+ All Categories
Home > Documents > Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global...

Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global...

Date post: 15-Jun-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
36
Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Differential Algebraic Equations and reactive transport models Jocelyne Erhel SAGE team, INRIA, RENNES co-authors Souhila Sabit (SAGE team, INRIA, Rennes, France) Caroline de Dieuleveult (Mines ParisTech, Fontainebleau, France) Pareng, Pecs, Hungary, March 2013 1 / 17
Transcript
Page 1: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Solving Partial Differential Algebraic Equationsand reactive transport models

Jocelyne ErhelSAGE team, INRIA, RENNES

co-authorsSouhila Sabit (SAGE team, INRIA, Rennes, France)

Caroline de Dieuleveult (Mines ParisTech, Fontainebleau, France)

Pareng, Pecs, Hungary, March 2013

1 / 17

Page 2: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

1 Introduction

2 Physical model

3 DAE global approach

4 Numerical experiment

5 Conclusion

2 / 17

Page 3: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

1 Introduction

2 Physical model

3 DAE global approach

4 Numerical experiment

5 Conclusion

2 / 17

Page 4: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

1 Introduction

2 Physical model

3 DAE global approach

4 Numerical experiment

5 Conclusion

2 / 17

Page 5: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

1 Introduction

2 Physical model

3 DAE global approach

4 Numerical experiment

5 Conclusion

2 / 17

Page 6: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

1 Introduction

2 Physical model

3 DAE global approach

4 Numerical experiment

5 Conclusion

2 / 17

Page 7: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Water resources

Pictures: Yves Chaux, Rennes, FranceDiagram: http://www.ec.gc.ca/water/f_main.html

3 / 17

Page 8: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Reactive transport modeling

Coupling transport by advection-dispersion with geochemistrySystem of Partial Differential Algebraic equationsModel with thermodynamic equilibriumMethod of lines: first discretize in space then in time ⇒ DAE systemExplicit scheme (SNIA): decoupling but stability restrictionsImplicit scheme (Global): stability but nonlinear coupled system

Our method: global approach GDAE

S. Krautle, P. Knabner, (2005); A new numerical reduction scheme forfully coupled multicomponent transport-reaction problems in porousmedia; Water Resources Research, Vol. 41, W09414, 17 pp.

S. Molins, J. Carrera, C. Ayora, Carlos and M.W. Saaltink, (2004); Aformulation for decoupling components in reactive transport problems;Water Resources Research, Vol.40, W10301, 13 pp.

C. de Dieuleveult, J. Erhel , M. Kern; A global strategy for solvingreactive transport equations; Journal of Computational Physics,2009.

4 / 17

Page 9: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Chemical modelTransport modelCoupling

Mass action laws

Aqueous reactions

xi (c) = Kci

Nc∏j=1

cSijj , i = 1, . . .Nx (1)

Sorption reactions

yi (c, s) = Ksi

Nc∏j=1

cAij

j

Ns∏j=1

sBij

j , i = 1, . . .Ny , (2)

Precipitation reactions

Πi (c) = Kpi

Nc∏j=1

cEijj , i = 1, . . .Np (3)

5 / 17

Page 10: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Chemical modelTransport modelCoupling

Mass action laws

Aqueous reactions

xi (c) = Kci

Nc∏j=1

cSijj , i = 1, . . .Nx (1)

Sorption reactions

yi (c, s) = Ksi

Nc∏j=1

cAij

j

Ns∏j=1

sBij

j , i = 1, . . .Ny , (2)

Precipitation reactions

Πi (c) = Kpi

Nc∏j=1

cEijj , i = 1, . . .Np (3)

5 / 17

Page 11: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Chemical modelTransport modelCoupling

Mass action laws

Aqueous reactions

xi (c) = Kci

Nc∏j=1

cSijj , i = 1, . . .Nx (1)

Sorption reactions

yi (c, s) = Ksi

Nc∏j=1

cAij

j

Ns∏j=1

sBij

j , i = 1, . . .Ny , (2)

Precipitation reactions

Πi (c) = Kpi

Nc∏j=1

cEijj , i = 1, . . .Np (3)

5 / 17

Page 12: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Chemical modelTransport modelCoupling

Mass conservation laws

Chemical variables and functions

X =

csp

, Φ(X ) =

c + ST x(c) + AT y(c, s) + ETps + BT y(c, s)Π(c)

(4)

Chemical model Φ(X ) =

TW1

,

c ≥ 0,s ≥ 0,p > 0.

(5)

6 / 17

Page 13: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Chemical modelTransport modelCoupling

Mass conservation laws

Chemical variables and functions

X =

csp

, Φ(X ) =

c + ST x(c) + AT y(c, s) + ETps + BT y(c, s)Π(c)

(4)

Chemical model Φ(X ) =

TW1

,

c ≥ 0,s ≥ 0,p > 0.

(5)

6 / 17

Page 14: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Chemical modelTransport modelCoupling

Transport model

Advection-Dispersion operator

L(u) = ∇ · (vu − D∇u)

D = dmI + αT‖v‖I + (αL − αT )vvT

‖v‖

Transport of mobile species

C(X ) = c + ST x(c) (6)

ω∂Ti

∂t+ L(Ci ) = Qi , i = 1, . . . ,Nc (7)

with boundary and initial conditions

Space discretization

with (for example) a finite difference method

T = (T1, . . . ,TNm ) (8)

7 / 17

Page 15: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Chemical modelTransport modelCoupling

Transport model

Advection-Dispersion operator

L(u) = ∇ · (vu − D∇u)

D = dmI + αT‖v‖I + (αL − αT )vvT

‖v‖

Transport of mobile species

C(X ) = c + ST x(c) (6)

ω∂Ti

∂t+ L(Ci ) = Qi , i = 1, . . . ,Nc (7)

with boundary and initial conditions

Space discretization

with (for example) a finite difference method

T = (T1, . . . ,TNm ) (8)

7 / 17

Page 16: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Chemical modelTransport modelCoupling

Transport model

Advection-Dispersion operator

L(u) = ∇ · (vu − D∇u)

D = dmI + αT‖v‖I + (αL − αT )vvT

‖v‖

Transport of mobile species

C(X ) = c + ST x(c) (6)

ω∂Ti

∂t+ L(Ci ) = Qi , i = 1, . . . ,Nc (7)

with boundary and initial conditions

Space discretization

with (for example) a finite difference method

T = (T1, . . . ,TNm ) (8)

7 / 17

Page 17: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Chemical modelTransport modelCoupling

Coupling transport with chemistry

Semi-discrete reactive transport modelω dTi

dt+ LCi (X ) = Qi + Gi , i = 1, . . . ,Nc ,

Φ(Xj)−

Tj

Wj

1

= 0 j = 1, . . . ,Nm,

initial condition for T ,

(9)

DAE formulation

{ω dvecT

dt+ (L⊗ I )vecC(X )− vecQ − vecG = 0, i = 1, . . . ,Nc ,

vecΦ(X )− (I ⊗ N)vecT − vecF = 0(10)

8 / 17

Page 18: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Chemical modelTransport modelCoupling

Coupling transport with chemistry

Semi-discrete reactive transport modelω dTi

dt+ LCi (X ) = Qi + Gi , i = 1, . . . ,Nc ,

Φ(Xj)−

Tj

Wj

1

= 0 j = 1, . . . ,Nm,

initial condition for T ,

(9)

DAE formulation

{ω dvecT

dt+ (L⊗ I )vecC(X )− vecQ − vecG = 0, i = 1, . . . ,Nc ,

vecΦ(X )− (I ⊗ N)vecT − vecF = 0(10)

8 / 17

Page 19: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Implicit time discretizationGRT3D software

DAE Global approach with substitution

Time discretization: BDF scheme

dvecT

dt' a

∆tvecT +

1

∆tvecZ ,{

aω∆t

vecT + (L⊗ I )vecC(X )− ... = 0,−(I ⊗ N)vecT + vecΦ(X )− ... = 0,

Substitution

R(X ) =∆t

aω(L⊗ N) vecC(X ) + vecΦ(X )− ...

The Jacobian of R is

JR(X ) =∆t

aω(L⊗ N) diag (

dC

dX(Xj)) + diag(JΦ(Xj)).

Nonlinear system

R(X ) = 0

solved with Newton method

9 / 17

Page 20: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Implicit time discretizationGRT3D software

DAE Global approach with substitution

Time discretization: BDF scheme

dvecT

dt' a

∆tvecT +

1

∆tvecZ ,{

aω∆t

vecT + (L⊗ I )vecC(X )− ... = 0,−(I ⊗ N)vecT + vecΦ(X )− ... = 0,

Substitution

R(X ) =∆t

aω(L⊗ N) vecC(X ) + vecΦ(X )− ...

The Jacobian of R is

JR(X ) =∆t

aω(L⊗ N) diag (

dC

dX(Xj)) + diag(JΦ(Xj)).

Nonlinear system

R(X ) = 0

solved with Newton method

9 / 17

Page 21: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Implicit time discretizationGRT3D software

DAE Global approach with substitution

Time discretization: BDF scheme

dvecT

dt' a

∆tvecT +

1

∆tvecZ ,{

aω∆t

vecT + (L⊗ I )vecC(X )− ... = 0,−(I ⊗ N)vecT + vecΦ(X )− ... = 0,

Substitution

R(X ) =∆t

aω(L⊗ N) vecC(X ) + vecΦ(X )− ...

The Jacobian of R is

JR(X ) =∆t

aω(L⊗ N) diag (

dC

dX(Xj)) + diag(JΦ(Xj)).

Nonlinear system

R(X ) = 0

solved with Newton method 9 / 17

Page 22: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Implicit time discretizationGRT3D software

GRT3D software

Transport modules

The velocity v is computed with MODFLOW

The transport operator L is computed with MT3D

Chemistry modules

The functions Φ(X ) and C(X )

The derivatives JΦ(X ) and dC(X )/dX

Coupling modules

The function R(X )

The derivative JR(X )

The DAE solver IDA in SUNDIALS using Newton-LU method

The sparse linear solver UMFPACK

10 / 17

Page 23: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Implicit time discretizationGRT3D software

GRT3D software

Transport modules

The velocity v is computed with MODFLOW

The transport operator L is computed with MT3D

Chemistry modules

The functions Φ(X ) and C(X )

The derivatives JΦ(X ) and dC(X )/dX

Coupling modules

The function R(X )

The derivative JR(X )

The DAE solver IDA in SUNDIALS using Newton-LU method

The sparse linear solver UMFPACK

10 / 17

Page 24: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Implicit time discretizationGRT3D software

GRT3D software

Transport modules

The velocity v is computed with MODFLOW

The transport operator L is computed with MT3D

Chemistry modules

The functions Φ(X ) and C(X )

The derivatives JΦ(X ) and dC(X )/dX

Coupling modules

The function R(X )

The derivative JR(X )

The DAE solver IDA in SUNDIALS using Newton-LU method

The sparse linear solver UMFPACK

10 / 17

Page 25: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Implicit time discretizationGRT3D software

Versions of GRT3D

First version with logarithms

No elimination of T and C

Reduced version with logarithms

Elimination of T and C in the linearized equations

Optimized version without logarithms

Elimination of T and C in the linearized equations

11 / 17

Page 26: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Implicit time discretizationGRT3D software

Versions of GRT3D

First version with logarithms

No elimination of T and C

Reduced version with logarithms

Elimination of T and C in the linearized equations

Optimized version without logarithms

Elimination of T and C in the linearized equations

11 / 17

Page 27: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Implicit time discretizationGRT3D software

Versions of GRT3D

First version with logarithms

No elimination of T and C

Reduced version with logarithms

Elimination of T and C in the linearized equations

Optimized version without logarithms

Elimination of T and C in the linearized equations

11 / 17

Page 28: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Andra qualification testNumerical results

Numerical experiment

Andra qualification test

Injection of alcaline water NaOH in a porous medium with quartz SiO2

ε = 1.

v =

(5.7 10−7

0.

)m.s−1

dm = 0αL = 0.2 mαT = 0.05 mT = 30 daysno flux boundary conditions

Mugler, G. and Bernard-Michel, G. and Faucher, G. and Miguez, R. and Gaombalet, J. and Loth, L. and Chavant, C.), Projet

ALLIANCES: plan de qualification ; CEA, ANDRA, EDF. 12 / 17

Page 29: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Andra qualification testNumerical results

Chemistry conditions

Chemistry equations

H2O ↔ H+ + OH− K1 = 10−14

H4SiO4 ↔ H3SiO−4 + H+ K2 = 10−9.8

H4SiO4 ↔ SiO2(s) + 2H2O K3 = 103.6(11)

Stoichiometric coefficients

Na+ OH− H4SiO4

H+ 0 -1 0

H3SiO4− 0 1 1

SiO2 0 0 1

Initial values

Na+ OH− SiO2

Outside M 0 0 10.

At M 10−2 10−2 10.

13 / 17

Page 30: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Andra qualification testNumerical results

Chemistry conditions

Chemistry equations

H2O ↔ H+ + OH− K1 = 10−14

H4SiO4 ↔ H3SiO−4 + H+ K2 = 10−9.8

H4SiO4 ↔ SiO2(s) + 2H2O K3 = 103.6(11)

Stoichiometric coefficients

Na+ OH− H4SiO4

H+ 0 -1 0

H3SiO4− 0 1 1

SiO2 0 0 1

Initial values

Na+ OH− SiO2

Outside M 0 0 10.

At M 10−2 10−2 10.

13 / 17

Page 31: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Andra qualification testNumerical results

Chemistry conditions

Chemistry equations

H2O ↔ H+ + OH− K1 = 10−14

H4SiO4 ↔ H3SiO−4 + H+ K2 = 10−9.8

H4SiO4 ↔ SiO2(s) + 2H2O K3 = 103.6(11)

Stoichiometric coefficients

Na+ OH− H4SiO4

H+ 0 -1 0

H3SiO4− 0 1 1

SiO2 0 0 1

Initial values

Na+ OH− SiO2

Outside M 0 0 10.

At M 10−2 10−2 10.

13 / 17

Page 32: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Andra qualification testNumerical results

Accuracy results

Accuracy of computed pH

EH+ = ‖xH+ − xH+‖

Mesh first GRT3D reduced GRT3D optimized GRT3D

21x14 1.333005E-11 1.591450E-11 8.040057E-11

41x28 2.489791E-09 2.489787E-09 8.113751E-11

81x56 7.640456E-09 7.640825E-09 3.055914E-10

71x101 7.747011E-09 7.746415E-09 4.161827E-10

161x112 7.9736E-09 7.9738E-09 2.6672E-10

322x224 - 3.0871E-09 4.3067E-10

14 / 17

Page 33: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Andra qualification testNumerical results

Performance results

CPU time of GRT3D

Computations done on two six-core Intel Xeon processors X5690, with afrequence of 3.46 GHz and 4GB of RAM per core.

Mesh first GRT3D reduced GRT3D optimized GRT3D

21x14 18 s 4 s 2 s

48x28 1 min 36 s 21 s 8s

81x56 6 min 33 s 1 min 53 s 50 s

71x101 11 min 55 s 3 min 28 s 1 min 21 s

161x112 32 min 43 s 16 min 30 s 4 min 32 s

322x224 - 1 h 52 min 37 min 38 s

15 / 17

Page 34: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Andra qualification testNumerical results

Comparison results

Performance/Accuracy results

Comparison with an analytical solution

ENa+ = [1

NmNt

∑n,j

(xNa+ (mj , tn)− xNa+ (mj , tn))]1/2

100

101

102

103

104

10−7

10−6

10−5

10−4

10−3

10−2

CPU (s)

Error

GDAE

SNIA

16 / 17

Page 35: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Conclusion

Summary

The DAE global approach (implicit scheme and Newton method) is veryefficient

Substitution is very efficient

The model without logarithms is more efficient than with logarithms

Future work

Precipitation-dissolution with vanishing p

Parallel computations

17 / 17

Page 36: Solving Partial Differential Algebraic Equations and ... · Introduction Physical model DAE global approach Numerical experiment Conclusion Solving Partial Di erential Algebraic Equations

IntroductionPhysical model

DAE global approachNumerical experiment

Conclusion

Conclusion

Summary

The DAE global approach (implicit scheme and Newton method) is veryefficient

Substitution is very efficient

The model without logarithms is more efficient than with logarithms

Future work

Precipitation-dissolution with vanishing p

Parallel computations

17 / 17


Recommended