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

Load a Flow360BaseModel from a .json file.

Parameters:

filename (str)

Return type:

Flow360BaseModel

Methods

help(methods=False)#

Print fields and methods of a Flow360BaseModel using rich.

Parameters:

methods (bool)

Return type:

None

to_file(filename, **kwargs)#

Export Flow360BaseModel instance to a .json file.

Parameters:
Return type:

None