flow360.Flow360Params

Contents

flow360.Flow360Params#

class Flow360Params[source]#

Bases: Flow360BaseModel

Flow360 solver parameters

Parameters:

unit_system (Union[SIUnitSystem, CGSUnitSystem, ImperialUnitSystem, Flow360UnitSystem, UnitSystem]) – version : str = 24.2.0 geometry : Optional[Geometry] = Geometry(ref_area=None, moment_center=None, moment_length=None, mesh_unit=None, _type=’Geometry’) fluid_properties : Union[AirDensityTemperature, AirPressureTemperature, NoneType] = None boundaries : Boundaries initial_condition : Union[FreestreamInitialCondition, ExpressionInitialCondition, NoneType] = None time_stepping : Union[SteadyTimeStepping, UnsteadyTimeStepping, NoneType] = SteadyTimeStepping(max_pseudo_steps=2000, order_of_accuracy=2, CFL=AdaptiveCFL(type=’adaptive’,, min=0.1,, max=10000.0,, max_relative_change=1.0,, convergence_limiting_factor=0.25,, _type=’AdaptiveCFL’), _type=’SteadyTimeStepping’, model_type=’Steady’, physical_steps=1, time_step_size=’inf’) turbulence_model_solver : Union[NoneSolver, SpalartAllmaras, KOmegaSST, NoneType] = None transition_model_solver : Optional[TransitionModelSolver] = None heat_equation_solver : Optional[HeatEquationSolver] = None freestream : Union[FreestreamFromMach, FreestreamFromMachReynolds, FreestreamFromVelocity, ZeroFreestream, ZeroFreestreamFromVelocity] bet_disks : Optional[List[BETDisk]] = None actuator_disks : Optional[List[ActuatorDisk]] = None porous_media : Optional[List[PorousMediumBox]] = None user_defined_dynamics : Optional[List[UserDefinedDynamic]] = None surface_output : Optional[SurfaceOutput] = SurfaceOutput(output_format=’paraview’, animation_frequency=-1, animation_frequency_offset=0, compute_time_averages=False, animation_frequency_time_average=-1, animation_frequency_time_average_offset=0, start_average_integration_step=-1, write_single_file=False, output_fields=[], surfaces=None, _type=’SurfaceOutput’) volume_output : Optional[VolumeOutput] = None slice_output : Optional[SliceOutput] = None iso_surface_output : Optional[IsoSurfaceOutput] = None monitor_output : Optional[MonitorOutput] = None volume_zones : Optional[VolumeZones] = None aeroacoustic_output : Optional[AeroacousticOutput] = None navier_stokes_solver : Union[NavierStokesSolver, IncompressibleNavierStokesSolver, NoneType] = None

Attributes

version

version

Methods

__init__([filename, legacy_fallback])

Create a new model by parsing and validating input data from keyword arguments.

add_type_field()

Automatically place "type" field with model name in the model field dictionary.

allow_but_remove(values)

root validator for allow_but_remove, e.g., legacy properties that are no longer in use

append(params[, overwrite])

append parametrs to the model

check_aero_acoustics(values)

check aeroacoustics settings

check_cht_solver_settings(values)

check conjugate heat transfer settings

check_consistency_ddes_unsteady(values)

check consistency between delayed detached eddy and unsteady simulation

check_consistency_ddes_volume_output(values)

check consistency between delayed detached eddy simulation and volume output

check_consistency_wall_function_and_surface_output(values)

check consistency between wall function usage and surface output

check_duplicate_boundary_name(values)

check duplicated boundary names

check_equation_eval_frequency_for_unsteady_simulations(values)

check equation evaluation frequency for unsteady simulations

check_incompressible_navier_stokes_solver(values)

check incompressible Navier-Stokes solver

check_low_mach_preconditioner_output(values)

Detect output of lowMachPreconditioner if not enabled.

check_low_mach_preconditioner_support(values)

Detect scenarios under which low mach preconditioning is not yet supported.

check_numerical_dissipation_factor_output(values)

Detect output of numericalDissipationFactor if not enabled.

check_periodic_boundary_mapping(values)

check periodic boundary mapping

check_temperature_consistency(values)

check if temperature values in freestream and fluid_properties match

check_tri_quad_boundaries(values)

check tri_ and quad_ prefix in boundary names

construct([filename])

Creates a new model from trusted or pre-validated data.

copy([update])

Copy a Flow360BaseModel.

dict(*args[, exclude])

Returns dict representation of the model.

dict_from_file(filename)

Loads a dictionary containing the model from a .json or .yaml file.

flow360_dict()

Generate a dict representation of the model, as required by Flow360

flow360_json()

Generate a JSON representation of the model, as required by Flow360

flow360_schema()

Generate a schema json string for the flow360 model

flow360_ui_schema()

Generate a UI schema json string for the flow360 model

from_file(filename)

Loads a Flow360BaseModel from .json, or .yaml file.

from_json(filename, **parse_obj_kwargs)

Load a Flow360BaseModel from .json file.

from_orm(obj)

from_yaml(filename, **parse_obj_kwargs)

Loads Flow360BaseModel from .yaml file.

generate_docstring()

Generates a docstring for a Flow360 model and saves it to the __doc__ of the class.

handle_conflicting_fields(values)

root validator to handle deprecated aliases

handle_deprecated_aliases(values)

root validator to handle deprecated aliases

help([methods])

Prints message describing the fields and methods of a Flow360BaseModel.

json(*args[, exclude])

Returns json representation of the model.

one_of(values)

root validator for require one of

parse_file(path, *[, content_type, ...])

parse_obj(obj)

parse_raw(b, *[, content_type, encoding, ...])

schema([by_alias, ref_template])

schema_json(*[, by_alias, ref_template])

set_will_export_to_flow360(flag)

Recursivly sets flag will_export_to_flow360

to_file(filename)

Exports Flow360BaseModel instance to .json or .yaml file

to_flow360_json(filename)

Exports Flow360Params instance to .json file

to_json(filename)

Exports Flow360BaseModel instance to .json file

to_solver()

returns configuration object in flow360 units system

to_yaml(filename)

Exports Flow360BaseModel instance to .yaml file.

update_forward_refs(**localns)

Try to update ForwardRefs on fields based on this Model, globalns and localns.

validate(value)

Inherited Common Usage

unit_system#
version#
geometry#
fluid_properties#
boundaries#
initial_condition#
time_stepping#
turbulence_model_solver#
transition_model_solver#
heat_equation_solver#
freestream#
bet_disks#
actuator_disks#
porous_media#
user_defined_dynamics#
surface_output#
volume_output#
slice_output#
iso_surface_output#
monitor_output#
volume_zones#
aeroacoustic_output#
navier_stokes_solver#
classmethod from_file(filename)[source]#

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:

Flow360Params

Example

>>> simulation = Flow360Params.from_file(filename='folder/sim.json') 
copy(update=None, **kwargs)[source]#

Copy a Flow360BaseModel. With deep=True as default.

to_solver()[source]#

returns configuration object in flow360 units system

flow360_json()[source]#

Generate a JSON representation of the model, as required by Flow360

Returns:

Returns JSON representation of the model.

Return type:

json

Example

>>> params.flow360_json() 
flow360_dict()[source]#

Generate a dict representation of the model, as required by Flow360

Returns:

Returns dict representation of the model.

Return type:

dict

Example

>>> params.flow360_dict() 
to_flow360_json(filename)[source]#

Exports Flow360Params instance to .json file

Example

>>> params.to_flow360_json() 
append(params, overwrite=False)[source]#

append parametrs to the model

Parameters:
  • params (Flow360BaseModel) – Flow360BaseModel parameters to be appended

  • overwrite (bool, optional) – Whether to overwrite if key exists, by default False

classmethod construct(filename=None, **kwargs)[source]#

Creates a new model from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

classmethod check_consistency_wall_function_and_surface_output(values)[source]#

check consistency between wall function usage and surface output

classmethod check_temperature_consistency(values)[source]#

check if temperature values in freestream and fluid_properties match

classmethod check_consistency_ddes_volume_output(values)[source]#

check consistency between delayed detached eddy simulation and volume output

classmethod check_tri_quad_boundaries(values)[source]#

check tri_ and quad_ prefix in boundary names

classmethod check_duplicate_boundary_name(values)[source]#

check duplicated boundary names

classmethod check_cht_solver_settings(values)[source]#

check conjugate heat transfer settings

classmethod check_equation_eval_frequency_for_unsteady_simulations(values)[source]#

check equation evaluation frequency for unsteady simulations

classmethod check_consistency_ddes_unsteady(values)[source]#

check consistency between delayed detached eddy and unsteady simulation

classmethod check_periodic_boundary_mapping(values)[source]#

check periodic boundary mapping

classmethod check_aero_acoustics(values)[source]#

check aeroacoustics settings

classmethod check_incompressible_navier_stokes_solver(values)[source]#

check incompressible Navier-Stokes solver

classmethod check_numerical_dissipation_factor_output(values)[source]#

Detect output of numericalDissipationFactor if not enabled.

classmethod check_low_mach_preconditioner_output(values)[source]#

Detect output of lowMachPreconditioner if not enabled.

classmethod check_low_mach_preconditioner_support(values)[source]#

Detect scenarios under which low mach preconditioning is not yet supported.