foamgen.morphology¶
Morphology module¶
- synopsis
Create foam morphology in CAD format.
Functions
|
Create walls by shrinking each cell. |
Delete unnecessary files. |
|
|
Add walls to a tessellated foam. |
|
Move foam to periodic box. |
-
foamgen.morphology.
add_walls
(iname, oname, wall_thickness)[source]¶ Create walls by shrinking each cell.
Uses files in gmsh CAD format.
- Parameters
iname (str) – input filename
oname (str) – output filename
wall_thickness (float) – wall thickness parameter
- Returns
number of cells
- Return type
int
-
foamgen.morphology.
make_walls
(fname, wall_thickness, clean, verbose)[source]¶ Add walls to a tessellated foam.
It is assumed that input file uses gmsh built-in kernel. Final geometry is created in the OpenCASCADE kernel.
FileTessellation.geo -> FileWalls.geo -> FileWallsBox.geo -> FileMorphology.geo
- Parameters
fname (str) – base filename
wall_thickness (float) – wall thickness parameter
clean (bool) – delete redundant files if True
verbose (bool) – print additional info to stdout if True
-
foamgen.morphology.
to_box
(iname, oname, ncells, verbose)[source]¶ Move foam to periodic box.
Remove point duplicity, restore OpenCASCADE compatibility, define periodic and physical surfaces.
- Parameters
iname (str) – input filename
oname (str) – output filename
ncells (int) – number of cells
verbose (bool) – print additional info to stdout if True