porepy.numerics.interface_laws.hyperbolic_interface_laws module
Module of coupling laws for hyperbolic equations.
- class UpwindCoupling(keyword)[source]
Bases:
AbstractInterfaceLaw
- Parameters
keyword (str) –
- assemble_matrix_rhs(sd_primary, sd_secondary, intf, data_primary, data_secondary, data_intf, matrix)[source]
Construct the matrix (and right-hand side) for the coupling conditions. Note: the right-hand side is not implemented now.
- Parameters
sd_primary (Grid) – grid of higher dimension
sd_secondary (Grid) – grid of lower dimension
data_primary (Dict) – dictionary which stores the data for the higher dimensional grid
data_secondary (Dict) – dictionary which stores the data for the lower dimensional grid
data_intf – dictionary which stores the data for the edges of the grid bucket
matrix (spmatrix) – Uncoupled discretization matrix.
intf (MortarGrid) –
- Returns
- block matrix which store the contribution of the coupling
condition. See the abstract coupling class for a more detailed description.
- Return type
cc
- cfl(sd_primary, sd_secondary, intf, data_primary, data_secondary, data_intf, d_name='mortar_solution')[source]
Return the time step according to the CFL condition. Note: the vector field is assumed to be given as the normal velocity, weighted with the face area, at each face.
The name of data in the input dictionary (data) are: darcy_flux : array (g.num_faces)
Normal velocity at each face, weighted by the face area.
- Parameters
sd_primary – grid of higher dimension
sd_secondary – grid of lower dimension
data_primary – dictionary which stores the data for the higher dimensional grid
data_secondary – dictionary which stores the data for the lower dimensional grid
data – dictionary which stores the data for the edges of the grid bucket
intf (MortarGrid) –
- Returns
time step according to CFL condition.
- Return type
deltaT
Note: the design of this function has not been updated according to the mortar structure. Instead, intf.high_to_mortar_int.nonzero()[1] is used to map the ‘mortar_solution’ (one flux for each mortar dof) to the old darcy_flux (one flux for each sd_primary face).
- ndof(intf)[source]
- Parameters
intf (MortarGrid) –
- Return type