A numerical model calibration should yield a computationally functional, and physically, at least a reasonably accurate model. Model calibration has already been covered in the results analysis section of the steady Telemac2d tutorial. This chapter first provides more tips to increase the physical correctness of a model, especially regarding the conservation of mass, which can sometimes be challenging in Telemac. Additionally, advanced calibration methods that use supervised machine learning to improve physical model accuracy are presented.
Computing Time¶
Some of the keywords in TELEMAC’s steering (*.cas) file affect computation speed.
Use the ACCURACY and MAXIMUM ITERATION keywords to yield faster convergence.
Deactivate
TIDAL FLATS, even though deactivating tidal flats can not be recommended to yield physically meaningful and stable models.When using the GMRES solver (
SOLVER : 7), varying the solver options may aid to reduce the total calculation time.Make sure to use the default
MATRIX STORAGE : 3keyword.Use an earlier simulation (e.g., with a coarser mesh) to initiate the model with the
COMPUTATION CONTINUED : YESandPREVIOUS COMPUTATION FILE : *.slfkeywords (see section 4.1.3 in the Telemac2d manual).
Moreover, Telemac2d provides a way to stop a simulation (step) when fluxes stabilize. To enable this feature, add the following block in the steering (*.cas) file:
/ steady state stop criteria in steering.cas
STOP IF A STEADY STATE IS REACHED : YES / default is NO
STOP CRITERIA : 1.E-3;1.E-3;1.E-3 / use list of three values - defaults are 1.E-4However, stop criteria are not functional for non-stationary flows (e.g., Von Karmàn (1930) vortex street downstream of bridge piers). Read more about the convergence stop criteria in the Telemac2d manual (section 5.1).
Stability & Physical Correctness¶
Accuracy¶
When the accuracy keywords are improperly defined, TELEMAC may not be able to end the simulation. In this case, make sure to comment out the accuracy keywords and let TELEMAC use its default values:
/ SOLVER ACCURACY : 1.E-4
/ ACCURACY FOR DIFFUSION OF TRACERS : 1.E-4
/ ACCURACY OF K : 1.E-6
/ ACCURACY OF EPSILON : 1.E-6
/ ACCURACY OF SPALART-ALLMARAS : 1.E-6Variable Time-Steps and CFL Condition¶
Unstable simulations may occur when the CFL condition is insufficiently fulfilled. To ensure that the CFL condition is respected, enable variable timestep calculation and use the DESIRED COURANT NUMBER keyword (default value 1), for example:
TIME STEP : 5
VARIABLE TIME-STEP : YES
DURATION : 5000
DESIRED COURANT NUMBER : 0.9Note that the TIME STEP is still required because the GRAPHIC PRINTOUT PERIOD is a multiple of the defined TIME STEP.
Implicitation¶
To increase model stability, modify the following variables or make sure that the variables are within reasonable ranges in the CAS file:
IMPLICITATION FOR DEPTHshould be between0.5and0.6.IMPLICITATION FOR VELOCITIESshould be between0.5and0.6.IMPLICITATION FOR DIFFUSIONshould be1.or smaller.
Surface Oscillations (Wiggles)¶
When physically non-meaningful gradients or oscillations occur at the water surface or the bathymetry has steep slopes, the following keyword settings may help:
FREE SURFACE GRADIENT- default is1.0, but it can be reduced to0.1to achieve stability (nevertheless, start with going incrementally down, such as a value of0.9).DISCRETIZATIONS IN SPACE : 12;11- uses quasi-bubble spatial discretization with 4-node triangles for velocity.
Residual Mass Errors¶
To reduce residual mass errors use in the steering file:
CONTINUITY CORRECTION : YESDivergence¶
To limit divergence issues, use the CONTROL OF LIMITS and LIMIT VALUES keywords. The LIMIT VALUES keyword is a list of 8 integers for minimum and maximum values for H, U, V, and T (tracers). The implementation in the steering file looks like this:
CONTROL OF LIMITS : YES / default is NO
LIMIT VALUES : -1000;9000;-1000;1000;-1000;1000;-1000;1000 / default mins and max for H, U, V, tracerTidal Flats¶
Wetting and drying of grid cells, for instance, during a simulation of dam breaks or flood hydrographs, may lead to model instability. While the Tidal Flats section in the Telemac2d steady modeling tutorial suggests physically and computationally meaningful keyword option combinations, section 16.5 in the Telemac2d manual recommends using the following settings in the steering file as conservative choices from the BAW’s Wesel example.
VELOCITY PROFILES : 4;0
TURBULENCE MODEL : 1
VELOCITY DIFFUSIVITY : 2.
TIDAL FLATS : YES
OPTION FOR THE TREATMENT OF TIDAL FLATS : 1
TREATMENT OF NEGATIVE DEPTHS : 2
FREE SURFACE GRADIENT COMPATIBILITY : 0.9
H CLIPPING : NO
TYPE OF ADVECTION : 1;5
SUPG OPTION : 0;0
TREATMENT OF THE LINEAR SYSTEM : 2
SOLVER : 2
PRECONDITIONING : 2
SOLVER ACCURACY : 1.E-5
CONTINUITY CORRECTION : YESDiscretization Scheme¶
The default setting of DISCRETIZATIONS IN SPACE : 11;11 assigns a linear discretization for velocity and water depth, which is computationally fast but potentially unstable (read more in the section on general Telemac2d parameters). To overcome stability issues related to the discretization scheme, consider using DISCRETIZATIONS IN SPACE : 12;11. In addition, setting FREE SURFACE GRADIENT COMPATIBILITY : 0.01 (i.e., close to zero) may aid in troubleshooting stability issues related to the discretization of velocity and depth.
Exceeding Maximum Iterations¶
This section is co-authored by Federica Scolari.
A simulation may print EXCEEDING MAXIMUM ITERATIONS warnings in the Terminal:
GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 50 RELATIVE PRECISION: 0.7234532E-01
GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 50 RELATIVE PRECISION: NaN
GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 50 RELATIVE PRECISION: NaN
GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 50 RELATIVE PRECISION: NaN
GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 50 RELATIVE PRECISION: NaN
GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 50 RELATIVE PRECISION: NaN
GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 50 RELATIVE PRECISION: NaNEXCEEDING MAXIMUM ITERATIONS warnings may occur when using SCHEME FOR ADVECTION OF [...] keywords with the values 3, 4, 5, 13, or 14. The reason is that these schemes yield CFL conditions of less than 1 by triggering iterative, adaptive timestepping. To troubleshoot EXCEEDING MAXIMUM ITERATIONS warnings, try the following options:
Decrease the timestep gradually.
Decrease the solver accuracy (e.g. from
1.E-8to1.E-6).Use other values for
SCHEME FOR ADVECTION OF [...].Increase the
MAXIMUM NUMBER OF ITERATIONS FOR SOLVERkeyword value, but do not exceed200.Change the
VELOCITY PROFILEtype (read this eBook’s instructions for 2d or 3d).Cold starts (i.e., defining initial conditions with the INITIAL CONDITIONS keyword in the steering file) may not converge. Therefore, either
increase the
PRESCRIBED FLOWRATESgradually (or in a liquid boundary file), orcreate an initial conditions Selafin file, assigning a water depth at the inlet nodes.
Bayesian Calibration¶
- Von Karmàn, T. (1930). Mechanische Ähnlichkeit und Turbulenz [Mechanical similarity and turbulence]. In Third International Congress for Applied Mechanics (Vol. 1, pp. 79–93). Stockholm.
- Mouris, K., Acuna Espinoza, E., Schwindt, S., Mohammadi, F., Haun, S., Wieprecht, S., & Oladyshkin, S. (2023). Stability Criteria for Bayesian Calibration of Reservoir Sedimentation Models. Modeling Earth Systems and Environment, 1–19. 10.1007/s40808-023-01712-7
- Schwindt, S., Callau Medrano, S., Mouris, K., Beckers, F., Haun, S., Nowak, W., Wieprecht, S., & Oladyshkin, S. (2023). Bayesian Calibration Points to Misconceptions in Three-Dimensional Hydrodynamic Reservoir Modeling. Water Resources Research, 59(3), e2022WR033660. 10.1029/2022WR033660
- Mohammadi, F., Kopmann, R., Guthke, A., Oladyshkin, S., & Nowak, W. (2018). Bayesian selection of hydro-morphodynamic models under computational time constraints. Advances in Water Resources, 117, 53–64. https://doi.org/10.1016/j.advwatres.2018.05.007
- Oladyshkin, S., Mohammadi, F., Kroeker, I., & Nowak, W. (2020). Bayesian3 Active Learning for the Gaussian Process Emulator Using Information Theory. Entropy, 22(8), 890. 10.3390/e22080890