butterfly.snappyHexMeshDict module¶
snappyHexMeshDict class.
-
class
butterfly.snappyHexMeshDict.
SnappyHexMeshDict
(values=None)[source]¶ Bases:
butterfly.foamfile.FoamFile
Control dict class.
-
addLayers
¶ Set if addLayers should be ran.
-
add_stl_geometry
(file_name)[source]¶ Add stl geometry to snappyHexMeshDict.
Parameters: file_name – Stl file name. This file should be located under /constant/triSurface.
-
castellatedMesh
¶ Set if castellatedMesh should be ran.
-
extractFeaturesRefineLevel
¶ A refinment value for extract feature level.
-
features
¶ Set features for castellatedMeshControls.
-
classmethod
from_bf_geometries
(project_name, geometries, meshing_parameters=None, convertToMeters=1, values=None)[source]¶ Create snappyHexMeshDict from HBGeometries.
-
classmethod
from_file
(filepath)[source]¶ Create a FoamFile from a file.
Parameters: filepath – Full file path to dictionary.
-
geometries
¶ Butterfly geometries.
-
globRefineLevel
¶ A tuple of (min, max) values for global refinment.
-
is_featureEdgeRefinement_implicit
¶ Return True if implicit feature refinment is used.
-
locationInMesh
¶ A tuple for the location of the volume the should be meshed.
x, y, z values will be multiplied to self.convertToMeters. If the units are not Meters you can set the convertToMeters using self.convertToMeters
-
maxGlobalCells
¶ 2000000).
Type: Number of max global cells for castellatedMeshControls (default
-
nCellsBetweenLevels
¶ 3).
Type: Number of cells between levels for castellatedMeshControls (default
-
project_name
¶ Project name.
-
refinementRegion_mode
(refinementRegion_name)[source]¶ Refinement region mode for a refinement region.
-
refinementRegion_names
¶ List of stl files if any.
-
refinementRegions
¶ Refinement regions.
-
set_featureEdgeRefinement_to_explicit
(file_name, refinement_level=2)[source]¶ Set meshing snap to explicitFeatureSnap.
Parameters: - file_name – eMesh file name.
- refinement_level – extractFeaturesRefineLevel (default: 2)
-
snap
¶ Set if snap should be ran.
-
stl_file_names
¶ List of names for stl files if any.
This method doesn’t return stl files for refinementRegions. You can use self.refinementRegion_names to get the names for refinment regions.
-