diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index b59d477fec4b78c6a9af3cbb29105fcf44057232..b48ceea6af7a6c9b9296156b171d61ef5e51fd59 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -1101,7 +1101,7 @@ void ProjectData::parseProcesses( createThermalTwoPhaseFlowWithPPProcess( name, *_mesh_vec[0], std::move(jacobian_assembler), _process_variables, _parameters, integration_order, - process_config, _curves); + process_config, _curves, _media); } else #endif diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp index b8fda16a42559cde27d79059bc7d2822426834fd..c0a1ad1264435c9848b47364dc3f0977b65b1677 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp @@ -11,6 +11,8 @@ #include <cassert> +#include "MaterialLib/MPL/CheckMaterialSpatialDistributionMap.h" +#include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" #include "ParameterLib/ConstantParameter.h" #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" @@ -34,7 +36,8 @@ std::unique_ptr<Process> createThermalTwoPhaseFlowWithPPProcess( BaseLib::ConfigTree const& config, std::map<std::string, std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& - curves) + curves, + std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media) { //! \ogs_file_param{prj__processes__process__type} config.checkConfigParameter("type", "THERMAL_TWOPHASE_WITH_PP"); @@ -108,14 +111,15 @@ std::unique_ptr<Process> createThermalTwoPhaseFlowWithPPProcess( createThermalTwoPhaseFlowWithPPMaterialProperties( mat_config, materialIDs(mesh), parameters); - ThermalTwoPhaseFlowWithPPProcessData process_data{specific_body_force, - has_gravity, - mass_lumping, - diff_coeff_b, - diff_coeff_a, - density_solid, - latent_heat_evaporation, - std::move(material)}; + auto media_map = + MaterialPropertyLib::createMaterialSpatialDistributionMap(media, mesh); + + ThermalTwoPhaseFlowWithPPProcessData process_data{ + std::move(media_map), specific_body_force, + has_gravity, mass_lumping, + diff_coeff_b, diff_coeff_a, + density_solid, latent_heat_evaporation, + std::move(material)}; return std::make_unique<ThermalTwoPhaseFlowWithPPProcess>( std::move(name), mesh, std::move(jacobian_assembler), parameters, diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.h index b5e835030e9fabeacc4838ccfa2e5cf3150a9080..d5adf1836c16ac6cec6693931330d147457e7d9d 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.h +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.h @@ -12,6 +12,7 @@ #include <memory> +#include "MaterialLib/MPL/Medium.h" #include "ProcessLib/Process.h" namespace ProcessLib @@ -28,6 +29,7 @@ std::unique_ptr<Process> createThermalTwoPhaseFlowWithPPProcess( BaseLib::ConfigTree const& config, std::map<std::string, std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& - curves); + curves, + std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media); } // namespace ThermalTwoPhaseFlowWithPP } // namespace ProcessLib diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h index a2227d529bb36d46301e74a49de758e712d86888..448adf2ecb6bbfc5ef32a6b309a9b3b6a0e3832d 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h @@ -10,6 +10,7 @@ #pragma once +#include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" #include "ThermalTwoPhaseFlowWithPPMaterialProperties.h" namespace ProcessLib @@ -21,6 +22,8 @@ namespace ThermalTwoPhaseFlowWithPP { struct ThermalTwoPhaseFlowWithPPProcessData { + std::unique_ptr<MaterialPropertyLib::MaterialSpatialDistributionMap> + media_map; Eigen::VectorXd const specific_body_force; bool const has_gravity;