OctreeSpacing#

class OctreeSpacing[source]#

Bases: Flow360BaseModel

Helper class for octree-based meshers. Holds the base for the octree spacing and lows calculation of levels.

Attributes

base_spacing: Any#

Additional Constructors

classmethod from_file(filename)#

Load a Flow360BaseModel from a .json file.

Parameters:

filename (str)

Return type:

Flow360BaseModel

Methods

to_level(spacing)[source]#

Can be used to check in what refinement level would the given spacing result and if it is a direct match in the spacing series.

Parameters:

spacing (Annotated[Any, BeforeValidator(func=~flow360_schema.framework.physical_dimensions.composers._create_validator.<locals>.validate, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~flow360_schema.framework.physical_dimensions.composers._create_serializer.<locals>.serialize, 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)])

check_spacing(spacing, location)[source]#

Warn if the given spacing does not align with the octree series.

Parameters:
  • spacing (Annotated[Any, BeforeValidator(func=~flow360_schema.framework.physical_dimensions.composers._create_validator.<locals>.validate, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~flow360_schema.framework.physical_dimensions.composers._create_serializer.<locals>.serialize, 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)])

  • location (str)

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