MeshingDefaults#

class MeshingDefaults[source]#

Bases: Flow360BaseModel

Default/global settings for meshing parameters.

Example

>>> fl.MeshingDefaults(
...     surface_max_edge_length=1*fl.u.m,
...     surface_edge_growth_rate=1.2,
...     curvature_resolution_angle=12*fl.u.deg,
...     boundary_layer_growth_rate=1.1,
...     boundary_layer_first_layer_thickness=1e-5*fl.u.m
... )

Attributes

geometry_accuracy: LengthType.Positive, optional#

The smallest length scale that will be resolved accurately by the surface meshing process. This parameter is only valid when using geometry AI.It can be overridden with class: ~flow360.GeometryRefinement.

Default:

None

surface_edge_growth_rate: float#

Growth rate of the anisotropic layers grown from the edges.This can not be overridden per edge.

Default:

1.2

boundary_layer_growth_rate: float#

Default growth rate for volume prism layers.

Default:

1.2

boundary_layer_first_layer_thickness: LengthType.Positive, optional#

Default first layer thickness for volumetric anisotropic layers. This can be overridden with BoundaryLayer.

Default:

None

number_of_boundary_layers: int, optional#

Default number of volumetric anisotropic layers. The volume mesher will automatically calculate the required no. of layers to grow the boundary layer elements to isotropic size if not specified. This is only supported by the beta mesher and can not be overridden per face.

Default:

None

planar_face_tolerance: float#

Tolerance used for detecting planar faces in the input surface mesh / geometry that need to be remeshed, such as symmetry planes. This tolerance is non-dimensional, and represents a distance relative to the largest dimension of the bounding box of the input surface mesh / geometry. This can not be overridden per face.

Default:

1e-06

sliding_interface_tolerance: float#

Tolerance used for detecting / creating curves in the input surface mesh / geometry lying on sliding interfaces. This tolerance is non-dimensional, and represents a distance relative to the smallest radius of all sliding interfaces specified in meshing parameters. This cannot be overridden per sliding interface.

Default:

0.01

surface_max_edge_length: LengthType.Positive, optional#

Default maximum edge length for surface cells. This can be overridden with SurfaceRefinement.

Default:

None

surface_max_aspect_ratio: float#

Maximum aspect ratio for surface cells for the GAI surface mesher. This cannot be overridden per face

Default:

10.0

surface_max_adaptation_iterations: int#

Maximum adaptation iterations for the GAI surface mesher.

Default:

50

curvature_resolution_angle: AngleType.Positive#

Default maximum angular deviation in degrees. This value will restrict: 1. The angle between a cell’s normal and its underlying surface normal. 2. The angle between a line segment’s normal and its underlying curve normal. This can be overridden per face only when using geometry AI.

Default:

12 * degree

resolve_face_boundaries: bool#

Flag to specify whether boundaries between adjacent faces should be resolved accurately during the surface meshing process using anisotropic mesh refinement. This option is only supported when using geometry AI, and can be overridden per face with SurfaceRefinement.

Default:

False

preserve_thin_geometry: bool#

Flag to specify whether thin geometry features with thickness roughly equal to geometry_accuracy should be resolved accurately during the surface meshing process. This option is only supported when using geometry AI, and can be overridden per face with GeometryRefinement.

Default:

False

sealing_size: LengthType.NonNegative#

Threshold size below which all geometry gaps are automatically closed. This option is only supported when using geometry AI, and can be overridden per face with GeometryRefinement.

Default:

0.0 * m

remove_hidden_geometry: bool#

Flag to remove hidden geometry that is not visible to flow. This option is only supported when using geometry AI.

Default:

False

min_passage_size: LengthType.Positive, optional#

Minimum passage size that hidden geometry removal can resolve. Internal regions connected by thin passages smaller than this size may not be detected. If not specified, the value is derived from geometry_accuracy and sealing_size. This option is only supported when using geometry AI.

Default:

None

edge_split_layers: int#

The number of layers that are considered for edge splitting in the boundary layer mesh.This only affects beta mesher.

Default:

1

Additional Constructors

classmethod from_file(filename)#

Loads a Flow360BaseModel from .json, or .yaml file.

Parameters:

filename (str) – Full path to the .yaml or .json file to load the Flow360BaseModel from.

Returns:

An instance of the component class calling load.

Return type:

Flow360BaseModel

Example

>>> params = Flow360BaseModel.from_file(filename='folder/sim.json') 

Methods

help(methods=False)#

Prints message describing the fields and methods of a Flow360BaseModel.

Parameters:

methods (bool = False) – Whether to also print out information about object’s methods.

Return type:

None

Example

>>> params.help(methods=True) 
to_file(filename, **kwargs)#

Exports Flow360BaseModel instance to .json or .yaml file

Parameters:

filename (str) – Full path to the .json or .yaml or file to save the Flow360BaseModel to.

Return type:

None

Example

>>> params.to_file(filename='folder/flow360.json')