From 78dea6aa205e597c4bcb9c1eb319c4155e6f5939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Thu, 12 Apr 2012 20:27:29 +0200 Subject: [PATCH] Pass correctly sized well-rate solution vectors to ifs_tpfa_press_flux(). The function computes a total flux at each perforation (connection), not just one total flux per well. Update documentation accordingly. --- opm/core/pressure/IncompTpfa.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/opm/core/pressure/IncompTpfa.cpp b/opm/core/pressure/IncompTpfa.cpp index a9c716cc..15425a1f 100644 --- a/opm/core/pressure/IncompTpfa.cpp +++ b/opm/core/pressure/IncompTpfa.cpp @@ -94,8 +94,9 @@ namespace Opm /// \param[out] faceflux Will contain F signed face flux values. /// \param[out] well_bhp Will contain bhp values for each well passed /// in the constructor. - /// \param[out] well_rate Will contain rate values for each well passed - /// in the constructor. + /// \param[out] well_rate Will contain rate values for each + /// connection in all wells passed in the + /// constructor void IncompTpfa::solve(const std::vector& totmob, const std::vector& omega, const std::vector& src, @@ -139,7 +140,7 @@ namespace Opm if(wells_ != NULL) { well_bhp.resize(wells_->number_of_wells); - well_rate.resize(wells_->number_of_wells); + well_rate.resize(wells_->well_connpos[ wells_->number_of_wells ]); soln.well_flux = &well_rate[0]; soln.well_press = &well_bhp[0]; } @@ -167,8 +168,9 @@ namespace Opm /// \param[out] faceflux Will contain F signed face flux values. /// \param[out] well_bhp Will contain bhp values for each well passed /// in the constructor - /// \param[out] well_rate Will contain rate values for each well passed - /// in the constructor + /// \param[out] well_rate Will contain rate values for each + /// connection in all wells passed in the + /// constructor void IncompTpfa::solve(const std::vector& totmob, const std::vector& omega, const std::vector& src, @@ -235,7 +237,7 @@ namespace Opm if(wells_ != NULL) { well_bhp.resize(wells_->number_of_wells); - well_rate.resize(wells_->number_of_wells); + well_rate.resize(wells_->well_connpos[ wells_->number_of_wells ]); soln.well_flux = &well_rate[0]; soln.well_press = &well_bhp[0]; }