Fluid#

class Fluid[source]#

Bases: PDEModelBase

Fluid class for setting up the volume model that contains all the common fields every fluid dynamics zone should have.

Example

>>> fl.Fluid(
...     navier_stokes_solver=fl.NavierStokesSolver(
...         absolute_tolerance=1e-10,
...         linear_solver=fl.LinearSolver(max_iterations=35),
...         low_mach_preconditioner=True,
...     ),
...     turbulence_model_solver=fl.SpalartAllmaras(
...         absolute_tolerance=1e-10,
...         linear_solver=fl.LinearSolver(max_iterations=25)
...     ),
...     transition_model_solver=fl.NoneSolver(),
... )

Attributes

material: Air | Water#

The material property of fluid.

Default:

Air()

initial_condition: NavierStokesModifiedRestartSolution | NavierStokesInitialCondition#

The initial condition of the fluid solver.

Default:

NavierStokesInitialCondition()

navier_stokes_solver: NavierStokesSolver#

Navier-Stokes solver settings, see NavierStokesSolver documentation.

Default:

NavierStokesSolver()

turbulence_model_solver: NoneSolver | SpalartAllmaras | KOmegaSST#

Turbulence model solver settings, see SpalartAllmaras, KOmegaSST and NoneSolver documentation.

Default:

SpalartAllmaras()

transition_model_solver: NoneSolver | TransitionModelSolver#

Transition solver settings, see TransitionModelSolver documentation.

Default:

NoneSolver()

gravity: Gravity, optional#

Gravitational body force settings. When specified, gravity is applied globally to all fluid zones. See Gravity documentation.

Default:

None

interface_interpolation_tolerance: float#

Interpolation will fail if the distance between an interpolation point and the closest triangle is greater than relative_interpolation_tolerance multiplied by the maximum edge length of the patch containing the interpolation point.

Default:

0.2

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

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