flow360.SimulationParams#
- class SimulationParams[source]#
Bases:
_ParamModelBase
All-in-one class for surface meshing + volume meshing + case configurations
- meshing: MeshingParams | None = None#
Surface and volume meshing parameters. See
MeshingParams
for more details.
- reference_geometry: ReferenceGeometry | None = None#
Global geometric reference values. See
ReferenceGeometry
for more details.
- operating_condition: OperatingConditionTypes | None = None#
Global operating condition. See Operating Condition for more details.
- models: List[ModelTypes] | None = None#
Solver settings and numerical models and boundary condition settings. See Volume Models and Surface Models for more details.
- time_stepping: Steady | Unsteady = Steady(type_name='Steady', max_steps=2000, CFL=AdaptiveCFL(type='adaptive', min=0.1, max=10000.0, max_relative_change=1.0, convergence_limiting_factor=0.25))#
Time stepping settings. See Time Stepping for more details.
- user_defined_dynamics: List[UserDefinedDynamic] | None = None#
User defined dynamics. See User Defined Dynamics for more details.
- user_defined_fields: List[UserDefinedField] = []#
User defined fields that can be used in outputs.
- convert_unit(value, target_system, length_unit=None)[source]#
Converts a given value to the specified unit system.
This method takes a dimensioned quantity and converts it from its current unit system to the target unit system, optionally considering a specific length unit for the conversion.
- Parameters:
value (DimensionedTypes) β The dimensioned quantity to convert. This should have units compatible with Flow360βs unit system.
target_system (str) β The target unit system for conversion. Common values include βSIβ, βImperialβ, flow360β.
length_unit (LengthType, optional) β The length unit to use for conversion. If not provided, the method defaults to the project length unit stored in the private_attribute_asset_cache.
- Returns:
The converted value in the specified target unit system.
- Return type:
DimensionedTypes
- Raises:
Flow360RuntimeError β If the input unit system is not compatible with the target system, or if the required length unit is missing.
Examples
Convert a value from the current system to Flow360βs V2 unit system:
>>> simulation_params = SimulationParams() >>> value = unyt_quantity(1.0, "meters") >>> converted_value = simulation_params.convert_unit(value, target_system="flow360") >>> print(converted_value) 1.0 (flow360_length_unit)