OGS
ProcessLib::RichardsFlow Namespace Reference

Classes

struct  IntegrationPointData
 
class  LocalAssemblerData
 
class  RichardsFlowLocalAssemblerInterface
 
class  RichardsFlowProcess
 
struct  RichardsFlowProcessData
 

Functions

void checkMPLProperties (MeshLib::Mesh const &mesh, MaterialPropertyLib::MaterialSpatialDistributionMap const &media_map)
 
std::unique_ptr< ProcesscreateRichardsFlowProcess (std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
 

Variables

const unsigned NUM_NODAL_DOF = 1
 

Function Documentation

◆ checkMPLProperties()

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

Definition at line 26 of file CreateRichardsFlowProcess.cpp.

29{
30 std::array const required_medium_properties = {
37
38 std::array const required_liquid_properties = {
41
42 std::array<MaterialPropertyLib::PropertyType, 0> const
43 required_solid_properties{};
44
45 std::array<MaterialPropertyLib::PropertyType, 0> const empty{};
46
48 mesh, media_map, required_medium_properties, required_solid_properties,
49 required_liquid_properties, empty);
50}
void checkMaterialSpatialDistributionMap(MeshLib::Mesh const &mesh, MaterialPropertyLib::MaterialSpatialDistributionMap const &media_map, ContainerMedium const &required_properties_medium, ContainerSolid const &required_properties_solid_phase, ContainerLiquid const &required_properties_liquid_phase, ContainerGas const &required_properties_gas_phase)

References MaterialPropertyLib::checkMaterialSpatialDistributionMap(), MaterialPropertyLib::density, MaterialPropertyLib::permeability, MaterialPropertyLib::porosity, MaterialPropertyLib::reference_temperature, MaterialPropertyLib::relative_permeability, MaterialPropertyLib::saturation, MaterialPropertyLib::storage, and MaterialPropertyLib::viscosity.

Referenced by createRichardsFlowProcess().

◆ createRichardsFlowProcess()

std::unique_ptr< Process > ProcessLib::RichardsFlow::createRichardsFlowProcess ( std::string const & name,
MeshLib::Mesh & mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > && jacobian_assembler,
std::vector< ProcessVariable > const & variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
unsigned const integration_order,
BaseLib::ConfigTree const & config,
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media )
Input File Parameter
prj__processes__process__type

Process Variables

Input File Parameter
prj__processes__process__RICHARDS_FLOW__process_variables

Primary process variables as they appear in the global component vector:

Input File Parameter
prj__processes__process__RICHARDS_FLOW__process_variables__process_variable

Process Parameters

Input File Parameter
prj__processes__process__RICHARDS_FLOW__specific_body_force
Input File Parameter
prj__processes__process__RICHARDS_FLOW__mass_lumping

Definition at line 52 of file CreateRichardsFlowProcess.cpp.

61{
63 config.checkConfigParameter("type", "RICHARDS_FLOW");
64
65 DBUG("Create RichardsFlowProcess.");
66
68
70 auto const pv_config = config.getConfigSubtree("process_variables");
71
73 auto per_process_variables = findProcessVariables(
74 variables, pv_config,
75 {
76 "process_variable"});
77 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
78 process_variables;
79 process_variables.push_back(std::move(per_process_variables));
80
81 SecondaryVariableCollection secondary_variables;
82
83 ProcessLib::createSecondaryVariables(config, secondary_variables);
84
86 // Specific body force
87 std::vector<double> const b =
89 config.getConfigParameter<std::vector<double>>("specific_body_force");
90 assert(!b.empty() && b.size() < 4);
91 Eigen::VectorXd specific_body_force(b.size());
92 bool const has_gravity = MathLib::toVector(b).norm() > 0;
93 if (has_gravity)
94 {
95 std::copy_n(b.data(), b.size(), specific_body_force.data());
96 }
97
98 // has mass lumping
100 auto mass_lumping = config.getConfigParameter<bool>("mass_lumping");
101
102 auto media_map =
104
105 DBUG("Check the media properties of RichardsFlow process ...");
106 checkMPLProperties(mesh, media_map);
107 DBUG("Media properties verified.");
108
109 RichardsFlowProcessData process_data{
110 std::move(media_map), specific_body_force, has_gravity, mass_lumping};
111
112 return std::make_unique<RichardsFlowProcess>(
113 std::move(name), mesh, std::move(jacobian_assembler), parameters,
114 integration_order, std::move(process_variables),
115 std::move(process_data), std::move(secondary_variables));
116}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
Handles configuration of several secondary variables from the project file.
MaterialSpatialDistributionMap createMaterialSpatialDistributionMap(std::map< int, std::shared_ptr< Medium > > const &media, MeshLib::Mesh const &mesh)
Eigen::Map< const Vector > toVector(std::vector< double > const &data, Eigen::VectorXd::Index size)
Creates an Eigen mapped vector from the given data vector.
std::vector< std::reference_wrapper< ProcessVariable > > findProcessVariables(std::vector< ProcessVariable > const &variables, BaseLib::ConfigTree const &pv_config, std::initializer_list< std::string > tags)
void createSecondaryVariables(BaseLib::ConfigTree const &config, SecondaryVariableCollection &secondary_variables)

References BaseLib::ConfigTree::checkConfigParameter(), checkMPLProperties(), MaterialPropertyLib::createMaterialSpatialDistributionMap(), ProcessLib::createSecondaryVariables(), DBUG(), ProcessLib::findProcessVariables(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigSubtree(), and MathLib::toVector().

Referenced by ProjectData::parseProcesses().

Variable Documentation

◆ NUM_NODAL_DOF