The mesher.py
module#
Summary#
Create mesh from a good-quality manifold input model. |
|
Generate mesh from a non-manifold poor quality input model. |
Description#
Module containing methods for interaction with Fluent meshing.
Module detail#
- mesher.mesh_from_manifold_input_model(model: ansys.health.heart.pre.input._InputModel, workdir: str | pathlib.Path, path_to_output: str | pathlib.Path, mesh_size: float = 2.0, overwrite_existing_mesh: bool = True) ansys.health.heart.objects.Mesh #
Create mesh from a good-quality manifold input model.
- Parameters:
- Returns:
Mesh
VTK mesh with both cell and face zones.
- mesher.mesh_from_non_manifold_input_model(model: ansys.health.heart.pre.input._InputModel, workdir: str | pathlib.Path, path_to_output: str | pathlib.Path, global_mesh_size: float = 2.0, _global_wrap_size: float = 1.5, overwrite_existing_mesh: bool = True, mesh_size_per_part: dict = None, _wrap_size_per_part: dict = None) ansys.health.heart.objects.Mesh #
Generate mesh from a non-manifold poor quality input model.
- Parameters:
- model
_InputModel
Input model.
- workdir
Union
[str
,Path
] Working directory.
- path_to_output
Union
[str
,Path
] Path to the resulting Fluent mesh file.
- global_mesh_size
float
, default: 2.0 Uniform mesh size to use for all volumes and surfaces.
- _global_wrap_size
float
, default: 1.5 Global size used by the wrapper to reconstruct the geometry.
- overwrite_existing_meshbool, default:
True
Whether to overwrite an existing mesh.
- mesh_size_per_part
dict
, default:None
Dictionary specifying the mesh size that should be used for each part.
- _wrap_size_per_part
dict
, default:None
Dictionary specifying the wrap size that should be used to wrap each part.
- model
- Returns:
Mesh
VTK mesh with both cell and face zones.
Notes
This method uses Fluent wrapping technology to wrap the individual parts. First it creates manifold parts. Then, it consequently wraps the entire model and uses the manifold parts to split the wrapped model into the different cell zones.
When specifying a mesh size per part, you can do that by either specifying the size for all parts or for specific parts. The default mesh size is used for any part not listed in the dictionary. This also applies to the wrapping step. You can control the wrap size per part or on a global level. By default, a size of 1.5 mm is used, but this value is not guaranteed to give good results.
Note that a post-wrap remesh is triggered if the wrap size is not equal to the target mesh size. Remeshing might fail if the target mesh size deviates too much from the wrap size.