请问.msh的2维旋转轴对称网格如何转换到OpenFOAM
-
大家好,我通过fluentMeshToFoam xxx.msh转换二维旋转轴对称网格,但是不能转换成OpenFOAM的用于二维旋转轴对称的楔形网格,而是转换成了一个轴对称的平面网格,原来定义的axis变成了symmetry,前后的面变成了empty,并不是我所想象的前后的面变成了wedge。期待各位的回复,谢谢
-
-
@dzw05 谢谢你的回复与帮助
-
@东岳 李老师,就如楼上dzwo5所说,转换后变成了平面网格,,而我想要的是能用于OpenFOAM二维轴对称的楔形网格
-
@东岳 老师,blockMeshDict真的太复杂了,效率低,简单一点的模型还好,稍微复杂一点的模型,靠一行一行的代码围成一个一个的block,会把人搞得晕头转向。
-
@东岳 @dzw05 两位老师好,上面的问题我已经解决了,确实是版本问题,我最后找到了新版的makeAxialMesh,就能够编译成功了,但是我遇到一个新的问题。就是在使用了makeAxialMesh之后,我在命令行键入collapseEdges,会出现大量的warning,如下所示:
--> FOAM Warning : From function virtual void Foam::wedgePolyPatch::calcGeometry(Foam::PstreamBuffers&) in file meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C at line 70 Wedge patch 'frontAndBack_neg' is not planar. At local face at (0.0975 0.1975 0.00489095) the normal (0 0.0435786 -0.99905) differs from the average normal (-4.60529e-27 0.043578 -0.99905) by 3.70688e-13 Either correct the patch or split it into planar parts Reading createPatchDict
然后我checkMesh,同样会出现上述的大量warning,但是最后check的结果是Mesh OK。请两位老师帮我解答一下,谢谢
-
@D-Benjamin 这个其实不是什么大问题,把平面网格转换为楔形网格的过程,其实是网格点坐标转换的过程。只要把controlDict文件中的writePrecision(精度)增大到10或者12,将坐标转换得更精确,应该就不会有问题了。
-
@D-Benjamin 您好,我想问下您最新版的makeaxialMesh模块是在哪里找的呢?可以告诉我一下吗,我找到的都是2.0版本的。万分感谢
-
@浪迹天大 您好,我按照您提供的方法进行网格转化的时候出现了这种情况
frontAndBack { type empty; inGroups 1(empty); nFaces 0; startFace 949841; } frontAndBack_pos { type wedge; inGroups 1(wedge); nFaces 474627; startFace 949841; } frontAndBack_neg { type wedge; inGroups 1(wedge); nFaces 474627; startFace 1424468; };
frontAndBack没被融合掉;我没有写blockdictionary,直接用fluent.msh转化的。、
-
@shampoo @LYD @D-Benjamin 我在OF5上下载了Benjamin的OF7版本的makeAxialMesh,编译通过也没报错,网格生成时有warnning,但是不是链接中指出的Either correct the patch or split it into planar parts,该warnning会在计算的时候出现,请指出的错误
makeAxialMesh -overwrite时Create time --> FOAM Warning : From function void *Foam::dlOpen(const Foam::fileName &, bool) in file POSIX.C at line 1210 dlopen error : /home2/snst/gzh1/OpenFOAM/gzh1-5.0/platforms/linux64IccDPInt32Opt/lib/libtabularThermophysicalModels.so: undefined symbol: _ZTIN4Foam29mixedEnergyFvPatchScalarFieldE --> FOAM Warning : From function bool Foam::dlLibraryTable::open(const Foam::fileName &, bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 105 could not load "libtabularThermophysicalModels.so" Create mesh for time = 0 Plane of the grid: (0 0 1) (0.5 0.000169685 5.95636e-21) The rotation-axis: ((0 0 0) (1 0 0)) Creating wedge with an opening angle of 5 degrees Projecting nodes Radius to axis: min = 0 max = 0.00035 Calculated Distance of center to axis is 0.000350333 Distance of axis to patch is 0.000350333 -> not changing the patch type Splitting patch frontAndBack Copying patches Creating Patches Creating Pos-patch Creating Neg-patch Changing patches Changing patch types Changing frontAndBack_pos to wedge Changing frontAndBack_neg to wedge Writing mesh to time 0 End Now use collapseEdges to clean grid
--> FOAM Warning : From function void *Foam::dlOpen(const Foam::fileName &, bool) in file POSIX.C at line 1210 dlopen error : /home2/snst/gzh1/OpenFOAM/gzh1-5.0/platforms/linux64IccDPInt32Opt/lib/libtabularThermophysicalModels.so: undefined symbol: _ZTIN4Foam29mixedEnergyFvPatchScalarFieldE --> FOAM Warning : From function bool Foam::dlLibraryTable::open(const Foam::fileName &, bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 105 could not load "libtabularThermophysicalModels.so" Create mesh for time = 0 Reading collapseDict Time = 0 Read faceSet indirectPatchFaces with 0 faces Merging: edges with length less than 1e-06 metres edges split by a point with edges in line to within 179 degrees Minimum edge length reduction factor = -1 Face collapsing is on Initial face length factor = -1 Control mesh quality = false Selectively disabling wanted collapses until resulting quality satisfies constraints in system/meshQualityDict Outer Iteration = 0 "Edge Filter Factor": min = 1e-06 av = 1e-06 max = 1e-06 484693 / 484693 elements used Inner iteration = 0 Collapsing 4503 small edges Collapsing 0 in line edges Uncollapsed edges = 4502 / 484693 Uncollapsed edges = 0 / 484693 Collapsing 1 edges after synchronisation and PointEdgeWave Number of points : 195130 Not visited : 0 Not collapsed : 195128 Collapsed : 2 Collapsing 0 cells Apply changes to the current mesh Inner iteration = 1 Collapsing 4502 small edges Collapsing 0 in line edges Uncollapsed edges = 4502 / 484692 Uncollapsed edges = 0 / 484692 Collapsing 0 edges after synchronisation and PointEdgeWave Writing collapsed mesh to time 0 ExecutionTime = 1.68 s ClockTime = 1 s
运行时
--> FOAM Warning : From function void Foam::wedgePolyPatch::calcGeometry(Foam::PstreamBuffers &) in file meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C at line 70 Wedge patch 'frontAndBack_pos' is not planar. At local face at (0.999667 0.000347009 1.51363e-05) the normal (-7.75524e-19 -0.043578 0.99905) differs from the average normal (1.35466e-08 -0.0435779 0.99905) b y 6.36941e-15 Either correct the patch or split it into planar parts SIMPLE: convergence criteria field p_rgh tolerance 1e-05 field U tolerance 1e-06 field h tolerance 1e-09 field "(k|epsilon|omega)" tolerance 1e-07 Reading thermophysical properties Selecting thermodynamics package { type hTabularThermo;
-
@dzw05 @浪迹天大 两位老师好,上一个问题已经解决,我觉得应该是网格质量问题导致,目前已经checkMesh通过了,但还有个问题,想请老师们指导。我首先用blockMesh画了一个前后面empty的2D网格,下底面刚好在x轴上,然后绕x轴旋转成一个圆柱,所以将旋转轴设置为了(1 0 0),将上边界设置为了center,最后生成的几何原先empty的frontAndBack变成了frontAndBack_pos和frontAndBack_neg, bottom面由于变成了对称轴所以face就为0(即一条线),top面就变成了圆柱体的外表面,但是因为将其边界类型设为了symmetryPlane,所以如果想实现等热流或者等温,边界条件该如何给定?在哪改?