diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index de1917a035adebcb96819811c3c5769b99ef94b5..d5349c55aca85d1b4dd98b3c1d8d030d4f1ed6e0 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -780,7 +780,7 @@ void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config, name, *_mesh_vec[0], std::move(jacobian_assembler), _process_variables, _parameters, _local_coordinate_system, integration_order, - process_config); + process_config, _media); break; case 3: process = ProcessLib::ThermoHydroMechanics:: @@ -788,7 +788,7 @@ void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config, name, *_mesh_vec[0], std::move(jacobian_assembler), _process_variables, _parameters, _local_coordinate_system, integration_order, - process_config); + process_config, _media); break; default: OGS_FATAL( diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_biot_coefficient.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_biot_coefficient.md deleted file mode 100644 index 2db4bbf026703aea93279258976457595f09ae97..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_biot_coefficient.md +++ /dev/null @@ -1 +0,0 @@ -Biot coefficient. diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_density.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_density.md deleted file mode 100644 index 722affa8a460db56881b8daeb0831cea20f5ac62..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_density.md +++ /dev/null @@ -1 +0,0 @@ -\copydoc ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcessData::fluid_density diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_specific_heat_capacity.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_specific_heat_capacity.md deleted file mode 100644 index 024bf06abff1e70b276717295a6360e4cbb3ace1..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_specific_heat_capacity.md +++ /dev/null @@ -1 +0,0 @@ -Fluid specific heat capacity is the heat capacity per unit mass of the fluid. diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_thermal_conductivity.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_thermal_conductivity.md deleted file mode 100644 index 75fd9758ed5dcaf750ef28a4568f5f1e09203711..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_thermal_conductivity.md +++ /dev/null @@ -1 +0,0 @@ -Fluid thermal conductivity, the property of fluid to conduct heat. diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_viscosity.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_viscosity.md deleted file mode 100644 index f49c37cdbfa92dc9d521c138d352ae4508d33a0a..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_viscosity.md +++ /dev/null @@ -1 +0,0 @@ -\copydoc ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcessData::fluid_viscosity diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_volumetric_thermal_expansion_coefficient.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_volumetric_thermal_expansion_coefficient.md deleted file mode 100644 index 440f6d0f3143fb2b63caa68149439a5a50675d75..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_fluid_volumetric_thermal_expansion_coefficient.md +++ /dev/null @@ -1 +0,0 @@ -Volumetric thermal expansion coefficient of fluid. diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_intrinsic_permeability.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_intrinsic_permeability.md deleted file mode 100644 index 9559792cd8011dfa8aa950a1d8ffa12ec0d02c9d..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_intrinsic_permeability.md +++ /dev/null @@ -1 +0,0 @@ -Permeability of porous medium. diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_porosity.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_porosity.md deleted file mode 100644 index 418fdcc6bc1a649c41c87583b5d458aff39537a8..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_porosity.md +++ /dev/null @@ -1 +0,0 @@ -Porosity of porous medium. diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_density.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_density.md deleted file mode 100644 index 197239040b301996ba1eb512365643e2e2880a76..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_density.md +++ /dev/null @@ -1 +0,0 @@ -Solid density. diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_linear_thermal_expansion_coefficient.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_linear_thermal_expansion_coefficient.md deleted file mode 100644 index 38eaff68a74714b0e6f9f31ad19aceb4cae7ba0f..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_linear_thermal_expansion_coefficient.md +++ /dev/null @@ -1 +0,0 @@ -Solid linear expansion in one dimension. diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_specific_heat_capacity.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_specific_heat_capacity.md deleted file mode 100644 index 1696adff39dc64b2f079078467745b99684bd5aa..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_specific_heat_capacity.md +++ /dev/null @@ -1 +0,0 @@ -Specific heat capacity, the heat capacity per unit mass of a material. diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_thermal_conductivity.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_thermal_conductivity.md deleted file mode 100644 index 0d0a26a12127fe7b1ea36565ba9f373e9e0788b2..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_solid_thermal_conductivity.md +++ /dev/null @@ -1 +0,0 @@ -Solid thermal conductivity, the property of solid to conduct heat. diff --git a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_specific_storage.md b/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_specific_storage.md deleted file mode 100644 index af55c27a7ae0e332abf290dd82c7621c91c6603b..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/THERMO_HYDRO_MECHANICS/t_specific_storage.md +++ /dev/null @@ -1 +0,0 @@ -Volumetric average specific storage of porous medium and fluid phases. diff --git a/MaterialLib/MPL/Components/GetThermalExpansivity.cpp b/MaterialLib/MPL/Components/GetThermalExpansivity.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38aa9ddb5a4a221aac19ec1fe7cf01cedc6c8f82 --- /dev/null +++ b/MaterialLib/MPL/Components/GetThermalExpansivity.cpp @@ -0,0 +1,43 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + * + * Created on August 16, 2019, 3:40 PM + */ + +#include "GetThermalExpansivity.h" + +#include "MaterialLib/MPL/Phase.h" + +namespace MaterialPropertyLib +{ +class Phase; + +double getThermalExpansivity(Phase const& phase, + VariableArray const& vars, + const double density) +{ + auto const thermal_expansivity_ptr = + &phase.property(MaterialPropertyLib::PropertyType::thermal_expansivity); + + // The thermal expansivity is explicitly given in the project file. + if (thermal_expansivity_ptr) + { + return (*thermal_expansivity_ptr).template value<double>(vars); + } + + // The thermal expansivity calculated by the density model directly. + return (density == 0.0) + ? 0.0 + : -phase.property(MaterialPropertyLib::PropertyType::density) + .template dValue<double>( + vars, MaterialPropertyLib::Variable::temperature) / + density; +} +} // namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Components/GetThermalExpansivity.h b/MaterialLib/MPL/Components/GetThermalExpansivity.h new file mode 100644 index 0000000000000000000000000000000000000000..45ce3c11ae9a1102d803de543968923e4e999857 --- /dev/null +++ b/MaterialLib/MPL/Components/GetThermalExpansivity.h @@ -0,0 +1,44 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + * + * Created on August 16, 2019, 3:40 PM + */ + +#pragma once + +#include "MaterialLib/MPL/VariableType.h" // for VariableArray + +namespace MaterialPropertyLib +{ +class Phase; + +/** + * It gets the thermal expansion coefficient. + * + * If the the thermal expansion coefficient is given in the project file via + * the media property of thermal_expansivity, e.g + * \verbatim + * <property> + * <name>thermal_expansivity</name> + * <type>Constant</type> + * <value>2.07e-4</value> + * </property> + * \endverbatim + * it returns the value of the given property. Otherwise it returns the value + * computed from the density model by the following formula + * \f[ + * (\frac{\partial \rho}{\partial T})/\rho + * \f] + * where \f$\rho\f$ is the density, \f$T\f$ is the temperature. + */ +double getThermalExpansivity(Phase const& phase, + VariableArray const& vars, + const double density); +} // namespace MaterialPropertyLib diff --git a/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp b/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp index 443f72b20c600a1308a33d293cc89730366a97ac..ddd4c8a8d29db681e967e37e0081eada6e5b0afc 100644 --- a/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp +++ b/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp @@ -12,6 +12,9 @@ #include <cassert> +#include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" +#include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" + #include "MaterialLib/SolidModels/CreateConstitutiveRelation.h" #include "MaterialLib/SolidModels/MechanicsBase.h" #include "ParameterLib/Utils.h" @@ -27,15 +30,14 @@ namespace ThermoHydroMechanics { template <int DisplacementDim> std::unique_ptr<Process> createThermoHydroMechanicsProcess( - std::string name, - MeshLib::Mesh& mesh, + std::string 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, boost::optional<ParameterLib::CoordinateSystem> const& local_coordinate_system, - unsigned const integration_order, - BaseLib::ConfigTree const& config) + unsigned const integration_order, BaseLib::ConfigTree const& config, + std::map<int, std::unique_ptr<MaterialPropertyLib::Medium>> const& media) { //! \ogs_file_param{prj__processes__process__type} config.checkConfigParameter("type", "THERMO_HYDRO_MECHANICS"); @@ -126,115 +128,6 @@ std::unique_ptr<Process> createThermoHydroMechanicsProcess( MaterialLib::Solids::createConstitutiveRelations<DisplacementDim>( parameters, local_coordinate_system, config); - // Intrinsic permeability (only one scalar per element, i.e. the isotropic - // case is handled at the moment) - auto& intrinsic_permeability = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__intrinsic_permeability} - "intrinsic_permeability", parameters, 1, &mesh); - - DBUG("Use '%s' as intrinsic conductivity parameter.", - intrinsic_permeability.name.c_str()); - - // Storage coefficient - auto& specific_storage = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__specific_storage} - "specific_storage", parameters, 1, &mesh); - - DBUG("Use '%s' as storage coefficient parameter.", - specific_storage.name.c_str()); - - // Fluid viscosity - auto& fluid_viscosity = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__fluid_viscosity} - "fluid_viscosity", parameters, 1, &mesh); - DBUG("Use '%s' as fluid viscosity parameter.", - fluid_viscosity.name.c_str()); - - // Fluid density - auto& fluid_density = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__fluid_density} - "fluid_density", parameters, 1, &mesh); - DBUG("Use '%s' as fluid density parameter.", fluid_density.name.c_str()); - - // Biot coefficient - auto& biot_coefficient = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__biot_coefficient} - "biot_coefficient", parameters, 1, &mesh); - DBUG("Use '%s' as Biot coefficient parameter.", - biot_coefficient.name.c_str()); - - // Porosity - auto& porosity = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__porosity} - "porosity", parameters, 1, &mesh); - DBUG("Use '%s' as porosity parameter.", porosity.name.c_str()); - - // Solid density - auto& solid_density = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__solid_density} - "solid_density", parameters, 1, &mesh); - DBUG("Use '%s' as solid density parameter.", solid_density.name.c_str()); - - // linear thermal expansion coefficient for solid - auto const& solid_linear_thermal_expansion_coefficient = - ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__solid_linear_thermal_expansion_coefficient} - "solid_linear_thermal_expansion_coefficient", parameters, 1, &mesh); - DBUG("Use '%s' as solid linear thermal expansion coefficient parameter.", - solid_linear_thermal_expansion_coefficient.name.c_str()); - - // volumetric thermal expansion coefficient for fluid - auto const& fluid_volumetric_thermal_expansion_coefficient = - ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__fluid_volumetric_thermal_expansion_coefficient} - "fluid_volumetric_thermal_expansion_coefficient", parameters, 1, - &mesh); - DBUG( - "Use '%s' as fluid volumetric thermal expansion coefficient " - "parameter.", - fluid_volumetric_thermal_expansion_coefficient.name.c_str()); - - // specific heat capacity for solid - auto& solid_specific_heat_capacity = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__solid_specific_heat_capacity} - "solid_specific_heat_capacity", parameters, 1, &mesh); - DBUG("Use '%s' as solid specific heat capacity parameter.", - solid_specific_heat_capacity.name.c_str()); - - // specific heat capacity for fluid - auto& fluid_specific_heat_capacity = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__fluid_specific_heat_capacity} - "fluid_specific_heat_capacity", parameters, 1, &mesh); - DBUG("Use '%s' as fluid specific heat capacity parameter.", - fluid_specific_heat_capacity.name.c_str()); - - // thermal conductivity for solid // currently only considers isotropic - auto& solid_thermal_conductivity = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__solid_thermal_conductivity} - "solid_thermal_conductivity", parameters, 1, &mesh); - DBUG("Use '%s' as solid thermal conductivity parameter.", - solid_thermal_conductivity.name.c_str()); - - // thermal conductivity for fluid // currently only considers isotropic - auto& fluid_thermal_conductivity = ParameterLib::findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__fluid_thermal_conductivity} - "fluid_thermal_conductivity", parameters, 1, &mesh); - DBUG("Use '%s' as fluid thermal conductivity parameter.", - fluid_thermal_conductivity.name.c_str()); - // reference temperature auto& reference_temperature = ParameterLib::findParameter<double>( config, @@ -262,22 +155,13 @@ std::unique_ptr<Process> createThermoHydroMechanicsProcess( std::copy_n(b.data(), b.size(), specific_body_force.data()); } + auto media_map = + MaterialPropertyLib::createMaterialSpatialDistributionMap(media, mesh); + ThermoHydroMechanicsProcessData<DisplacementDim> process_data{ materialIDs(mesh), + std::move(media_map), std::move(solid_constitutive_relations), - intrinsic_permeability, - specific_storage, - fluid_viscosity, - fluid_density, - biot_coefficient, - porosity, - solid_density, - solid_linear_thermal_expansion_coefficient, - fluid_volumetric_thermal_expansion_coefficient, - solid_specific_heat_capacity, - fluid_specific_heat_capacity, - solid_thermal_conductivity, - fluid_thermal_conductivity, reference_temperature, specific_body_force}; @@ -305,7 +189,8 @@ template std::unique_ptr<Process> createThermoHydroMechanicsProcess<2>( boost::optional<ParameterLib::CoordinateSystem> const& local_coordinate_system, unsigned const integration_order, - BaseLib::ConfigTree const& config); + BaseLib::ConfigTree const& config, + std::map<int, std::unique_ptr<MaterialPropertyLib::Medium>> const& media); template std::unique_ptr<Process> createThermoHydroMechanicsProcess<3>( std::string name, @@ -316,7 +201,7 @@ template std::unique_ptr<Process> createThermoHydroMechanicsProcess<3>( boost::optional<ParameterLib::CoordinateSystem> const& local_coordinate_system, unsigned const integration_order, - BaseLib::ConfigTree const& config); - + BaseLib::ConfigTree const& config, + std::map<int, std::unique_ptr<MaterialPropertyLib::Medium>> const& media); } // namespace ThermoHydroMechanics } // namespace ProcessLib diff --git a/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.h b/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.h index 99641a62eb6d2aad89d9575a9174e16fc3c49f6a..cf2468cf6ed5ba304650a7af018286edfc244403 100644 --- a/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.h +++ b/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.h @@ -11,6 +11,7 @@ #pragma once #include <boost/optional.hpp> +#include <map> #include <memory> #include <vector> @@ -18,10 +19,17 @@ namespace BaseLib { class ConfigTree; } + +namespace MaterialPropertyLib +{ +class Medium; +} + namespace MeshLib { class Mesh; } + namespace ParameterLib { struct CoordinateSystem; @@ -48,18 +56,18 @@ std::unique_ptr<Process> createThermoHydroMechanicsProcess( boost::optional<ParameterLib::CoordinateSystem> const& local_coordinate_system, unsigned const integration_order, - BaseLib::ConfigTree const& config); + BaseLib::ConfigTree const& config, + std::map<int, std::unique_ptr<MaterialPropertyLib::Medium>> const& media); extern template std::unique_ptr<Process> createThermoHydroMechanicsProcess<2>( - std::string name, - MeshLib::Mesh& mesh, + std::string 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, boost::optional<ParameterLib::CoordinateSystem> const& local_coordinate_system, - unsigned const integration_order, - BaseLib::ConfigTree const& config); + unsigned const integration_order, BaseLib::ConfigTree const& config, + std::map<int, std::unique_ptr<MaterialPropertyLib::Medium>> const& media); extern template std::unique_ptr<Process> createThermoHydroMechanicsProcess<3>( std::string name, @@ -70,6 +78,7 @@ extern template std::unique_ptr<Process> createThermoHydroMechanicsProcess<3>( boost::optional<ParameterLib::CoordinateSystem> const& local_coordinate_system, unsigned const integration_order, - BaseLib::ConfigTree const& config); + BaseLib::ConfigTree const& config, + std::map<int, std::unique_ptr<MaterialPropertyLib::Medium>> const& media); } // namespace ThermoHydroMechanics } // namespace ProcessLib diff --git a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h index a0095d5b58bea7d53fa768e9f5017d94c8f696a4..0eb510707b7fec1df14b207e9c98718c7656b08c 100644 --- a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h +++ b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h @@ -13,6 +13,13 @@ #include "ThermoHydroMechanicsFEM.h" #include "MaterialLib/SolidModels/SelectSolidConstitutiveRelation.h" + +#include "MaterialLib/MPL/Components/GetThermalExpansivity.h" +#include "MaterialLib/MPL/Medium.h" +#include "MaterialLib/MPL/Property.h" +#include "MaterialLib/MPL/Utils/FormEffectiveThermalConductivity.h" +#include "MaterialLib/MPL/Utils/FormEigenTensor.h" + #include "MathLib/KelvinVector.h" #include "NumLib/Function/Interpolation.h" #include "ProcessLib/CoupledSolutionsForStaggeredScheme.h" @@ -181,6 +188,11 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, ParameterLib::SpatialPosition x_position; x_position.setElementID(_element.getID()); + auto const& medium = _process_data.media_map->getMedium(_element.getID()); + auto const& liquid_phase = medium->phase("AqueousLiquid"); + auto const& solid_phase = medium->phase("Solid"); + MaterialPropertyLib::VariableArray vars; + unsigned const n_integration_points = _integration_method.getNumberOfPoints(); for (unsigned ip = 0; ip < n_integration_points; ip++) @@ -215,51 +227,63 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, auto& eps = _ip_data[ip].eps; auto const& sigma_eff = _ip_data[ip].sigma_eff; - double const S = _process_data.specific_storage(t, x_position)[0]; - // TODO: change it like auto const K_over_mu - // hydraulicConductivity<GlobalDim>(_process_data.intrinsic_permeability(t, - // x_position)/... - double const K_over_mu = - _process_data.intrinsic_permeability(t, x_position)[0] / - _process_data.fluid_viscosity(t, x_position)[0]; - double const alpha_s = - _process_data.solid_linear_thermal_expansion_coefficient( - t, x_position)[0]; - double const beta_f = - _process_data.fluid_volumetric_thermal_expansion_coefficient( - t, x_position)[0]; - // TODO: change it like auto const lambda_f = - // hydraulicConductivity<GlobalDim>(_process_data.intrinsic_permeability(t, - // x_position)/... - double const lambda_f = - _process_data.fluid_thermal_conductivity(t, x_position)[0]; - // TODO: change it like auto const lambda_s = - // hydraulicConductivity<GlobalDim>(_process_data.intrinsic_permeability(t, - // x_position)/... - double const lambda_s = - _process_data.solid_thermal_conductivity(t, x_position)[0]; - double const C_f = - _process_data.fluid_specific_heat_capacity(t, x_position)[0]; - double const C_s = - _process_data.solid_specific_heat_capacity(t, x_position)[0]; + vars[static_cast<int>(MaterialPropertyLib::Variable::temperature)] = + T_int_pt; + vars[static_cast<int>(MaterialPropertyLib::Variable::phase_pressure)] = + N_p * p; + + auto const solid_density = + solid_phase.property(MaterialPropertyLib::PropertyType::density) + .template value<double>(vars); + auto const specific_storage = + solid_phase.property(MaterialPropertyLib::PropertyType::storage) + .template value<double>(vars); + auto const solid_linear_thermal_expansion_coefficient = + solid_phase + .property( + MaterialPropertyLib::PropertyType::thermal_expansivity) + .template value<double>(vars); + + auto const porosity = + solid_phase.property(MaterialPropertyLib::PropertyType::porosity) + .template value<double>(vars); + + auto const intrinsic_permeability = + MaterialPropertyLib::formEigenTensor<DisplacementDim>( + solid_phase + .property(MaterialPropertyLib::PropertyType::permeability) + .value(vars)); + + auto const fluid_density = + liquid_phase.property(MaterialPropertyLib::PropertyType::density) + .template value<double>(vars); + + double const fluid_volumetric_thermal_expansion_coefficient = + MaterialPropertyLib::getThermalExpansivity(liquid_phase, vars, + fluid_density); + + // Use the viscosity model to compute the viscosity + auto const viscosity = + liquid_phase.property(MaterialPropertyLib::PropertyType::viscosity) + .template value<double>(vars); + GlobalDimMatrixType K_over_mu = intrinsic_permeability / viscosity; + double const T0 = _process_data.reference_temperature(t, x_position)[0]; - auto const alpha = _process_data.biot_coefficient(t, x_position)[0]; - auto const rho_sr = _process_data.solid_density(t, x_position)[0]; - auto const rho_fr = _process_data.fluid_density(t, x_position)[0]; - auto const porosity = _process_data.porosity(t, x_position)[0]; + auto const& b = _process_data.specific_body_force; auto const& identity2 = MathLib::KelvinVector::Invariants< MathLib::KelvinVector::KelvinVectorDimensions< DisplacementDim>::value>::identity2; + // TODO (Wenqing) : Change dT to time step wise increment double const delta_T(T_int_pt - T0); - double const thermal_strain = alpha_s * delta_T; + double const thermal_strain = + solid_linear_thermal_expansion_coefficient * delta_T; - double const rho_s = rho_sr * (1 - 3 * thermal_strain); + double const rho_s = solid_density * (1 - 3 * thermal_strain); auto velocity = (-K_over_mu * dNdx_p * p).eval(); - double const rho_f = rho_fr * (1 - beta_f * delta_T); - velocity += K_over_mu * rho_f * b; + velocity += K_over_mu * fluid_density * b; // // displacement equation, displacement part @@ -275,7 +299,7 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, displacement_index, displacement_index) .noalias() += B.transpose() * C * B * w; - auto const rho = rho_s * (1 - porosity) + porosity * rho_f; + auto const rho = rho_s * (1 - porosity) + porosity * fluid_density; local_rhs.template segment<displacement_size>(displacement_index) .noalias() -= (B.transpose() * sigma_eff - N_u_op.transpose() * rho * b) * w; @@ -283,6 +307,11 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, // // displacement equation, pressure part (K_up) // + auto const alpha = + solid_phase + .property(MaterialPropertyLib::PropertyType::biot_coefficient) + .template value<double>(vars); + Kup.noalias() += B.transpose() * alpha * identity2 * N_p * w; // @@ -290,16 +319,18 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, // laplace_p.noalias() += dNdx_p.transpose() * K_over_mu * dNdx_p * w; - storage_p.noalias() += N_p.transpose() * S * N_p * w; + storage_p.noalias() += N_p.transpose() * specific_storage * N_p * w; // // RHS, pressure part // local_rhs.template segment<pressure_size>(pressure_index).noalias() += - dNdx_p.transpose() * rho_f * K_over_mu * b * w; + dNdx_p.transpose() * fluid_density * K_over_mu * b * w; // // pressure equation, temperature part (M_pT) // - auto const beta = porosity * beta_f + (1 - porosity) * 3 * alpha_s; + auto const beta = + porosity * fluid_volumetric_thermal_expansion_coefficient + + (1 - porosity) * 3 * solid_linear_thermal_expansion_coefficient; storage_T.noalias() += N_T.transpose() * beta * N_T * w; // @@ -310,20 +341,46 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, // // temperature equation, temperature part. // - auto const lambda = porosity * lambda_f + (1 - porosity) * lambda_s; - KTT.noalias() += (dNdx_T.transpose() * lambda * dNdx_T + - dNdx_T.transpose() * velocity * N_p * rho_f * C_f) * - w; - // coefficient matrix which is used for calculating the residual - auto const heat_capacity = - porosity * C_f * rho_f + (1 - porosity) * C_s * rho_sr; - MTT.noalias() += N_T.transpose() * heat_capacity * N_T * w; + const double c_f = + liquid_phase + .property( + MaterialPropertyLib::PropertyType::specific_heat_capacity) + .template value<double>(vars); + auto const fluid_thermal_conductivity = + liquid_phase + .property( + MaterialPropertyLib::PropertyType::thermal_conductivity) + .template value<double>(vars); + GlobalDimMatrixType effective_thermal_condictivity = + MaterialPropertyLib::formEffectiveThermalConductivity< + DisplacementDim>( + solid_phase + .property( + MaterialPropertyLib::PropertyType::thermal_conductivity) + .value(vars), + fluid_thermal_conductivity, porosity); + + KTT.noalias() += + (dNdx_T.transpose() * effective_thermal_condictivity * dNdx_T + + dNdx_T.transpose() * velocity * N_p * fluid_density * c_f) * + w; + + auto const effective_volumetric_heat_capacity = + porosity * fluid_density * c_f + + (1.0 - porosity) * solid_density * + solid_phase + .property(MaterialPropertyLib::PropertyType:: + specific_heat_capacity) + .template value<double>(vars); + + MTT.noalias() += + N_T.transpose() * effective_volumetric_heat_capacity * N_T * w; // // temperature equation, pressure part // - KTp.noalias() += K_over_mu * rho_f * C_f * N_T.transpose() * - (dNdx_T * T).transpose() * dNdx_T * w; + KTp.noalias() += fluid_density * c_f * N_T.transpose() * + (dNdx_T * T).transpose() * K_over_mu * dNdx_p * w; } // temperature equation, temperature part local_Jac @@ -384,7 +441,7 @@ template <typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, typename IntegrationMethod, int DisplacementDim> std::vector<double> const& ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, - DisplacementDim>::getIntPtDarcyVelocity(const double t, + DisplacementDim>::getIntPtDarcyVelocity(const double /*t*/, GlobalVector const& current_solution, NumLib::LocalToGlobalIndexMap const& @@ -407,26 +464,51 @@ std::vector<double> const& ThermoHydroMechanicsLocalAssembler< auto p = Eigen::Map<typename ShapeMatricesTypePressure::template VectorType< pressure_size> const>(local_x.data() + pressure_index, pressure_size); + auto T = Eigen::Map<typename ShapeMatricesTypePressure::template VectorType< + temperature_size> const>(local_x.data() + temperature_index, + temperature_size); unsigned const n_integration_points = _integration_method.getNumberOfPoints(); ParameterLib::SpatialPosition x_position; x_position.setElementID(_element.getID()); + + auto const& medium = _process_data.media_map->getMedium(_element.getID()); + auto const& liquid_phase = medium->phase("AqueousLiquid"); + auto const& solid_phase = medium->phase("Solid"); + MaterialPropertyLib::VariableArray vars; + for (unsigned ip = 0; ip < n_integration_points; ip++) { x_position.setIntegrationPoint(ip); - double const K_over_mu = - _process_data.intrinsic_permeability(t, x_position)[0] / - _process_data.fluid_viscosity(t, x_position)[0]; - auto const rho_fr = _process_data.fluid_density(t, x_position)[0]; + auto const& N_p = _ip_data[ip].N_p; + + vars[static_cast<int>(MaterialPropertyLib::Variable::temperature)] = + N_p * T; // N_p = N_T + vars[static_cast<int>(MaterialPropertyLib::Variable::phase_pressure)] = + N_p * p; + + auto const viscosity = + liquid_phase.property(MaterialPropertyLib::PropertyType::viscosity) + .template value<double>(vars); + GlobalDimMatrixType K_over_mu = + MaterialPropertyLib::formEigenTensor<DisplacementDim>( + solid_phase + .property(MaterialPropertyLib::PropertyType::permeability) + .value(vars)) / + viscosity; + + auto const fluid_density = + liquid_phase.property(MaterialPropertyLib::PropertyType::density) + .template value<double>(vars); auto const& b = _process_data.specific_body_force; // Compute the velocity auto const& dNdx_p = _ip_data[ip].dNdx_p; cache_matrix.col(ip).noalias() = - -K_over_mu * dNdx_p * p + K_over_mu * rho_fr * b; + -K_over_mu * dNdx_p * p + K_over_mu * fluid_density * b; } return cache; @@ -452,10 +534,15 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, auto T = Eigen::Map<typename ShapeMatricesTypePressure::template VectorType< temperature_size> const>(local_x.data() + temperature_index, temperature_size); + auto p = Eigen::Map<typename ShapeMatricesTypePressure::template VectorType< + pressure_size> const>(local_x.data() + pressure_index, pressure_size); double const& dt = _process_data.dt; ParameterLib::SpatialPosition x_position; x_position.setElementID(_element.getID()); + auto const& medium = _process_data.media_map->getMedium(_element.getID()); + auto const& solid_phase = medium->phase("Solid"); + MaterialPropertyLib::VariableArray vars; int const n_integration_points = _integration_method.getNumberOfPoints(); for (int ip = 0; ip < n_integration_points; ip++) @@ -476,14 +563,22 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, dNdx_u, N_u, x_coord, _is_axially_symmetric); double const T0 = _process_data.reference_temperature(t, x_position)[0]; - double const alpha_s = - _process_data.solid_linear_thermal_expansion_coefficient( - t, x_position)[0]; double const T_int_pt = N_T * T; + vars[static_cast<int>(MaterialPropertyLib::Variable::temperature)] = + T_int_pt; + vars[static_cast<int>(MaterialPropertyLib::Variable::phase_pressure)] = + N_T * p; // N_T = N_p + + auto const solid_linear_thermal_expansion_coefficient = + solid_phase + .property( + MaterialPropertyLib::PropertyType::thermal_expansivity) + .template value<double>(vars); double const delta_T(T_int_pt - T0); - double const thermal_strain = alpha_s * delta_T; + double const thermal_strain = + solid_linear_thermal_expansion_coefficient * delta_T; auto& eps = _ip_data[ip].eps; eps.noalias() = B * u; diff --git a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM.h b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM.h index 18fb21dcb0416e9fedd78aa2fc48ba42246a3e36..eb66005fdcd84e2a83038485a2c3f2e061db9f57 100644 --- a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM.h +++ b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM.h @@ -53,6 +53,12 @@ public: using ShapeMatricesTypePressure = ShapeMatrixPolicyType<ShapeFunctionPressure, DisplacementDim>; + using GlobalDimMatrixType = + typename ShapeMatricesTypePressure::GlobalDimMatrixType; + + using GlobalDimVectorType = + typename ShapeMatricesTypePressure::GlobalDimVectorType; + static int const KelvinVectorSize = MathLib::KelvinVector::KelvinVectorDimensions<DisplacementDim>::value; using Invariants = MathLib::KelvinVector::Invariants<KelvinVectorSize>; diff --git a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcessData.h b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcessData.h index a9bbc59e9df7d6430d1f657b0b63da5e70fe0b76..cab217a599a6b88c2ee345bab119b779670101d7 100644 --- a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcessData.h +++ b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcessData.h @@ -17,6 +17,8 @@ #include <Eigen/Dense> +#include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" + namespace MaterialLib { namespace Solids @@ -34,37 +36,15 @@ struct ThermoHydroMechanicsProcessData { MeshLib::PropertyVector<int> const* const material_ids = nullptr; + std::unique_ptr<MaterialPropertyLib::MaterialSpatialDistributionMap> + media_map = nullptr; + /// The constitutive relation for the mechanical part. /// \note Linear elasticity is the only supported one in the moment. std::map< int, std::unique_ptr<MaterialLib::Solids::MechanicsBase<DisplacementDim>>> solid_materials; - /// Permeability of the solid. A scalar quantity, - /// ParameterLib::Parameter<double>. - ParameterLib::Parameter<double> const& intrinsic_permeability; - /// Volumetric average specific storage of the solid and fluid phases. - /// A scalar quantity, ParameterLib::Parameter<double>. - ParameterLib::Parameter<double> const& specific_storage; - /// Fluid's viscosity. A scalar quantity, ParameterLib::Parameter<double>. - ParameterLib::Parameter<double> const& fluid_viscosity; - /// Fluid's density. A scalar quantity, ParameterLib::Parameter<double>. - ParameterLib::Parameter<double> const& fluid_density; - /// Biot coefficient. A scalar quantity, ParameterLib::Parameter<double>. - ParameterLib::Parameter<double> const& biot_coefficient; - /// Porosity of the solid. A scalar quantity, - /// ParameterLib::Parameter<double>. - ParameterLib::Parameter<double> const& porosity; - /// Solid's density. A scalar quantity, ParameterLib::Parameter<double>. - ParameterLib::Parameter<double> const& solid_density; - ParameterLib::Parameter<double> const& - solid_linear_thermal_expansion_coefficient; - ParameterLib::Parameter<double> const& - fluid_volumetric_thermal_expansion_coefficient; - ParameterLib::Parameter<double> const& solid_specific_heat_capacity; - ParameterLib::Parameter<double> const& fluid_specific_heat_capacity; - ParameterLib::Parameter<double> const& solid_thermal_conductivity; - ParameterLib::Parameter<double> const& fluid_thermal_conductivity; ParameterLib::Parameter<double> const& reference_temperature; /// Specific body forces applied to solid and fluid. /// It is usually used to apply gravitational forces. diff --git a/Tests/Data/ThermoHydroMechanics/Linear/Beam_sealed_bimaterial/square_1e2.prj b/Tests/Data/ThermoHydroMechanics/Linear/Beam_sealed_bimaterial/square_1e2.prj index 8f84cb29607644e3aee95655b85ac068742f76e0..ace71de594666a8f855939efddd65b2a903707f4 100644 --- a/Tests/Data/ThermoHydroMechanics/Linear/Beam_sealed_bimaterial/square_1e2.prj +++ b/Tests/Data/ThermoHydroMechanics/Linear/Beam_sealed_bimaterial/square_1e2.prj @@ -13,19 +13,6 @@ <youngs_modulus>E</youngs_modulus> <poissons_ratio>nu</poissons_ratio> </constitutive_relation> - <intrinsic_permeability>k</intrinsic_permeability> - <specific_storage>S</specific_storage> - <biot_coefficient>alpha</biot_coefficient> - <porosity>phi</porosity> - <solid_density>rho_sr</solid_density> - <fluid_density>rho_fr</fluid_density> - <fluid_viscosity>mu</fluid_viscosity> - <fluid_volumetric_thermal_expansion_coefficient>beta_f</fluid_volumetric_thermal_expansion_coefficient> - <solid_linear_thermal_expansion_coefficient>alpha_s</solid_linear_thermal_expansion_coefficient> - <solid_specific_heat_capacity>C_s</solid_specific_heat_capacity> - <solid_thermal_conductivity>lambda_s</solid_thermal_conductivity> - <fluid_specific_heat_capacity>C_f</fluid_specific_heat_capacity> - <fluid_thermal_conductivity>lambda_f</fluid_thermal_conductivity> <reference_temperature>T0</reference_temperature> <process_variables> <displacement>displacement</displacement> @@ -39,6 +26,260 @@ <specific_body_force>0 0</specific_body_force> </process> </processes> + <media> + <medium id="0"> + <phases> + <phase> + <type>AqueousLiquid</type> + <properties> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>4186.0</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>0.56e-3</value> + </property> + <property> + <name>density</name> + <type>Linear</type> + <reference_value>1e-6</reference_value> + <independent_variable> + <variable_name>temperature</variable_name> + <reference_condition>283.15</reference_condition> + <slope>-2.07e-4</slope> + </independent_variable> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>2.07e-4</value> + </property> + <property> + <name>viscosity</name> + <type>Constant</type> + <value>1.278e-9</value> + </property> + </properties> + </phase> + <phase> + <type>Solid</type> + <properties> + <property> + <name>permeability</name> + <type>Constant</type> + <value>1.e-6 0 0 1.e-6</value> + </property> + <property> + <name>porosity</name> + <type>Constant</type> + <value>0.1</value> + </property> + <property> + <name>storage</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>density</name> + <type>Constant</type> + <value>1.75e-6</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>2.5e-3</value> + </property> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>1714.0</value> + </property> + <property> + <name>biot_coefficient</name> + <type>Constant</type> + <value>1.0</value> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>0.23333e-5</value> + </property> + </properties> + </phase> + </phases> + </medium> + <medium id="1"> + <phases> + <phase> + <type>AqueousLiquid</type> + <properties> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>4186.0</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>0.56e-3</value> + </property> + <property> + <name>density</name> + <type>Linear</type> + <reference_value>1e-6</reference_value> + <independent_variable> + <variable_name>temperature</variable_name> + <reference_condition>283.15</reference_condition> + <slope>-2.07e-4</slope> + </independent_variable> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>2.07e-4</value> + </property> + <property> + <name>viscosity</name> + <type>Constant</type> + <value>1.278e-9</value> + </property> + </properties> + </phase> + <phase> + <type>Solid</type> + <properties> + <property> + <name>permeability</name> + <type>Constant</type> + <value>1.e-16 0 0 1.e-16</value> + </property> + <property> + <name>porosity</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>storage</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>density</name> + <type>Constant</type> + <value>1.75e-6</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>2.5e-3</value> + </property> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>1714.0</value> + </property> + <property> + <name>biot_coefficient</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>0.23333e-5</value> + </property> + </properties> + </phase> + </phases> + </medium> + <medium id="2"> + <phases> + <phase> + <type>AqueousLiquid</type> + <properties> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>4186.0</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>0.56e-3</value> + </property> + <property> + <name>density</name> + <type>Linear</type> + <reference_value>1e-6</reference_value> + <independent_variable> + <variable_name>temperature</variable_name> + <reference_condition>283.15</reference_condition> + <slope>-2.07e-4</slope> + </independent_variable> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>2.07e-4</value> + </property> + <property> + <name>viscosity</name> + <type>Constant</type> + <value>1.278e-9</value> + </property> + </properties> + </phase> + <phase> + <type>Solid</type> + <properties> + <property> + <name>permeability</name> + <type>Constant</type> + <value>1.e-6 0 0 1.e-6</value> + </property> + <property> + <name>porosity</name> + <type>Constant</type> + <value>0.1</value> + </property> + <property> + <name>storage</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>density</name> + <type>Constant</type> + <value>1.75e-6</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>2.5e-3</value> + </property> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>1714.0</value> + </property> + <property> + <name>biot_coefficient</name> + <type>Constant</type> + <value>1.0</value> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>0.46667e-5</value> + </property> + </properties> + </phase> + </phases> + </medium> + </media> <time_loop> <processes> <process ref="THERMO_HYDRO_MECHANICS"> @@ -100,104 +341,11 @@ <value>9.5</value> </index_values> </parameter> - <parameter> - <name>alpha_s</name> - <type>Group</type> - <group_id_property>MaterialIDs</group_id_property> - <index_values> - <index>0</index> - <value>0.23333e-5</value> - </index_values> - <index_values> - <index>1</index> - <value>0.23333e-5</value> - </index_values> - <index_values> - <index>2</index> - <value>0.46667e-5</value> - </index_values> - </parameter> - <parameter> - <name>phi</name> - <type>Group</type> - <group_id_property>MaterialIDs</group_id_property> - <index_values> - <index>0</index> - <value>0.1</value> - </index_values> - <index_values> - <index>1</index> - <value>0</value> - </index_values> - <index_values> - <index>2</index> - <value>0.1</value> - </index_values> - </parameter> - <parameter> - <name>k</name> - <type>Group</type> - <group_id_property>MaterialIDs</group_id_property> - <index_values> - <index>0</index> - <value>1e-6</value> - </index_values> - <index_values> - <index>1</index> - <value>1e-16</value> - </index_values> - <index_values> - <index>2</index> - <value>1e-6</value> - </index_values> - </parameter> - <parameter> - <name>alpha</name> - <type>Group</type> - <group_id_property>MaterialIDs</group_id_property> - <index_values> - <index>0</index> - <value>1</value> - </index_values> - <index_values> - <index>1</index> - <value>0</value> - </index_values> - <index_values> - <index>2</index> - <value>1</value> - </index_values> - </parameter> <parameter> <name>nu</name> <type>Constant</type> <value>0.3</value> </parameter> - <parameter> - <name>S</name> - <type>Constant</type> - <value>0</value> - </parameter> - <parameter> - <name>rho_sr</name> - <type>Constant</type> - <value>1.75e-6</value> - </parameter> - <parameter> - <name>beta_f</name> - <type>Constant</type> - <value>2.07e-4</value> - </parameter> - <parameter> - <name>lambda_s</name> - <type>Constant</type> - <value>2.5e-3</value> - </parameter> - <parameter> - <name>C_s</name> - <type>Constant</type> - <value>1714.0</value> - </parameter> <parameter> <name>T0</name> <type>Constant</type> @@ -228,26 +376,6 @@ <type>Constant</type> <value>363.15</value> </parameter> - <parameter> - <name>rho_fr</name> - <type>Constant</type> - <value>1e-6</value> - </parameter> - <parameter> - <name>mu</name> - <type>Constant</type> - <value>1.278e-9</value> - </parameter> - <parameter> - <name>C_f</name> - <type>Constant</type> - <value>4186</value> - </parameter> - <parameter> - <name>lambda_f</name> - <type>Constant</type> - <value>0.56e-3</value> - </parameter> </parameters> <process_variables> <process_variable> diff --git a/Tests/Data/ThermoHydroMechanics/Linear/Beam_unsealed_bimaterial/square_1e2.prj b/Tests/Data/ThermoHydroMechanics/Linear/Beam_unsealed_bimaterial/square_1e2.prj index e5ae4709a9984e82ccae571959b37a592f6abaa6..663649224712c0c1912d6df2dd0f610060d72033 100644 --- a/Tests/Data/ThermoHydroMechanics/Linear/Beam_unsealed_bimaterial/square_1e2.prj +++ b/Tests/Data/ThermoHydroMechanics/Linear/Beam_unsealed_bimaterial/square_1e2.prj @@ -13,19 +13,6 @@ <youngs_modulus>E</youngs_modulus> <poissons_ratio>nu</poissons_ratio> </constitutive_relation> - <intrinsic_permeability>k</intrinsic_permeability> - <specific_storage>S</specific_storage> - <biot_coefficient>alpha</biot_coefficient> - <porosity>phi</porosity> - <solid_density>rho_sr</solid_density> - <fluid_density>rho_fr</fluid_density> - <fluid_viscosity>mu</fluid_viscosity> - <fluid_volumetric_thermal_expansion_coefficient>beta_f</fluid_volumetric_thermal_expansion_coefficient> - <solid_linear_thermal_expansion_coefficient>alpha_s</solid_linear_thermal_expansion_coefficient> - <solid_specific_heat_capacity>C_s</solid_specific_heat_capacity> - <solid_thermal_conductivity>lambda_s</solid_thermal_conductivity> - <fluid_specific_heat_capacity>C_f</fluid_specific_heat_capacity> - <fluid_thermal_conductivity>lambda_f</fluid_thermal_conductivity> <reference_temperature>T0</reference_temperature> <process_variables> <displacement>displacement</displacement> @@ -39,6 +26,262 @@ <specific_body_force>0 0</specific_body_force> </process> </processes> + + <media> + <medium id="0"> + <phases> + <phase> + <type>AqueousLiquid</type> + <properties> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>4186.0</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>0.56</value> + </property> + <property> + <name>density</name> + <type>Linear</type> + <reference_value>1e-6</reference_value> + <independent_variable> + <variable_name>temperature</variable_name> + <reference_condition>283.15</reference_condition> + <slope>-2.07e-4</slope> + </independent_variable> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>2.07e-4</value> + </property> + <property> + <name>viscosity</name> + <type>Constant</type> + <value>1.278e-9</value> + </property> + </properties> + </phase> + <phase> + <type>Solid</type> + <properties> + <property> + <name>permeability</name> + <type>Constant</type> + <value>1.e-6 0 0 1.e-6</value> + </property> + <property> + <name>porosity</name> + <type>Constant</type> + <value>0.1</value> + </property> + <property> + <name>storage</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>density</name> + <type>Constant</type> + <value>1.75e-6</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>2.5e-3</value> + </property> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>1714.0</value> + </property> + <property> + <name>biot_coefficient</name> + <type>Constant</type> + <value>1.0</value> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>0.2333333333e-5</value> + </property> + </properties> + </phase> + </phases> + </medium> + <medium id="1"> + <phases> + <phase> + <type>AqueousLiquid</type> + <properties> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>4186.0</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>0.56</value> + </property> + <property> + <name>density</name> + <type>Linear</type> + <reference_value>1e-6</reference_value> + <independent_variable> + <variable_name>temperature</variable_name> + <reference_condition>283.15</reference_condition> + <slope>-2.07e-4</slope> + </independent_variable> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>2.07e-4</value> + </property> + <property> + <name>viscosity</name> + <type>Constant</type> + <value>1.278e-9</value> + </property> + </properties> + </phase> + <phase> + <type>Solid</type> + <properties> + <property> + <name>permeability</name> + <type>Constant</type> + <value>1.e-6 0 0 1.e-6</value> + </property> + <property> + <name>porosity</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>storage</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>density</name> + <type>Constant</type> + <value>1.75e-6</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>2.5e-3</value> + </property> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>1714.0</value> + </property> + <property> + <name>biot_coefficient</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>0.2333333333e-5</value> + </property> + </properties> + </phase> + </phases> + </medium> + <medium id="2"> + <phases> + <phase> + <type>AqueousLiquid</type> + <properties> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>4186.0</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>0.56</value> + </property> + <property> + <name>density</name> + <type>Linear</type> + <reference_value>1e-6</reference_value> + <independent_variable> + <variable_name>temperature</variable_name> + <reference_condition>283.15</reference_condition> + <slope>-2.07e-4</slope> + </independent_variable> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>2.07e-4</value> + </property> + <property> + <name>viscosity</name> + <type>Constant</type> + <value>1.278e-9</value> + </property> + </properties> + </phase> + <phase> + <type>Solid</type> + <properties> + <property> + <name>permeability</name> + <type>Constant</type> + <value>1.e-6 0 0 1.e-6</value> + </property> + <property> + <name>porosity</name> + <type>Constant</type> + <value>0.1</value> + </property> + <property> + <name>storage</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>density</name> + <type>Constant</type> + <value>1.75e-6</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>2.5e-3</value> + </property> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>1714.0</value> + </property> + <property> + <name>biot_coefficient</name> + <type>Constant</type> + <value>1.0</value> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>0.4666666667e-5</value> + </property> + </properties> + </phase> + </phases> + </medium> + </media> + <time_loop> <processes> <process ref="THERMO_HYDRO_MECHANICS"> @@ -100,104 +343,11 @@ <value>10</value> </index_values> </parameter> - <parameter> - <name>alpha_s</name> - <type>Group</type> - <group_id_property>MaterialIDs</group_id_property> - <index_values> - <index>0</index> - <value>0.2333333333e-5</value> - </index_values> - <index_values> - <index>1</index> - <value>0.2333333333e-5</value> - </index_values> - <index_values> - <index>2</index> - <value>0.4666666667e-5</value> - </index_values> - </parameter> - <parameter> - <name>phi</name> - <type>Group</type> - <group_id_property>MaterialIDs</group_id_property> - <index_values> - <index>0</index> - <value>0.1</value> - </index_values> - <index_values> - <index>1</index> - <value>0</value> - </index_values> - <index_values> - <index>2</index> - <value>0.1</value> - </index_values> - </parameter> - <parameter> - <name>k</name> - <type>Group</type> - <group_id_property>MaterialIDs</group_id_property> - <index_values> - <index>0</index> - <value>1e-6</value> - </index_values> - <index_values> - <index>1</index> - <value>1e-6</value> - </index_values> - <index_values> - <index>2</index> - <value>1e-6</value> - </index_values> - </parameter> - <parameter> - <name>alpha</name> - <type>Group</type> - <group_id_property>MaterialIDs</group_id_property> - <index_values> - <index>0</index> - <value>1</value> - </index_values> - <index_values> - <index>1</index> - <value>0</value> - </index_values> - <index_values> - <index>2</index> - <value>1</value> - </index_values> - </parameter> <parameter> <name>nu</name> <type>Constant</type> <value>0.3</value> </parameter> - <parameter> - <name>S</name> - <type>Constant</type> - <value>0</value> - </parameter> - <parameter> - <name>rho_sr</name> - <type>Constant</type> - <value>1.75e-6</value> - </parameter> - <parameter> - <name>beta_f</name> - <type>Constant</type> - <value>2.07e-4</value> - </parameter> - <parameter> - <name>lambda_s</name> - <type>Constant</type> - <value>2.5e-3</value> - </parameter> - <parameter> - <name>C_s</name> - <type>Constant</type> - <value>1714.0</value> - </parameter> <parameter> <name>T0</name> <type>Constant</type> @@ -233,26 +383,6 @@ <type>Constant</type> <value>363.15</value> </parameter> - <parameter> - <name>rho_fr</name> - <type>Constant</type> - <value>1e-6</value> - </parameter> - <parameter> - <name>mu</name> - <type>Constant</type> - <value>1.278e-9</value> - </parameter> - <parameter> - <name>C_f</name> - <type>Constant</type> - <value>4186</value> - </parameter> - <parameter> - <name>lambda_f</name> - <type>Constant</type> - <value>0.56</value> - </parameter> </parameters> <process_variables> <process_variable> diff --git a/Tests/Data/ThermoHydroMechanics/Linear/Point_injection/square_1e2.prj b/Tests/Data/ThermoHydroMechanics/Linear/Point_injection/square_1e2.prj index 159678752a13ff78d5403d48d92e63a752933384..87e15ebe5da9f326b0034a9b0b666b908841e011 100644 --- a/Tests/Data/ThermoHydroMechanics/Linear/Point_injection/square_1e2.prj +++ b/Tests/Data/ThermoHydroMechanics/Linear/Point_injection/square_1e2.prj @@ -13,19 +13,6 @@ <youngs_modulus>E</youngs_modulus> <poissons_ratio>nu</poissons_ratio> </constitutive_relation> - <intrinsic_permeability>k</intrinsic_permeability> - <specific_storage>S</specific_storage> - <biot_coefficient>alpha</biot_coefficient> - <porosity>phi</porosity> - <solid_density>rho_sr</solid_density> - <fluid_density>rho_fr</fluid_density> - <fluid_viscosity>mu</fluid_viscosity> - <fluid_volumetric_thermal_expansion_coefficient>beta_f</fluid_volumetric_thermal_expansion_coefficient> - <solid_linear_thermal_expansion_coefficient>alpha_s</solid_linear_thermal_expansion_coefficient> - <solid_specific_heat_capacity>C_s</solid_specific_heat_capacity> - <solid_thermal_conductivity>lambda_s</solid_thermal_conductivity> - <fluid_specific_heat_capacity>C_f</fluid_specific_heat_capacity> - <fluid_thermal_conductivity>lambda_f</fluid_thermal_conductivity> <reference_temperature>T0</reference_temperature> <process_variables> <displacement>displacement</displacement> @@ -39,6 +26,94 @@ <specific_body_force>0 0</specific_body_force> </process> </processes> + + <media> + <medium id="0"> + <phases> + <phase> + <type>AqueousLiquid</type> + <properties> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>4280.0</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>0.6</value> + </property> + <property> + <name>density</name> + <type>Linear</type> + <reference_value>999.1</reference_value> + <independent_variable> + <variable_name>temperature</variable_name> + <reference_condition>273.15</reference_condition> + <slope>-4e-4</slope> + </independent_variable> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>4.0e-4</value> + </property> + <property> + <name>viscosity</name> + <type>Constant</type> + <value>1.e-3</value> + </property> + </properties> + </phase> + <phase> + <type>Solid</type> + <properties> + <property> + <name>permeability</name> + <type>Constant</type> + <value>2e-20 0 0 2e-20</value> + </property> + <property> + <name>porosity</name> + <type>Constant</type> + <value>0.16</value> + </property> + <property> + <name>storage</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>density</name> + <type>Constant</type> + <value>2290</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>1.838</value> + </property> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>917.654</value> + </property> + <property> + <name>biot_coefficient</name> + <type>Constant</type> + <value>1.0</value> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>1.5e-5</value> + </property> + </properties> + </phase> + </phases> + </medium> + </media> + <time_loop> <processes> <process ref="THERMO_HYDRO_MECHANICS"> @@ -93,51 +168,6 @@ <type>Constant</type> <value>0.3</value> </parameter> - <parameter> - <name>k</name> - <type>Constant</type> - <value>2e-20</value> - </parameter> - <parameter> - <name>S</name> - <type>Constant</type> - <value>0</value> - </parameter> - <parameter> - <name>alpha</name> - <type>Constant</type> - <value>1</value> - </parameter> - <parameter> - <name>phi</name> - <type>Constant</type> - <value>0.16</value> - </parameter> - <parameter> - <name>rho_sr</name> - <type>Constant</type> - <value>2290</value> - </parameter> - <parameter> - <name>alpha_s</name> - <type>Constant</type> - <value>1.5e-5</value> - </parameter> - <parameter> - <name>beta_f</name> - <type>Constant</type> - <value>4e-4</value> - </parameter> - <parameter> - <name>lambda_s</name> - <type>Constant</type> - <value>1.838</value> - </parameter> - <parameter> - <name>C_s</name> - <type>Constant</type> - <value>917.654</value> - </parameter> <parameter> <name>T0</name> <type>Constant</type> @@ -183,26 +213,6 @@ <type>Constant</type> <value>150</value> </parameter> - <parameter> - <name>rho_fr</name> - <type>Constant</type> - <value>999.1</value> - </parameter> - <parameter> - <name>mu</name> - <type>Constant</type> - <value>1e-3</value> - </parameter> - <parameter> - <name>C_f</name> - <type>Constant</type> - <value>4280</value> - </parameter> - <parameter> - <name>lambda_f</name> - <type>Constant</type> - <value>0.6</value> - </parameter> </parameters> <process_variables> <process_variable> diff --git a/Tests/Data/ThermoHydroMechanics/Linear/Square_sealed_homogeneous/square_1e0.prj b/Tests/Data/ThermoHydroMechanics/Linear/Square_sealed_homogeneous/square_1e0.prj index 727f1e8b899af85de36ec0957eac26889d461303..ef56bac35b7336c5059d53995536851667a4949e 100644 --- a/Tests/Data/ThermoHydroMechanics/Linear/Square_sealed_homogeneous/square_1e0.prj +++ b/Tests/Data/ThermoHydroMechanics/Linear/Square_sealed_homogeneous/square_1e0.prj @@ -13,19 +13,6 @@ <youngs_modulus>E</youngs_modulus> <poissons_ratio>nu</poissons_ratio> </constitutive_relation> - <intrinsic_permeability>k</intrinsic_permeability> - <specific_storage>S</specific_storage> - <biot_coefficient>alpha</biot_coefficient> - <porosity>phi</porosity> - <solid_density>rho_sr</solid_density> - <fluid_density>rho_fr</fluid_density> - <fluid_viscosity>mu</fluid_viscosity> - <fluid_volumetric_thermal_expansion_coefficient>beta_f</fluid_volumetric_thermal_expansion_coefficient> - <solid_linear_thermal_expansion_coefficient>alpha_s</solid_linear_thermal_expansion_coefficient> - <solid_specific_heat_capacity>C_s</solid_specific_heat_capacity> - <solid_thermal_conductivity>lambda_s</solid_thermal_conductivity> - <fluid_specific_heat_capacity>C_f</fluid_specific_heat_capacity> - <fluid_thermal_conductivity>lambda_f</fluid_thermal_conductivity> <reference_temperature>T0</reference_temperature> <process_variables> <temperature>temperature</temperature> @@ -39,6 +26,94 @@ <specific_body_force>0 0</specific_body_force> </process> </processes> + + <media> + <medium id="0"> + <phases> + <phase> + <type>AqueousLiquid</type> + <properties> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>4186.0</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>0.56</value> + </property> + <property> + <name>density</name> + <type>Linear</type> + <reference_value>1e-6</reference_value> + <independent_variable> + <variable_name>temperature</variable_name> + <reference_condition>273.15</reference_condition> + <slope>-2.07e-4</slope> + </independent_variable> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>2.07e-4</value> + </property> + <property> + <name>viscosity</name> + <type>Constant</type> + <value>1.278e-9</value> + </property> + </properties> + </phase> + <phase> + <type>Solid</type> + <properties> + <property> + <name>permeability</name> + <type>Constant</type> + <value>1e-6 0 0 1e-6</value> + </property> + <property> + <name>porosity</name> + <type>Constant</type> + <value>0.4</value> + </property> + <property> + <name>storage</name> + <type>Constant</type> + <value>0.0</value> + </property> + <property> + <name>density</name> + <type>Constant</type> + <value>1.75e-6</value> + </property> + <property> + <name>thermal_conductivity</name> + <type>Constant</type> + <value>0.9e-3</value> + </property> + <property> + <name>specific_heat_capacity</name> + <type>Constant</type> + <value>1714.0</value> + </property> + <property> + <name>biot_coefficient</name> + <type>Constant</type> + <value>1.0</value> + </property> + <property> + <name>thermal_expansivity</name> + <type>Constant</type> + <value>0.7e-5</value> + </property> + </properties> + </phase> + </phases> + </medium> + </media> + <time_loop> <processes> <process ref="THERMO_HYDRO_MECHANICS"> @@ -93,51 +168,6 @@ <type>Constant</type> <value>0.3</value> </parameter> - <parameter> - <name>k</name> - <type>Constant</type> - <value>1e-6</value> - </parameter> - <parameter> - <name>S</name> - <type>Constant</type> - <value>0</value> - </parameter> - <parameter> - <name>alpha</name> - <type>Constant</type> - <value>1</value> - </parameter> - <parameter> - <name>phi</name> - <type>Constant</type> - <value>0.4</value> - </parameter> - <parameter> - <name>rho_sr</name> - <type>Constant</type> - <value>1.75e-6</value> - </parameter> - <parameter> - <name>alpha_s</name> - <type>Constant</type> - <value>0.7e-5</value> - </parameter> - <parameter> - <name>beta_f</name> - <type>Constant</type> - <value>2.07e-4</value> - </parameter> - <parameter> - <name>lambda_s</name> - <type>Constant</type> - <value>0.9e-3</value> - </parameter> - <parameter> - <name>C_s</name> - <type>Constant</type> - <value>1714.0</value> - </parameter> <parameter> <name>T0</name> <type>Constant</type> @@ -168,26 +198,6 @@ <type>Constant</type> <value>353.15</value> </parameter> - <parameter> - <name>rho_fr</name> - <type>Constant</type> - <value>1e-6</value> - </parameter> - <parameter> - <name>mu</name> - <type>Constant</type> - <value>1.278e-9</value> - </parameter> - <parameter> - <name>C_f</name> - <type>Constant</type> - <value>4186</value> - </parameter> - <parameter> - <name>lambda_f</name> - <type>Constant</type> - <value>0.56</value> - </parameter> </parameters> <process_variables> <process_variable>