# Porosity under deformation

In `material/fluidmatrixinteractions/porositydeformation.hh`

, we calculate the effective porosity as

`\phi_\text{eff} = \phi_0 ( 1 + \text{div}\,u ).`

In the last release's `geomechanics/el2p/elementvolumevariables.hh`

, we use

`\phi_\text{eff} = \frac{\phi_0 + \text{div}\,u}{1 + \text{div}\,u},`

justified by the following comment:

```
// this equation would be correct if the bulk volume could change (Vol_new = Vol_init *(1+div u)),
// however, we have a constant bulk volume therefore we should apply phi_eff = phi_init + div u
// but this causes convergence problems. Since div u is very small here the chosen relation is
// assumed to be a good approximation
```

The comment suggests that the truth should be

`\phi_\text{eff} = \phi_0 + \text{div}\,u.`

@martinb, @DennisGlaeser, @holle: What's your opinion? What should we implement? It actually makes a rather big difference: In the setting discussed in #546 (closed), I get the following effective porosities:

Red corresponds to the first formula (master), black to the second (release) and green to the third (suggested by the comment).