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: Any#

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: Optional[typing.Annotated[dict[flow360_schema.models.entities.volume_entities.AxisymmetricSegment, typing.Annotated[typing.Any, BeforeValidator(func=<function _create_validator.<locals>.validate at 0x7bbe21b68b80>, json_schema_input_type=PydanticUndefined), PlainSerializer(func=<function _create_serializer.<locals>.serialize at 0x7bbe21b68c10>, return_type=PydanticUndefined, when_used='always'), WithJsonSchema(json_schema={'type': 'object', 'properties': {'value': {'$ref': 'https://flexcompute.com/schemas/1.0.0/PositiveFloat64.json'}, 'units': {'type': 'string'}}, 'required': ['value', 'units'], 'additionalProperties': False}, mode=None)]], BeforeValidator(func=<function _deserialize_segment_spacing at 0x7bbe21646cb0>, json_schema_input_type=PydanticUndefined), PlainSerializer(func=<function _serialize_segment_spacing at 0x7bbe216468c0>, return_type=PydanticUndefined, when_used='always')]]#

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

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