porepy.models.contact_mechanics_biot_model module
This is a setup class for solving the Biot equations with contact mechanics at the fractures.
The class ContactMechanicsBiot inherits from ContactMechanics, which is a model for the purely mechanical problem with contact conditions on the fractures. Here, we expand to a model where the displacement solution is coupled to a scalar variable, e.g. pressure (Biot equations) or temperature. Parameters, variables and discretizations are set in the model class, and the problem may be solved using run_biot.
- class ContactMechanicsBiot(params=None)[source]
Bases:
ContactMechanics
This is a shell class for poroelastic contact mechanics problems.
Setting up such problems requires a lot of boilerplate definitions of variables, parameters and discretizations. This class is intended to provide a standardized setup, with all discretizations in place and reasonable parameter and boundary values. The intended use is to inherit from this class, and do the necessary modifications and specifications for the problem to be fully defined. The minimal adjustment needed is to specify the method create_grid().
- Parameters
params (Optional[Dict]) –
- time_manager
Time-stepping control manager.
- displacement_variable
Name assigned to the displacement variable in the highest-dimensional subdomain. Will be used throughout the simulations, including in ParaView export.
- Type
- mortar_displacement_variable
Name assigned to the displacement variable on the fracture walls. Will be used throughout the simulations, including in ParaView export.
- Type
- contact_traction_variable
Name assigned to the variable for contact forces in the fracture. Will be used throughout the simulations, including in ParaView export.
- Type
- scalar_variable
Name assigned to the scalar variable (say, temperature or pressure). Will be used throughout the simulations, including in ParaView export.
- Type
- mortar scalar_variable
Name assigned to the interface scalar variable representing flux between subdomains. Will be used throughout the simulations, including in ParaView export.
- Type
- mechanics_parameter_key
Keyword used to define parameters and discretizations for the mechanics problem.
- Type
- scalar_parameter_key
Keyword used to define parameters and discretizations for the flow problem.
- Type
- mdg
Mixed-dimensional grid. Should be set by a method create_grid which should be provided by the user.
- Type
pp.MixedDimensionalGrid
- scalar_scale
Scaling coefficient for the scalar variable. Can be used to get comparable size of the mechanical and flow problem.
- Type
- scalar_scale
Scaling coefficient for the vector variable. Can be used to get comparable size of the mechanical and flow problem.
- Type
- subtract_fracture_pressure
If True (default) the scalar variable will be interpreted as a pressure, and contribute a force to the fracture walls from the lower-dimensional grid.
- Type
Except from the grid, all attributes are given natural values at initialization of the class.
- before_newton_loop()[source]
Will be run before entering a Newton loop. E.g.
Discretize time-dependent quantities etc. Update time-dependent parameters (captured by assembly).
- Return type
None
- check_convergence(solution, prev_solution, init_solution, nl_params)[source]
Check whether the solution has converged by comparing values from the two most recent iterations.
Tailored implementation if AD is not used. Else, the generic check in AbstractModel is used.
- Parameters
solution (
array
) – solution of current iteration.prev_solution (
array
) – solution of previous iteration.init_solution (
array
) – initial solution (or from beginning of time step).nl_params (
dictionary
) – assumed to have the key nl_convergence_tol whose value is a float.
- Return type
- reconstruct_stress(previous_iterate=False)[source]
Compute the stress in the highest-dimensional grid based on the displacement and pressure states in that grid, adjacent interfaces and global boundary conditions.
The stress is stored in the data dictionary of the highest-dimensional grid, in [pp.STATE][‘stress’].
- Parameters
previous_iterate (
boolean, optional
) – If True, use values from previous iteration to compute the stress. Defaults to False.- Return type
None
- class ContactMechanicsBiotAdObjects[source]
Bases:
ContactMechanicsAdObjects
Storage class for ad related objects.
Stored objects include variables, compound ad operators and projections.
- codim_one_interfaces: List[MortarGrid]
- mortar_projections_scalar: MortarProjections
- subdomain_projections_scalar: SubdomainProjections