diff --git a/ProcessLib/RichardsMechanics/Tests.cmake b/ProcessLib/RichardsMechanics/Tests.cmake
index a3947b88ba673f92c3a5425e623ddbc7d6b2a330..5a9888aba7a862e55f32822281bdd151760faa6b 100644
--- a/ProcessLib/RichardsMechanics/Tests.cmake
+++ b/ProcessLib/RichardsMechanics/Tests.cmake
@@ -182,7 +182,24 @@ AddTest(
     GLOB RichardsFlow_2d_richardsflow_pcs_0_ts_*.vtu pressure pressure 5e-11 1e-15
     GLOB RichardsFlow_2d_richardsflow_pcs_0_ts_*.vtu saturation saturation 1e-14 1e-15
 )
-
+AddTest(
+    NAME RichardsMechanics_deformation_dependent_porosity
+    PATH RichardsMechanics
+    EXECUTABLE ogs
+    EXECUTABLE_ARGS deformation_dependent_porosity.prj
+    WRAPPER time
+    TESTER vtkdiff
+    REQUIREMENTS NOT OGS_USE_MPI
+    DIFF_DATA
+    GLOB deformation_dependent_porosity_pcs_0_ts_*.vtu pressure pressure 5e-11 1e-15
+    GLOB deformation_dependent_porosity_pcs_0_ts_*.vtu saturation saturation 1e-14 0
+    GLOB deformation_dependent_porosity_pcs_0_ts_*.vtu displacement displacement 5e-11 0
+    GLOB deformation_dependent_porosity_pcs_0_ts_*.vtu sigma sigma 1e-14 0
+    GLOB deformation_dependent_porosity_pcs_0_ts_*.vtu epsilon epsilon 1e-14 0
+    GLOB deformation_dependent_porosity_pcs_0_ts_*.vtu velocity velocity 5e-14 0
+    GLOB deformation_dependent_porosity_pcs_0_ts_*.vtu porosity porosity 5e-14 1e-15
+    GLOB deformation_dependent_porosity_pcs_0_ts_*.vtu porosity_avg porosity_avg 1e-14 1e-15
+)
 #PETSc
 AddTest(
     NAME Parallel_RichardsMechanics_RichardsFlow_2d_richardsflow
diff --git a/Tests/Data/RichardsMechanics/deformation_dependent_porosity.prj b/Tests/Data/RichardsMechanics/deformation_dependent_porosity.prj
new file mode 100644
index 0000000000000000000000000000000000000000..6810b7220c6de8d96bc6b06020c0886b1e7ea60b
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/deformation_dependent_porosity.prj
@@ -0,0 +1,340 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<OpenGeoSysProject>
+    <mesh>square_1x1_quad8_1e2.vtu</mesh>
+    <geometry>square_1x1.gml</geometry>
+    <processes>
+        <process>
+            <name>RM</name>
+            <type>RICHARDS_MECHANICS</type>
+            <integration_order>3</integration_order>
+            <dimension>2</dimension>
+            <!-- Keep for testing
+            <jacobian_assembler>
+                <type>CentralDifferences</type>
+                <component_magnitudes>1e5 1e5 1e5 1e5 1e-5 1e-5 1e-5 1e-5 1e-5 1e-5 1e-5 1e-5 1e-5 1e-5 1e-5 1e-5 1e-5 1e-5 1e-5 1e-5</component_magnitudes>
+                <relative_epsilons>1e-8 1e-8 1e-8 1e-8 1e-8 1e-8 1e-8 1e-8 1e-8 1e-8 1e-8 1e-8 1e-8 1e-8 1e-8 1e-8 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="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>1</value>
+                        </property>
+                        <property>
+                            <name>density</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                        <property>
+                            <name>porosity</name>
+                            <type>PorosityFromMassBalance</type>
+                            <initial_porosity>phi0</initial_porosity>
+                        </property>
+                        <property>
+                            <name>permeability</name>
+                            <type>Constant</type>
+                            <value>1</value>
+                        </property>
+                    </properties>
+                </phase>
+            </phases>
+            <properties>
+                <property>
+                    <name>reference_temperature</name>
+                    <type>Constant</type>
+                    <value>293.15</value>
+                </property>
+                <property>
+                    <name>saturation</name>
+                    <type>Constant</type>
+                    <value>1</value>
+                </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>
+                <convergence_criterion>
+                    <type>PerComponentDeltaX</type>
+                    <norm_type>NORM2</norm_type>
+                    <abstols>1e-14 1e-14 1e-14</abstols>
+                </convergence_criterion>
+                <time_discretization>
+                    <type>BackwardEuler</type>
+                </time_discretization>
+                <time_stepping>
+                    <type>FixedTimeStepping</type>
+                    <t_initial>0</t_initial>
+                    <t_end>4</t_end>
+                    <timesteps>
+                        <pair>
+                            <repeat>20</repeat>
+                            <delta_t>.01</delta_t>
+                        </pair>
+                        <pair>
+                            <repeat>8</repeat>
+                            <delta_t>.1</delta_t>
+                        </pair>
+                        <pair>
+                            <repeat>20</repeat>
+                            <delta_t>.01</delta_t>
+                        </pair>
+                        <pair>
+                            <repeat>8</repeat>
+                            <delta_t>.1</delta_t>
+                        </pair>
+                        <pair>
+                            <repeat>20</repeat>
+                            <delta_t>.01</delta_t>
+                        </pair>
+                        <pair>
+                            <repeat>8</repeat>
+                            <delta_t>.1</delta_t>
+                        </pair>
+                        <pair>
+                            <repeat>20</repeat>
+                            <delta_t>.01</delta_t>
+                        </pair>
+                        <pair>
+                            <repeat>8</repeat>
+                            <delta_t>.1</delta_t>
+                        </pair>
+                    </timesteps>
+                </time_stepping>
+            </process>
+        </processes>
+        <output>
+            <type>VTK</type>
+            <prefix>deformation_dependent_porosity</prefix>
+            <timesteps>
+                <pair>
+                    <repeat>1000</repeat>
+                    <each_steps>1</each_steps>
+                </pair>
+            </timesteps>
+            <variables>
+                <variable>displacement</variable>
+                <variable>pressure</variable>
+                <variable>sigma</variable>
+                <variable>epsilon</variable>
+                <variable>velocity</variable>
+                <variable>saturation</variable>
+                <variable>porosity</variable>
+            </variables>
+        </output>
+    </time_loop>
+    <parameters>
+        <!-- Mechanics -->
+        <parameter>
+            <name>E</name>
+            <type>Constant</type>
+            <value>1</value>
+        </parameter>
+        <parameter>
+            <name>nu</name>
+            <type>Constant</type>
+            <value>.3</value>
+        </parameter>
+        <parameter>
+            <name>phi0</name>
+            <type>Constant</type>
+            <value>0.5</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</value>
+        </parameter>
+        <parameter>
+            <name>dirichlet0</name>
+            <type>Constant</type>
+            <values>0</values>
+        </parameter>
+        <parameter>
+            <name>maximum_pressure</name>
+            <type>Constant</type>
+            <value>0.1</value>
+        </parameter>
+        <parameter>
+            <name>maximum_displacement</name>
+            <type>Constant</type>
+            <value>-0.1</value>
+        </parameter>
+        <parameter>
+            <name>pressureRamp</name>
+            <type>CurveScaled</type>
+            <curve>pressure</curve>
+            <parameter>maximum_pressure</parameter>
+        </parameter>
+        <parameter>
+            <name>displacementRamp</name>
+            <type>CurveScaled</type>
+            <curve>displacement</curve>
+            <parameter>maximum_displacement</parameter>
+        </parameter>
+    </parameters>
+    <curves>
+        <curve>
+            <name>displacement</name>
+            <coords>0 1 2 3 4</coords>
+            <values>0 1 1 1 1</values>
+        </curve>
+        <curve>
+            <name>pressure</name>
+            <coords>0 1 2 3 4</coords>
+            <values>0 0 0 1 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_condition>
+                    <geometrical_set>square_1x1_geometry</geometrical_set>
+                    <geometry>top</geometry>
+                    <type>Dirichlet</type>
+                    <component>1</component>
+                    <parameter>displacementRamp</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>square_1x1_geometry</geometrical_set>
+                    <geometry>right</geometry>
+                    <type>Dirichlet</type>
+                    <component>0</component>
+                    <parameter>displacementRamp</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>top</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressureRamp</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>square_1x1_geometry</geometrical_set>
+                    <geometry>right</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressureRamp</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>square_1x1_geometry</geometrical_set>
+                    <geometry>bottom</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressureRamp</parameter>
+                </boundary_condition>
+                <boundary_condition>
+                    <geometrical_set>square_1x1_geometry</geometrical_set>
+                    <geometry>left</geometry>
+                    <type>Dirichlet</type>
+                    <parameter>pressureRamp</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>BiCGSTAB</solver_type>
+                <precon_type>DIAGONAL</precon_type>
+                <max_iteration_step>10000</max_iteration_step>
+                <error_tolerance>1e-16</error_tolerance>
+            </eigen>
+        </linear_solver>
+    </linear_solvers>
+</OpenGeoSysProject>
diff --git a/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_107_t_3.500000.vtu b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_107_t_3.500000.vtu
new file mode 100644
index 0000000000000000000000000000000000000000..dd01912f080470c7c700ae351b72eb0798044de8
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_107_t_3.500000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:709f8e22fb7554d0256cc95fd405b53eb15fa7747fc1becd235ca31de743dd69
+size 36135
diff --git a/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_112_t_4.000000.vtu b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_112_t_4.000000.vtu
new file mode 100644
index 0000000000000000000000000000000000000000..e76337a19fe432db03aa57f7882f3a8243de5888
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_112_t_4.000000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c380d8c83f080dc76c617f6b66127265afd1c7cb9bee3da6b6e549c3a5be804d
+size 37175
diff --git a/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_23_t_0.500000.vtu b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_23_t_0.500000.vtu
new file mode 100644
index 0000000000000000000000000000000000000000..344013f70515d9c928f5a1095025dbc53d9edbbf
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_23_t_0.500000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:50b6ba5608efca468e735c2b955e84c64d5d8ef6aa1583957702b24bfc86db65
+size 33967
diff --git a/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_28_t_1.000000.vtu b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_28_t_1.000000.vtu
new file mode 100644
index 0000000000000000000000000000000000000000..6c8f924b7a6202cdd4c0719888f7910ead97c662
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_28_t_1.000000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:456f52140fb0fb083cafe84777291b8c64a226f6c390c0237d0b21190d7ec86b
+size 34055
diff --git a/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_51_t_1.500000.vtu b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_51_t_1.500000.vtu
new file mode 100644
index 0000000000000000000000000000000000000000..1396e73c8a158a5cb3e0ee2760b5d5921a95da64
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_51_t_1.500000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:61f0e77f093a2fdad2d7be06ba8bd94f7c7a059653c3a10ee8b5778cf124d5f8
+size 36723
diff --git a/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_56_t_2.000000.vtu b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_56_t_2.000000.vtu
new file mode 100644
index 0000000000000000000000000000000000000000..c70b1a520b73c3bb880ae568e6362ffa3972f346
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_56_t_2.000000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1946371f0e29478f24b2c51be20261e66ff691806ded54eb57494c4da9a85fb5
+size 38167
diff --git a/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_79_t_2.500000.vtu b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_79_t_2.500000.vtu
new file mode 100644
index 0000000000000000000000000000000000000000..8e01971158e0dcac79991a0d04715ead5429cbfa
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_79_t_2.500000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:910dba2fe0968a2d9b58fedcf61d42ca3a7986663f1a365c00501427bd4b2458
+size 34619
diff --git a/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_84_t_3.000000.vtu b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_84_t_3.000000.vtu
new file mode 100644
index 0000000000000000000000000000000000000000..ecc2f9ece3541c0dd86a0746408fa12004d6f6fe
--- /dev/null
+++ b/Tests/Data/RichardsMechanics/deformation_dependent_porosity_pcs_0_ts_84_t_3.000000.vtu
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c15759406217c2eaadc0904a0506aea42226a1ab181d35739327748031abdf79
+size 34631