ebos: allow larger errors for larger reservoirs

albeit, we scale the error only to the cube root of the pore
volume. the rationale is that the same amount of mass can get lost
"along" a line for each timestep.

maybe it would be a good idea to do something like this for time step
size as well because taking multiple small time steps currently allows
a much larger error in the result than doing it in one big step.
This commit is contained in:
Andreas Lauser 2018-11-14 12:13:28 +01:00
parent 07e1b4ecde
commit 85a9b75076
2 changed files with 16 additions and 3 deletions

View File

@ -173,6 +173,16 @@ public:
for (unsigned eqIdx = 0; eqIdx < numEq; ++eqIdx)
errorSum_ = std::max(std::abs(componentSumError[eqIdx]), errorSum_);
// update the sum tolerance: larger reservoirs can tolerate a higher amount of
// mass lost per time step than smaller ones! since this is not linear, we use
// the cube root of the overall pore volume, i.e., the value specified by the
// NewtonSumTolerance parameter is the "incorrect" mass per timestep for an
// reservoir that exhibits 1 m^3 of pore volume. A reservoir with a total pore
// volume of 10^3 m^3 will tolerate 10 times as much.
sumTolerance_ =
EWOMS_GET_PARAM(TypeTag, Scalar, NewtonSumTolerance)
* std::cbrt(sumPv);
// make sure that the error never grows beyond the maximum
// allowed one
if (this->error_ > newtonMaxError)

View File

@ -236,10 +236,13 @@ SET_SCALAR_PROP(EclBaseProblem, EndTime, 1e100);
// not millions of trillions of years, that is...)
SET_SCALAR_PROP(EclBaseProblem, InitialTimeStepSize, 1e100);
// increase the default raw tolerance for the newton solver because this is what everone
// else seems to be doing...
// set the tolerated amount of "incorrect" mass to ~1e-6 kg of oil per time step for a
// reservoir that exhibits a pore volume of 1 m^3. larger reservoirs will tolerate larger
// residuals.
SET_SCALAR_PROP(EclBaseProblem, NewtonSumTolerance, 1e-6);
// the default for the volumetric error for oil per second is 10^-2 kg/(m^3 * s).
SET_SCALAR_PROP(EclBaseProblem, NewtonRawTolerance, 1e-2);
SET_SCALAR_PROP(EclBaseProblem, NewtonSumTolerance, 1e-3);
// set the maximum number of Newton iterations to 14 because the likelyhood that a time
// step succeeds at more than 14 Newton iteration is rather small