SimulationParams#

class SimulationParams[source]#

Bases: _ParamModelBase

All-in-one class for surface meshing + volume meshing + case configurations

Attributes

meshing: MeshingParams | ModularMeshingWorkflow, optional#

Surface and volume meshing parameters. See MeshingParams for more details.

Default:

None

reference_geometry: ReferenceGeometry, optional#

Global geometric reference values. See ReferenceGeometry for more details.

Default:

None

operating_condition: GenericReferenceCondition | AerospaceCondition | LiquidOperatingCondition, optional#

Global operating condition. See Operating Condition for more details.

Default:

None

models: list[Fluid | Solid | ActuatorDisk | BETDisk | Rotation | PorousMedium | Wall | SlipWall | Freestream | Outflow | Inflow | Periodic | SymmetryPlane | PorousJump], optional#

Solver settings and numerical models and boundary condition settings. See Volume Models and Surface Models for more details.

Default:

None

time_stepping: Steady | Unsteady#

Time stepping settings. See Time Stepping for more details.

Default:

Steady()

user_defined_dynamics: list[UserDefinedDynamic], optional#

User defined dynamics. See User Defined Dynamics for more details.

Default:

None

user_defined_fields: list[UserDefinedField]#

User defined fields that can be used in outputs.

Default:

[]

outputs: list[SurfaceOutput | TimeAverageSurfaceOutput | VolumeOutput | TimeAverageVolumeOutput | SliceOutput | TimeAverageSliceOutput | IsosurfaceOutput | TimeAverageIsosurfaceOutput | SurfaceIntegralOutput | ProbeOutput | SurfaceProbeOutput | SurfaceSliceOutput | TimeAverageProbeOutput | TimeAverageSurfaceProbeOutput | AeroAcousticOutput | StreamlineOutput | TimeAverageStreamlineOutput | ForceDistributionOutput | TimeAverageForceDistributionOutput | ForceOutput | RenderOutput], optional#

Output settings. See Outputs for more details.

Default:

None

run_control: RunControl, optional#

Run control settings of the simulation.

Default:

None

Properties

base_length: LengthType#

Get base length unit for non-dimensionalization

base_temperature: AbsoluteTemperatureType#

Get base temperature unit for non-dimensionalization

base_velocity: VelocityType#

Get base velocity unit for non-dimensionalization

reference_velocity: VelocityType#

This function returns the reference velocity. Note that the reference velocity is NOT the non-dimensionalization velocity scale

For dimensionalization of Flow360 output (converting FROM flow360 unit) The solver output is already re-normalized by reference velocity due to “velocityScale” So we need to find the reference velocity. reference_velocity_magnitude takes precedence, consistent with how “velocityScale” is computed.

base_density: DensityType#

Get base density unit for non-dimensionalization

base_mass: MassType#

Get base mass unit for non-dimensionalization

base_time: TimeType#

Get base time unit for non-dimensionalization

flow360_unit_system: u.UnitSystem#

Get the unit system for non-dimensionalization

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

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)
is_steady()[source]#

returns True when SimulationParams is steady state

has_solid()[source]#

returns True when SimulationParams has Solid model

has_actuator_disks()[source]#

returns True when SimulationParams has ActuatorDisk disk

has_bet_disks()[source]#

returns True when SimulationParams has BET disk

has_isosurfaces()[source]#

returns True when SimulationParams has isosurfaces

has_monitors()[source]#

returns True when SimulationParams has monitors

has_volume_output()[source]#

returns True when SimulationParams has volume output

has_aeroacoustics()[source]#

returns True when SimulationParams has aeroacoustics

has_user_defined_dynamics()[source]#

returns True when SimulationParams has user defined dynamics

has_force_distributions()[source]#

returns True when SimulationParams has force distributions

has_custom_forces()[source]#

returns True when SimulationParams has any ForceOutputs

display_output_units()[source]#

Display all the output units for UserVariables used in outputs.

Return type:

None

pre_submit_summary()[source]#

Display a summary of the simulation params before submission.

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