From 644a32b46ed9d3d25b48c6b778a28b4fcc03daa6 Mon Sep 17 00:00:00 2001 From: Boyan Meng <meng.boyan@ufz.de> Date: Wed, 23 Feb 2022 16:54:58 +0100 Subject: [PATCH] [PL/T2PF] Clean-up: remove old material properties stuff --- ...alTwoPhaseFlowWithPPMaterialProperties.cpp | 91 --------- ...rmalTwoPhaseFlowWithPPMaterialProperties.h | 39 ---- ...CreateThermalTwoPhaseFlowWithPPProcess.cpp | 18 +- ...malTwoPhaseFlowWithPPLocalAssembler-impl.h | 5 - .../ThermalTwoPhaseFlowWithPPLocalAssembler.h | 14 +- ...alTwoPhaseFlowWithPPMaterialProperties.cpp | 186 ------------------ ...rmalTwoPhaseFlowWithPPMaterialProperties.h | 140 ------------- .../ThermalTwoPhaseFlowWithPPProcess.cpp | 1 - .../ThermalTwoPhaseFlowWithPPProcess.h | 1 - .../ThermalTwoPhaseFlowWithPPProcessData.h | 2 - 10 files changed, 9 insertions(+), 488 deletions(-) delete mode 100644 ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp delete mode 100644 ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.h delete mode 100644 ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp delete mode 100644 ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp deleted file mode 100644 index 5b931b5653f..00000000000 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/** - * \file - * \copyright - * Copyright (c) 2012-2022, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - * - */ - -#include "CreateThermalTwoPhaseFlowWithPPMaterialProperties.h" - -#include <tuple> - -#include "BaseLib/Logging.h" -#include "MaterialLib/Fluid/FluidProperty.h" -#include "MaterialLib/Fluid/SpecificHeatCapacity/CreateSpecificFluidHeatCapacityModel.h" -#include "MaterialLib/Fluid/ThermalConductivity/CreateFluidThermalConductivityModel.h" -#include "MaterialLib/PorousMedium/Porosity/Porosity.h" -#include "MaterialLib/PorousMedium/Storage/Storage.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturation.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/RelativePermeability.h" -#include "MaterialLib/TwoPhaseModels/CreateTwoPhaseFlowMaterialProperties.h" -#include "MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h" -#include "MeshLib/Mesh.h" -#include "MeshLib/PropertyVector.h" -#include "ParameterLib/Parameter.h" -#include "ParameterLib/SpatialPosition.h" -#include "ThermalTwoPhaseFlowWithPPMaterialProperties.h" - -namespace ProcessLib -{ -namespace ThermalTwoPhaseFlowWithPP -{ -std::unique_ptr<ThermalTwoPhaseFlowWithPPMaterialProperties> -createThermalTwoPhaseFlowWithPPMaterialProperties( - BaseLib::ConfigTree const& config, - MeshLib::PropertyVector<int> const* material_ids, - std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters) -{ - DBUG( - "Reading material properties of nonisothermal two-phase flow process."); - auto two_phase_model_tuple = - MaterialLib::TwoPhaseFlowWithPP::createTwoPhaseFlowMaterialProperties( - config, material_ids, parameters); - auto two_phase_material_model = - std::move(std::get<0>(two_phase_model_tuple)); - auto const& fluid_config = std::get<1>(two_phase_model_tuple); - - auto const& spec_heat_capacity_air_conf = - //! \ogs_file_param{prj__processes__process__TWOPHASE_FLOW_THERMAL__material_property__specific_heat_capacity_air} - fluid_config.getConfigSubtree("specific_heat_capacity_air"); - auto specific_heat_capacity_air = - MaterialLib::Fluid::createSpecificFluidHeatCapacityModel( - spec_heat_capacity_air_conf); - auto const& spec_heat_capacity_vapor_conf = - //! \ogs_file_param{prj__processes__process__TWOPHASE_FLOW_THERMAL__material_property__specific_heat_capacity_water_vapor} - fluid_config.getConfigSubtree("specific_heat_capacity_water_vapor"); - auto specific_heat_capacity_vapor = - MaterialLib::Fluid::createSpecificFluidHeatCapacityModel( - spec_heat_capacity_vapor_conf); - - auto const& thermal_conductivity_dry_solid_conf = - //! \ogs_file_param{prj__processes__process__TWOPHASE_FLOW_THERMAL__material_property__thermal_conductivity_dry_solid} - fluid_config.getConfigSubtree("thermal_conductivity_dry_solid"); - auto thermal_conductivity_dry_solid = - MaterialLib::Fluid::createFluidThermalConductivityModel( - thermal_conductivity_dry_solid_conf); - auto const& thermal_conductivity_wet_solid_conf = - //! \ogs_file_param{prj__processes__process__TWOPHASE_FLOW_THERMAL__material_property__thermal_conductivity_wet_solid} - fluid_config.getConfigSubtree("thermal_conductivity_wet_solid"); - auto thermal_conductivity_wet_solid = - MaterialLib::Fluid::createFluidThermalConductivityModel( - thermal_conductivity_wet_solid_conf); - - std::unique_ptr<MaterialLib::Fluid::WaterVaporProperties> vapor_property = - std::make_unique<MaterialLib::Fluid::WaterVaporProperties>(); - - return std::make_unique<ThermalTwoPhaseFlowWithPPMaterialProperties>( - std::move(two_phase_material_model), - std::move(specific_heat_capacity_air), - std::move(specific_heat_capacity_vapor), - std::move(thermal_conductivity_dry_solid), - std::move(thermal_conductivity_wet_solid), - std::move(vapor_property)); -} - -} // namespace ThermalTwoPhaseFlowWithPP -} // namespace ProcessLib diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.h deleted file mode 100644 index c80569c6a8b..00000000000 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * \file - * \copyright - * Copyright (c) 2012-2022, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - * - */ - -#pragma once - -#include <memory> - -#include "MaterialLib/Fluid/FluidPropertyHeaders.h" -#include "MaterialLib/PorousMedium/Porosity/Porosity.h" -#include "MaterialLib/PorousMedium/PorousPropertyHeaders.h" -#include "MaterialLib/PorousMedium/Storage/Storage.h" -#include "MaterialLib/TwoPhaseModels/CreateTwoPhaseFlowMaterialProperties.h" - -#include "ThermalTwoPhaseFlowWithPPMaterialProperties.h" -namespace BaseLib -{ -class ConfigTree; -} - -namespace ProcessLib -{ -namespace ThermalTwoPhaseFlowWithPP -{ -std::unique_ptr<ThermalTwoPhaseFlowWithPPMaterialProperties> -createThermalTwoPhaseFlowWithPPMaterialProperties( - BaseLib::ConfigTree const& config, - MeshLib::PropertyVector<int> const* material_ids, - std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& - parameters); - -} // end namespace -} // namespace ProcessLib diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp index 069e84ea8d5..7960bba9956 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp @@ -16,8 +16,6 @@ #include "ParameterLib/ConstantParameter.h" #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" -#include "ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.h" -#include "ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h" #include "ProcessLib/Utils/ProcessUtils.h" #include "ThermalTwoPhaseFlowWithPPProcess.h" #include "ThermalTwoPhaseFlowWithPPProcessData.h" @@ -130,30 +128,20 @@ std::unique_ptr<Process> createThermalTwoPhaseFlowWithPPProcess( //! \ogs_file_param{prj__processes__process__TWOPHASE_FLOW_THERMAL__mass_lumping} auto mass_lumping = config.getConfigParameter<bool>("mass_lumping"); - //! \ogs_file_param{prj__processes__process__TWOPHASE_FLOW_THERMAL__material_property} - auto const& mat_config = config.getConfigSubtree("material_property"); - - std::unique_ptr<ThermalTwoPhaseFlowWithPPMaterialProperties> material = - createThermalTwoPhaseFlowWithPPMaterialProperties( - mat_config, materialIDs(mesh), parameters); - auto media_map = MaterialPropertyLib::createMaterialSpatialDistributionMap(media, mesh); - DBUG( - "Check the media properties of ThermalTwoPhaseFlowWithPP process ..."); + DBUG("Check the media properties of ThermalTwoPhaseFlowWithPP process ..."); checkMPLProperties(media); DBUG("Media properties verified."); ThermalTwoPhaseFlowWithPPProcessData process_data{ - std::move(media_map), specific_body_force, has_gravity, mass_lumping, - std::move(material)}; + std::move(media_map), specific_body_force, has_gravity, mass_lumping}; return std::make_unique<ThermalTwoPhaseFlowWithPPProcess>( std::move(name), mesh, std::move(jacobian_assembler), parameters, integration_order, std::move(process_variables), - std::move(process_data), std::move(secondary_variables), mat_config, - curves); + std::move(process_data), std::move(secondary_variables), curves); } } // namespace ThermalTwoPhaseFlowWithPP diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h index 33d09b49064..cb8df1ecde4 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h @@ -139,11 +139,6 @@ void ThermalTwoPhaseFlowWithPPLocalAssembler< ParameterLib::SpatialPosition pos; pos.setElementID(_element.getID()); - // clean-up - auto const& two_phase_material_model = - _process_data.material->getTwoPhaseMaterialModel(); - const int material_id = - two_phase_material_model.getMaterialID(pos.getElementID().value()); auto const num_nodes = ShapeFunction::NPOINTS; auto const pg_nodal_values = diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler.h index 4cf9262c879..d934f0ceefb 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler.h +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler.h @@ -31,14 +31,13 @@ template <typename NodalRowVectorType, typename GlobalDimNodalMatrixType, typename NodalMatrixType> struct IntegrationPointData final { - explicit IntegrationPointData( - NodalRowVectorType const& N_, GlobalDimNodalMatrixType const& dNdx_, - ThermalTwoPhaseFlowWithPPMaterialProperties const& material_property_, - double const& integration_weight_, NodalMatrixType const mass_operator_, - NodalMatrixType const diffusion_operator_) + explicit IntegrationPointData(NodalRowVectorType const& N_, + GlobalDimNodalMatrixType const& dNdx_, + double const& integration_weight_, + NodalMatrixType const mass_operator_, + NodalMatrixType const diffusion_operator_) : N(N_), dNdx(dNdx_), - mat_property(material_property_), integration_weight(integration_weight_), mass_operator(mass_operator_), diffusion_operator(diffusion_operator_) @@ -46,7 +45,6 @@ struct IntegrationPointData final } NodalRowVectorType const N; GlobalDimNodalMatrixType const dNdx; - ThermalTwoPhaseFlowWithPPMaterialProperties const& mat_property; double const integration_weight; NodalMatrixType const mass_operator; NodalMatrixType const diffusion_operator; @@ -120,7 +118,7 @@ public: auto const& sm = shape_matrices[ip]; const double integration_factor = sm.integralMeasure * sm.detJ; _ip_data.emplace_back( - sm.N, sm.dNdx, *_process_data.material, + sm.N, sm.dNdx, sm.integralMeasure * sm.detJ * _integration_method.getWeightedPoint(ip).getWeight(), sm.N.transpose() * sm.N * integration_factor * diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp deleted file mode 100644 index cf360536bfa..00000000000 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/** - * \file - * \copyright - * Copyright (c) 2012-2022, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - * - */ - -#include "ThermalTwoPhaseFlowWithPPMaterialProperties.h" - -#include "BaseLib/Logging.h" -#include "MaterialLib/Fluid/FluidProperty.h" -#include "MaterialLib/PorousMedium/Porosity/Porosity.h" -#include "MaterialLib/PorousMedium/Storage/Storage.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturation.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/RelativePermeability.h" -#include "MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.h" -#include "MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h" -#include "MeshLib/Mesh.h" -#include "MeshLib/PropertyVector.h" -#include "NumLib/NewtonRaphson.h" -#include "ParameterLib/Parameter.h" -#include "ParameterLib/SpatialPosition.h" - -namespace ProcessLib -{ -using MaterialLib::PhysicalConstant::CelsiusZeroInKelvin; -using MaterialLib::PhysicalConstant::IdealGasConstant; - -namespace ThermalTwoPhaseFlowWithPP -{ -ThermalTwoPhaseFlowWithPPMaterialProperties:: - ThermalTwoPhaseFlowWithPPMaterialProperties( - std::unique_ptr<MaterialLib::TwoPhaseFlowWithPP:: - TwoPhaseFlowWithPPMaterialProperties>&& - two_phase_material_model, - std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& - specific_heat_capacity_air, - std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& - specific_heat_capacity_vapor, - std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& - thermal_conductivity_dry_solid, - std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& - thermal_conductivity_wet_solid, - std::unique_ptr<MaterialLib::Fluid::WaterVaporProperties>&& - water_vapor_properties) - : _two_phase_material_model(std::move(two_phase_material_model)), - _specific_heat_capacity_air(std::move(specific_heat_capacity_air)), - _specific_heat_capacity_vapor(std::move(specific_heat_capacity_vapor)), - _thermal_conductivity_dry_solid( - std::move(thermal_conductivity_dry_solid)), - _thermal_conductivity_wet_solid( - std::move(thermal_conductivity_wet_solid)), - _water_vapor_properties(std::move(water_vapor_properties)) -{ - DBUG("Create material properties for non-isothermal two-phase flow model."); -} - -double ThermalTwoPhaseFlowWithPPMaterialProperties::getSpecificHeatCapacityAir( - const double p, const double T) const -{ - ArrayType vars; - vars[static_cast<int>(MaterialLib::Fluid::PropertyVariableType::T)] = T; - vars[static_cast<int>(MaterialLib::Fluid::PropertyVariableType::p)] = p; - return _specific_heat_capacity_air->getValue(vars); -} - -double -ThermalTwoPhaseFlowWithPPMaterialProperties::getSpecificHeatCapacityVapor( - const double p, const double T) const -{ - ArrayType vars; - vars[static_cast<int>(MaterialLib::Fluid::PropertyVariableType::T)] = T; - vars[static_cast<int>(MaterialLib::Fluid::PropertyVariableType::p)] = p; - return _specific_heat_capacity_vapor->getValue(vars); -} - -double -ThermalTwoPhaseFlowWithPPMaterialProperties::getThermalConductivityDrySolid( - const double p, const double T) const -{ - ArrayType vars; - vars[static_cast<int>(MaterialLib::Fluid::PropertyVariableType::T)] = T; - vars[static_cast<int>(MaterialLib::Fluid::PropertyVariableType::p)] = p; - return _thermal_conductivity_dry_solid->getValue(vars); -} - -double -ThermalTwoPhaseFlowWithPPMaterialProperties::getThermalConductivityWetSolid( - const double p, const double T) const -{ - ArrayType vars; - vars[static_cast<int>(MaterialLib::Fluid::PropertyVariableType::T)] = T; - vars[static_cast<int>(MaterialLib::Fluid::PropertyVariableType::p)] = p; - return _thermal_conductivity_wet_solid->getValue(vars); -} - -double -ThermalTwoPhaseFlowWithPPMaterialProperties::calculateUnsatHeatConductivity( - double const /*t*/, ParameterLib::SpatialPosition const& /*x*/, - double const Sw, double const lambda_pm_dry, double const lambda_pm_wet) -{ - double lambda_pm = - lambda_pm_dry + std::sqrt(Sw) * (lambda_pm_wet - lambda_pm_dry); - if (Sw > 1) - { - lambda_pm = lambda_pm_wet; - } - else if (Sw < 0) - { - lambda_pm = lambda_pm_dry; - } - return lambda_pm; -} - -double -ThermalTwoPhaseFlowWithPPMaterialProperties::calculateSaturatedVaporPressure( - const double T) const -{ - return _water_vapor_properties->calculateSaturatedVaporPressure(T); -} -double -ThermalTwoPhaseFlowWithPPMaterialProperties::calculateVaporPressureNonwet( - const double pc, const double T, const double mass_density_water) const -{ - return _water_vapor_properties->calculateVaporPressureNonwet( - pc, T, mass_density_water); -} -double ThermalTwoPhaseFlowWithPPMaterialProperties::calculateDerivativedPsatdT( - const double T) const -{ - return _water_vapor_properties->calculateDerivativedPsatdT(T); -} -double ThermalTwoPhaseFlowWithPPMaterialProperties::calculateDerivativedPgwdT( - const double pc, const double T, const double mass_density_water) const -{ - return _water_vapor_properties->calculateDerivativedPgwdT( - pc, T, mass_density_water); -} -double ThermalTwoPhaseFlowWithPPMaterialProperties::calculateDerivativedPgwdPC( - const double pc, const double T, const double mass_density_water) const -{ - return _water_vapor_properties->calculateDerivativedPgwdPC( - pc, T, mass_density_water); -} -double ThermalTwoPhaseFlowWithPPMaterialProperties::calculatedDensityNonwetdT( - const double p_air_nonwet, const double p_vapor_nonwet, const double pc, - const double T, const double mass_density_water) const -{ - return _water_vapor_properties->calculatedDensityNonwetdT( - p_air_nonwet, p_vapor_nonwet, pc, T, mass_density_water); -} - -double ThermalTwoPhaseFlowWithPPMaterialProperties::getWaterVaporEnthalpySimple( - const double temperature, const double heat_capacity_water_vapor, - const double pg, const double latent_heat_evaporation) const -{ - return _water_vapor_properties->getWaterVaporEnthalpySimple( - temperature, heat_capacity_water_vapor, pg, latent_heat_evaporation); -} - -double ThermalTwoPhaseFlowWithPPMaterialProperties::getAirEnthalpySimple( - const double temperature, - const double heat_capacity_dry_air, - const double /*pg*/) const -{ - return heat_capacity_dry_air * (temperature - CelsiusZeroInKelvin) + - IdealGasConstant * (temperature - CelsiusZeroInKelvin) / - _air_mol_mass; -} - -double -ThermalTwoPhaseFlowWithPPMaterialProperties::getLiquidWaterEnthalpySimple( - const double temperature, - const double heat_capacity_liquid_water, - const double /*pl*/) -{ - return heat_capacity_liquid_water * (temperature - CelsiusZeroInKelvin); -} - -} // namespace ThermalTwoPhaseFlowWithPP -} // namespace ProcessLib diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h deleted file mode 100644 index 93d40864a64..00000000000 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * \file - * \copyright - * Copyright (c) 2012-2022, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - * - */ - -#pragma once - -#include <memory> -#include <vector> - -#include "MaterialLib/Fluid/FluidPropertyHeaders.h" -#include "MaterialLib/Fluid/WaterVaporProperties/WaterVaporProperties.h" -#include "MaterialLib/PhysicalConstant.h" -#include "MaterialLib/PorousMedium/Porosity/Porosity.h" -#include "MaterialLib/PorousMedium/PorousPropertyHeaders.h" -#include "MaterialLib/PorousMedium/Storage/Storage.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturation.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/RelativePermeability.h" -#include "MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.h" -#include "MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h" - -namespace MeshLib -{ -template <typename PROP_VAL_TYPE> -class PropertyVector; -} -/** TODO -* in this implementation, the thermal properties of gas component directly use -* the properties of air, -* e.g. the specific heat capacity of gas component use the specific heat -* capacity of air, and since a constant specific heat capacity of air is -* assumed, the enthalpy of air is calculated based on a simplified model. -* Next, a strategy which can automatically(or from input file)switch between -* different gas components is required, and should be implemented as a material -* class, also different enthalpy models for different components are need to be -* implemented. -*/ -namespace ProcessLib::ThermalTwoPhaseFlowWithPP -{ -class ThermalTwoPhaseFlowWithPPMaterialProperties final -{ -public: - using ArrayType = MaterialLib::Fluid::FluidProperty::ArrayType; - - ThermalTwoPhaseFlowWithPPMaterialProperties( - std::unique_ptr<MaterialLib::TwoPhaseFlowWithPP:: - TwoPhaseFlowWithPPMaterialProperties>&& - two_phase_material_model, - std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& - specific_heat_capacity_air, - std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& - specific_heat_capacity_vapor, - std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& - thermal_conductivity_dry_solid, - std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& - thermal_conductivity_wet_solid, - std::unique_ptr<MaterialLib::Fluid::WaterVaporProperties>&& - water_vapor_properties); - - double getSpecificHeatCapacityWater(const double p, const double T) const; - double getSpecificHeatCapacityAir(const double p, const double T) const; - double getSpecificHeatCapacityVapor(const double p, const double T) const; - double getThermalConductivityDrySolid(const double p, const double T) const; - double getThermalConductivityWetSolid(const double p, const double T) const; - /// Calculates the unsaturated heat conductivity - static double calculateUnsatHeatConductivity( - double const t, - ParameterLib::SpatialPosition const& x, - double const Sw, - double const lambda_pm_dry, - double const lambda_pm_wet); - /// water vapor saturation pressure - double calculateSaturatedVaporPressure(const double T) const; - /// partial water vapor pressure in nonwetting phase - /// Kelvin equation - double calculateVaporPressureNonwet(const double pc, const double T, - const double mass_density_water) const; - /// Derivative of SaturatedVaporPressure in terms of T - double calculateDerivativedPsatdT(const double T) const; - /// Derivative of partial vapor pressure in terms of T - double calculateDerivativedPgwdT(const double pc, const double T, - const double mass_density_water) const; - /// Derivative of partial vapor pressure in terms of PC - double calculateDerivativedPgwdPC(const double pc, const double T, - const double mass_density_water) const; - /// - double calculatedDensityNonwetdT(const double p_air_nonwet, - const double p_vapor_nonwet, const double pc, - const double T, - const double mass_density_water) const; - /// Specific enthalpy of water vapor - double getWaterVaporEnthalpySimple( - const double temperature, - const double heat_capacity_water_vapor, - const double pg, - const double latent_heat_evaporation) const; - /// Specific enthalpy of air - double getAirEnthalpySimple(const double temperature, - const double heat_capacity_dry_air, - const double /*pg*/) const; - /// Specific enthalpy of liquid water - static double getLiquidWaterEnthalpySimple(const double temperature, - const double heat_capacity_liquid_water, - const double /*pl*/); - const MaterialLib::TwoPhaseFlowWithPP::TwoPhaseFlowWithPPMaterialProperties& - getTwoPhaseMaterialModel() const - { - return *_two_phase_material_model; - } - -private: - double const& _air_mol_mass = MaterialLib::PhysicalConstant::MolarMass::Air; - std::unique_ptr<MaterialLib::TwoPhaseFlowWithPP:: - TwoPhaseFlowWithPPMaterialProperties> const - _two_phase_material_model; - - std::unique_ptr<MaterialLib::Fluid::FluidProperty> const - _specific_heat_capacity_solid; - std::unique_ptr<MaterialLib::Fluid::FluidProperty> const - _specific_heat_capacity_water; - std::unique_ptr<MaterialLib::Fluid::FluidProperty> const - _specific_heat_capacity_air; - std::unique_ptr<MaterialLib::Fluid::FluidProperty> const - _specific_heat_capacity_vapor; - std::unique_ptr<MaterialLib::Fluid::FluidProperty> const - _thermal_conductivity_dry_solid; - std::unique_ptr<MaterialLib::Fluid::FluidProperty> const - _thermal_conductivity_wet_solid; - std::unique_ptr<MaterialLib::Fluid::WaterVaporProperties> const - _water_vapor_properties; -}; - -} // namespace ProcessLib::ThermalTwoPhaseFlowWithPP diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp index a3b5c7b05b7..3625f50e574 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp @@ -33,7 +33,6 @@ ThermalTwoPhaseFlowWithPPProcess::ThermalTwoPhaseFlowWithPPProcess( process_variables, ThermalTwoPhaseFlowWithPPProcessData&& process_data, SecondaryVariableCollection&& secondary_variables, - BaseLib::ConfigTree const& /*config*/, std::map<std::string, std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& /*curves*/) diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.h index ae47c5ff42a..1bb65a8f3f2 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.h +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.h @@ -49,7 +49,6 @@ public: process_variables, ThermalTwoPhaseFlowWithPPProcessData&& process_data, SecondaryVariableCollection&& secondary_variables, - BaseLib::ConfigTree const& config, std::map<std::string, std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& curves); diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h index 89691e40fc9..86aedd4bf12 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h @@ -11,7 +11,6 @@ #pragma once #include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" -#include "ThermalTwoPhaseFlowWithPPMaterialProperties.h" namespace ProcessLib { @@ -28,7 +27,6 @@ struct ThermalTwoPhaseFlowWithPPProcessData bool const has_gravity; bool const has_mass_lumping; - std::unique_ptr<ThermalTwoPhaseFlowWithPPMaterialProperties> material; }; } // namespace ThermalTwoPhaseFlowWithPP -- GitLab