From ba869c4020a54e17766a0cb75fb256bbb17a074c Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Tue, 19 Jan 2021 13:09:16 +0100 Subject: [PATCH] [PL/T2PF] Use MPL::Density for the solid density. --- ...CreateThermalTwoPhaseFlowWithPPProcess.cpp | 20 ++++++++----------- ...malTwoPhaseFlowWithPPLocalAssembler-impl.h | 5 ++++- .../ThermalTwoPhaseFlowWithPPProcessData.h | 1 - 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp index c0a1ad12644..167924cf33a 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp @@ -90,12 +90,6 @@ std::unique_ptr<Process> createThermalTwoPhaseFlowWithPPProcess( // Parameter for the density of the solid. - auto const& density_solid = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__TWOPHASE_FLOW_THERMAL__density_solid} - "density_solid", parameters, 1, &mesh); - DBUG("Use '{:s}' as density_solid parameter.", density_solid.name); - // Parameter for the latent heat of evaporation. auto const& latent_heat_evaporation = ParameterLib::findParameter<double>( config, @@ -114,12 +108,14 @@ std::unique_ptr<Process> createThermalTwoPhaseFlowWithPPProcess( 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)}; + ThermalTwoPhaseFlowWithPPProcessData process_data{std::move(media_map), + specific_body_force, + has_gravity, + mass_lumping, + diff_coeff_b, + diff_coeff_a, + 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/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h index f28f2f64bc6..d0d61c312dd 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h @@ -182,6 +182,7 @@ void ThermalTwoPhaseFlowWithPPLocalAssembler< auto const& medium = *_process_data.media_map->getMedium(this->_element.getID()); auto const& liquid_phase = medium.phase("AqueousLiquid"); + auto const& solid_phase = medium.phase("Solid"); auto const density_water = liquid_phase.property(MaterialPropertyLib::PropertyType::density) @@ -235,7 +236,9 @@ void ThermalTwoPhaseFlowWithPPLocalAssembler< p_vapor_nonwet * water_mol_mass / IdealGasConstant / T_int_pt; double const density_nonwet = density_nonwet_gas + density_nonwet_vapor; double const density_wet = density_water; - double const density_solid = _process_data.density_solid(t, pos)[0]; + auto const density_solid = + solid_phase.property(MaterialPropertyLib::PropertyType::density) + .template value<double>(vars, pos, t, dt); // Derivative of nonwet phase density in terms of T double const d_density_nonwet_d_T = _process_data.material->calculatedDensityNonwetdT ( diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h index 448adf2ecb6..349fa5b603c 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h @@ -30,7 +30,6 @@ struct ThermalTwoPhaseFlowWithPPProcessData bool const has_mass_lumping; ParameterLib::Parameter<double> const& diffusion_coeff_component_b; ParameterLib::Parameter<double> const& diffusion_coeff_component_a; - ParameterLib::Parameter<double> const& density_solid; ParameterLib::Parameter<double> const& latent_heat_evaporation; std::unique_ptr<ThermalTwoPhaseFlowWithPPMaterialProperties> material; }; -- GitLab