Sig Numerical Optimization / Tips & Tricks

From OpenFOAMWiki
< Sig Numerical Optimization
Revision as of 08:54, 11 October 2014 by Crixman (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

1 Geometry generation with cfMesh

1.1 cartesian2DMesh

Cartesian2DMesh proves to be a very good mesh generator to be included in the optimization routine, because of its easy to understand input file and fast speed in generating the required mesh. In addition, it is able to generate boundary layers with ease, compared to other open-source mesh generators.

While working with this tool, the following guidelines have to be followed in order to avoid mistakes and unproper meshing:

  • in 2D, the geometry should be drawn in the x-y plane (the default plane in the 2D draw of Salome). A geometry placed in the x-z or y-z plane will cause errors.
  • the geometry should only be made of external patches. These patches can be easily selected and named using Salome (New entity -> Group -> Create group -> Surfaces (3rd bottom on the top-right). Front and back patches should not be included, as cartesian2DMesh will generate these patches itself (naming it topEmptyFaces and bottomEmptyFaces).
  • For boundary layer generation, it is recommended to save each closed surface as a single patch. For example, in the savonius turbine example, it is better to save each blade with a different name.
  • Input files .fms or .ftr are also recommended in cartesian2DMesh. It is possible to convert an .stl to .ftr using the command

surfaceConvert geometry.stl geometry.ftr


1.2 cartesianMesh

1.3 tetMesh