zahari zlatev national environmental research institute frederiksborgvej 399, p. o. box 358
DESCRIPTION
Using Partitioning in the Numerical Treatment of ODE Systems with Applications to Atmospheric Modelling. Zahari Zlatev National Environmental Research Institute Frederiksborgvej 399, P. O. Box 358 DK-4000 Roskilde, Denmark e-mail: [email protected] - PowerPoint PPT PresentationTRANSCRIPT
Using Partitioning in the Numerical Treatment of ODE Systems with Applications to Atmospheric Modelling
Zahari ZlatevZahari Zlatev
National Environmental Research InstituteNational Environmental Research Institute
Frederiksborgvej 399, P. O. Box 358Frederiksborgvej 399, P. O. Box 358
DK-4000 Roskilde, DenmarkDK-4000 Roskilde, Denmark
e-mail: [email protected]: [email protected]
http://www.dmu.dk/AtmosphericEnvironment/staff/zlatev.htmhttp://www.dmu.dk/AtmosphericEnvironment/staff/zlatev.htm
http://www.dmu.dk/AtmosphericEnvironment/DEMhttp://www.dmu.dk/AtmosphericEnvironment/DEM
http://www.mathpreprints.comhttp://www.mathpreprints.com
Contents
1. Major assumptions1. Major assumptions
2. Partitioning into strong and week blocks2. Partitioning into strong and week blocks
3. Advantages of the partitioned algorithms3. Advantages of the partitioned algorithms
4. 4. “Local”“Local” error of the partitioned algorithms error of the partitioned algorithms
5. 5. “Global”“Global” error of the partitioned algorithms error of the partitioned algorithms
6. Application to some atmospheric models6. Application to some atmospheric models
7. Computing times7. Computing times
8. Open problems8. Open problems
Great environmental challenges in the 21st century
1. More detailed information about the pollution 1. More detailed information about the pollution levels and the possible damaging effectslevels and the possible damaging effects
2. More reliable information (especially about 2. More reliable information (especially about worst cases)worst cases)
How to resolve these two tasks?How to resolve these two tasks?
By using large-scale mathematical modelsBy using large-scale mathematical models
discretized on a fine resolution gridsdiscretized on a fine resolution grids
Mathematical Models
,...,q,s
z
cK
zz
)(wc
),c...,c(cQE
)ck(k
y
cK
yx
cK
x
y
)(vc
x
)(uc
t
c
sz
s
qss
sss
sy
sx
sss
21
transportvert.
emis.chem.,
deposition
diffusionhor.
transporthor.
21
21
“Non-optimized” codeModuleModule Comp. timeComp. time PercentPercent
Chemistry 16147 Chemistry 16147 83.0983.09
Advection 3013 15.51Advection 3013 15.51
Initialization 1 0.00Initialization 1 0.00
Input operations 50 0.26Input operations 50 0.26
Output operation 220 1.13Output operation 220 1.13
Total 19432 100.00Total 19432 100.00
It is important to optimize the chemical part It is important to optimize the chemical part for this problemfor this problem
2-D version on a 96x96 grid (50 km x 50 km)2-D version on a 96x96 grid (50 km x 50 km)
The time-period is one monthThe time-period is one month
The situation changes for the fine resolution models (theThe situation changes for the fine resolution models (the
advection becomes very important)advection becomes very important)
The computing time is measured in secondsThe computing time is measured in seconds
One processor is used in this runOne processor is used in this run
Methods for the chemical part
QSSAQSSA (Quasi-Steady-State-Approximation) (Quasi-Steady-State-Approximation) Classical numerical methods for Classical numerical methods for stiffstiff ODEs ODEs PartitionigPartitionig
QSSA
01.0
1001.0
10
),...,,(),...,,(
1
1
1
2121
tLforyLPtyy
tLforeL
Py
L
Py
tLforL
Py
yyyyLyyyPdt
dy
ssss
n
s
n
s
s
Lt
s
sn
s
s
sn
s
s
s
sn
s
sqsqs
s
s
1. Major assumptionsIt will be assumed that the components ofIt will be assumed that the components of
the solution vector the solution vector can be divided into severalcan be divided into several
groupsgroups, so that the components belonging to, so that the components belonging to
different groups have different properties.different groups have different properties.
In the particular case where In the particular case where the chemical part ofthe chemical part of
a large air pollution modelsa large air pollution models is studied, the is studied, the
reactions are divided into reactions are divided into fastfast reactions and reactions and slowslow
reactionsreactions
2. Partitioning vector
diagonal)areblocksstrong(theblocksweekandStrong
ofblockeachtocorrespondofblocksrowTwo
inngpartitioniimpliesofgparitioninThe
blockstheofone,...,2,1,1,,...,,
blockstodpartitioneis
:thatAssume
),(
),(),(,
,),,(
]0[1
]0[1
21
]1[11
]1[1
][1
]0[1
11
nn
nn
kp
n
innn
in
inn
nnnnnnnn
ytJI
tJIy
qkqrqprrr
NBLOCKSy
ytftyyytJI
ytfftyyftyy
fyytfdt
dy
n y
3. Forming the partitioned system
]1[
11]1[
1][1
]0[1
]1[11
]1[1
][1
]0[1
][1
]0[
1
~]0[1
]0[1
]0[1
]0[1
]0[1
]0[1
]1[11
]1[1
][1
]0[1
,
,
),(
innn
in
inn
nnnnnn
n
nnnnn
nn
innn
in
inn
ztftzzzS
ytftyyyA
methodNewtonregularthebyobtained
solutionacceptedthebeyLet
StISwithWSA
tJIA
ytftyyyA
Splitting matrix A
A = S + WA = S + W
WSA
WW
WW
WW
S
S
S
SWW
WSW
WWS
0
0
0
00
00
00
3231
2321
1312
33
22
11
333231
232221
131211
4. Why partitioned system?
Advantages:Advantages:
1. It is not necessary to compute the non-zero 1. It is not necessary to compute the non-zero elements of the weak blockselements of the weak blocks
2. Several small matrices are to be factorized 2. Several small matrices are to be factorized instead of one big matrixinstead of one big matrix
3. Several small systems of linear algebraic 3. Several small systems of linear algebraic equations are to be solved at each Newton equations are to be solved at each Newton iteration (instead of one large system)iteration (instead of one large system)
5. Requirements
]1[
11]1[
1][1
]0[1
]1[11
]1[1
][1
]0[1
,
,
innn
in
inn
innn
in
inn
ztftzzzS
ytftyyyA
It is desirable to find the conditions under which the approximate solution of the second problem is closeto the approximate solution of the first one
largermuchnotis
sufficientnotis0z
smallis][1n
][1
][1
nn zy
Lemma 1
dy
zytfT
BWSD
STStB
SC
yDzyCzyBzy
innni
n
innn
in
ni
nnin
nn
ninnnn
inn
in
inn
1
0
]1[1
]1[1,1]1[
1
]1[1
]0[1
1]0[1
]1[1
]0[
1
~]1[
1
1]0[1
]1[1
1]0[11
][1
]1[11
]1[1
][1
]1[1
][1
][1
)1(
where
)(
methodnumericalsome
byfoundofionapproximat
),(ofsolutionexact
1][1
1111
nn
nnnnn
yy
ytftyyy
Lemma 2
][1
]1[1
1
1
][1
1
1
1
][1
]0[1
][1
1
][1
][1
][1
)(
nki
n
i
k
k
j
jin
nnn
i
k
k
j
jin
nn
i
j
jin
inn
yDB
zyCB
zyBzy
methodnumericalsome
byfoundofionapproximat
),(ofsolutionexact
1][1
1111
nn
nnnnn
yy
ytftyyy
“Local” error
][
10
1 maxj
nij
nBB
11 nB Major assumption
Theorem
][1
][1
][11
inn
inn
zy
zy
1. if the number of iterations is sufficiently large and2. if the error from the previous step is sufficiently small
“Global” error
)(,1
10,
max
max
10][
][
0
][
knkk
kk
ik
ik
EEB
CE
nkBB
k
k
k
Theorem
If 11][ EandB kk then the inequalities
][1
][1
][11
11 nnnnnn zyandzy
will be satisfied when sufficiently many iterations are performed
“Global” error - continuation
Theorem
E
EzyEzy
E
EzyEzy
EIf
nn
nn
nnv
nn
n
n
1
1
1
1
,1
1
001][
1][1
1
001][
11
1
1
nzyzy
nzyzy
EIf
n
n
nn
vnn
00][
1][1
00][
11
1
1
,1
Actual partitioning
1. Matrix 1. Matrix SS, which is obtained after the partitioning is a , which is obtained after the partitioning is a block-diagonal matrix containing block-diagonal matrix containing 2323 blocks. blocks.
2. The first diagonal block is a 2. The first diagonal block is a 13x1313x13 matrix. matrix.
3. The next 3. The next 2222 clocks are clocks are 1x11x1 matrices (a Newton iteration matrices (a Newton iteration procedure for scalar equations is used in this part).procedure for scalar equations is used in this part).
4. This partitioning was recommended by the chemists (based 4. This partitioning was recommended by the chemists (based on their knowledge of the chemical reactions)on their knowledge of the chemical reactions)
Variation of the key quantities for different scenarios
ScenarioScenario )( NB E
1 [2.4E-4, 3.3E-2] 1.03425 2 [3.7E-4, 2.1E-2] 1.02179 3 [5.8E-3, 5.7E-2] 1.06040 4 [1.3E-3, 4.3E-2] 1.04606 5 [4.3E-3, 2.5E-2] 1.02522 6 [5.6E-3, 6.4E-2] 1.06882
standN 301260,...,2,1
)(,)( 1111 nnnn BBBB
Variation of the key quantities for different scenarios
Variation of the key quantities for different stepsizes
StepsizeStepsize B E
30 2.5E-2 1.025 10 1.4E-2 1.014 1 2.6E-3 1.0026 0.1 3.6E-4 1.00036 0.01 5.3E-5 1.000053
5Scenario
Numerical Results
Method Method Computing timeComputing time
QSSA-1 12.85QSSA-1 12.85
QSSA-2 11.72QSSA-2 11.72
Euler Euler 15.1115.11
Trapez. 15.94Trapez. 15.94
RK-2 28.49RK-2 28.49
Part. dense 10.09 Based on EulerPart. dense 10.09 Based on EulerBetter accuracy with the classical numerical methodsBetter accuracy with the classical numerical methods
Accuracy results
Numer. Method Scenario 2 Scenario 6Numer. Method Scenario 2 Scenario 6
QSSA-1 3.20E-3 4.39E-1QSSA-1 3.20E-3 4.39E-1
QSSA-2 3.39E-3 3.86E-1QSSA-2 3.39E-3 3.86E-1
Euler 5.78E-4 3.57E-3Euler 5.78E-4 3.57E-3
Trapez 5.78E-4 3.57E-3Trapez 5.78E-4 3.57E-3
Part. dense 5.72E-4 3.26E-3Part. dense 5.72E-4 3.26E-3st 30 The chemical compound is ozone
Conclusions and open problems
1.We have shown that the 1.We have shown that the physicalphysical arguments for achieving arguments for achieving successful partitioning can be justified with clear algebraic successful partitioning can be justified with clear algebraic requirements.requirements.
2. There is a 2. There is a drawbackdrawback: if the chemical scheme is changed, : if the chemical scheme is changed, then the whole procedure has to be carried out for the new then the whole procedure has to be carried out for the new chemical scheme.chemical scheme.
3. 3. Automatic partitioningAutomatic partitioning is desirable.is desirable.