The cyclic boundary condition, also know as a periodic boundary condition, treats 2 boundary regions as if they are physically connected. They are used for repeated geometries , e.g. heat exchanger tube bundles. In versions of OpenFOAM before v2.0.0, a cyclic patch contained the faces for both regions of the boundary, i.e. cyclic behaviour was described with a single patch. In v2.0.0, however, the boundary regions are split into 2 separate patches that are linked to one another in the respective mesh file, e.g. boundary, blockMeshDict, through the keyword neighbourPatch. Each pair of connecting faces must have areas to within a tolerance given by the matchTolerance keyword. Faces do not need to be of the same orientation.
The syntax describing a cyclic condition in the boundary file of a mesh, prior to v2.0.0 may be as follows.
A foamUpgradeCyclics utility is available to convert a mesh with one of more cyclic boundary conditions of the old form, into the form for v2.0.0.
- foamUpgradeCyclics utility - $FOAM_UTILITIES/preProcessing/foamUpgradeCyclics
- Further information
- User Guide: Boundaries
- Box of turbulence - $FOAM_TUTORIALS/DNS/dnsFoam/boxTurb16
As reported previously, the latest version of snappyHexMesh includes feature edge handling. Complex geometries may contain sudden changes in surface normal direction, e.g. between sides of a box, or across a crease in a surface. Such a feature can be resolved reasonably well by refining cells locally around it. However the feature can be better resolved by aligning edges in the mesh with it. The sudden change in surface normal direction can then be directly represented by an equivalent change in surface normal direction of mesh faces across feature.
The image below shows feature edge handling in action. On this flange geometry, a mesh has been generated with barely enough cells to resolve the geometry. Nevertheless, with the feature edge handling, mesh edges are aligned with surface features so that the geometry is well represented by the coarse mesh.
Additional changes to snappyHexMesh include the following:
- boundary faces and edges are merged at end of snapping phase, rather than at the beginning of the layer addition phase;
- extrusion across multi-processor boundaries;
- optional specification of type of patch for given surface geometry;
- can handle cyclic patches in initial mesh (serial meshing only);
- preserves faceZones shape during layer insertion;
- mesh smoothing between surface smoothing and snapping is reinstated in v2.0.0.
- Flange case: $FOAM_TUTORIALS/mesh/snappyHexMesh/flange
The syntax for blockMesh has been modified to be more compatible with the general syntax for OpenFOAM input files. More specifically, the patches sub-dictionary has now been replaced by a boundary sub-dictionary, the different keyword enabling easy backward-compatibility. The syntax of the boundary sub-dictionary is now consistent with the boundary file itself, e.g. it uses the same syntax as the the cyclic boundary condition described above. So, for example, a cyclic patch described in the syntax prior to v2.0.0 may be as follows.
(0 3 2 1)
(4 5 6 7)
(0 3 2 1)
- Further information
- User Guide: blockMesh
- An interesting example is:
Otherwise, see all blockMeshDict files in $FOAM_TUTORIALS/
- Source code
- blockMesh library - $FOAM_SRC/mesh/blockMesh
For simulations that use pointField, e.g. those that include mesh motion, recent changes improve parallel running and volPointInterpolation. The main change is that a pointField now operates effectively in parallel because points located on multiple processors are handled locally, with respect to the processors using the point, instead of handling all these points on the master processor (using globalPointPatch in earlier versions). Consequently, cases can now be decomposed, reconstructed and restarted without any limitation, and parallel simulations are faster.
In addition, a new cyclicSlip boundary condition has been introduced, particularly for mesh motion, that applies slip behaviour for point motion but which also keeps points on the cyclic in sync with those on its neighbour cyclic patch.
A new binary file format has been developed for reading and writing meshes. The change in format relates to optimising the reading and writing of lists of small lists, e.g. lists of faces and cells in a mesh, for which a special IO container class has been developed, named CompactIOList. The new class is similar to the IOList class but it is considerably faster when reading/writing binary format. Our tests showed an increase in speed of up to a factor of 5, giving up to a factor of 2 speed-up when reading in large meshes.
Meshes generated in binary in version 2.0.0 are not compatible with previous versions of OpenFOAM. However, meshes generated in binary in previous versions of OpenFOAM are compatible with version 2.0.0 of OpenFOAM.
- Source code
- CompactIOList class - $FOAM_SRC/OpenFOAM/db/IOobjects/CompactIOList