# Reg. inclusion of fluid saturation as an input into the MCC framework

**URL:** <https://discourse.opengeosys.org/t/reg-inclusion-of-fluid-saturation-as-an-input-into-the-mcc-framework/1285>\
**Category:** Help & Support\
**Created:** [August 30, 2023, 10:19am UTC](https://discourse.opengeosys.org/t/reg-inclusion-of-fluid-saturation-as-an-input-into-the-mcc-framework/1285 "2023-08-30T10:19:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavanbhukya](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/pavanbhukya/32/1325_2.png) [@pavanbhukya](https://discourse.opengeosys.org/u/pavanbhukya)\
**Post date:** [August 30, 2023, 10:19am UTC](https://discourse.opengeosys.org/t/reg-inclusion-of-fluid-saturation-as-an-input-into-the-mcc-framework/1285/1 "2023-08-30T10:19:55Z")

</div>

Dear OGS community,

I am Pavan. I am working with MFront for material modelling. I am solving a Hydro-Mechanical problem with fluid pressure (i.e., suction) and deformation as primary variables. I am using a Modified Cam Clay (MCC) based constitutive framework for mechanics and Richards equation for fluid flow.

However, I want to include fluid saturation, _S_ (which is a secondary variable in the fluid phase mass balance) as an input to expand/contract my MCC yield surface by altering the pre-consolidation pressure.

I found a way to do this in MFront after discussing it with Dr. Helfer in this [issue](https://github.com/thelfer/tfel/issues/423).

However, I am not sure how to externally supplement saturation to the material model after solving the fluid phase mass balance equation after each time step.

Please let me know if there is anyway.

Thanks  
Pavan.

---

<div class="post-metadata">

**Author:** ![pavanbhukya](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/pavanbhukya/32/1325_2.png) [@pavanbhukya](https://discourse.opengeosys.org/u/pavanbhukya)\
**Post date:** [September 6, 2023, 6:55am UTC](https://discourse.opengeosys.org/t/reg-inclusion-of-fluid-saturation-as-an-input-into-the-mcc-framework/1285/2 "2023-09-06T06:55:17Z")

</div>

Prof. @Thomas_Nagel, could you help me in this regard?

---

<div class="post-metadata">

**Author:** ![Thomas\_Nagel](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/thomas_nagel/32/573_2.png) [@Thomas\_Nagel](https://discourse.opengeosys.org/u/Thomas_Nagel)\
**Post date:** [September 6, 2023, 9:00am UTC](https://discourse.opengeosys.org/t/reg-inclusion-of-fluid-saturation-as-an-input-into-the-mcc-framework/1285/3 "2023-09-06T09:00:39Z")

</div>

This is an important extension – I’d also like to see this in OGS in order to simulate wetting collapse. We’ve prepared for such features, but this is still quite new and there are issues that remain to be solved.

You could simply enter S as an external state variable (like it is done for temperature, just follow the same path in the code). That would allow you to use the current saturation (S+dS) in MFront to change the pre-consolidation pressure. You will not get tangent information out of this, afaik. If you’re lucky, OGS will nevertheless converge.

Otherwise you need to use a generic behaviour. Then, you can also get dsigma\_dS This is what we tested here:

> **[Tests/Data/ThermoRichardsMechanics/MFront/ThermoPoroElasticity · master · ogs...](https://gitlab.opengeosys.org/ogs/ogs/-/tree/master/Tests/Data/ThermoRichardsMechanics/MFront/ThermoPoroElasticity?ref_type=heads)**
>
> OpenGeoSys THM/C simulator

So you could try something similar. In any case, you will have to get into coding a bit.

But as a first step, I recommend you create the corresponding MFront files (maybe one with external state variable, one with generic behaviour) and get the MTests to run on stress/strain and suction/saturation paths to confirm your implementation. For example wetting collapse, if the model can do it. This all has to work before you even touch OGS. Then we can think about the integration into OGS…
