From 8bd7d89d00d6433adc76e3df57f1cee23758a26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Wed, 16 Feb 2011 10:41:43 +0100 Subject: [PATCH] Implement total rate constraint for wells. Untested. --- src/cfs_tpfa.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cfs_tpfa.c b/src/cfs_tpfa.c index 94234aaca..96e501abe 100644 --- a/src/cfs_tpfa.c +++ b/src/cfs_tpfa.c @@ -715,6 +715,11 @@ assemble_well_contrib(size_t nc, } is_neumann = is_neumann && (! is_bhp); + + if (! is_bhp) { + /* Enforce total (reservoir volume) rate constraint. */ + h->b[nc + w] += wctrl->target[w]; + } } return is_neumann;