Skip to content

Commit

Permalink
Merge branch 'strain-dependent-permeability' into 'master'
Browse files Browse the repository at this point in the history
TRM: Enable strain dependent permeability

See merge request ogs/ogs!4731
  • Loading branch information
endJunction committed Sep 15, 2023
2 parents 26c6f2a + d50e638 commit e2233fc
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ void PermeabilityModel<DisplacementDim>::eval(
LiquidViscosityData const& mu_L_data,
TransportPorosityData const& transport_poro_data,
TotalStressData<DisplacementDim> const& total_stress_data,
StrainData<DisplacementDim> const& eps_data,
EquivalentPlasticStrainData const& equiv_plast_strain_data,
PermeabilityData<DisplacementDim>& out) const
{
namespace MPL = MaterialPropertyLib;

static constexpr int kelvin_vector_size =
MathLib::KelvinVector::kelvin_vector_dimensions(DisplacementDim);
using Invariants = MathLib::KelvinVector::Invariants<kelvin_vector_size>;

auto const& medium = media_data.medium;

MPL::VariableArray variables;
Expand Down Expand Up @@ -57,6 +62,8 @@ void PermeabilityModel<DisplacementDim>::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<DisplacementDim>(
medium.property(MPL::PropertyType::permeability)
.value(variables, x_t.x, x_t.t, x_t.dt));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct PermeabilityModel
LiquidViscosityData const& mu_L_data,
TransportPorosityData const& transport_poro_data,
TotalStressData<DisplacementDim> const& total_stress_data,
StrainData<DisplacementDim> const& eps_data,
EquivalentPlasticStrainData const& equiv_plast_strain_data,
PermeabilityData<DisplacementDim>& out) const;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ void ConstitutiveSetting<DisplacementDim>::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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ void ConstitutiveSetting<DisplacementDim>::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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,12 @@
</property>
<property>
<name>permeability</name>
<type>Constant</type>
<value>2e-20</value>
<type>Function</type>
<value>
<!-- If volumetric strain is not set by OGS, it will be NaN.
Hence, the entire expression will be NaN and OGS will fail. -->
<expression>2e-20 + volumetric_strain - volumetric_strain</expression>
</value>
</property>
<property>
<name>porosity</name>
Expand Down

0 comments on commit e2233fc

Please sign in to comment.