From 530123c4865176a167366edd1a1ba48979949df1 Mon Sep 17 00:00:00 2001 From: Christoph Lehmann Date: Fri, 8 Sep 2023 13:13:39 +0200 Subject: [PATCH 1/2] [PL] Pass volumetric strain to permeability model. --- .../ConstitutiveCommon/PermeabilityModel.cpp | 7 +++++++ .../ConstitutiveCommon/PermeabilityModel.h | 1 + .../ConstitutiveSetting.cpp | 4 ++-- .../ConstitutiveSetting.cpp | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ProcessLib/ThermoRichardsMechanics/ConstitutiveCommon/PermeabilityModel.cpp b/ProcessLib/ThermoRichardsMechanics/ConstitutiveCommon/PermeabilityModel.cpp index 42d3c98b3c2..1b37fcd4ad5 100644 --- a/ProcessLib/ThermoRichardsMechanics/ConstitutiveCommon/PermeabilityModel.cpp +++ b/ProcessLib/ThermoRichardsMechanics/ConstitutiveCommon/PermeabilityModel.cpp @@ -23,11 +23,16 @@ void PermeabilityModel::eval( LiquidViscosityData const& mu_L_data, TransportPorosityData const& transport_poro_data, TotalStressData const& total_stress_data, + StrainData const& eps_data, EquivalentPlasticStrainData const& equiv_plast_strain_data, PermeabilityData& out) const { namespace MPL = MaterialPropertyLib; + static constexpr int kelvin_vector_size = + MathLib::KelvinVector::kelvin_vector_dimensions(DisplacementDim); + using Invariants = MathLib::KelvinVector::Invariants; + auto const& medium = media_data.medium; MPL::VariableArray variables; @@ -57,6 +62,8 @@ void PermeabilityModel::eval( variables.equivalent_plastic_strain = equiv_plast_strain_data.equivalent_plastic_strain; + variables.volumetric_strain = Invariants::trace(eps_data.eps); + auto const K_intrinsic = MPL::formEigenTensor( medium.property(MPL::PropertyType::permeability) .value(variables, x_t.x, x_t.t, x_t.dt)); diff --git a/ProcessLib/ThermoRichardsMechanics/ConstitutiveCommon/PermeabilityModel.h b/ProcessLib/ThermoRichardsMechanics/ConstitutiveCommon/PermeabilityModel.h index 545a67b8fb8..43a90efb3fa 100644 --- a/ProcessLib/ThermoRichardsMechanics/ConstitutiveCommon/PermeabilityModel.h +++ b/ProcessLib/ThermoRichardsMechanics/ConstitutiveCommon/PermeabilityModel.h @@ -28,6 +28,7 @@ struct PermeabilityModel LiquidViscosityData const& mu_L_data, TransportPorosityData const& transport_poro_data, TotalStressData const& total_stress_data, + StrainData const& eps_data, EquivalentPlasticStrainData const& equiv_plast_strain_data, PermeabilityData& out) const; }; diff --git a/ProcessLib/ThermoRichardsMechanics/ConstitutiveStressSaturation_StrainPressureTemperature/ConstitutiveSetting.cpp b/ProcessLib/ThermoRichardsMechanics/ConstitutiveStressSaturation_StrainPressureTemperature/ConstitutiveSetting.cpp index 8f50910fe4f..fba26c23873 100644 --- a/ProcessLib/ThermoRichardsMechanics/ConstitutiveStressSaturation_StrainPressureTemperature/ConstitutiveSetting.cpp +++ b/ProcessLib/ThermoRichardsMechanics/ConstitutiveStressSaturation_StrainPressureTemperature/ConstitutiveSetting.cpp @@ -127,8 +127,8 @@ void ConstitutiveSetting::eval( assertEvalArgsUnique(models.perm_model); models.perm_model.eval(x_t, media_data, S_L_data, p_cap_data, T_data, mu_L_data, state.transport_poro_data, - state.total_stress_data, tmp.equiv_plast_strain_data, - perm_data); + state.total_stress_data, state.eps_data, + tmp.equiv_plast_strain_data, perm_data); assertEvalArgsUnique(models.th_osmosis_model); models.th_osmosis_model.eval(x_t, media_data, T_data, rho_L_data, diff --git a/ProcessLib/ThermoRichardsMechanics/ConstitutiveStress_StrainTemperature/ConstitutiveSetting.cpp b/ProcessLib/ThermoRichardsMechanics/ConstitutiveStress_StrainTemperature/ConstitutiveSetting.cpp index 48d162a4f55..cba97f7d3cc 100644 --- a/ProcessLib/ThermoRichardsMechanics/ConstitutiveStress_StrainTemperature/ConstitutiveSetting.cpp +++ b/ProcessLib/ThermoRichardsMechanics/ConstitutiveStress_StrainTemperature/ConstitutiveSetting.cpp @@ -149,8 +149,8 @@ void ConstitutiveSetting::eval( assertEvalArgsUnique(models.perm_model); models.perm_model.eval(x_t, media_data, S_L_data, p_cap_data, T_data, mu_L_data, state.transport_poro_data, - cd.total_stress_data, tmp.equiv_plast_strain_data, - perm_data); + cd.total_stress_data, state.eps_data, + tmp.equiv_plast_strain_data, perm_data); assertEvalArgsUnique(models.th_osmosis_model); models.th_osmosis_model.eval(x_t, media_data, T_data, rho_L_data, From d50e63888d0d6809e9029a1ebc1769d58ea8211a Mon Sep 17 00:00:00 2001 From: Christoph Lehmann Date: Fri, 8 Sep 2023 13:14:02 +0200 Subject: [PATCH 2/2] [T/TRM] Added a minimal test for passing volumetric strain. --- ...othermal_drainage_imbibition_extended_mfront_model.prj | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Tests/Data/ThermoRichardsMechanics/MFront/ThermoPoroElasticity/uniaxial_isothermal_drainage_imbibition_extended_mfront_model.prj b/Tests/Data/ThermoRichardsMechanics/MFront/ThermoPoroElasticity/uniaxial_isothermal_drainage_imbibition_extended_mfront_model.prj index 4687b388bc5..ce1d13ba14c 100644 --- a/Tests/Data/ThermoRichardsMechanics/MFront/ThermoPoroElasticity/uniaxial_isothermal_drainage_imbibition_extended_mfront_model.prj +++ b/Tests/Data/ThermoRichardsMechanics/MFront/ThermoPoroElasticity/uniaxial_isothermal_drainage_imbibition_extended_mfront_model.prj @@ -129,8 +129,12 @@ permeability - Constant - 2e-20 + Function + + + 2e-20 + volumetric_strain - volumetric_strain + porosity