mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Change back relative change computation to old order.
Changing this caused tiny timestepping differences.
This commit is contained in:
parent
71c5129d3d
commit
0b9b20695c
@ -422,6 +422,12 @@ namespace Opm {
|
|||||||
|
|
||||||
Scalar saturationsOld[FluidSystem::numPhases] = { 0.0 };
|
Scalar saturationsOld[FluidSystem::numPhases] = { 0.0 };
|
||||||
Scalar oilSaturationOld = 1.0;
|
Scalar oilSaturationOld = 1.0;
|
||||||
|
|
||||||
|
// NB fix me! adding pressures changes to satutation changes does not make sense
|
||||||
|
Scalar tmp = pressureNew - pressureOld;
|
||||||
|
resultDelta += tmp*tmp;
|
||||||
|
resultDenom += pressureNew*pressureNew;
|
||||||
|
|
||||||
if (FluidSystem::numActivePhases() > 1) {
|
if (FluidSystem::numActivePhases() > 1) {
|
||||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
||||||
saturationsOld[FluidSystem::waterPhaseIdx] = priVarsOld[Indices::waterSaturationIdx];
|
saturationsOld[FluidSystem::waterPhaseIdx] = priVarsOld[Indices::waterSaturationIdx];
|
||||||
@ -446,10 +452,6 @@ namespace Opm {
|
|||||||
assert(std::isfinite(resultDenom));
|
assert(std::isfinite(resultDenom));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// NB fix me! adding pressures changes to satutation changes does not make sense
|
|
||||||
Scalar tmp = pressureNew - pressureOld;
|
|
||||||
resultDelta += tmp*tmp;
|
|
||||||
resultDenom += pressureNew*pressureNew;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resultDelta = gridView.comm().sum(resultDelta);
|
resultDelta = gridView.comm().sum(resultDelta);
|
||||||
|
Loading…
Reference in New Issue
Block a user