# Rheology and physics in the new pylith implementation

**URL:** <https://community.geodynamics.org/t/rheology-and-physics-in-the-new-pylith-implementation/751>\
**Category:** PyLith\
**Tags:** poroelasticity\
**Created:** [August 8, 2019, 2:57pm UTC](https://community.geodynamics.org/t/rheology-and-physics-in-the-new-pylith-implementation/751 "2019-08-08T14:57:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josimar](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@josimar](https://community.geodynamics.org/u/josimar)\
**Post date:** [August 8, 2019, 2:57pm UTC](https://community.geodynamics.org/t/rheology-and-physics-in-the-new-pylith-implementation/751/1 "2019-08-08T14:57:22Z")

</div>

Hi Brad,

We (@robertlwalker and @lurpi ) would like to understand better your code design concept in separating the `physics` from `rheology` implementation. To help on this discussion, we could use the incompressible elasticity case:

1. What is the role of the file [`RheologyIncompressibleElasticity.cc`](https://github.com/josimarsilva/pylith/blob/poroelastic/libsrc/pylith/materials/RheologyIncompressibleElasticity.cc) in the materials folder and how is it connected with [`IsotropicLinearIncompElasticity.cc`](https://github.com/josimarsilva/pylith/blob/poroelastic/libsrc/pylith/fekernels/IsotropicLinearIncompElasticity.cc) and [`IncompressibleElasticity`](https://github.com/josimarsilva/pylith/blob/poroelastic/libsrc/pylith/fekernels/IncompressibleElasticity.cc) in the kernels folder and the ones in the materials folder as well ?

2. How does the variable `_rheology` in the `IncompressibleElasticity` in the materials is related to the [`RheologyIncompressibleElasticity.cc`](https://github.com/josimarsilva/pylith/blob/poroelastic/libsrc/pylith/materials/RheologyIncompressibleElasticity.cc) in the materials folder ?

3. Similarly, why do we need to specify the files `RheologyPoroelasticity.cc` and `RheologyElasticity.cc` ?

Thanks,  
Josimar

---

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [August 8, 2019, 4:00pm UTC](https://community.geodynamics.org/t/rheology-and-physics-in-the-new-pylith-implementation/751/2 "2019-08-08T16:00:13Z")

</div>

I need to update the developer section in the manual to discuss the revised implementation. I will put this high on my TODO list.

In the meantime, here is the short explanation without figures. In implementing the governing equations, the material is associated with the governing equation and the rheology is associated with the bulk constitutive model. We now have a few governing equation cases: elasticity (`pylith::materials::Elasticity`), incompressible elasticity (`pylith::materials::IncompressibleElasticity`), and poroelasticity (`pylith::materials::Poroelasticity`). For each of these three governing equation cases (“materials”), we have various rheologies. For example, in the case of elasticity, the rheologies (linear elasticity, Maxwell viscoelastic, generalize Maxwell viscoelastic, and Drucker Prager elastoplastic) are responsible for supplying the kernels for computing the stress tensor. In order to do this, they need constitutive parameters and (optionally) state variables, which we include in the auxiliary field (e.g., shear modulus, bulk modulus). `RheologyElasticity` is the abstract base class that defines the interface that all rheologies for `Elasticity` must use. Likewise, `RheologyPoroelasticity` is the abstract base class that defines the interface that the rheologies for `Poroelasticity` must use.

1. What is the role of the file `RheologyIncompressibleElasticity.cc` in the materials folder and how is it connected with `IsotropicLinearIncompElasticity.cc` and `IncompressibleElasticity` in the kernels folder and the ones in the materials folder as well ?

2. How does the variable `_rheology` in the `IncompressibleElasticity` in the materials is related to the `RheologyIncompressibleElasticity.cc` in the materials folder?

3. Similarly, why do we need to specify the files `RheologyPoroelasticity.cc` and `RheologyElasticity.cc`?
