From 886457002e2fa78f28218aca432df08e55dde779 Mon Sep 17 00:00:00 2001 From: Kjetil Olsen Lye Date: Tue, 8 May 2012 12:23:58 +0200 Subject: [PATCH] Changed some minor bugs in the refactored code in wells_example --- examples/wells_example.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/wells_example.cpp b/examples/wells_example.cpp index 168a5168c..159e43ac3 100644 --- a/examples/wells_example.cpp +++ b/examples/wells_example.cpp @@ -81,9 +81,14 @@ int main(int argc, char** argv) std::vector well_rate_per_cell; std::vector rc; rc.resize(grid.c_grid()->number_of_cells); + + int nl_pressure_maxiter = 100; + double nl_pressure_tolerance = 0.0; + if (rock_comp.isActive()) { + nl_pressure_maxiter = parameters.getDefault("nl_pressure_maxiter", 10); + nl_pressure_tolerance = parameters.getDefault("nl_pressure_tolerance", 1.0); // in Pascal + } - const int nl_pressure_maxiter = 100; - const double nl_pressure_tolerance = 1e-8; const int num_cells = grid.c_grid()->number_of_cells; std::vector porevol; if (rock_comp.isActive()) { @@ -117,10 +122,9 @@ int main(int argc, char** argv) well_bhp, well_rate_per_cell); } - // This will be refactored into a separate function once done. const int np = incomp_properties.numPhases(); std::vector fractional_flows(grid.c_grid()->number_of_cells*np, 0.0); - //computeFractionalFlow(incomp_properties, all_cells, state.saturation(), fractional_flows); + computeFractionalFlow(incomp_properties, all_cells, state.saturation(), fractional_flows); // This will be refactored into a separate function once done std::vector well_resflows(wells.c_wells()->number_of_wells*np, 0.0);