Skip to content

Commit

Permalink
Fixed scaling mistake in Mpfa flux.
Browse files Browse the repository at this point in the history
It was assumed to be flux density, however, to follow the same standard as
boundary fluxes it is now given as total inn/out-flow (i.e. assumed to be
scaled by the cell area before it is given to the class).
  • Loading branch information
Runar committed Jun 6, 2017
1 parent d689845 commit ed52ed3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/porepy/numerics/fv/mpfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ def matrix_rhs(self, g, data):
Permeability defined cell-wise. If not given a identity permeability
is assumed and a warning arised.
f : array (self.g.num_cells)
Scalar source term defined cell-wise. Given as flux density, i.e. later
multiplied with the cell sizes. If not given a zero source
Scalar source term defined cell-wise. Given as net inn/out-flow, i.e.
should already have been multiplied with the cell sizes. Positive
values are considered innflow. If not given a zero source
term is assumed and a warning arised.
bc : boundary conditions (optional)
bc_val : dictionary (optional)
Expand Down Expand Up @@ -92,7 +93,7 @@ def rhs(self, g, bound_flux, bc_val, f):
warnings.warn('Scalar source not assigned, assumed null')
div = g.cell_faces.T

return -div * bound_flux * bc_val + f * g.cell_volumes
return -div * bound_flux * bc_val + f

#------------------------------------------------------------------------------#

Expand Down

0 comments on commit ed52ed3

Please sign in to comment.