PorousMedium#
- class PorousMedium[source]#
Bases:
Flow360BaseModelPorousMediumclass for specifying porous media settings. For further information please refer to the porous media knowledge base.Example
Define a porous medium model
porous_zonewith theBoxentity. 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 theporous_zoneare 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_zonewith thevolume_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 theporous_zoneas (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
- 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 orbySeedpointVolumewhen using snappyHexMeshing.The axes of entity must be specified to serve as the the principle axes of the porous medium material model.
- darcy_coefficient: InverseAreaType.Vector#
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: InverseLengthType.Vector#
Forchheimer coefficient of the porous media model which determines the scaling of the inertial loss term.
Additional Constructors
- classmethod from_file(filename)#
Loads a
Flow360BaseModelfrom .json, or .yaml file.- Parameters:
filename (str) – Full path to the .yaml or .json file to load the
Flow360BaseModelfrom.- 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)