Reference:
Download makeAxialMesh
for OpenFOAM 2.x
versions from here.
Compile:
./Allwmake
Make sure the axis is set in the boundary conditions.
Use fluentMeshToFoam
:
fluentMeshToFoam fluent.msh
Note: Don't use scale option! Use mm to prevent roundOff error.
Use makeAxialMesh
:
makeAxialMesh -axis AXIS -wedge frontAndBackPlanes -offset 1e-6 -overwrite
# Use flattenMesh to prevent checkMesh error
flattenMesh
Please note! The config -offset 1e-6
is used to fix this error report:
Changing patch types
Changing AXIS to symmetryPlane
Changing frontAndBackPlanes_pos to wedge
Changing frontAndBackPlanes_neg to wedge
--> FOAM FATAL ERROR:
Symmetry plane 'AXIS' is not planar.
At local face at (-0.04525201889605017 0 0) the normal (0 -1 0) differs from the average normal (0 -0.4972222222222222 0) by 0.2527854938271605
Either split the patch into planar parts or use the symmetry patch type
From function symmetryPlanePolyPatch::n()
in file meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C at line 64.
FOAM exiting
Create collapseDict
file in system
folder:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object collapseDict;
}
collapseEdgesCoeffs
{
minimumEdgeLength 1e-6;
maximumMergeAngle 179.5;
}
Run this command:
collapseEdges -overwrite
# Scale mesh from mm to m
transformPoints -scale "(1e-3 1e-3 1e-3)"
See Ref[2] for more information.
Check mesh and boundary patch names in constant/polyMesh/boundary
.
checkMesh