Changed treatment of gravity in poromechanics kernels
This PR changes the formulation of the body force and pressure terms in the poromechanics kernels (single-phase and multiphase) to move away from the delta formulation (delta pressure, delta body force, stress interpreted as a delta from an initial stress).
The PR also removes some constitutive fields that are no longer needed after the change:
-
initialDensityinSingleFluidBase -
initialTotalMassDensityinMultiFluidBase
Resolves #2041
Requires rebaseline, because:
- The PR removes some registered fields
- The PR changes the values of effective stress for poromechanics integrated tests with a non-zero initial pressure
I would use the case created by @cssherman in https://github.com/GEOSX/GEOSX/issues/2041 as an integratedTest.
I would use the case created by @cssherman in #2041 as an integratedTest.
Sorry for the delay, I just added the test created by Chris to this PR, which is now ready.
The change proposed in this PR will also affect no-gravity poromechanics simulations because it changes the formulation of the total stress in the code. Specifically, the pressure term is no longer a pressure increment (but the actual pressure value) and the body force term is no longer an increment either.
So, in the poromechanics simulations with this PR, the stress variable of the xml file is an effective stress that does not include the pressure term, and we have to initialize it properly when the simulation has either gravity and/or a non-zero initial pressure to start from an equilibrium state. In our integrated tests and validation tests, I added this effective stress initialization where it was missing to make sure that we don't have numerical diffs. The only thing that I was not able to do is changing this script and its input data because it was generated outside GEOSX.
The main advantage is that the stress computed by GEOSX is not anymore a delta with respect an equilibrium configuration, but now has a meaningful value that users can use in their analyses. But I may be wrong. Is everyone on board with the change?
If everyone is on board with the changes, this PR is ready to be merged.
I personally prefer it this way. Isn't it also more consistent with what we do for the
stressin general?
Yes, with the previous formulation, stress had to be interpreted as a delta stress from an initial equilibrium. Now, the initial stress has to be provided to GEOSX (we have used PR #1927 to compute the initial stress in the field-scale simulations) and the stress computed by GEOSX is no longer a delta wrt to the initial state. This is easier when users want to visualize / analyze / post-process the stress variable.