Rotation#
- class Rotation[source]#
Bases:
Flow360BaseModelRotationclass for specifying rotation settings.Example
Define a rotation model
outer_rotationfor thevolume_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_rotationfor thevolume_mesh["inner"]volume.inner_rotationis nested inouter_rotationby settingvolume_mesh["outer"]as theRotation.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. ... )
Attributes
- entities: EntityList[GenericVolume, Cylinder, CustomVolume, SeedpointVolume, AxisymmetricBody]#
The entity list for the Rotation model. The entity should be
CylinderorAxisymmetricBodyorGenericVolumetype.
- spec: AngleExpression | FromUserDefinedDynamics | AngularVelocity#
The angular velocity or rotation angle as a function of time.
- parent_volume: GenericVolume | Cylinder | CustomVolume | SeedpointVolume | AxisymmetricBody, optional#
The parent rotating entity in a nested rotation case.The entity should be
CylinderorAxisymmetricBodyorGenericVolumetype.- Default:
None
- rotating_reference_frame_model: bool, optional#
Flag to specify whether the non-inertial reference frame model is to be used for the rotation model. Steady state simulation requires this flag to be True for all rotation models.
- Default:
None
Additional Constructors
- classmethod from_file(filename)#
Loads a
Flow360BaseModelfrom .json, or .yaml file.- Parameters:
filename (str) – Full path to the .yaml or .json file to load the
Flow360BaseModelfrom.- 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)