UniformRefinement#

class UniformRefinement[source]#

Bases: Flow360BaseModel

Uniform spacing refinement inside specified region of mesh. For AxisymmetricBody entities, specify per-segment spacing overrides via face_spacing.

Example

>>> fl.UniformRefinement(
...     entities=[cylinder, box, axisymmetric_body, sphere],
...     spacing=1*fl.u.cm,
...     face_spacing={
...         axisymmetric_body.segment(2): 0.2*fl.u.cm,
...     }
... )

Attributes

name: str, optional#
Default:

'Uniform refinement'

entities: EntityList[Box, Cylinder, AxisymmetricBody, Sphere]#

UniformRefinement can be applied to Box, Cylinder, AxisymmetricBody, and Sphere regions.

spacing: Length.PositiveFloat64#

The required refinement spacing.

project_to_surface: bool, optional#

Whether to include the refinement in the surface mesh. Defaults to True when using snappy.

Default:

None

face_spacing: dict[AxisymmetricSegment, Length.PositiveFloat64], optional#

Per-segment spacing overrides for AxisymmetricBody entities. Use body.segment(i) as keys, where segment i is defined between profile_curve[i] and profile_curve[i+1]. Segments without overrides use the default spacing.

Default:

None

Methods

classmethod check_entities_used_with_beta_mesher(values)[source]#

Check that AxisymmetricBody and Sphere are used with beta mesher.

classmethod check_entities_used_with_snappy(values)[source]#

Check that only Box, Cylinder, and Sphere entities are used with snappyHexMesh.

check_project_to_surface_with_snappy()[source]#

Check that project_to_surface is used only with snappy.

check_face_spacing()[source]#

Validate face_spacing keys reference registered AxisymmetricBody entities.