MeshingParams#

class MeshingParams[source]#

Bases: Flow360BaseModel

Meshing parameters for volume and/or surface mesher. This contains all the meshing related settings.

Example

>>> fl.MeshingParams(
...     refinement_factor=1.0,
...     gap_treatment_strength=0.5,
...     defaults=fl.MeshingDefaults(
...         surface_max_edge_length=1*fl.u.m,
...         boundary_layer_first_layer_thickness=1e-5*fl.u.m
...     ),
...     volume_zones=[farfield],
...     refinements=[
...         fl.SurfaceEdgeRefinement(
...             edges=[geometry["edge1"], geometry["edge2"]],
...             method=fl.AngleBasedRefinement(value=8*fl.u.deg)
...         ),
...         fl.SurfaceRefinement(
...             faces=[geometry["face1"], geometry["face2"]],
...             max_edge_length=0.001*fl.u.m
...         ),
...         fl.UniformRefinement(
...             entities=[cylinder, box],
...             spacing=1*fl.u.cm
...         )
...     ]
... )

Attributes

refinement_factor: float, optional#

All spacings in refinement regionsand first layer thickness will be adjusted to generate r-times finer mesh where r is the refinement_factor value.

Default:

1

gap_treatment_strength: float, optional#

Narrow gap treatment strength used when two surfaces are in close proximity. Use a value between 0 and 1, where 0 is no treatment and 1 is the most conservative treatment. This parameter has a global impact where the anisotropic transition into the isotropic mesh. However the impact on regions without close proximity is negligible. The beta mesher uses a conservative default value of 1.0.

Default:

None

defaults: MeshingDefaults#

Default settings for meshing. In other words the settings specified here will be applied as a default setting for all Surface (s) and Edge (s).

Default:

MeshingDefaults()

refinements: list[Annotated[flow360_schema.models.simulation.meshing_param.edge_params.SurfaceEdgeRefinement | flow360_schema.models.simulation.meshing_param.face_params.SurfaceRefinement | flow360_schema.models.simulation.meshing_param.face_params.GeometryRefinement | flow360_schema.models.simulation.meshing_param.face_params.BoundaryLayer | flow360_schema.models.simulation.meshing_param.face_params.PassiveSpacing | flow360_schema.models.simulation.meshing_param.volume_params.UniformRefinement | flow360_schema.models.simulation.meshing_param.volume_params.StructuredBoxRefinement | flow360_schema.models.simulation.meshing_param.volume_params.AxisymmetricRefinement, FieldInfo(annotation=NoneType, required=True, discriminator='refinement_type')]]#

Additional fine-tunning for refinements on top of defaults

Default:

[]

volume_zones: list[Annotated[flow360_schema.models.simulation.meshing_param.volume_params.RotationVolume | flow360_schema.models.simulation.meshing_param.volume_params.RotationCylinder | flow360_schema.models.simulation.meshing_param.volume_params.RotationSphere | flow360_schema.models.simulation.meshing_param.volume_params.AutomatedFarfield | flow360_schema.models.simulation.meshing_param.volume_params.UserDefinedFarfield | flow360_schema.models.simulation.meshing_param.volume_params.CustomZones | flow360_schema.models.simulation.meshing_param.volume_params.WindTunnelFarfield, FieldInfo(annotation=NoneType, required=True, discriminator='type')]] | None#

Creation of new volume zones.

Default:

None

outputs: list[flow360_schema.models.simulation.meshing_param.volume_params.MeshSliceOutput]#

Mesh output settings.

Default:

[]

Properties

farfield_method#

Returns the farfield method used.

Additional Constructors

classmethod from_file(filename)#

Load a Flow360BaseModel from a .json file.

Parameters:

filename (str)

Return type:

Flow360BaseModel

Methods

help(methods=False)#

Print fields and methods of a Flow360BaseModel using rich.

Parameters:

methods (bool)

Return type:

None

to_file(filename, **kwargs)#

Export Flow360BaseModel instance to a .json file.

Parameters:
Return type:

None