mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 09:16:27 -06:00
newton method: make the tolerance easily settable at run time
The reason for this is to be able to modify the tolerance according to grid size: The NewtonTolerance parameter has been renamed to NewtonRawTolerance and for the porous media models is divided by the square root of the volume of the smallst finite volume in the grid to get the final tolerance for the Newton method. This is necessary because very large grids need to achive a higher volumetric accuracy in the residual than very small ones...
This commit is contained in:
parent
f6fc258b70
commit
c309145085
@ -51,7 +51,7 @@ SET_TYPE_PROP(
|
||||
#if HAVE_QUAD
|
||||
SET_TYPE_PROP(Co2InjectionFlashEcfvProblem, Scalar, quad);
|
||||
#else
|
||||
SET_SCALAR_PROP(Co2InjectionFlashEcfvProblem, NewtonTolerance, 1e-5);
|
||||
SET_SCALAR_PROP(Co2InjectionFlashEcfvProblem, NewtonRawTolerance, 1e-5);
|
||||
#endif
|
||||
} // namespace Properties
|
||||
} // namespace Opm
|
||||
|
@ -50,7 +50,7 @@ SET_TYPE_PROP(
|
||||
#if HAVE_QUAD
|
||||
SET_TYPE_PROP(Co2InjectionFlashNiEcfvProblem, Scalar, quad);
|
||||
#else
|
||||
SET_SCALAR_PROP(Co2InjectionFlashNiEcfvProblem, NewtonTolerance, 1e-5);
|
||||
SET_SCALAR_PROP(Co2InjectionFlashNiEcfvProblem, NewtonRawTolerance, 1e-5);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ SET_TYPE_PROP(
|
||||
#if HAVE_QUAD
|
||||
SET_TYPE_PROP(Co2InjectionFlashNiVcfvProblem, Scalar, quad);
|
||||
#else
|
||||
SET_SCALAR_PROP(Co2InjectionFlashNiVcfvProblem, NewtonTolerance, 1e-5);
|
||||
SET_SCALAR_PROP(Co2InjectionFlashNiVcfvProblem, NewtonRawTolerance, 1e-5);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ SET_TYPE_PROP(
|
||||
#if HAVE_QUAD
|
||||
SET_TYPE_PROP(Co2InjectionFlashVcfvProblem, Scalar, quad);
|
||||
#else
|
||||
SET_SCALAR_PROP(Co2InjectionFlashVcfvProblem, NewtonTolerance, 1e-5);
|
||||
SET_SCALAR_PROP(Co2InjectionFlashVcfvProblem, NewtonRawTolerance, 1e-5);
|
||||
#endif
|
||||
} // namespace Properties
|
||||
} // namespace Opm
|
||||
|
@ -68,9 +68,6 @@ SET_BOOL_PROP(InfiltrationBaseProblem, EnableGravity, true);
|
||||
// Write newton convergence?
|
||||
SET_BOOL_PROP(InfiltrationBaseProblem, NewtonWriteConvergence, false);
|
||||
|
||||
// Maximum tolerated error in the Newton method
|
||||
SET_SCALAR_PROP(InfiltrationBaseProblem, NewtonTolerance, 1e-8);
|
||||
|
||||
// -1 backward differences, 0: central differences, +1: forward differences
|
||||
SET_INT_PROP(InfiltrationBaseProblem, NumericDifferenceMethod, 1);
|
||||
|
||||
|
@ -70,8 +70,8 @@ SET_SCALAR_PROP(StokesNiTestProblem, EndTime, 3.0);
|
||||
// Default initial time step size [s]
|
||||
SET_SCALAR_PROP(StokesNiTestProblem, InitialTimeStepSize, 0.1);
|
||||
|
||||
// Default tolerance of the Newton-Raphson method
|
||||
SET_SCALAR_PROP(StokesNiTestProblem, NewtonTolerance, 1e-4);
|
||||
// Increase the default raw tolerance of the Newton-Raphson method to 10^-4
|
||||
SET_SCALAR_PROP(StokesNiTestProblem, NewtonRawTolerance, 1e-4);
|
||||
|
||||
// Default grid file to load
|
||||
SET_STRING_PROP(StokesNiTestProblem, GridFile, "data/test_stokes2cni.dgf");
|
||||
|
Loading…
Reference in New Issue
Block a user