porepy.models.poromechanics module

Coupling of mass and momentum balance to obtain poromechanics equations.

The module only contains what is needed for the coupling, the two individual subproblems are defined elsewhere.

The main changes to the equations are achieved by changing the constitutive laws for porosity and stress. The former aquires a pressure dependency and an additional \(lpha\) ablacdotmathbf{u} term, while the latter is modified to include a isotropic pressure term \(lpha p \mathbf{I}\).

Suggested references (TODO: add more, e.g. Inga’s in prep):
class BoundaryConditionsMechanicsTimeDependent[source]

Bases: BoundaryConditionsMomentumBalance

bc_values_mechanics(subdomains)[source]

Boundary values for mechanics.

Parameters:

subdomains (list[Grid]) – List of subdomains on which to define boundary conditions.

Returns:

Array of boundary values.

Return type:

TimeDependentArray

time_dependent_bc_values_mechanics(subdomains)[source]

Boundary values for mechanics.

Parameters:

subdomains (list[Grid]) – List of subdomains on which to define boundary conditions.

Returns:

Array of boundary values.

Return type:

ndarray

bc_values_mechanics_key: str

Key for the mechanical boundary conditions in the state and iterate dictionaries.

class BoundaryConditionsPoromechanics[source]

Bases: BoundaryConditionsSinglePhaseFlow, BoundaryConditionsMechanicsTimeDependent

Combines mass and momentum balance boundary conditions.

Note

The mechanical boundary conditions are differentiated wrt time in the div_u term. Thus, time dependent values must be defined using TimeDependentArray.

To modify the values of the mechanical boundary conditions, the user must redefine the method time_dependent_bc_values_mechanics(), which is called by the methods initial_condition() and before_nonlinear_loop() to update the boundary conditions in data[pp.STATE] and data[pp.STATE][pp.ITERATE].

class ConstitutiveLawsPoromechanics[source]

Bases: DisplacementJumpAperture, BiotCoefficient, PressureStress, PoroMechanicsPorosity, DarcysLaw, DimensionReduction, AdvectiveFlux, FluidMobility, ConstantPermeability, FluidDensityFromPressure, ConstantViscosity, LinearElasticSolid, FracturedSolid, FrictionBound

Class for the coupling of mass and momentum balance to obtain poromechanics equations.

stress(subdomains)[source]

Stress operator.

Parameters:

subdomains (list[Grid]) – List of subdomains where the stress is defined.

Returns:

Operator for the stress.

Return type:

Operator

class EquationsPoromechanics[source]

Bases: MassBalanceEquations, MomentumBalanceEquations

Combines mass and momentum balance equations.

set_equations()[source]

Set the equations for the poromechanics problem.

Call both parent classes’ set_equations methods.

class Poromechanics(params=None)[source]

Bases: EquationsPoromechanics, VariablesPoromechanics, ConstitutiveLawsPoromechanics, BoundaryConditionsPoromechanics, SolutionStrategyPoromechanics, ModelGeometry, DataSavingMixin

Class for the coupling of mass and momentum balance in a mixed-dimensional porous medium.

Parameters:

params (Optional[dict])

class SolutionStrategyPoromechanics(params=None)[source]

Bases: SolutionStrategyTimeDependentBCs, SolutionStrategySinglePhaseFlow, SolutionStrategyMomentumBalance

Combines mass and momentum balance solution strategies.

This class has a diamond structure inheritance. The user should be aware of this and take method resolution order into account when defining new methods.

TODO: More targeted (re-)discretization.

Parameters:

params (Optional[dict])

set_discretization_parameters()[source]

Set parameters for the subproblems and the combined problem.

Return type:

None

mdg: pp.MixedDimensionalGrid

Mixed dimensional grid.

time_dependent_bc_values_mechanics: Callable[[list[pp.Grid]], np.ndarray]

Method for time dependent boundary values for mechanics.

class SolutionStrategyTimeDependentBCs(params=None)[source]

Bases: SolutionStrategy

Parameters:

params (Optional[dict])

before_nonlinear_loop()[source]
Return type:

None

initial_condition()[source]

Set initial condition for the coupled problem.

The initial condition for the coupled problem is the initial condition for the subproblems.

Return type:

None

update_time_dependent_ad_arrays(initial)[source]

Update the time dependent arrays for the mechanics boundary conditions.

Parameters:

initial (bool) – If True, the array generating method is called for both state and iterate. If False, the array generating method is called only for the iterate, and the state is updated by copying the iterate.

Return type:

None

property bc_values_mechanics_key: str

Key for the mechanical boundary conditions in the state and iterate dictionaries.

time_dependent_bc_values_mechanics: Callable[[list[pp.Grid]], np.ndarray]

Method for time dependent boundary conditions for mechanics.

class VariablesPoromechanics[source]

Bases: VariablesSinglePhaseFlow, VariablesMomentumBalance

Combines mass and momentum balance variables.

create_variables()[source]

Set the variables for the poromechanics problem.

Call both parent classes’ set_variables methods.