On the use of time step prediction

Similar documents
Chapter 7 One-Dimensional Search Methods

Confidence Intervals for the Difference Between Two Means with Tolerance Probability

Lecture Quantitative Finance Spring Term 2015

Finite Element Method

Group-Sequential Tests for Two Proportions

A distributed Laplace transform algorithm for European options

10/1/2012. PSY 511: Advanced Statistics for Psychological and Behavioral Research 1

Solutions of Equations in One Variable. Secant & Regula Falsi Methods

Chapter 14 : Statistical Inference 1. Note : Here the 4-th and 5-th editions of the text have different chapters, but the material is the same.

Richardson Extrapolation Techniques for the Pricing of American-style Options

CS227-Scientific Computing. Lecture 6: Nonlinear Equations

Confidence Intervals for Paired Means with Tolerance Probability

DATA GAPS AND NON-CONFORMITIES

Artificially Intelligent Forecasting of Stock Market Indexes

ESG Yield Curve Calibration. User Guide

Copyright 2011 Pearson Education, Inc. Publishing as Addison-Wesley.

Structure of the Code

EC316a: Advanced Scientific Computation, Fall Discrete time, continuous state dynamic models: solution methods

KING FAHAD UNIVERSITY OF PETROLEUM & MINERALS COLLEGE OF ENVIROMENTAL DESGIN CONSTRUCTION ENGINEERING & MANAGEMENT DEPARTMENT

Probability. An intro for calculus students P= Figure 1: A normal integral

Heinz W. Engl. Industrial Mathematics Institute Johannes Kepler Universität Linz, Austria

Appendix G: Numerical Solution to ODEs

EUPHEMIA: Description and functioning. Date: July 2016

5 Error Control. 5.1 The Milne Device and Predictor-Corrector Methods

Tests for Two Variances

Introduction to Numerical Methods (Algorithm)

Accelerated Option Pricing Multiple Scenarios

F A S C I C U L I M A T H E M A T I C I

Finding Roots by "Closed" Methods

Week 2 Quantitative Analysis of Financial Markets Hypothesis Testing and Confidence Intervals

Reinforcement Learning (1): Discrete MDP, Value Iteration, Policy Iteration

Reinforcement Learning (1): Discrete MDP, Value Iteration, Policy Iteration

Chapter 6 Forecasting Volatility using Stochastic Volatility Model

In terms of covariance the Markowitz portfolio optimisation problem is:

Implementing Models in Quantitative Finance: Methods and Cases

Estimating the Current Value of Time-Varying Beta

Econ 582 Nonlinear Regression

Modelling the Sharpe ratio for investment strategies

Dynamic Programming: An overview. 1 Preliminaries: The basic principle underlying dynamic programming

Issued On: 21 Jan Morningstar Client Notification - Fixed Income Style Box Change. This Notification is relevant to all users of the: OnDemand

Learning Curve Theory

Solution of Equations

King s College London

1 Appendix A: Definition of equilibrium

Sterman, J.D Business dynamics systems thinking and modeling for a complex world. Boston: Irwin McGraw Hill

(Refer Slide Time: 01:17)

Non-Inferiority Tests for the Ratio of Two Means in a 2x2 Cross-Over Design

Time Observations Time Period, t

FUNCIONAMIENTO DEL ALGORITMO DEL PCR: EUPHEMIA

Unblinded Sample Size Re-Estimation in Bioequivalence Trials with Small Samples. Sam Hsiao, Cytel Lingyun Liu, Cytel Romeo Maciuca, Genentech

EFFICIENT MONTE CARLO ALGORITHM FOR PRICING BARRIER OPTIONS

Morningstar Fixed-Income Style Box TM

the display, exploration and transformation of the data are demonstrated and biases typically encountered are highlighted.

1 The Solow Growth Model

Jacob: What data do we use? Do we compile paid loss triangles for a line of business?

Version A. Problem 1. Let X be the continuous random variable defined by the following pdf: 1 x/2 when 0 x 2, f(x) = 0 otherwise.

Agricultural and Applied Economics 637 Applied Econometrics II

Yao s Minimax Principle

The Impact of Basel Accords on the Lender's Profitability under Different Pricing Decisions

Project 1: Double Pendulum

Lecture outline W.B. Powell 1

16 MAKING SIMPLE DECISIONS

Advanced Numerical Methods

SOLVING ROBUST SUPPLY CHAIN PROBLEMS

Solutions To Problem Set Five

Equivalence Tests for One Proportion

Case Study: Heavy-Tailed Distribution and Reinsurance Rate-making

Penalty Functions. The Premise Quadratic Loss Problems and Solutions

8: Economic Criteria

Application of the Black-Derman-Toy Model (1990) -Valuation of an Interest Rate CAP and a Call Option on a Bond-

Getting started with WinBUGS

Sensitivity Analysis with Data Tables. 10% annual interest now =$110 one year later. 10% annual interest now =$121 one year later

Solving dynamic portfolio choice problems by recursing on optimized portfolio weights or on the value function?

Alternative VaR Models

Monte Carlo Methods for Uncertainty Quantification

This homework assignment uses the material on pages ( A moving average ).

Week 11 Answer Key Spring 2015 Econ 210D K.D. Hoover. Week 11 Answer Key

An Adjusted Trinomial Lattice for Pricing Arithmetic Average Based Asian Option

A Note on the Oil Price Trend and GARCH Shocks

A Note on the Oil Price Trend and GARCH Shocks

Predictive Model Learning of Stochastic Simulations. John Hegstrom, FSA, MAAA

February 2 Math 2335 sec 51 Spring 2016

درس هفتم یادگیري ماشین. (Machine Learning) دانشگاه فردوسی مشهد دانشکده مهندسی رضا منصفی

SAQ KONTROLL AB Box 49306, STOCKHOLM, Sweden Tel: ; Fax:

Principles of Financial Computing

Traditional Optimization is Not Optimal for Leverage-Averse Investors

REGIONAL WORKSHOP ON TRAFFIC FORECASTING AND ECONOMIC PLANNING

32.4. Parabolic PDEs. Introduction. Prerequisites. Learning Outcomes

Lattice Model of System Evolution. Outline

1.1 Interest rates Time value of money

Computational Finance Finite Difference Methods

lecture 31: The Secant Method: Prototypical Quasi-Newton Method

Two-Sample Z-Tests Assuming Equal Variance

Modelling Economic Variables

FINITE DIFFERENCE METHODS

**BEGINNING OF EXAMINATION** A random sample of five observations from a population is:

NUMERICAL MATHEMATICS & COMPUTING, 7 Ed. 4.3 Estimating Derivatives and Richardson Extrapolation

Managing the Uncertainty: An Approach to Private Equity Modeling

European option pricing under parameter uncertainty

Markov Decision Processes

Transcription:

On the use of time step prediction CODE_BRIGHT TEAM Sebastià Olivella

Contents 1 Introduction... 3 Convergence failure or large variations of unknowns... 3 Other aspects... 3 Model to use as test case... 4 2 Time step prediction... 8 Description of time step prediction options in CODE_BRIGHT... 9 3. Time step evolution during model run... 12 4 Calculated error and computational cost... 17 Evolution of error during calculations... 21 5 Effect of mesh size... 23 Combined effect of time step and mesh... 26 6 Time step control used without time step rejections... 28 7 Concluding remarks... 35

1 Introduction CODE_BRIGHT uses dynamic time step variation under certain control conditions. In general, time step will tend to increase because time step is continuously increased by a factor of 1.4. Manually, time step is given in a general card (Interval data window) with 5 values for each time interval: Time begins at 0 days (Initial time or TIMEI) and calculation will start with and initial time step of 0.001 (Initial Time Step or DTIME). Calculation should continue until 100 days (Final Time or TIMEF). Time step will increase until 0.5 (Partial time or TIME1) from the initial value of 0.001 (DTIME). After 0.5 days (TIME1), time step can increase until it reaches the value of 1.0 (Partial Time Step or DTIMEC), which is the maximum time step. TIME1 can be equal to TIMEI or to TIMEF. Initial Time for second interval should be set equal to Final Time of the first interval. And so on. Convergence failure or large variations of unknowns When the maximum number of iterations (user defined value) is reached without convergence being achieved, current time step is rejected. A new time step is calculated by reducing the current one and new calculations are carried out. In this case time step is reduced by a factor of 2 as there is no additional information to use other values. When a variable shows systematic values of corrections that increase during Newton Raphson iterations, the current time step is rejected and a smaller one is considered. Again a reduction by a factor of 2 is considered. When a variable undergoes a large correction during Newton Raphson calculations, the calculations for a given time step are stopped. Time step is reduced using a scaled value which is obtained from the large variation obtained and the user defined maximum variation permitted. For instance if temperature variation is permitted up to 1 o C and corrections indicate a variation of 3 o C, time step would be reduced by a factor or 3. A lower bound is considered. Other aspects A projection is used to set the initial value of variables for the forthcoming time step. A very small time step will tend to reduce the number of Newton Raphson iterations until a value of 1. In principle, a time step prediction method or algorithm can be made sufficiently strict so that the number of NR-iterations is one for all time steps. Although this solution seems attractive (because the errors are small and the possibility of failure practically disappears), the CPU time required is very large. Although a very small time step

calculations is not competitive, it can be used as a reference solution for comparison in a study of errors. This reference solution can be obtained using a time step prediction scheme based on a very low error, or it could be obtained manually. The latter is not easy because calculations normally have different periods with different requirements (for instance, heating and cooling periods require very small time step). The Newton Raphson algorithm shows quadratic convergence. This means that corrections (and errors) decrease in a quadratic way for each new NR-iteration carried out. A case with 1 NR-iteration corresponds to the maximum CPU time required for a given mesh and equations because it uses the minimum time step. In general, using 2 NRiterations per time step will reduce the CPU time by a factor of 4 and using 3 NRiterations per time step will reduce CPU time by a factor of 9 (assuming a direct solver is used). Model to use as test case A simulation of a typical Mock-Up experiment (a simulated waste surrounded by unsaturated clay) is used to do several run tests to determine various aspects such as the error of results, the CPU time and the number of iterations. The geometry of the model is very simple. Boundary conditions are simple as well. Normal displacements are prescribed on all boundaries. Heating takes place on the inner boundary (representing the heating effect of a canister) and water pressure is prescribed on the outer boundary (representing the hydration effect from the rock). Time days Time seconds Boundary condition changes 0 to 6 0 to 5.18410 5 on the outer boundary. Maintained until end. Constant temperature (20oC) and pressure (0.55 MPa) 130 W/m2 on the internal boundary. 6 to 20 to 1.72810 6 Power increased to 260 W/m2 on the internal boundary. 20 to 30 to 2.59210 6 Power decreased to 250 W/m2 on the internal boundary. 30 to 60 to 5.18410 6 No changes 60 to 2000 to 1.72810 8 No changes 2000 to 3000 to 2.59210 8 Power shut down to 0 W/m2 on the internal boundary. Intervals without changes in boundary conditions are included in this table as these may produce changes on the time step. Temperature, liquid pressure and mean stress evolutions are included. Heating in various steps takes place and there is a shutdown of heating at 2000 days which causes fast cooling. Liquid pressure shows the effect of heating and associated drying. Mean stress increases because the expansivity of the material which is represented by the BBM model.

Power (W/m2) Temperature (oc) Temperature (oc) 100 90 80 70 60 50 40 30 20 10 0 100 90 80 70 60 50 40 30 20 10 Contact with Canister Center buffer Contact with wall 0 500 1000 1500 2000 2500 3000 Time (days) Contact with Canister Center buffer Contact with wall 0 0.01 0.1 1 10 100 1000 10000 Time (days) 300 250 200 150 100 50 0 0.01 0.1 1 10 100 1000 10000 Time (days) Temperature evolution and power. The point in contact with the canister heats up to somewhat higher than 90oC. The point near the outer surface maintains the 20oC imposed by the atmospheric condition. Time scale is considered linear (above) and logarithmic (center). The figure below corresponds to the variation of the power along time.

Liquid pressure (MPa) Liquid pressure (MPa) 50 0-50 -100-150 -200 50 Contact with Canister Center buffer Contact with wall 0 500 1000 1500 2000 2500 3000 Time (days) 0-50 -100-150 Contact with Canister Center buffer Contact with wall -200 0.01 0.1 1 10 100 1000 10000 Time (days) Liquid pressure evolution. The point in contact with the canister dries up to a suction that ranges between 150 on 200 MPa. Time scale is considered linear (above) and logarithmic (below).

Mean stress (MPa) Mean stress (MPa) 10 9 8 7 6 5 4 3 2 1 0 10 Near Canister Center buffer Near wall 0 500 1000 1500 2000 2500 3000 Time (days) 9 8 7 6 5 4 3 2 1 Near Canister Center buffer Near wall 0 0.01 0.1 1 10 100 1000 10000 Time (days) Mean stress evolution. Mean stress increases during hydration. A contraction is calculated during cooling. Hydration continues after cooling. Time scale is considered linear (above) and logarithmic (below).

2 Time step prediction A number of options are available in CODE_BRIGHT to perform a time step prediction. The objective of time step prediction is to reduce the numerical error of the calculated results. A consequence of time step prediction must be the reduction of time step rejections. In contrast, a strict time step prediction may produce a large CPU-time needed to finish the calculation. It is desirable to obtain results with low error using an acceptable numerical effort. A time step prediction scheme has to be chosen for every specific problem. It may depend on accuracy required or desired, non-linearity of the constitutive equations (and this depends on parameters), quality of the mesh, and boundary conditions (instantaneous changes, presence of ramps, non-linear boundary conditions i.e. the ones that depend on the variable at node). A strict time step prediction scheme may produce good results for a relative simple problem (depending on non-linearity and quality of the mesh) and fail for more complex problems. Failure of time step prediction happens when the estimated errors cannot be limited by time step reduction. In such case, time step predictions become very small and the calculation fails to advance with a reasonable time step to reach the end of the calculation. The relatively simple model considered here for the runs can be solved with all options for time step prediction discussed in this document (available in CODE_BRIGHT). The following is a list of options for time step prediction (in CODE_BRIGHT) based on different criteria. itime Description of time step prediction 0 No time step prediction Maximum number of NR iterations = 10 (*) Maximum variations for time step rejection = 0.1 m, 10 MPa, 0.1 C (*) (*) This is maintained in all cases. Method based on the number of NR number of iterations 1 Time step prediction according to an expected target of 4 iterations per time step. 2 Time step prediction according to an expected target of 3 iterations. 3 Time step prediction according to an expected target of 2 iterations Method based on error estimation of unknowns 6 A new time step is predicted from the relative error in variables of the previous time step calculation (see below for more detailed description). If the relative error is greater than dtol = 0.01, time increment is reduced according to error deviation, otherwise it is increased. 7 The same as 6, but with dtol = 0.001 8 The same as 6, but with dtol = 0.0001. 9 The same as 6, but with dtol = 0.00001. 10 The same as 6, but with dtol = 0.000001. Method based on error estimation combined with second order equation 16 The same as 6 but second order equation (see below)

17 The same as 7 but second order equation (see below) 18 The same as 8 but second order equation (see below) 19 The same as 9 but second order equation (see below) Method based on error on stress update 43 A new time step is predicted from the error in stresses of the previous time step calculation. If the relative error is greater than dtol = 0.01, time increment is reduced according to error deviation. 44 The same as 43, but with dtol = 0.001 45 The same as 43, but with dtol = 0.0001 Description of time step prediction options in CODE_BRIGHT Value 0 No time step prediction is performed. Time step is controlled by the user given values according to the time interval definition window. An upper bound of time step is considered. Time step rejections (and subsequent reductions) can occur if convergence is not achieved or other reasons. Convergence implies that time step will be increased by a factor of 1.4 regardless of the number of iterations or evolution of errors. Maximum number of iterations reached implies time step reduction by a factor of 0.5. On the other hand, if large variations of displacements, pressures or temperatures occur during a NR iteration, time step is reduced immediately simply by scaling, and calculations start again for the current time step. The values considered in the calculations are: Maximum number of NR iterations = 10 Maximum variation, for time step rejection, of displacement, pressure and temperature, = 0.1 m, 10 MPa, 0.1 C, respectively. For instance, if temperature variation is 0.5, time step is reduced by a factor of 1/5. Time step rejections are not desirable, but can occur. This is maintained in all cases. Values of 1, 2, 3 The number of Newton Raphson iterations is used to estimate the value of the time step that will be used after convergence for the next time step calculation. There are three possibilities in this case according to 4, 3 or 2 Newton Raphson iterations. Time step control value (ITIME) = 1 Time step control value (ITIME) = 2 f f 4 iter 3 iter 0.25 0.25 0.5 0.5

Time step control value (ITIME) = 3 2 f iter 0.25 0.5 The value of f has an upper bound of 1.4. Note that f = 1 when the target of number of iterations is obtained and this implies same time step. If the maximum time step prescribed manually (DTIMEC) is achieved, time step will not increase above this value regardless of what the formula indicates. Values of 6, 7, 8, 9, 10 An estimation of error (for displacements, pressures and temperatures) is used to predict time step. Time step is predicted with the factor f which is calculated with: 0.5 DTOL f 0.8 error with 0.1 f 1.4 The variable error is calculated using an error estimator based on second order prediction. An upper and lower bound for f are considered. The value of DTOL has the following values depending on the option chosen: 6 DTOL = 0.01 (not used in this study) 7 DTOL = 0.001 8 DTOL = 0.0001 9 DTOL = 0.00001 10 DTOL = 0.000001 (used in this study to obtain a reference solution). If the maximum time step prescribed manually (DTIMEC) is achieved, time step will not increase furthermore. Values of 16, 17, 18, 19 Same as 6,7,8,9 but second order approximation of conservation equations is used. This is based on the following equations (for implicit scheme): 2 m( x ) m( x ) hm( x ) h n n1 n1 K(x n ) xn F n This is a modification of the usual approach in CODE_BRIGHT which can be written in the following compact way: m( xˆ ) m( x ) h n n1 K(x ˆ ˆ n) xn F n If the maximum time step prescribed manually (DTIMEC) is achieved, time step will not increase furthermore. Values of 43, 44, 45 An estimation of error (stresses) is used to predict time step. Time step is predicted with the factor f which is calculated with:

0.5 DTOL f 0.8 error with 0.1 f 1.4 The variable error is calculated using an error estimator for stresses. The variable f is the factor for time step reduction. An upper and lower bound for f are considered. The value of DTOL has the following values depending on the option chosen: 43 DTOL = 0.001 44 DTOL = 0.0001 45 DTOL = 0.00001 If the maximum time step prescribed manually (DTIMEC) is achieved, time step will not increase furthermore.

3. Time step evolution during model run A typical plot of time step evolution has been prepared for each run as a function of time. Some of the time step reductions correspond to changes in boundary conditions: Time days Time seconds Boundary condition changes 0 to 6 0 to 5.18410 5 Constant temperature (20oC) and pressure (0.55 MPa) on the outer boundary. Maintained until end. 130 W/m2 on the internal boundary. to 20 to 1.72810 6 260 W/m2 on the internal boundary. to 30 to 2.59210 6 250 W/m2 on the internal boundary. to 60 to 5.18410 6 No change to 2000 to 1.72810 8 No change to 3000 to 2.59210 8 0 W/m2 on the internal boundary

Dtime (s) 1.E+08 1.E+07 1.E+06 1.E+05 Option 0 Option 1 Option 2 Option 3 1.E+04 1.E+03 1.E+02 1.E+01 1.E+00 1.E+01 1.E+03 1.E+05 1.E+07 1.E+09 Time (s) Time step evolution for option (itime) = 0. No time step prediction is done, only time step rejection by failure to converge and subsequent reduction. User defined time step control is not given, hence time step can grow as much as possible. But 128 time step rejections and immediate reductions encountered due to convergence problems or too large variations of variables (displacement, pressure or temperature). In conclusion, time step evolution is only controlled by NR convergence difficulties. Time step for itime =1,2 and 3 Itime= 0 128 time step rejections 327 time steps Itime = 1 37 time step rejections 483 time steps Itime = 2 21 time step rejections 762 time steps Itime = 3 13 time step rejection 3261 time steps

Dtime (s) 1.E+08 1.E+07 1.E+06 1.E+05 Option 0 Option 7 Option 8 Option 9 1.E+04 1.E+03 1.E+02 1.E+01 1.E+00 1.E+01 1.E+03 1.E+05 1.E+07 1.E+09 Time (s) Time step for itime =7, 8 and 9 Itime = 7 41 time step rejections 569 time steps Itime = 8 15 time step rejections 1362 time steps Itime = 9 10 time step rejections 4203 time steps

Dtime (s) 1.E+08 1.E+07 1.E+06 1.E+05 Option 0 Option 17 Option 18 Option 19 1.E+04 1.E+03 1.E+02 1.E+01 1.E+00 1.E+01 1.E+03 1.E+05 1.E+07 1.E+09 Time (s) Time step for itime =17, 18 and 19 Itime = 17 40 time step rejections 570 time steps Itime = 18 15 time step rejections 1376 time steps Itime = 19 10 time step rejections 4226 time steps

Dtime (s) 1.E+08 1.E+07 1.E+06 1.E+05 Option 0 Option 43 Option 44 Option 45 1.E+04 1.E+03 1.E+02 1.E+01 1.E+00 1.E+01 1.E+03 1.E+05 1.E+07 1.E+09 Time (s) Time step for itime = 43, 44 and 45 Itime = 43 83 time step rejections 580 time steps Itime = 44 45 time step rejections 2746 time steps Itime = 45 12 time step rejections 8491 time steps

Displacement error (m) 4 Calculated error and computational cost A reference case that uses very small time steps is used to determine the error of each run. This very small time step case uses one Newton Raphson iteration for every time step during the calculation as the time step is so small that corrections at every time steps are smaller than tolerances. This is achieved with DTOL = 0.000001. Errors are calculated as difference between calculated results at the final time. This can be done for unknowns (displacement, pressure, temperature) or for any other variable. The maximum variable error for all nodes is considered for each variable. CPU time is normalized with respect to the CPU time required to solve case 0. The maximum value is 9 times for one of the prediction schemes. CPU time becomes larger mainly because time step is smaller. Smaller time steps imply lower number of NR iterations. The fact that lower NR iterations are used does not compensate the effect of more time steps. Hence, smaller time steps always imply more CPU time. The number of NR iterations ranges between 1 and 3 in average. When the average is 1, it means that all time steps require one NR iteration. 0.01 0.001 0.0001 0.00001 0 1 2 3 7 8 9 17 18 19 43 44 45 Option for TIME STEP CONTROL (ITIME) in CODE_BRIGHT Absolute error for displacement at the end of model calculation (3000 days) for the node that has the maximum error.

Mean Stress Error (MPa) Liquid pressure error (MPa) 1 0.1 0.01 0.001 0 1 2 3 7 8 9 17 18 19 43 44 45 Option for TIME STEP CONTROL (ITIME) in CODE_BRIGHT Absolute error for liquid pressure at the end of model calculation (3000 days) for the node that has the maximum error. 1 0.1 0.01 0.001 0 1 2 3 7 8 9 17 18 19 43 44 45 Option for TIME STEP CONTROL (ITIME) in CODE_BRIGHT Absolute error for mean stress at the end of model calculation (3000 days) for the node that has the maximum error.

Average of NR iterations / time step Normalized CPU time Relative error 1 0.1 0.01 0.001 0.0001 Displacement Liquid pressure Temperature 0.00001 0 1 2 3 7 8 9 17 18 19 43 44 45 Option for TIME STEP CONTROL (ITIME) in CODE_BRIGHT Relative error for displacements, liquid pressures and temperatures calculated using resultsat 60 days. 10 9 8 7 6 5 4 3 2 1 0 NR iterations per time step Normalized CPU time 10.0-5.0 Normalized CPU time and Average number of NR iterations for model runs with different options for time step predictions. CPU time increases when time step control method is stricter because time steps are smaller. This is compensated by the reduction on the number on NR iterations. 5.0 0.0-10.0 0 1 2 3 7 8 9 17 18 19 43 44 45 Option for TIME STEP CONTROL (ITIME) in CODE_BRIGHT

Option 2 leads to 2.5 NR iterations per time step. CPU time is moderately bigger than the reference case Option 0. Error in variables is approximately 10 times lower than the reference case Option 0. Hence, this is an interesting option. Option 8 leads to 2 NR iterations per time step. CPU time is 3 times the reference case. Error in variables is about 20-30 times lower than the reference case Option 0. This is an interesting option provided that an increase of CPU time is accepted.

Temperature relative error Temperature relative error Temperature relative error Temperature relative error Evolution of error during calculations Final temperature in the calculation is constant and therefore it is not possible to calculate errors at 3000 days. For this reason this has not been included in the previous section. Instead, a point in the hottest zone on the surface where the heat inflows, has been used to calculate the error at certain times. Intermediate points (the beginning-end of intervals) are adequate because these are exact times where the calculation gives output values. The following figures show the relative error for temperature in a point on the hot boundary. itime=0 itime=1 Itime=2 itime=3 itime=7 itime=8 itime=9 1.E-02 1.E-02 1.E-03 1.E-03 1.E-04 1.E-04 1.E-05 1.E-05 1.E-06 1 10 100 1000 10000 Time (days) 1.E-06 1 10 100 1000 10000 Time (days) itime=17 itime=18 itime=19 itime=43 itime=44 itime=45 1.E-02 1.E-02 1.E-03 1.E-03 1.E-04 1.E-04 1.E-05 1.E-05 1.E-06 1 10 100 1000 10000 1.E-06 1 10 100 1000 10000 Time (days) Time (days) Relative error in temperature at hottest point during model evolution From error evolution it is observed that relative error may change during the evolution of the coupled problem. These errors can be average over time to obtain a plot similar to what has been obtained for other variables.

0 1 2 3 7 8 9 17 18 19 43 44 45 Temperature relative error 0.01 0.001 0.0001 0.00001 itime Time step control option Temperature relative error calculated in a point (hottest zone) and averaged for various times

5 Effect of mesh size The results shown above are obtained with the same tendencies if another mehs is used. Mesh size effect can be illustrated by comparing liquid pressure evolution for example as it is the variable with largest error. With a mesh half size, the results are practically identical. Comparison of temperature evolution at selected points for two different meshes.

Comparison of liquid pressure evolution at selected points for two different meshes. Comparison of mean stress evolution at selected points for two different meshes.

Temperature relative error Temperature relative error Each mesh defines a different problem. The errors are calculated by comparison of results obtained with the same mesh. So, the effect of time step control is analysed for each mesh giving the same error variations. itime=7 itime=8 itime=9 itime=7 itime=8 itime=9 1.E-02 1.E-02 1.E-03 1.E-03 1.E-04 1.E-04 1.E-05 1.E-05 1.E-06 1 10 100 1000 10000 1.E-06 1 10 100 1000 10000 Time (days) Time (days) Relative error in temperature for time step control options 7, 8 and 9. Left with squared elements, right for the rectangular elements (half size of the squared). Each mesh has a reference solution.

Combined effect of time step and mesh To investigate the effect of time step control and mesh size, calculations with different mesh sizes and time step control system have been carried out. 4 meshes and 5 time step control options have been considered. Firstly, the effect of time step control for different mesh sizes is analysed. Each mesh is considered to do the study of time step control. The results to compare the error are for each mesh, the ones obtained with itime = 10. For each mesh size, there is a different reference model to calculate the error. In other words, given a mesh the systematic study of time step control gives practically the same error variation. 0.01 itime = 0 itime = 7 itime = 8 itime = 9 0.001 0.0001 0.00001 3.5 1.7 1.2 1.0 Effect of mesh size on the reduction of error caused by different time step control system. For each mesh (defined by the normalized element size), time step control with smaller error tolerance, reduces in the same way the error.

itime = 0 itime = 7 itime = 8 itime = 9 itime = 10 Error Secondly, the effect of mesh is analysed. For each time step control system, the effect of the mesh is analysed. Similar error reduction is obtained. 0.1 3.5 1.7 1.2 0.01 0.001 0.0001 0.00001 Effect of time step control system on the reduction of error caused by different mesh sizes. For each time step control, smaller mesh reduces the error in the same way. Finally, the combined effect of mesh and time step control is analysed. The results for different mesh size and time step control method are compares with the case of itime=10 and mesh size equal to 1. This reference case is supposed to be the case with less error of all calculations. The plot indicates that if the mesh is large (3.5), improving the time step method (i.e. reducing time step) does not improve the solution. 0.1 0.01 itime = 0 itime = 7 itime = 8 itime = 9 itime = 10 0.001 0.0001 0.00001 3.5 1.7 1.2 1.0 Error calculated with respect to one single case (itime=10 and mesh size = 1).

6 Time step control used without time step rejections The different options explained here have been used in combination with time step rejection options available in CODE_BRIGHT. As indicated above, time step rejection has been done according to the actions described below. Maximum number of iterations reached implies time step reduction by a factor of 0.5. On the other hand, if large variations of displacements, pressures or temperatures occur during a NR iteration, time step is reduced immediately simply by scaling, and calculations start again for the current time step. The values considered in the calculations are: Maximum number of NR iterations = 10 Maximum variation, for time step rejection, of displacement, pressure and temperature, = 0.1 m, 10 MPa, 0.1 C, respectively. For instance, if temperature variation is 0.5, time step is reduced by a factor of 1/5. In addition, time step can be reduced if correction increase or convergence is slow. In this section, the number of time step rejections is reduced as much as possible. This is based on the following objectives: To reduce the risk of non-convergence when time step rejections and subsequent reductions becomes endless and time step reduces a lot thus stopping the run. To reduce the risk of too small time steps after boundary condition change which may lead to large variations of variables. To reduce the risk of out of scale results obtained with very small time steps. To avoid CPU time waste as rejection and reduction imply waste of CPU time. To reduce rejections, the control of variations of variables has been removed by setting large values on the corresponding tolerances for variation. So, instead of the above mentioned values, 0.1 m, 10 MPa, 0.1 C, a large value is input. The maximum number of NR iterations is maintained to 10 which is considered sufficiently large so it is not expected to play a significant role when time step is controlled automatically.

Dtime (s) Dtime (s) 1.E+08 1.E+07 1.E+06 1.E+05 Option 0 Option 1 Option 2 Option 3 1.E+04 1.E+03 1.E+02 1.E+01 1.E+00 1.E+01 1.E+03 1.E+05 1.E+07 1.E+09 Time (s) 1.E+08 1.E+07 1.E+06 1.E+05 Option 0 Option 1 Option 2 Option 3 1.E+04 1.E+03 1.E+02 1.E+01 1.E+00 1.E+01 1.E+03 1.E+05 1.E+07 1.E+09 Time (s) Evolution of time step during model run. The model uses (above) or not uses (below) the time step rejection method based large variations of calculated variables.

Dtime (s) Dtime (s) 1.E+08 1.E+07 1.E+06 1.E+05 Option 0 Option 7 Option 8 Option 9 1.E+04 1.E+03 1.E+02 1.E+01 1.E+00 1.E+01 1.E+03 1.E+05 1.E+07 1.E+09 Time (s) 1.E+08 1.E+07 1.E+06 1.E+05 Option 0 Option 7 Option 8 Option 9 1.E+04 1.E+03 1.E+02 1.E+01 1.E+00 1.E+01 1.E+03 1.E+05 1.E+07 1.E+09 Time (s) Evolution of time step during model run. The model uses (above) or not uses (below) the time step rejection method based large variations of calculated variables.

Total number of time steps Time step rejections 1000 With variation control Without variation control 100 10 1 0 1 2 3 7 8 9 17 18 19 43 44 45 Option for TIME STEP CONTROL (ITIME) in CODE_BRIGHT 5000 4500 4000 3500 3000 2500 2000 1500 1000 500 0 8000 With variation control Without variation control 0 1 2 3 7 8 9 17 18 19 43 44 45 Option for TIME STEP CONTROL (ITIME) in CODE_BRIGHT Time step rejections are 0 or very small when the variation of variables is not controlled. This implies less number of time steps (rejected time steps are counted because that implies CPU time consumption).

Average of NR iterations / time step Normalized CPU time 10.0 9.0 8.0 7.0 6.0 5.0 4.0 3.0 2.0 1.0 0.0 With variation control Without variation control 0 1 2 3 7 8 9 17 18 19 43 44 45 Option for TIME STEP CONTROL (ITIME) in CODE_BRIGHT 4.5 4 3.5 3 2.5 2 1.5 1 0.5 0 With variation control Without variation control 0 1 2 3 7 8 9 17 18 19 43 44 45 Option for TIME STEP CONTROL (ITIME) in CODE_BRIGHT CPU time is smaller when variation control is not used. This increases de size of the time step (because the number or time steps is lower) and the number of NR iterations per time step.

Relative error Relative error 1 0.1 0.01 0.001 0.0001 0.00001 1 0.1 0.01 0.001 0.0001 0.00001 Displacement Liquid pressure Temperature 0 1 2 3 7 8 9 17 18 19 43 44 45 Option for TIME STEP CONTROL (ITIME) in CODE_BRIGHT Displacement Liquid pressure Temperature 0 1 2 3 6 7 8 9 16 17 18 19 42 43 44 45 Option for TIME STEP CONTROL (ITIME) in CODE_BRIGHT Above: using time step rejections due to variation of variable limitted Below: without time step rejections due to variation of variable limitted

The results indicate that time step variations are smoother when the time step rejections are minimized. In fact, some of the reductions which lead to a kind of catastrophic reduction (several concatenated time step reductions) still exist but are less catastrophic. Total number of time steps is smaller when time step rejection is minimized, but the number of NR iterations per time step increases somewhat. However, globally, CPUTIME is smaller, i.e. the total number of NR iterations (product of average value by the number of time steps) is smaller. Relative errors are compared and it is shown that minimizing rejections reduces the error. For instance, for option 7, relative errors are smaller that 10-3 for all variables when time step rejection was minimized and this was not the case in the preceding option. Finally, rejection is not convenient because it increases CPUTIME and increases the RELATIVE ERROR of the solution.

7 Concluding remarks Roughly all variables show similar response with respect to errors. Options 3, 9 and 45 give the best results for all plotted variables in terms of errors but at the same time produce a large CPU time consumption, between 5 and 9 times larger than the reference case 0. CPU time can be reduced if time step rejection is minimised. Options 17, 18, 19 use second order approach for the time derivative of conservation equations. Results are not improving and the reason may be that the error is calculated with respect to a reference case which uses the first order approximation of the time derivative. This second order approximation has to be reviewed, probably by setting a different reference for the calculation of errors as we are obtaining a solution based on a different conservation equation in its numerical form. Options 43, 44, 45, use error in stress calculation from integration subroutine of the constitutive model. The error is taken as equal to the last correction of stress obtained. This error estimate can be improved. As a general conclusion it can be said that series 1 to 3 and 7 to 9 can be used for time step prediction. Series 17, 18, 19 and 43, 44, 45 require further refinements. Among the options analysed, 2 and 8 are recommended. The average of NR iterations is 2.5 and 2, respectively. CPU time is acceptable for option 2 and can be considered in an affordable range for option 8. Option 18 gives similar results as 8, so it does not seem to improve. Options 43 or 44 can perhaps be interesting when the mechanical model is complex. If time step control is adequate i.e. sufficiently restrictive, some of the time step rejection criteria are not necessary (will never go into a large number of NR iterations or will never get large variations of unknowns). By eliminating or minimizing time step rejections, calculation time is reduced and accuracy is improved.