RotationVolume#

class RotationVolume[source]#

Bases: _RotationVolumeBase

Creates a rotation volume mesh using cylindrical or axisymmetric body entities.

  • The mesh on RotationVolume is guaranteed to be concentric.

  • The RotationVolume is designed to enclose other objects, but it can’t intersect with other objects.

  • Users can create a donut-shaped RotationVolume and put their stationary centerbody in the middle.

  • This type of volume zone can be used to generate volume zones compatible with Rotation model.

  • Supports Cylinder and AxisymmetricBody entities for defining the rotation volume geometry.

Note

For spherical sliding interfaces, use RotationSphere.

Note

The deprecated RotationCylinder class is maintained for backward compatibility but only accepts Cylinder entities. New code should use RotationVolume.

Example

Using a Cylinder entity:

>>> fl.RotationVolume(
...     name="RotationCylinder",
...     spacing_axial=0.5*fl.u.m,
...     spacing_circumferential=0.3*fl.u.m,
...     spacing_radial=1.5*fl.u.m,
...     entities=cylinder
... )

Using an AxisymmetricBody entity:

>>> fl.RotationVolume(
...     name="RotationConeFrustum",
...     spacing_axial=0.5*fl.u.m,
...     spacing_circumferential=0.3*fl.u.m,
...     spacing_radial=1.5*fl.u.m,
...     entities=axisymmetric_body
... )

With enclosed entities:

>>> fl.RotationVolume(
...     name="RotationVolume",
...     spacing_axial=0.5*fl.u.m,
...     spacing_circumferential=0.3*fl.u.m,
...     spacing_radial=1.5*fl.u.m,
...     entities=outer_cylinder,
...     enclosed_entities=[inner_cylinder, surface]
... )

Attributes

name: str, optional#

Name to display in the GUI.

Default:

'Rotation Volume'

enclosed_entities: EntityList[Cylinder, Surface, MirroredSurface, AxisymmetricBody, Box, Sphere], optional#

Entities enclosed by RotationVolume. Can be Surface and/or other Sphere

Default:

None

stationary_enclosed_entities: EntityList[Surface, MirroredSurface], optional#

Surface entities included in enclosed_entities which should remain stationary (excluded from rotation).

Default:

None

entities: EntityList[Cylinder, AxisymmetricBody]#
spacing_axial: LengthType.Positive#

Spacing along the axial direction.

spacing_radial: LengthType.Positive#

Spacing along the radial direction.

spacing_circumferential: LengthType.Positive#

Spacing along the circumferential direction.

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')