PorousMedium#

class PorousMedium[source]#

Bases: Flow360BaseModel

PorousMedium class for specifying porous media settings. For further information please refer to the porous media knowledge base.

Example

Define a porous medium model porous_zone with the Box entity. The center and size of the porous_zone box are (0, 0, 0) * fl.u.m and (0.2, 0.3, 2) * fl.u.m, respectively. The axes of the porous_zone are set as (0, 1, 0) and (0, 0, 1).

>>> fl.PorousMedium(
...     entities=[
...         fl.Box.from_principal_axes(
...             name="porous_zone",
...             axes=[(0, 1, 0), (0, 0, 1)],
...             center=(0, 0, 0) * fl.u.m,
...             size=(0.2, 0.3, 2) * fl.u.m,
...         )
...    ],
...    darcy_coefficient=(1e6, 0, 0) / fl.u.m **2,
...    forchheimer_coefficient=(1, 0, 0) / fl.u.m,
...    volumetric_heat_source=1.0 * fl.u.W/ fl.u.m **3,
... )

Define a porous medium model porous_zone with the volume_mesh["porous_zone"] volume. The axes of entity must be specified to serve as the the principle axes of the porous medium material model, and we set the axes of the porous_zone as (1, 0, 0) and (0, 1, 0).

>>> porous_zone = volume_mesh["porous_zone"]
>>> porous_zone.axes = [(1, 0, 0), (0, 1, 0)]
>>> porous_medium_model = fl.PorousMedium(
...     entities=[porous_zone],
...     darcy_coefficient=(1e6, 0, 0) / fl.u.m **2,
...     forchheimer_coefficient=(1, 0, 0) / fl.u.m,
...     volumetric_heat_source=1.0 * fl.u.W/ fl.u.m **3,
... )

Attributes

name: str, optional#

Name of the PorousMedium model.

Default:

'Porous medium'

entities: EntityList[GenericVolume, Box, CustomVolume, SeedpointVolume]#

The entity list for the PorousMedium model. The entity should be defined by Box, zones from the geometry/volume mesh orby SeedpointVolume when using snappyHexMeshing.The axes of entity must be specified to serve as the the principle axes of the porous medium material model.

darcy_coefficient: Any#

Darcy coefficient of the porous media model which determines the scaling of the viscous loss term. The 3 values define the coefficient for each of the 3 axes defined by the reference frame of the volume zone.

forchheimer_coefficient: Any#

Forchheimer coefficient of the porous media model which determines the scaling of the inertial loss term.

volumetric_heat_source: str | Any, optional#

The volumetric heat source.

Default:

None

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