From e2e6e2f9ebd2d23c576761f025ff97a6c6ebf3fb Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Sun, 1 Mar 2020 13:24:28 +0100
Subject: [PATCH] [MPL] Fix saturation dependent swelling.

Divide by dt to get a rate instead of an increment.
Update the test references.
---
 MaterialLib/MPL/Properties/SaturationDependentSwelling.cpp    | 2 +-
 .../orthotropic_swelling_xy_pcs_0_ts_104_t_3.000000.vtu       | 4 ++--
 .../orthotropic_swelling_xy_pcs_0_ts_25_t_0.500000.vtu        | 4 ++--
 .../orthotropic_swelling_xy_pcs_0_ts_50_t_1.000000.vtu        | 4 ++--
 .../orthotropic_swelling_xy_pcs_0_ts_54_t_2.000000.vtu        | 4 ++--
 .../orthotropic_swelling_xy_pcs_0_ts_5_t_0.100000.vtu         | 4 ++--
 .../orthotropic_swelling_xy_pcs_0_ts_79_t_2.500000.vtu        | 4 ++--
 .../orthotropic_swelling_xy_pcs_0_ts_99_t_2.900000.vtu        | 4 ++--
 .../orthotropic_swelling_xyz_pcs_0_ts_104_t_3.000000.vtu      | 4 ++--
 .../orthotropic_swelling_xyz_pcs_0_ts_25_t_0.500000.vtu       | 4 ++--
 .../orthotropic_swelling_xyz_pcs_0_ts_50_t_1.000000.vtu       | 4 ++--
 .../orthotropic_swelling_xyz_pcs_0_ts_54_t_2.000000.vtu       | 4 ++--
 .../orthotropic_swelling_xyz_pcs_0_ts_5_t_0.100000.vtu        | 4 ++--
 .../orthotropic_swelling_xyz_pcs_0_ts_79_t_2.500000.vtu       | 4 ++--
 .../orthotropic_swelling_xyz_pcs_0_ts_99_t_2.900000.vtu       | 4 ++--
 15 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/MaterialLib/MPL/Properties/SaturationDependentSwelling.cpp b/MaterialLib/MPL/Properties/SaturationDependentSwelling.cpp
index a176f98e6a2..a36343200f8 100644
--- a/MaterialLib/MPL/Properties/SaturationDependentSwelling.cpp
+++ b/MaterialLib/MPL/Properties/SaturationDependentSwelling.cpp
@@ -97,7 +97,7 @@ PropertyDataType SaturationDependentSwelling::value(
             _lambda[i] * _p[i] * std::pow(S_eff, _lambda[i] - 1) * ei_otimes_ei;
     }
 
-    return (delta_sigma_sw * delta_S_eff).eval();
+    return (delta_sigma_sw * delta_S_eff / dt).eval();
 }
 
 PropertyDataType SaturationDependentSwelling::dValue(
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_104_t_3.000000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_104_t_3.000000.vtu
index 8270a8449dc..6cfc59d398d 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_104_t_3.000000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_104_t_3.000000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:0b0541c2cc75c6e19ed9400e17bfd04d918f4f5038d6bd2a8df3c0f93df429a3
-size 5870
+oid sha256:06e4bbbae10afc40e1537071bf5659284b5d3131807a7ddc101eecdc2d622fb1
+size 5894
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_25_t_0.500000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_25_t_0.500000.vtu
index 9f2ec705916..f04152b8bb1 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_25_t_0.500000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_25_t_0.500000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:1c7799a4d8762e76bb48bf409ffc377afc44f21a2b09896474dd3c6e2c49a4de
-size 5762
+oid sha256:d0f000630e1be7d129622cac1501bded1b790df54291f726c4b8930fde560cc3
+size 5790
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_50_t_1.000000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_50_t_1.000000.vtu
index b1153f5c149..a92deb62b49 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_50_t_1.000000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_50_t_1.000000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a6567d456cc0432ae8990a89be66fc2fc4915e4453c347aa64b4e52626bb3aff
-size 5742
+oid sha256:c8a6c828383948231abbd5a9e2e1addef6514660e356c9c848ce033da210b85f
+size 5746
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_54_t_2.000000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_54_t_2.000000.vtu
index 97d16a3cabb..b77780f429f 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_54_t_2.000000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_54_t_2.000000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:84c075d12f09e3ce9b32f4e2d89b2969b6bea726672c98f502d9a66d32524b91
-size 5746
+oid sha256:538ed01f9f15c421d9f76c9dcaa6770acee2c392c0f2c0c8764525ebf79b5268
+size 5822
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_5_t_0.100000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_5_t_0.100000.vtu
index bf30600e4df..5f8191f5a88 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_5_t_0.100000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_5_t_0.100000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:2d2828b524c66e8f702de55d91b383757ea46555167a1d1aee647d9c637d4434
-size 5062
+oid sha256:bec9cb1b1d8ef8663346791a489583e7a632d4e87428a6c5df74f874856fd766
+size 5086
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_79_t_2.500000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_79_t_2.500000.vtu
index 2951f241ad3..af74958453b 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_79_t_2.500000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_79_t_2.500000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:789943b21f41e393133b49817182e7cf5b4847e3b9b3f44f17fa67a9c5bd051b
-size 5794
+oid sha256:d47b32211260b3de2c44fdffcba86b2fccb1924b53b08270301b66e5dfda6d49
+size 5810
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_99_t_2.900000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_99_t_2.900000.vtu
index c7939580154..7c9e5446ed8 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_99_t_2.900000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_99_t_2.900000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:d810f296763bd33e8ff99c0db22b48ae1343293d6b53c12120a6ec06b3619ce3
-size 5886
+oid sha256:3aee6db85ae2b4e5a137b940a9ffab37d7d29a6f1c1892534e0f059fc5f722bb
+size 5914
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_104_t_3.000000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_104_t_3.000000.vtu
index 6ffe6ce18d6..e76a38c8c28 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_104_t_3.000000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_104_t_3.000000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:3179ab1aa8f64182c33e9f669c1f88a36c9c9be75133018f003fa7e1552c4c37
-size 8453
+oid sha256:f34e390daf56279c7986d720f9d3d40a1e8f699168aa8a9aaf6ab13fa5257c84
+size 8409
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_25_t_0.500000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_25_t_0.500000.vtu
index 68564781399..96efaaf0bd9 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_25_t_0.500000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_25_t_0.500000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:54ec748207309e4111ae80fcc8cc3747107771fe77207aa94efeb8e91d77a2c1
-size 8261
+oid sha256:65570f4c96a0c83ae688f907afd5c0e378e539f3c68122a1d4497d34ee0cc668
+size 8325
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_50_t_1.000000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_50_t_1.000000.vtu
index d913742f8b4..b7d7df22c12 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_50_t_1.000000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_50_t_1.000000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:e7d1fd05c636d7a15546ea5817f3a31768cd33e5acdd8a1e9448bad31a8e3ac8
-size 8077
+oid sha256:64b2b0cb7120363a92420caca5cfca01fc500c3c211caede86e4a84262f50137
+size 8085
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_54_t_2.000000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_54_t_2.000000.vtu
index abb75bf61d7..eff61a9f606 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_54_t_2.000000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_54_t_2.000000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:9cdde7fe729e5aea1e3bee1299df2f667b47be9aff1c0e9b9fd052c201bca908
-size 8245
+oid sha256:838065f327d1bf92fccfbe31d884e0c606faf3d2d2e7d67386fb9c28719e9f7c
+size 8253
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_5_t_0.100000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_5_t_0.100000.vtu
index 8ec0e8bb528..bbae602fcdd 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_5_t_0.100000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_5_t_0.100000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:cbaa9b48db982a332bca6488c4373ec3f3a6a3bcf7e5a05fc7e2385ac185ebf8
-size 5237
+oid sha256:4398eea458a8d7958d2f9c8510040e9d62481b4bd39c75b1b501fd7aba810458
+size 5405
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_79_t_2.500000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_79_t_2.500000.vtu
index 9d417db1f31..f94ad8c34b0 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_79_t_2.500000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_79_t_2.500000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:3dd6949225cc622a6ea92da37e41072b92f4811548adfee054fc342ea6f70f72
-size 8189
+oid sha256:0b76825efa97835b9ab4cf3c5532c9fa3ae13195414da4011050dd50b9e2b632
+size 8237
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_99_t_2.900000.vtu b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_99_t_2.900000.vtu
index 3941920b114..35348483694 100644
--- a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_99_t_2.900000.vtu
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_99_t_2.900000.vtu
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:0dd40e059a3a7a4214a67254a51bfd07c6bc74a59886ed7c63341f191ba64db1
-size 8433
+oid sha256:1fe578c2f47bcd4df13f7b3a6daa6835e0d35e42c55f8edfe8a222fc6818f8dc
+size 8377
-- 
GitLab