From c94cfff4df61159c75c012b84f112392aaac9cf4 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Tue, 25 Feb 2020 19:04:52 +0100
Subject: [PATCH] [T/RM] Orthotropic swelling tests 3d and 2d.

---
 ProcessLib/RichardsMechanics/Tests.cmake      |  38 ++
 Tests/Data/RichardsMechanics/cube_1x1x1.gml   |   3 +
 .../cube_1x1x1_hex20_1e0.vtu                  |   3 +
 .../orthotropic_swelling_xy.prj               | 308 ++++++++++++++++
 ...ic_swelling_xy_pcs_0_ts_104_t_3.000000.vtu |   3 +
 ...pic_swelling_xy_pcs_0_ts_25_t_0.500000.vtu |   3 +
 ...pic_swelling_xy_pcs_0_ts_50_t_1.000000.vtu |   3 +
 ...pic_swelling_xy_pcs_0_ts_54_t_2.000000.vtu |   3 +
 ...opic_swelling_xy_pcs_0_ts_5_t_0.100000.vtu |   3 +
 ...pic_swelling_xy_pcs_0_ts_79_t_2.500000.vtu |   3 +
 ...pic_swelling_xy_pcs_0_ts_99_t_2.900000.vtu |   3 +
 .../orthotropic_swelling_xyz.prj              | 340 ++++++++++++++++++
 ...c_swelling_xyz_pcs_0_ts_104_t_3.000000.vtu |   3 +
 ...ic_swelling_xyz_pcs_0_ts_25_t_0.500000.vtu |   3 +
 ...ic_swelling_xyz_pcs_0_ts_50_t_1.000000.vtu |   3 +
 ...ic_swelling_xyz_pcs_0_ts_54_t_2.000000.vtu |   3 +
 ...pic_swelling_xyz_pcs_0_ts_5_t_0.100000.vtu |   3 +
 ...ic_swelling_xyz_pcs_0_ts_79_t_2.500000.vtu |   3 +
 ...ic_swelling_xyz_pcs_0_ts_99_t_2.900000.vtu |   3 +
 19 files changed, 734 insertions(+)
 create mode 100644 Tests/Data/RichardsMechanics/cube_1x1x1.gml
 create mode 100644 Tests/Data/RichardsMechanics/cube_1x1x1_hex20_1e0.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xy.prj
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_104_t_3.000000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_25_t_0.500000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_50_t_1.000000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_54_t_2.000000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_5_t_0.100000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_79_t_2.500000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_99_t_2.900000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xyz.prj
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_104_t_3.000000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_25_t_0.500000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_50_t_1.000000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_54_t_2.000000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_5_t_0.100000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_79_t_2.500000.vtu
 create mode 100644 Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_99_t_2.900000.vtu

diff --git a/ProcessLib/RichardsMechanics/Tests.cmake b/ProcessLib/RichardsMechanics/Tests.cmake
index 5e6587ce345..f72b6458778 100644
--- a/ProcessLib/RichardsMechanics/Tests.cmake
+++ b/ProcessLib/RichardsMechanics/Tests.cmake
@@ -206,3 +206,41 @@ AddTest(
     GLOB orthotropic_power_law_permeability_xyz_pcs_0_ts_*.vtu porosity porosity 5e-14 1e-15
     GLOB orthotropic_power_law_permeability_xyz_pcs_0_ts_*.vtu porosity_avg porosity_avg 5e-14 1e-15
 )
+AddTest(
+    NAME RichardsMechanics_orthotropic_swelling_xyz
+    PATH RichardsMechanics
+    EXECUTABLE ogs
+    EXECUTABLE_ARGS orthotropic_swelling_xyz.prj
+    WRAPPER time
+    TESTER vtkdiff
+    REQUIREMENTS NOT OGS_USE_MPI
+    DIFF_DATA
+    GLOB orthotropic_swelling_xyz_pcs_0_ts_*.vtu pressure pressure 1e-15 0
+    GLOB orthotropic_swelling_xyz_pcs_0_ts_*.vtu saturation saturation 1e-14 1e-15
+    GLOB orthotropic_swelling_xyz_pcs_0_ts_*.vtu displacement displacement 1e-15 0
+    GLOB orthotropic_swelling_xyz_pcs_0_ts_*.vtu sigma sigma 1e-15 0
+    GLOB orthotropic_swelling_xyz_pcs_0_ts_*.vtu swelling_stress swelling_stress 1e-15 0
+    GLOB orthotropic_swelling_xyz_pcs_0_ts_*.vtu epsilon epsilon 1e-15 0
+    GLOB orthotropic_swelling_xyz_pcs_0_ts_*.vtu velocity velocity 1e-15 0
+    GLOB orthotropic_swelling_xyz_pcs_0_ts_*.vtu porosity porosity 5e-15 1e-15
+    GLOB orthotropic_swelling_xyz_pcs_0_ts_*.vtu porosity_avg porosity_avg 5e-15 1e-15
+)
+AddTest(
+    NAME RichardsMechanics_orthotropic_swelling_xy
+    PATH RichardsMechanics
+    EXECUTABLE ogs
+    EXECUTABLE_ARGS orthotropic_swelling_xy.prj
+    WRAPPER time
+    TESTER vtkdiff
+    REQUIREMENTS NOT OGS_USE_MPI
+    DIFF_DATA
+    GLOB orthotropic_swelling_xy_pcs_0_ts_*.vtu pressure pressure 1e-15 0
+    GLOB orthotropic_swelling_xy_pcs_0_ts_*.vtu saturation saturation 2e-15 1e-15
+    GLOB orthotropic_swelling_xy_pcs_0_ts_*.vtu displacement displacement 1e-15 0
+    GLOB orthotropic_swelling_xy_pcs_0_ts_*.vtu sigma sigma 1e-15 0
+    GLOB orthotropic_swelling_xy_pcs_0_ts_*.vtu swelling_stress swelling_stress 1e-15 0
+    GLOB orthotropic_swelling_xy_pcs_0_ts_*.vtu epsilon epsilon 1e-15 0
+    GLOB orthotropic_swelling_xy_pcs_0_ts_*.vtu velocity velocity 1e-15 0
+    GLOB orthotropic_swelling_xy_pcs_0_ts_*.vtu porosity porosity 1e-15 1e-15
+    GLOB orthotropic_swelling_xy_pcs_0_ts_*.vtu porosity_avg porosity_avg 1e-15 1e-15
+)
diff --git a/Tests/Data/RichardsMechanics/cube_1x1x1.gml b/Tests/Data/RichardsMechanics/cube_1x1x1.gml
new file mode 100644
index 00000000000..92bb259f46c
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/cube_1x1x1.gml
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:eb8c02563eaa7fc99ab48b12feef92962f2265821911831f05ced5673847d7a4
+size 1602
diff --git a/Tests/Data/RichardsMechanics/cube_1x1x1_hex20_1e0.vtu b/Tests/Data/RichardsMechanics/cube_1x1x1_hex20_1e0.vtu
new file mode 100644
index 00000000000..3ce51ef0599
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/cube_1x1x1_hex20_1e0.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b40805033818b949e9d4d7aac6002954f20e6d4b8c6c3b46be36edd0e75034ad
+size 1752
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xy.prj b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy.prj
new file mode 100644
index 00000000000..3f467b63cc8
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy.prj
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<OpenGeoSysProject>
+    <mesh>square_1x1_quad8_1e0.vtu</mesh>
+    <geometry>square_1x1.gml</geometry>
+    <processes>
+        <process>
+            <name>RM</name>
+            <type>RICHARDS_MECHANICS</type>
+            <integration_order>3</integration_order>
+            <dimension>2</dimension>
+            <!--
+            <jacobian_assembler>
+                <type>CentralDifferences</type>
+                <component_magnitudes>1e5 1e-5 1e-5 1e-5</component_magnitudes>
+                <relative_epsilons>1e-8 1e-8 1e-8 1e-8</relative_epsilons>
+            </jacobian_assembler>
+            -->
+            <constitutive_relation>
+                <type>LinearElasticIsotropic</type>
+                <youngs_modulus>E</youngs_modulus>
+                <poissons_ratio>nu</poissons_ratio>
+            </constitutive_relation>
+            <process_variables>
+                <displacement>displacement</displacement>
+                <pressure>pressure</pressure>
+            </process_variables>
+            <secondary_variables>
+                <secondary_variable internal_name="sigma" output_name="sigma"/>
+                <secondary_variable internal_name="swelling_stress" output_name="swelling_stress"/>
+                <secondary_variable internal_name="epsilon" output_name="epsilon"/>
+                <secondary_variable internal_name="velocity" output_name="velocity"/>
+                <secondary_variable internal_name="saturation" output_name="saturation"/>
+                <secondary_variable internal_name="porosity" output_name="porosity"/>
+            </secondary_variables>
+            <specific_body_force>0 0</specific_body_force>
+        </process>
+    </processes>
+    <media>
+        <medium>
+            <phases>
+                <phase>
+                    <type>AqueousLiquid</type>
+                    <properties>
+                        <property>
+                            <name>bulk_modulus</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                        <property>
+                            <name>viscosity</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                        <property>
+                            <name>density</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                    </properties>
+                </phase>
+                <phase>
+                    <type>Solid</type>
+                    <properties>
+                        <property>
+                            <name>bulk_modulus</name>
+                            <type>Constant</type>
+                            <value>10</value>
+                        </property>
+                        <property>
+                            <name>biot_coefficient</name>
+                            <type>Constant</type>
+                            <value>0</value>
+                        </property>
+                        <property>
+                            <name>density</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                        <property>
+                            <name>porosity</name>
+                            <type>Constant</type>
+                            <value>0.5</value>
+                        </property>
+                        <property>
+                            <name>permeability</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                        <property>
+                            <name>swelling_stress_rate</name>
+                            <type>SaturationDependentSwelling</type>
+                            <swelling_pressures>.1 .2 .3</swelling_pressures>
+                            <exponents>1 1 1</exponents>
+                            <lower_saturation_limit>0.3</lower_saturation_limit>
+                            <upper_saturation_limit>0.8</upper_saturation_limit>
+                        </property>
+                    </properties>
+                </phase>
+            </phases>
+            <properties>
+                <property>
+                    <name>reference_temperature</name>
+                    <type>Constant</type>
+                    <value>293.15</value>
+                </property>
+                <property>
+                    <name>saturation</name>
+                    <type>SaturationVanGenuchten</type>
+                    <residual_liquid_saturation>0.1</residual_liquid_saturation>
+                    <residual_gas_saturation>0.05</residual_gas_saturation>
+                    <exponent>0.8</exponent>
+                    <entry_pressure>0.5</entry_pressure>
+                </property>
+                <property>
+                    <name>relative_permeability</name>
+                    <type>Constant</type>
+                    <value>1</value>
+                </property>
+            </properties>
+        </medium>
+    </media>
+    <time_loop>
+        <processes>
+            <process ref="RM">
+                <nonlinear_solver>nonlinear_solver</nonlinear_solver>
+                <compensate_non_equilibrium_initial_residuum>true</compensate_non_equilibrium_initial_residuum>
+                <convergence_criterion>
+                    <type>PerComponentDeltaX</type>
+                    <norm_type>NORM2</norm_type>
+                    <abstols>1e-13 1e-13 1e-13</abstols>
+                </convergence_criterion>
+                <time_discretization>
+                    <type>BackwardEuler</type>
+                </time_discretization>
+                <time_stepping>
+                    <type>FixedTimeStepping</type>
+                    <t_initial>0</t_initial>
+                    <t_end>3</t_end>
+                    <timesteps>
+                        <pair>
+                            <repeat>50</repeat>
+                            <delta_t>.02</delta_t>
+                        </pair>
+
+                        <pair>
+                            <repeat>4</repeat>
+                            <delta_t>.25</delta_t>
+                        </pair>
+
+                        <pair>
+                            <repeat>50</repeat>
+                            <delta_t>.02</delta_t>
+                        </pair>
+                    </timesteps>
+                </time_stepping>
+            </process>
+        </processes>
+        <output>
+            <type>VTK</type>
+            <prefix>orthotropic_swelling_xy</prefix>
+            <timesteps>
+                <pair>
+                    <repeat>1000</repeat>
+                    <each_steps>1</each_steps>
+                </pair>
+            </timesteps>
+            <variables>
+                <variable>displacement</variable>
+                <variable>pressure</variable>
+                <variable>sigma</variable>
+                <variable>swelling_stress</variable>
+                <variable>epsilon</variable>
+                <variable>velocity</variable>
+                <variable>saturation</variable>
+                <variable>porosity</variable>
+            </variables>
+        </output>
+    </time_loop>
+    <local_coordinate_system>
+        <basis_vector_0>e0</basis_vector_0>
+        <basis_vector_1>e1</basis_vector_1>
+    </local_coordinate_system>
+    <parameters>
+        <parameter>
+            <name>e0</name>
+            <type>Constant</type>
+            <values>1 0</values>
+        </parameter>
+        <parameter>
+            <name>e1</name>
+            <type>Constant</type>
+            <values>0 1</values>
+        </parameter>
+        <!-- Mechanics -->
+        <parameter>
+            <name>E</name>
+            <type>Constant</type>
+            <value>1</value>
+        </parameter>
+        <parameter>
+            <name>nu</name>
+            <type>Constant</type>
+            <value>.3</value>
+        </parameter>
+        <!-- Model parameters -->
+        <parameter>
+            <name>displacement0</name>
+            <type>Constant</type>
+            <values>0 0</values>
+        </parameter>
+        <parameter>
+            <name>p0</name>
+            <type>Constant</type>
+            <value>0.1</value>
+        </parameter>
+        <parameter>
+            <name>dirichlet0</name>
+            <type>Constant</type>
+            <values>0</values>
+        </parameter>
+        <parameter>
+            <name>pressure_bc</name>
+            <type>CurveScaled</type>
+            <curve>pressure_ramp</curve>
+            <parameter>p0</parameter>
+        </parameter>
+    </parameters>
+    <curves>
+        <curve>
+            <name>pressure_ramp</name>
+            <coords>0  1   2  3</coords>
+            <values>1 -10 -10 1</values>
+        </curve>
+    </curves>
+    <process_variables>
+        <process_variable>
+            <name>displacement</name>
+            <components>2</components>
+            <order>2</order>
+            <initial_condition>displacement0</initial_condition>
+            <boundary_conditions>
+                <boundary_condition>
+                    <geometrical_set>square_1x1_geometry</geometrical_set>
+                    <geometry>left</geometry>
+                    <type>Dirichlet</type>
+                    <component>0</component>
+                    <parameter>dirichlet0</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>square_1x1_geometry</geometrical_set>
+                    <geometry>bottom</geometry>
+                    <type>Dirichlet</type>
+                    <component>1</component>
+                    <parameter>dirichlet0</parameter>
+                </boundary_condition>
+            </boundary_conditions>
+        </process_variable>
+        <process_variable>
+            <name>pressure</name>
+            <components>1</components>
+            <order>1</order>
+            <initial_condition>p0</initial_condition>
+            <boundary_conditions>
+                <boundary_condition>
+                    <geometrical_set>square_1x1_geometry</geometrical_set>
+                    <geometry>right</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressure_bc</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>square_1x1_geometry</geometrical_set>
+                    <geometry>bottom</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressure_bc</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>square_1x1_geometry</geometrical_set>
+                    <geometry>left</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressure_bc</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>square_1x1_geometry</geometrical_set>
+                    <geometry>top</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressure_bc</parameter>
+                </boundary_condition>
+            </boundary_conditions>
+        </process_variable>
+    </process_variables>
+    <nonlinear_solvers>
+        <nonlinear_solver>
+            <name>nonlinear_solver</name>
+            <type>Newton</type>
+            <max_iter>100</max_iter>
+            <linear_solver>general_linear_solver</linear_solver>
+        </nonlinear_solver>
+    </nonlinear_solvers>
+    <linear_solvers>
+        <linear_solver>
+            <name>general_linear_solver</name>
+            <eigen>
+                <solver_type>SparseLU</solver_type>
+                <scaling>true</scaling>
+            </eigen>
+        </linear_solver>
+    </linear_solvers>
+</OpenGeoSysProject>
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
new file mode 100644
index 00000000000..8270a8449dc
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_104_t_3.000000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0b0541c2cc75c6e19ed9400e17bfd04d918f4f5038d6bd2a8df3c0f93df429a3
+size 5870
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
new file mode 100644
index 00000000000..9f2ec705916
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_25_t_0.500000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1c7799a4d8762e76bb48bf409ffc377afc44f21a2b09896474dd3c6e2c49a4de
+size 5762
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
new file mode 100644
index 00000000000..b1153f5c149
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_50_t_1.000000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a6567d456cc0432ae8990a89be66fc2fc4915e4453c347aa64b4e52626bb3aff
+size 5742
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
new file mode 100644
index 00000000000..97d16a3cabb
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_54_t_2.000000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:84c075d12f09e3ce9b32f4e2d89b2969b6bea726672c98f502d9a66d32524b91
+size 5746
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
new file mode 100644
index 00000000000..bf30600e4df
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_5_t_0.100000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2d2828b524c66e8f702de55d91b383757ea46555167a1d1aee647d9c637d4434
+size 5062
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
new file mode 100644
index 00000000000..2951f241ad3
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_79_t_2.500000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:789943b21f41e393133b49817182e7cf5b4847e3b9b3f44f17fa67a9c5bd051b
+size 5794
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
new file mode 100644
index 00000000000..c7939580154
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xy_pcs_0_ts_99_t_2.900000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d810f296763bd33e8ff99c0db22b48ae1343293d6b53c12120a6ec06b3619ce3
+size 5886
diff --git a/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz.prj b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz.prj
new file mode 100644
index 00000000000..74bc46d475d
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz.prj
@@ -0,0 +1,340 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<OpenGeoSysProject>
+    <mesh>cube_1x1x1_hex20_1e0.vtu</mesh>
+    <geometry>cube_1x1x1.gml</geometry>
+    <processes>
+        <process>
+            <name>RM</name>
+            <type>RICHARDS_MECHANICS</type>
+            <integration_order>3</integration_order>
+            <dimension>3</dimension>
+            <!--
+            <jacobian_assembler>
+                <type>CentralDifferences</type>
+                <component_magnitudes>1e5 1e-5 1e-5 1e-5</component_magnitudes>
+                <relative_epsilons>1e-8 1e-8 1e-8 1e-8</relative_epsilons>
+            </jacobian_assembler>
+            -->
+            <constitutive_relation>
+                <type>LinearElasticIsotropic</type>
+                <youngs_modulus>E</youngs_modulus>
+                <poissons_ratio>nu</poissons_ratio>
+            </constitutive_relation>
+            <process_variables>
+                <displacement>displacement</displacement>
+                <pressure>pressure</pressure>
+            </process_variables>
+            <secondary_variables>
+                <secondary_variable internal_name="sigma" output_name="sigma"/>
+                <secondary_variable internal_name="swelling_stress" output_name="swelling_stress"/>
+                <secondary_variable internal_name="epsilon" output_name="epsilon"/>
+                <secondary_variable internal_name="velocity" output_name="velocity"/>
+                <secondary_variable internal_name="saturation" output_name="saturation"/>
+                <secondary_variable internal_name="porosity" output_name="porosity"/>
+            </secondary_variables>
+            <specific_body_force>0 0 0</specific_body_force>
+        </process>
+    </processes>
+    <media>
+        <medium>
+            <phases>
+                <phase>
+                    <type>AqueousLiquid</type>
+                    <properties>
+                        <property>
+                            <name>bulk_modulus</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                        <property>
+                            <name>viscosity</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                        <property>
+                            <name>density</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                    </properties>
+                </phase>
+                <phase>
+                    <type>Solid</type>
+                    <properties>
+                        <property>
+                            <name>bulk_modulus</name>
+                            <type>Constant</type>
+                            <value>10</value>
+                        </property>
+                        <property>
+                            <name>biot_coefficient</name>
+                            <type>Constant</type>
+                            <value>0</value>
+                        </property>
+                        <property>
+                            <name>density</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                        <property>
+                            <name>porosity</name>
+                            <type>Constant</type>
+                            <value>0.5</value>
+                        </property>
+                        <property>
+                            <name>permeability</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                        <property>
+                            <name>swelling_stress_rate</name>
+                            <type>SaturationDependentSwelling</type>
+                            <swelling_pressures>.1 .2 .3</swelling_pressures>
+                            <exponents>1 1 1</exponents>
+                            <lower_saturation_limit>0.3</lower_saturation_limit>
+                            <upper_saturation_limit>0.8</upper_saturation_limit>
+                        </property>
+                    </properties>
+                </phase>
+            </phases>
+            <properties>
+                <property>
+                    <name>reference_temperature</name>
+                    <type>Constant</type>
+                    <value>293.15</value>
+                </property>
+                <property>
+                    <name>saturation</name>
+                    <type>SaturationVanGenuchten</type>
+                    <residual_liquid_saturation>0.1</residual_liquid_saturation>
+                    <residual_gas_saturation>0.05</residual_gas_saturation>
+                    <exponent>0.8</exponent>
+                    <entry_pressure>0.5</entry_pressure>
+                </property>
+                <property>
+                    <name>relative_permeability</name>
+                    <type>Constant</type>
+                    <value>1</value>
+                </property>
+            </properties>
+        </medium>
+    </media>
+    <time_loop>
+        <processes>
+            <process ref="RM">
+                <nonlinear_solver>nonlinear_solver</nonlinear_solver>
+                <compensate_non_equilibrium_initial_residuum>true</compensate_non_equilibrium_initial_residuum>
+                <convergence_criterion>
+                    <type>PerComponentDeltaX</type>
+                    <norm_type>NORM2</norm_type>
+                    <abstols>1e-13 1e-13 1e-13 1e-13</abstols>
+                </convergence_criterion>
+                <time_discretization>
+                    <type>BackwardEuler</type>
+                </time_discretization>
+                <time_stepping>
+                    <type>FixedTimeStepping</type>
+                    <t_initial>0</t_initial>
+                    <t_end>3</t_end>
+                    <timesteps>
+                        <pair>
+                            <repeat>50</repeat>
+                            <delta_t>.02</delta_t>
+                        </pair>
+
+                        <pair>
+                            <repeat>4</repeat>
+                            <delta_t>.25</delta_t>
+                        </pair>
+
+                        <pair>
+                            <repeat>50</repeat>
+                            <delta_t>.02</delta_t>
+                        </pair>
+                    </timesteps>
+                </time_stepping>
+            </process>
+        </processes>
+        <output>
+            <type>VTK</type>
+            <prefix>orthotropic_swelling_xyz</prefix>
+            <timesteps>
+                <pair>
+                    <repeat>1000</repeat>
+                    <each_steps>1</each_steps>
+                </pair>
+            </timesteps>
+            <variables>
+                <variable>displacement</variable>
+                <variable>pressure</variable>
+                <variable>sigma</variable>
+                <variable>swelling_stress</variable>
+                <variable>epsilon</variable>
+                <variable>velocity</variable>
+                <variable>saturation</variable>
+                <variable>porosity</variable>
+            </variables>
+        </output>
+    </time_loop>
+    <local_coordinate_system>
+        <basis_vector_0>e0</basis_vector_0>
+        <basis_vector_1>e1</basis_vector_1>
+        <basis_vector_2>e2</basis_vector_2>
+    </local_coordinate_system>
+    <parameters>
+        <parameter>
+            <name>e0</name>
+            <type>Constant</type>
+            <values>1 0 0</values>
+        </parameter>
+        <parameter>
+            <name>e1</name>
+            <type>Constant</type>
+            <values>0 1 0</values>
+        </parameter>
+        <parameter>
+            <name>e2</name>
+            <type>Constant</type>
+            <values>0 0 1</values>
+        </parameter>
+        <!-- Mechanics -->
+        <parameter>
+            <name>E</name>
+            <type>Constant</type>
+            <value>1</value>
+        </parameter>
+        <parameter>
+            <name>nu</name>
+            <type>Constant</type>
+            <value>.3</value>
+        </parameter>
+        <!-- Model parameters -->
+        <parameter>
+            <name>displacement0</name>
+            <type>Constant</type>
+            <values>0 0 0</values>
+        </parameter>
+        <parameter>
+            <name>p0</name>
+            <type>Constant</type>
+            <value>0.1</value>
+        </parameter>
+        <parameter>
+            <name>dirichlet0</name>
+            <type>Constant</type>
+            <values>0</values>
+        </parameter>
+        <parameter>
+            <name>pressure_bc</name>
+            <type>CurveScaled</type>
+            <curve>pressure_ramp</curve>
+            <parameter>p0</parameter>
+        </parameter>
+    </parameters>
+    <curves>
+        <curve>
+            <name>pressure_ramp</name>
+            <coords>0  1   2  3</coords>
+            <values>1 -10 -10 1</values>
+        </curve>
+    </curves>
+    <process_variables>
+        <process_variable>
+            <name>displacement</name>
+            <components>3</components>
+            <order>2</order>
+            <initial_condition>displacement0</initial_condition>
+            <boundary_conditions>
+                <boundary_condition>
+                    <geometrical_set>cube_1x1x1_geometry</geometrical_set>
+                    <geometry>left</geometry>
+                    <type>Dirichlet</type>
+                    <component>0</component>
+                    <parameter>dirichlet0</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>cube_1x1x1_geometry</geometrical_set>
+                    <geometry>front</geometry>
+                    <type>Dirichlet</type>
+                    <component>1</component>
+                    <parameter>dirichlet0</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>cube_1x1x1_geometry</geometrical_set>
+                    <geometry>bottom</geometry>
+                    <type>Dirichlet</type>
+                    <component>2</component>
+                    <parameter>dirichlet0</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>cube_1x1x1_geometry</geometrical_set>
+                    <geometry>top</geometry>
+                    <type>Dirichlet</type>
+                    <component>2</component>
+                    <parameter>dirichlet0</parameter>
+                </boundary_condition>
+            </boundary_conditions>
+        </process_variable>
+        <process_variable>
+            <name>pressure</name>
+            <components>1</components>
+            <order>1</order>
+            <initial_condition>p0</initial_condition>
+            <boundary_conditions>
+                <boundary_condition>
+                    <geometrical_set>cube_1x1x1_geometry</geometrical_set>
+                    <geometry>right</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressure_bc</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>cube_1x1x1_geometry</geometrical_set>
+                    <geometry>bottom</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressure_bc</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>cube_1x1x1_geometry</geometrical_set>
+                    <geometry>front</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressure_bc</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>cube_1x1x1_geometry</geometrical_set>
+                    <geometry>left</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressure_bc</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>cube_1x1x1_geometry</geometrical_set>
+                    <geometry>top</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressure_bc</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>cube_1x1x1_geometry</geometrical_set>
+                    <geometry>back</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressure_bc</parameter>
+                </boundary_condition>
+            </boundary_conditions>
+        </process_variable>
+    </process_variables>
+    <nonlinear_solvers>
+        <nonlinear_solver>
+            <name>nonlinear_solver</name>
+            <type>Newton</type>
+            <max_iter>100</max_iter>
+            <linear_solver>general_linear_solver</linear_solver>
+        </nonlinear_solver>
+    </nonlinear_solvers>
+    <linear_solvers>
+        <linear_solver>
+            <name>general_linear_solver</name>
+            <eigen>
+                <solver_type>SparseLU</solver_type>
+                <scaling>true</scaling>
+            </eigen>
+        </linear_solver>
+    </linear_solvers>
+</OpenGeoSysProject>
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
new file mode 100644
index 00000000000..6ffe6ce18d6
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_104_t_3.000000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3179ab1aa8f64182c33e9f669c1f88a36c9c9be75133018f003fa7e1552c4c37
+size 8453
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
new file mode 100644
index 00000000000..68564781399
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_25_t_0.500000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:54ec748207309e4111ae80fcc8cc3747107771fe77207aa94efeb8e91d77a2c1
+size 8261
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
new file mode 100644
index 00000000000..d913742f8b4
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_50_t_1.000000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e7d1fd05c636d7a15546ea5817f3a31768cd33e5acdd8a1e9448bad31a8e3ac8
+size 8077
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
new file mode 100644
index 00000000000..abb75bf61d7
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_54_t_2.000000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9cdde7fe729e5aea1e3bee1299df2f667b47be9aff1c0e9b9fd052c201bca908
+size 8245
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
new file mode 100644
index 00000000000..8ec0e8bb528
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_5_t_0.100000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cbaa9b48db982a332bca6488c4373ec3f3a6a3bcf7e5a05fc7e2385ac185ebf8
+size 5237
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
new file mode 100644
index 00000000000..9d417db1f31
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_79_t_2.500000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3dd6949225cc622a6ea92da37e41072b92f4811548adfee054fc342ea6f70f72
+size 8189
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
new file mode 100644
index 00000000000..3941920b114
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/orthotropic_swelling_xyz_pcs_0_ts_99_t_2.900000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0dd40e059a3a7a4214a67254a51bfd07c6bc74a59886ed7c63341f191ba64db1
+size 8433
-- 
GitLab