From 3802f79db1a1c6328faa93457dbf7b4d3fe62296 Mon Sep 17 00:00:00 2001
From: AlirezaBGE <a.hassanzadegan@gmail.com>
Date: Wed, 25 Aug 2021 10:47:36 +0200
Subject: [PATCH] MPa changes in gas perm

---
 .../MPL/Properties/GasPressureDependentPermeability.cpp  | 9 +++++----
 .../MPL/Properties/GasPressureDependentPermeability.h    | 4 ++++
 .../MaterialLib/TestGasPressureDependentPermeability.cpp | 6 +++---
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/MaterialLib/MPL/Properties/GasPressureDependentPermeability.cpp b/MaterialLib/MPL/Properties/GasPressureDependentPermeability.cpp
index c163598e75f..6a236135147 100644
--- a/MaterialLib/MPL/Properties/GasPressureDependentPermeability.cpp
+++ b/MaterialLib/MPL/Properties/GasPressureDependentPermeability.cpp
@@ -62,10 +62,11 @@ PropertyDataType GasPressureDependentPermeability<DisplacementDim>::value(
 
     auto k_data = k0_(t, pos);
 
-    double const factor = (gas_pressure <= pressure_threshold_)
-                              ? (1.0 + a1_ * gas_pressure)
-                              : (a2_ * (gas_pressure - pressure_threshold_) +
-                                 1.0 + a1_ * pressure_threshold_);
+    double const factor =
+        (gas_pressure <= pressure_threshold_)
+            ? (1.0 + a1_ * gas_pressure / 1.0e6)
+            : (a2_ * (gas_pressure - pressure_threshold_) / 1.0e6 + 1.0 +
+               a1_ * pressure_threshold_ / 1.0e6);
 
     for (auto& k_i : k_data)
     {
diff --git a/MaterialLib/MPL/Properties/GasPressureDependentPermeability.h b/MaterialLib/MPL/Properties/GasPressureDependentPermeability.h
index 1147f82a4d5..5d91e7a938e 100644
--- a/MaterialLib/MPL/Properties/GasPressureDependentPermeability.h
+++ b/MaterialLib/MPL/Properties/GasPressureDependentPermeability.h
@@ -41,6 +41,10 @@ namespace MaterialPropertyLib
  *  where \f$\mathbf{k}\f$ is the permeability, \f$\mathbf{k}_0\f$ is the
  * initial intrinsic permeability, \f$p_g\f$ is the gas pressure, \f$a_1\f$,
  * \f$a_2\f$ and \f$p_\text{thr}\f$ are three parameters.
+ * The threshold pressure and gas pressure, \f$p_g\f$ , \f$p_\text{thr}\f$, are
+ * in Pascal, and the \f$a_1\f$ and \f$a_2\f$ are dimensionless, representing
+ * the values reported in \cite xu2013coupled, and
+ * permeabilities,\f$\mathbf{k}\f$ and \f$\mathbf{k}_0\f$ are in \f$m^2\f$.
  *
  */
 template <int DisplacementDim>
diff --git a/Tests/MaterialLib/TestGasPressureDependentPermeability.cpp b/Tests/MaterialLib/TestGasPressureDependentPermeability.cpp
index d0771c3ad9a..f8c675eb7fd 100644
--- a/Tests/MaterialLib/TestGasPressureDependentPermeability.cpp
+++ b/Tests/MaterialLib/TestGasPressureDependentPermeability.cpp
@@ -27,7 +27,7 @@ TEST(MaterialPropertyLib, GasPressureDependentPermeability)
     ParameterLib::ConstantParameter<double> const k0("k0", 1.e-20);
     double const a1 = 0.125;
     double const a2 = 152.0;
-    double const pressure_threshold = 3.2;
+    double const pressure_threshold = 3.2e6;
     double const min_permeability = 1.e-22;
     double const max_permeability = 1.e-10;
 
@@ -42,7 +42,7 @@ TEST(MaterialPropertyLib, GasPressureDependentPermeability)
 
     /// For gas pressure smaller than threshold value.
     {
-        double const p_gas = 2.5;
+        double const p_gas = 2.5e6;
 
         vars[static_cast<int>(MPL::Variable::phase_pressure)] = p_gas;
         auto const k = MPL::formEigenTensor<3>(k_model.value(vars, pos, t, dt));
@@ -58,7 +58,7 @@ TEST(MaterialPropertyLib, GasPressureDependentPermeability)
     }
     /// For gas pressure bigger than threshold value.
     {
-        double const p_gas = 4.5;
+        double const p_gas = 4.5e6;
 
         vars[static_cast<int>(MPL::Variable::phase_pressure)] = p_gas;
         auto const k = MPL::formEigenTensor<3>(k_model.value(vars, pos, t, dt));
-- 
GitLab