geodynamics / pylith

PyLith is a finite element code for the solution of dynamic and quasi-static tectonic deformation problems.
Other
154 stars 98 forks source link

Negative porosities when using poroelastic material with state variables #658

Closed danieldouglas92 closed 1 year ago

danieldouglas92 commented 1 year ago

Describe the bug

When using poroelasticity and state variables, the porosity field can develop

To Reproduce

PETSc branch: knepley/pylith PyLith fork: https://github.com/baagaard-usgs/pylith.git PyLith branch: baagaard/example-poroelasticity-statevars

Steps to reproduce the behavior.

pylith step01_elastic_bending.cfg

Expected behavior

The porosity as a physical parameter should not be negative,

Screenshots

image

If applicable, add screenshots to help explain your problem.

Environment

Please provide the following information:

Additional context

Add any other context about the problem here. step01_elastic_bending.txt variable_permeability.txt pylithapp copy.txt top_boundary.txt

knepley commented 1 year ago

Is the porosity a function of other variables? If so, which ones and how are they updated? Pointing me to code is fine.

baagaard-usgs commented 1 year ago

The update of the porosity (plane strain) is in fekernels/IsotropicLinearPoroelasticity.hh.

danieldouglas92 commented 1 year ago

I'm not 100% sure if this is the place but I see it in IsotropicLinearPoroelasticity.hh at line 2488

knepley commented 1 year ago

We should put in an assert there for negative porosity, or a clamp

danieldouglas92 commented 1 year ago

The porosity should only be between 0 and 1, so I think a clamp makes sense!

rwalkerlewis commented 1 year ago

I agree.

On Fri, Sep 29, 2023, 11:36 Daniel Douglas @.***> wrote:

The porosity should only be between 0 and 1, so I think a clamp makes sense!

— Reply to this email directly, view it on GitHub https://github.com/geodynamics/pylith/issues/658#issuecomment-1741329369, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKJY33TFKLO64QDATY6XM2DX44IKVANCNFSM6AAAAAA5MXRBGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

baagaard-usgs commented 1 year ago

Fixed in branch example-poroelasticity-statevars in https://github.com/baagaard-usgs/pylith.git.