ReferenceGeometry#
- class ReferenceGeometry[source]#
Bases:
Flow360BaseModelReferenceGeometryclass contains all geometrical related reference values.Example
>>> ReferenceGeometry( ... moment_center=(1, 2, 1) * u.m, ... moment_length=(1, 1, 1) * u.m, ... area=1.5 * u.m**2 ... ) >>> ReferenceGeometry( ... moment_center=(1, 2, 1) * u.m, ... moment_length=1 * u.m, ... area=1.5 * u.m**2 ... ) # Equivalent to above
Attributes
- moment_center: LengthType.Vector, optional#
The x, y, z coordinate of moment center.
- Default:
None
- moment_length: LengthType.Positive | LengthType.PositiveVector, optional#
The x, y, z component-wise moment reference lengths.
- Default:
None
- area: Expression | AreaType.Positive, optional#
The reference area of the geometry.
- 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
- classmethod fill_defaults(ref, params)[source]#
Return a new ReferenceGeometry with defaults filled using SimulationParams.
Defaults when missing or when ref is None: - area: 1 * (base_length)**2 - moment_center: (0,0,0) * base_length - moment_length: (1,1,1) * base_length
- 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)