Fix mass balance report for multi-epoch case.

Compute initial polymer amount instead of setting it to zero.
Error obvious with multiple epochs.
This commit is contained in:
Atgeirr Flø Rasmussen 2012-10-04 20:02:34 +02:00
parent e13e77a7bb
commit f4abfd6cbb
2 changed files with 6 additions and 6 deletions

View File

@ -270,10 +270,10 @@ namespace Opm
Opm::time::StopWatch total_timer;
total_timer.start();
double init_surfvol[2] = { 0.0 };
double init_polymass = 0.0;
double inplace_surfvol[2] = { 0.0 };
double polymass = 0.0;
double polymass_adsorbed = 0.0;
double polymass = computePolymerMass(porevol, state.saturation(), state.concentration(), poly_props_.deadPoreVol());
double polymass_adsorbed = computePolymerAdsorbed(grid_, props_, poly_props_, state, rock_comp_props_);
double init_polymass = polymass + polymass_adsorbed;
double tot_injected[2] = { 0.0 };
double tot_produced[2] = { 0.0 };
double tot_polyinj = 0.0;

View File

@ -264,10 +264,10 @@ namespace Opm
Opm::time::StopWatch total_timer;
total_timer.start();
double init_satvol[2] = { 0.0 };
double init_polymass = 0.0;
double satvol[2] = { 0.0 };
double polymass = 0.0;
double polymass_adsorbed = 0.0;
double polymass = computePolymerMass(porevol, state.saturation(), state.concentration(), poly_props_.deadPoreVol());
double polymass_adsorbed = computePolymerAdsorbed(props_, poly_props_, porevol, state.maxconcentration());
double init_polymass = polymass + polymass_adsorbed;
double injected[2] = { 0.0 };
double produced[2] = { 0.0 };
double polyinj = 0.0;