OGS
ProcessLib::RichardsComponentTransport::anonymous_namespace{CreateRichardsComponentTransportProcess.cpp} Namespace Reference

Functions

void checkMPLProperties (MeshLib::Mesh const &mesh, MaterialPropertyLib::MaterialSpatialDistributionMap const &media_map)
 

Function Documentation

◆ checkMPLProperties()

void ProcessLib::RichardsComponentTransport::anonymous_namespace{CreateRichardsComponentTransportProcess.cpp}::checkMPLProperties ( MeshLib::Mesh const & mesh,
MaterialPropertyLib::MaterialSpatialDistributionMap const & media_map )

Definition at line 27 of file CreateRichardsComponentTransportProcess.cpp.

30{
31 std::array const required_properties_medium = {
39
40 std::array const required_properties_liquid_phase = {
43
44 std::array const required_properties_components = {
48
49 for (auto const element_id : mesh.getElements() | MeshLib::views::ids)
50 {
51 auto const& medium = *media_map.getMedium(element_id);
52 checkRequiredProperties(medium, required_properties_medium);
53
54 // check if liquid phase definition and the corresponding properties
55 // exist
56 auto const& liquid_phase = medium.phase("AqueousLiquid");
57 checkRequiredProperties(liquid_phase, required_properties_liquid_phase);
58
59 // check if components and the corresponding properties exist
60 auto const number_of_components = liquid_phase.numberOfComponents();
61 for (std::size_t component_id = 0; component_id < number_of_components;
62 ++component_id)
63 {
64 if (!liquid_phase.hasComponent(component_id))
65 {
67 "The component {:d} in the AqueousLiquid phase isn't "
68 "specified.",
69 component_id);
70 }
71 auto const& component = liquid_phase.component(component_id);
72 checkRequiredProperties(component, required_properties_components);
73 }
74 }
75}
#define OGS_FATAL(...)
Definition Error.h:26
void checkRequiredProperties(Component const &c, std::span< PropertyType const > const required_properties)
Definition Component.cpp:60
@ longitudinal_dispersivity
used to compute the hydrodynamic dispersion tensor.
@ transversal_dispersivity
used to compute the hydrodynamic dispersion tensor.
@ retardation_factor
specify retardation factor used in component transport process.

References MaterialPropertyLib::decay_rate, MaterialPropertyLib::density, MeshLib::Mesh::getElements(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), MeshLib::views::ids, MaterialPropertyLib::longitudinal_dispersivity, OGS_FATAL, MaterialPropertyLib::permeability, MaterialPropertyLib::pore_diffusion, MaterialPropertyLib::porosity, MaterialPropertyLib::relative_permeability, MaterialPropertyLib::retardation_factor, MaterialPropertyLib::saturation, MaterialPropertyLib::storage, MaterialPropertyLib::transversal_dispersivity, and MaterialPropertyLib::viscosity.