flow360.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,
... )

name: str | None = None#

Name of the PorousMedium model.

type: Literal['PorousMedium'] = 'PorousMedium'#
entities: EntityList[GenericVolume, Box] [Required] (alias 'volumes')#

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

darcy_coefficient: Annotated[_VectorType, PlainSerializer(func=_dimensioned_type_serializer, return_type=PydanticUndefined, when_used=always)] [Required]#

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.

Constraints:
  • func = <function _dimensioned_type_serializer at 0x79c44aad7130>

  • return_type = PydanticUndefined

  • when_used = always

forchheimer_coefficient: Annotated[_VectorType, PlainSerializer(func=_dimensioned_type_serializer, return_type=PydanticUndefined, when_used=always)] [Required]#

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

Constraints:
  • func = <function _dimensioned_type_serializer at 0x79c44aad7130>

  • return_type = PydanticUndefined

  • when_used = always

volumetric_heat_source: Annotated[str, AfterValidator(func=process_expressions)] | Annotated[_HeatSourceType, PlainSerializer(func=_dimensioned_type_serializer, return_type=PydanticUndefined, when_used=always)] | None = None#

The volumetric heat source.