如何在每个时间步,获取流场特定区域的速度等相关物理量的变化并输出
-
如图所示的方腔绕流,我想要用OpenFoam获取红色框区域的速度、压力、湍动能k和湍流耗散率e随时间的变化,并把方框内的node坐标以及相关物理量生成文件,请问OpenFoam有通过探针类似的面提取功能来满足需求的工具吗? -
paraview紧挨着窗口上一大排工具就是用来选择的,如果比较费劲,可以用条件选择:edit -> find data
选择好之后,ctrl + 空格键,搜索数据筛:extract selection
就分离出来了
-
可以用surface sampling 功能来实现,示例:
MeshedSurface { type surfaces; libs ("libsampling.so"); writeControl onEnd; writeInterval 1; executeControl timeStep; executeInterval 1; fields ( p U ); interpolationScheme cellPoint; sampleScheme cell; surfaceFormat ensight; formatOptions { ensight { format binary; collateTimes true; } } surfaces ( MeshedSurface_0 { type meshedSurface; surface surface.obj; source cells; interpolate true; } ); }
surface.obj 这个文件是一个面网格,网格尺寸建议跟你的 cfd 网格尺寸相当。
不同 OpenFOAM 版本可能具体写法略有不同,供参考。 -
@xpqiu 谢谢教授
-
@bestucan 谢谢教授的解答