mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Improve reporting of volume balance.
Should now give more accurate results when taking multiple substeps.
This commit is contained in:
parent
076164d3f3
commit
678611166d
@ -329,13 +329,24 @@ namespace Opm
|
|||||||
stepsize /= double(num_transport_substeps_);
|
stepsize /= double(num_transport_substeps_);
|
||||||
std::cout << "Making " << num_transport_substeps_ << " transport substeps." << std::endl;
|
std::cout << "Making " << num_transport_substeps_ << " transport substeps." << std::endl;
|
||||||
}
|
}
|
||||||
|
double substep_injected[2] = { 0.0 };
|
||||||
|
double substep_produced[2] = { 0.0 };
|
||||||
|
double substep_polyinj = 0.0;
|
||||||
|
double substep_polyprod = 0.0;
|
||||||
|
injected[0] = injected[1] = produced[0] = produced[1] = polyinj = polyprod = 0.0;
|
||||||
for (int tr_substep = 0; tr_substep < num_transport_substeps_; ++tr_substep) {
|
for (int tr_substep = 0; tr_substep < num_transport_substeps_; ++tr_substep) {
|
||||||
tsolver_.solve(&state.faceflux()[0], &porevol[0], &transport_src[0], stepsize, inflow_c,
|
tsolver_.solve(&state.faceflux()[0], &porevol[0], &transport_src[0], stepsize, inflow_c,
|
||||||
state.saturation(), state.concentration(), state.maxconcentration());
|
state.saturation(), state.concentration(), state.maxconcentration());
|
||||||
Opm::computeInjectedProduced(props_, poly_props_,
|
Opm::computeInjectedProduced(props_, poly_props_,
|
||||||
state.saturation(), state.concentration(), state.maxconcentration(),
|
state.saturation(), state.concentration(), state.maxconcentration(),
|
||||||
transport_src, timer.currentStepLength(), inflow_c,
|
transport_src, stepsize, inflow_c,
|
||||||
injected, produced, polyinj, polyprod);
|
substep_injected, substep_produced, substep_polyinj, substep_polyprod);
|
||||||
|
injected[0] += substep_injected[0];
|
||||||
|
injected[1] += substep_injected[1];
|
||||||
|
produced[0] += substep_produced[0];
|
||||||
|
produced[1] += substep_produced[1];
|
||||||
|
polyinj += substep_polyinj;
|
||||||
|
polyprod += substep_polyprod;
|
||||||
if (use_segregation_split_) {
|
if (use_segregation_split_) {
|
||||||
tsolver_.solveGravity(columns_, &porevol[0], stepsize,
|
tsolver_.solveGravity(columns_, &porevol[0], stepsize,
|
||||||
state.saturation(), state.concentration(), state.maxconcentration());
|
state.saturation(), state.concentration(), state.maxconcentration());
|
||||||
|
Loading…
Reference in New Issue
Block a user