Cfmesh - Short Introduction
Cfmesh - Short Introduction
This document contains pieces of advice for using the automatic mesh generation tool cfMesh.
Answers to frequently asked questions are given and the settings explained using the example
(tutorial) provided by the Faculty of Mechanical Engineering and Naval Architecture, University of
Zagreb. It is recommended to read and study the cfMesh User Guide for any additional information.
What is cfMesh?
cfMesh is an automatic mesh generation tool compatible with all recent versions of
OpenFOAM and foam-extend. It supports various 3D and 2D workflows, built by using
components from the main library. These components can be combined to achieve various
meshing workflows.
in the boundary of the resulting volume mesh end up in a single patch. In addition, the
geometry can be imported in all formats supported by the surfaceConvert utility, which
comes with OpenFOAM. cfMesh also provides additional utilities for conversion of surface
mesh into fms and from fms to other formats (list of useful utilities is below). The preferred
format for cfMesh is fms, designed to hold all relevant information for setting up a meshing
job. It stores patches, subsets, and feature edges in a single file. In addition, it is the only
format, which can store all geometric entities into a single file, and the users are strongly
encouraged to use it.
surfaceFile - points to a geometry file. The path to the geometry file is relative to the path of
the case directory.
maxCellSize - represents the default cell size used for the meshing job. It is the maximum cell size
generated in the domain.
What are the refinement settings defined in meshDict dictionary?
boundaryCellSize - used for refinement of cells at the boundary. It is a global option and the
requested cell size is applied everywhere at the boundary.
boundaryCellSizeRefinementThickness - specifies the distance from the boundary at which the
boundaryCellSize is still applied.
minCellSize - global option which activates automatic refinement of the mesh template. This option
performs refinement in regions where the cells are larger than the estimated feature size. The scalar
value provided with this setting, specifies the smallest cell size allowed by this procedure.
localRefinement - allows for local refinement regions at the boundary. It is a dictionary of
dictionaries and each dictionary inside the main localRefinement dictionary is named by a patch or
facet subset in the geometry that is used for refinement:
cellSize - for controlling requested cell size.
additionalRefinementLevels - defines the desired number of refinements relative to
the maximum cell size.
refinementThickness - specifies the thickness of the refinement zone.
objectRefinement - for specifying refinement zones inside the volume. The supported objects
that can be used for refinement are: lines, spheres, boxes, and truncated cones.
Each dictionary inside the objectRefinement dictionary represents the name of the
object used for refinement.
refinementThickness - used to specify the thickness of the refinement zone away
from the object.
surfaceMeshRefinement - for using surface meshes as refinement zones in the mesh.
FLMAToSurface
FMSToSurface
FMSToVTK
FPMAToMesh
importSurfaceAsSubset
improveSymmetryPlanes
mergeSurfacePatches
meshToFPMAposition
patchesToSubsets
preparePar
removeSurfaceFacets
subsetToPatch
surfaceFeatureEdges
surfaceGenerateBoundingBox
surfaceToFMS
Description
It copies surface facets in a specified facet subset into a new
surface mesh.
This utility extrudes edges written as feature edges in the
geometry into a ribbon of triangles required for 2D mesh
generation. Generated triangles are stored in a single patch.
It converts geometry from AVL's flma format into the format
readable by cfMesh. Cell selections defined in the input file are
transferred as facet subsets.
The utility converts the data in a fms file into several files which
can be imported into ParaView.
Converts fms file into ParaViews vtm file, containing all data
available in an fms file.
Is a utility for importing volume meshes from AVL's fpma format.
Selections defined on the input mesh are transferred as subsets.
The utility matches the triangles of the surface mesh used for
meshing with the other other surface, and create a facet subset in
the original surface.
OpenFOAM is very sensitive to the position of points in the
symmetry plane. This utility calculates the regression plane for all
vertices belonging to a symmetry plane, and ensures that all
vertices lie in a plane.
The utility allow the user to specify the patches in the surface
mesh which shall be merged together.
This utility converts the mesh into the AVL's fpma format.
It converts patches in the geometry into facet subsets.
It creates processor directories required for MPI parallelisation.
The number of processor directories is dependent on the
numberOfSubdmains specified indecomposeParDict.
It is a utility for removing facets from the surface mesh. The
facets that shall be removed are given by a patch name or a facet
subset.
It creates a patch in the surface mesh consisting of facets in the
given facet subset.
It is used for generating feature edges in the geometry. In case the
output is a fms file, generated edges are stored as feature edges.
Otherwise it generates patches bounded by the selected feature
edges.
It generates a box around the geometry. It does not resolve selfintersections in case the box intersects with the rest of the
geometry.
A converter from common surface triangulation formats into fms.
Ship tutorial
meshDict overview:
{
newPatchNames
{
hull
{
newName hull;
type wall;
}
inlet
{
newName inlet;
type patch;
}
outlet
{
newName outlet;
type patch;
}
top
{
newName top;
type patch;
}
bottom
{
newName bottom;
type patch;
}
farfield
{
newName farfield;
type patch;
}
symmetry
{
newName symmetry;
type symmetry;
}
}
}