29 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
31 std::array
const required_medium_properties = {
33 std::array
const required_liquid_properties = {
35 std::array
const required_gas_properties = {
39 for (
auto const& m : media)
41 checkRequiredProperties(*m.second, required_medium_properties);
42 checkRequiredProperties(m.second->phase(
"AqueousLiquid"),
43 required_liquid_properties);
44 checkRequiredProperties(m.second->phase(
"Gas"),
45 required_gas_properties);
50 std::string
const& name,
52 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
53 std::vector<ProcessVariable>
const& variables,
54 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
55 unsigned const integration_order,
57 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
62 DBUG(
"Create TwoPhaseFlowProcess with Prho model.");
75 "overall_mass_density"});
76 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
78 process_variables.push_back(std::move(per_process_variables));
85 std::vector<double>
const b =
88 assert(!b.empty() && b.size() < 4);
89 Eigen::VectorXd specific_body_force(b.size());
93 std::copy_n(b.data(), b.size(), specific_body_force.data());
102 "diffusion_coeff_component_b", parameters, 1, &mesh);
106 "diffusion_coeff_component_a", parameters, 1, &mesh);
110 "temperature", parameters, 1, &mesh);
115 auto const material_ids = materialIDs(mesh);
116 if (material_ids !=
nullptr)
118 INFO(
"The twophase flow is in heterogeneous porous media.");
122 INFO(
"The twophase flow is in homogeneous porous media.");
129 std::unique_ptr<TwoPhaseFlowWithPrhoMaterialProperties> material =
133 specific_body_force, has_gravity, mass_lumping,
134 diff_coeff_b, diff_coeff_a, temperature,
135 std::move(material), std::move(media_map)};
137 return std::make_unique<TwoPhaseFlowWithPrhoProcess>(
138 std::move(name), mesh, std::move(jacobian_assembler), parameters,
139 integration_order, std::move(process_variables),
140 std::move(process_data), std::move(secondary_variables));
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const ¶meter_name, std::vector< std::unique_ptr< ParameterBase > > const ¶meters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
std::unique_ptr< Process > createTwoPhaseFlowWithPrhoProcess(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 ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)