Page 1
© IF
P Extended reserves | Clean refining | Fuel-efficient vehicles | Diversified fuels | Controlled CO2
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
A new strategy for adapting time-step in the Local Time Stepping Method applied to
hyperbolic PDEs
Équipe de Recherche Technologique: Frédéric Coquel, Marie Postel (LJLL) Quang Huy Tran (IFP)
Quang Long Nguyen
Page 2
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Outline
Context Mathematical model and numerical scheme Multiresolution (MR) Local Time Stepping (LTS) Conclusion
Page 3
© IF
P
3
Outline
Context Mathematical model and numerical scheme Multiresolution (MR) Local Time Stepping (LTS) Conclusion
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 4
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Context
Page 5
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Context
Transportation of hydrocarbons: oil and gas numerical simulation of two-phase flows in pipelines over a long
time-range Characteristics
Closure laws: costly to evaluate Time varying boundary conditions: inflow and outflow Pipeline's geometry: horizontal, slugging, severe slugging (gravity) fronts separating the oil and gas propagate along the pipeline
Goals Model the problem Improve the simulations Speed up the computation thanks to the Multiresolution and Local Time Stepping methods
Page 6
© IF
P
6
Outline
Context Mathematical model and numerical scheme Multiresolution (MR) Local Time Stepping (LTS) Conclusion
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 7
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Mathematical model
Drift-Flux Model
Closure laws Thermodynamics and Hydrodynamics :
nonlinear and costly
with
with
Page 8
© IF
P
8
Numerical scheme
Finite volume method with Riemann solver Explicit Lagrange-Projection scheme under the form
Under the CFL condition
avec
The positivity of the scheme is preserved
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 9
© IF
P
9
Outline
Context Mathematical model and numerical scheme Multiresolution (MR) Local Time Stepping (LTS) Conclusion
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 10
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Multiresolution (MR)
Idea The mesh size depends on the local
smoothness of the solution adaptive grid The adaptive grid adapts dynamically
as the solution evolves in time grid prediction by detecting the
displacement and the formation of the singularities
Advantages Well adapted to our problem Reduce the number of calls to the
expensive closure laws gain in CPU time
Uniform
Adaptive
Page 11
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Adaptive Multiresolution (MR)
Multiscale representation Mean value interpolation of the solution A. Cohen, S.M. Kaber, S. Müller and M. Postel, Math. Comp., 72
(2003), pp. 183–225
1. Encoding
2. Decoding h
h/2 level k-2
level k-1 level k
level k+1
Page 12
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Multiresolution (MR) Thresholding algorithm
Details
Level dependent threshold parameter
Prediction (Harten's heuristic) Mark the neighborhoods of if
Mark the higher levels if
The adaptive grid is updated at each time step graded to ensure optimal complexity of the encoding/decoding
algorithm
Page 13
© IF
P
Numerical results (MR) Problem of shock tube flow
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
€
ρ
Yv
R
=
4000.4−10
€
ρ
Yv
L
=
5400.2−10
Page 14
© IF
P
14
Uniform solution versus MR solution Adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 15
© IF
P
15
Convergence of the Multiresolution method
€
ε
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 16
© IF
P
16
Outline
Context Mathematical model and numerical scheme Multiresolution (MR) Local Time Stepping (LTS) Conclusion
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 17
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Local Time Stepping (LTS)
Remark on MR Same time-step for all cells
Principle of the LTS Time-step adapted to mesh size
Advantage Further reduction of calls to closure
laws increase gain in CPU time
Adaptive Mesh Refinement
Local time stepping
Page 18
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Local Time Stepping (LTS) Computation of the time-step
Definitions Macro time-step: corresponds to the biggest cells Micro time-step: corresponds to the smallest cells
Page 19
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Local Time Stepping (LTS) Computation of the time-step
The micro time-steps decrease during each macro time-step They are updated along with the solution while ensuring the
stability condition
Page 20
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Local Time Stepping (LTS) Computation of the time-step
The micro time-steps decrease during each macro time-step They are updated along with the solution while ensuring the
stability condition The first micro time-step
The others
where is the updated solution at time
The macro time-step
Page 21
© IF
P
21
Local Time Stepping (LTS) Synchronization in transition zones
?
? ?
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 22
© IF
P
22
Local Time Stepping (LTS) Synchronization in transition zones
?
? ?
?
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 23
© IF
P
23
Local Time Stepping (LTS) Synchronization in transition zones
S. Müller and Y. Stiriba, J. Sci. Comput., 30 (2007), pp. 493–531
?
? ?
?
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 24
© IF
P
24
Local Time Stepping (LTS) Synchronization in transition zones
S. Müller and Y. Stiriba, J. Sci. Comput., 30 (2007), pp. 493–531
?
? ?
?
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 25
© IF
P
25
Local Time Stepping (LTS)
LP conservative scheme Outside of transition zones
In transition zones
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 26
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Local Time Stepping (LTS)
Example of a mesh with 3 levels (K = 3) The solution is updated at each micro time step
0 1 2
Page 27
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Local Time Stepping (LTS)
Example of a mesh with 3 levels (K = 3) The solution is updated at each micro time step
0 0 1 2
Page 28
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Local Time Stepping (LTS)
Example of a mesh with 3 levels (K = 3) The solution is updated at each micro time step
0 1 2
Page 29
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Local Time Stepping (LTS)
Example of a mesh with 3 levels (K = 3) The solution is updated at each micro time step
0 1 2
Page 30
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Local Time Stepping (LTS)
Example of a mesh with 3 levels (K = 3) Synchronisation of the at the macro time step
0 1 2
Page 31
© IF
P
31
Numerical results (LTS) Problem of shock tube flow
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 32
© IF
P
32
Numerical results - Convergence
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
€
ε
Page 33
© IF
P
Numerical results - Pipeline
Pipeline with slope of 30 degrees
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 34
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Sensors along the pipeline
Page 35
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Time-steps’ evolution
Page 36
© IF
P
Performance
Comparison between two types of hydrodynamics laws
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
ratio UNI/MR ratio MR/LTS
N(K) Simple law Realistic law Simple law Realistic law
rCPU rNbLaw rCPU rNbLaw rCPU rNbLaw rCPU rNbLaw
256(5) 2,98 2,90 3,17 3,07 6,61 11,67 10,41 10,82
512(6) 4,19 4,64 5,02 4,85 7,77 18,79 16,13 17,06
1024(7) 5,47 6,99 7,48 7,13 8,39 29,20 24,58 25,88
Page 37
© IF
P
37
Outline
Context Mathematical model and numerical scheme Multiresolution (MR) Local Time Stepping (LTS) Conclusion
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 38
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Conclusion
Speed up the simulations thanks to the Multiresolution method Analysis of the local regularity of the solution Dyadic grid hierarchy Threshold parameter + prediction
Increase the performance by using the Local Time Stepping method coupled with MR Time-step adapted to the mesh size Faster, less calls to closure laws A new strategy to compute the time-step
The more expensive the closure laws are, the better the CPU gain is
Page 39
© IF
P
References [1] N. Adrianov, F. Coquel, M. Postel, Q-H. Tran A relaxation multi-resolution scheme for accelerating realistic two-phase
flows calculations in pipelines [2] A. Cohen, M.S. Kaber, S. Müller, M. Postel Fully adaptive multiresolution finite volume schemes for conservation laws [3] F. Coquel, Q-L. Nguyen, M. Postel, Q-H. Tran Local time stepping applied to implicit-explicit methods for hyperbolic systems [4] A. Harten Multiresolution algorithms for the numerical solutions of hyperbolic
conservation laws [5] S. Müller, Y. Stiriba Fully adaptive multiscale schemes for conservation laws employing
locally varying time stepping
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
http://www.ann.jussieu.fr/ERTint/
Page 40
© IF
P
Thank you for your attention
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 41
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Numerical method
Relaxation to treat the nonlinearities Replacing and by two new variables and Relaxation system
Hyperbolic system with linearly degenerate eigenfields
Subcharacteristic conditions
Page 42
© IF
P
42
Numerical method
Lagrange-Projection decomposition Based on ALE (Arbitrary Lagrange-Euler) formalism
3-step resolution
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 43
© IF
P
43
Numerical method
Lagrange-Projection decomposition Based on ALE (Arbitrary Lagrange-Euler) formalism
3-step resolution
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 44
© IF
P
44
Numerical method
Lagrange-Projection decomposition Based on ALE (Arbitrary Lagrange-Euler) formalism
3-step resolution
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 45
© IF
P
45
Numerical method
Lagrange-Projection decomposition Based on ALE (Arbitrary Lagrange-Euler) formalism
3-step resolution
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 46
© IF
P
46
Numerical method
Lagrange-Projection decomposition Based on ALE (Arbitrary Lagrange-Euler) formalism
3-step resolution
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 47
© IF
P
47
Numerical method
Lagrange-Projection decomposition Based on ALE (Arbitrary Lagrange-Euler) formalism
3-step resolution
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 48
© IF
P
48
Numerical method
Lagrange-Projection decomposition Based on ALE (Arbitrary Lagrange-Euler) formalism
3-step resolution
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 49
© IF
P
49
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 50
© IF
P
50
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 51
© IF
P
51
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 52
© IF
P
52
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 53
© IF
P
53
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 54
© IF
P
54
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 55
© IF
P
55
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 56
© IF
P
56
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 57
© IF
P
57
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 58
© IF
P
58
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 59
© IF
P
59
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 60
© IF
P
60
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 61
© IF
P
61
Evolution of the adaptive tree
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 62
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Local Time Stepping (LTS) 1st strategy
Constant micro time-step during the whole simulation by using the smallest time-step issued from a uniform simulation
Page 63
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Local Time Stepping (LTS) 2nd strategy
Constant micro time-step during each macro time-step by satisfying the very first stability conditions at time
Page 64
© IF
P
Local Time Stepping (LTS) Computation of the time-step
The first strategy stable but expensive as the time-step is very small needs to do simulation with a uniform grid first
The second strategy not sure to be stable as the solution evolves in time, i.e
after every micro time-step
A new strategy ??? ensure the stability
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 65
© IF
P
LTS-fix
MAMCDP 2009 Workshop - Université Pierre et Marie Curie
Page 66
© IF
P
MAMCDP 2009 Workshop - Université Pierre et Marie Curie