From 5f8319efc7b4618d9d99780105499a6185b6ef40 Mon Sep 17 00:00:00 2001 From: FZill <florian.zill@ufz.de> Date: Thu, 7 Jan 2021 18:21:56 +0100 Subject: [PATCH] [MPL] return 0 for dvalue of some permeability models would otherwise prevent the use of dvalue for other models --- .../PermeabilityMohrCoulombFailureIndexModel.cpp | 7 ++++++- MaterialLib/MPL/Properties/StrainDependentPermeability.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/MaterialLib/MPL/Properties/PermeabilityMohrCoulombFailureIndexModel.cpp b/MaterialLib/MPL/Properties/PermeabilityMohrCoulombFailureIndexModel.cpp index 662a1ba677d..fd0a1066ecf 100644 --- a/MaterialLib/MPL/Properties/PermeabilityMohrCoulombFailureIndexModel.cpp +++ b/MaterialLib/MPL/Properties/PermeabilityMohrCoulombFailureIndexModel.cpp @@ -150,10 +150,15 @@ PermeabilityMohrCoulombFailureIndexModel<DisplacementDim>::value( template <int DisplacementDim> PropertyDataType PermeabilityMohrCoulombFailureIndexModel<DisplacementDim>::dValue( - VariableArray const& /*variable_array*/, Variable const /*variable*/, + VariableArray const& /*variable_array*/, Variable const variable, ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/, double const /*dt*/) const { + if (variable == Variable::mechanical_strain) + { + return 0.; + } + OGS_FATAL( "The derivative of the intrinsic permeability k(sigma, ...) with " "respect to stress tensor (sigma) is not implemented because that " diff --git a/MaterialLib/MPL/Properties/StrainDependentPermeability.cpp b/MaterialLib/MPL/Properties/StrainDependentPermeability.cpp index b141bbc1e47..5769a7cf60c 100644 --- a/MaterialLib/MPL/Properties/StrainDependentPermeability.cpp +++ b/MaterialLib/MPL/Properties/StrainDependentPermeability.cpp @@ -97,10 +97,15 @@ PropertyDataType StrainDependentPermeability<DisplacementDim>::value( template <int DisplacementDim> PropertyDataType StrainDependentPermeability<DisplacementDim>::dValue( - VariableArray const& /*variable_array*/, Variable const /*variable*/, + VariableArray const& /*variable_array*/, Variable const variable, ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/, double const /*dt*/) const { + if (variable == Variable::mechanical_strain) + { + return 0.; + } + OGS_FATAL( "The derivative of the intrinsic permeability of " "StrainDependentPermeability" -- GitLab