flow360.Rotation#

class Rotation[source]#

Bases: Flow360BaseModel

Rotation class for specifying rotation settings.

Example

Define a rotation model outer_rotation for the volume_mesh["outer"] volume. The rotation center and axis are defined via the rotation entity’s property:

>>> outer_rotation_volume = volume_mesh["outer"]
>>> outer_rotation_volume.center = (-1, 0, 0) * fl.u.m
>>> outer_rotation_volume.axis = (0, 1, 0)
>>> outer_rotation = fl.Rotation(
...     name="outerRotation",
...     volumes=[outer_rotation_volume],
...     spec= fl.AngleExpression("sin(t)"),
... )

Define another rotation model inner_rotation for the volume_mesh["inner"] volume. inner_rotation is nested in outer_rotation by setting volume_mesh["outer"] as the Rotation.parent_volume:

>>> inner_rotation_volume = volume_mesh["inner"]
>>> inner_rotation_volume.center = (0, 0, 0) * fl.u.m
>>> inner_rotation_volume.axis = (0, 1, 0)
>>> inner_rotation = fl.Rotation(
...     name="innerRotation",
...     volumes=inner_rotation_volume,
...     spec= fl.AngleExpression("-2*sin(t)"),
...     parent_volume=outer_rotation_volume  # inner rotation is nested in the outer rotation.
... )

name: str | None = None#

Name of the Rotation model.

type: Literal['Rotation'] = 'Rotation'#
entities: EntityList[GenericVolume, Cylinder] [Required] (alias 'volumes')#

The entity list for the Rotation model. The entity should be Cylinder or GenericVolume type.

spec: AngleExpression | FromUserDefinedDynamics | AngularVelocity [Required]#

The angular velocity or rotation angle as a function of time.

parent_volume: GenericVolume | Cylinder | None = None#

The parent rotating entity in a nested rotation case.The entity should be Cylinder or GenericVolume type.