From 40ac7414ac00913327b1b5e37ec616f4ec2bf029 Mon Sep 17 00:00:00 2001 From: Kjetil Olsen Lye Date: Thu, 12 Apr 2012 18:47:06 +0200 Subject: [PATCH] Made a (possibly wrong) adjustment to well_controls_append. Each control now has its current index set to 0, as there's only supposed to be one control per well. --- examples/wells_example.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/wells_example.cpp b/examples/wells_example.cpp index d09a3fdb5..11132ae0a 100644 --- a/examples/wells_example.cpp +++ b/examples/wells_example.cpp @@ -62,6 +62,10 @@ int main(int argc, char** argv) { std::vector omega; computeTotalMobilityOmega(incomp_properties, all_cells, state.saturation(), totmob, omega); + std::vector wdp; + std::vector densities(incomp_properties.density(), incomp_properties.density() + incomp_properties.numPhases()); + computeWDP(*wells.c_wells(), *grid.c_grid(), state.saturation(), densities, wdp); + std::vector src; Opm::FlowBCManager bcs; @@ -70,7 +74,7 @@ int main(int argc, char** argv) { std::vector well_bhp; std::vector well_rate; - pressure_solver.solve(totmob, omega, src, bcs.c_bcs(), pressure, face_flux, well_bhp, well_rate); + pressure_solver.solve(totmob, omega, src, wdp, bcs.c_bcs(), pressure, face_flux, well_bhp, well_rate); std::cout << "Solved" << std::endl; if(wells.wellCollection().conditionsMet(well_bhp, well_rate)) { std::cout << "Conditions met for wells!" << std::endl;