Numerical Methods for Nuclear Nonlinear Coupled System
description
Transcript of Numerical Methods for Nuclear Nonlinear Coupled System
Numerical Methods for Nuclear Nonlinear Coupled
System
J. Gan, Y. XuT. J. Downar
School of Nuclear EngineeringPurdue University
October, 2002
Outline
Numerical methods for nonlinear system: Marching forward method Nested loop method Newton – Krylov method (intro at end)
Results analysis Conclusion
Nonlinear Coupled System
Neutronics
eg. PARCS
Thermal –
Hydraulics
eg. TRAC-MT, , , B
Q
Nonlinear subsystems already handled in each side,
How about the above global nonlinear system?
Marching Forward Method for Coupled System
Current marching forward method:
No convergence constrained !
Only once feedback happened in each time step,
Therefore time step size limited
TRAC-M
PARCS
step n step n+1
A. Original Marching Forward
Iterative Methods for Coupled System – Nested Loop
Alternative nested loop method:
Convergence criteria constrained, more accurate !
0)()( ,*1,, ninin xSxxM
n: time step index; i: nested loop index
TRAC-M
PARCS
step n step n+1
B. Gauss Seidel style Nested iteration
Converged?N
Y Converged?N
Y Converged?N
Y
Neutronics/Thermal-Hydraulics Coupled Problem
)()( xbxxA
It can be viewed as :
variablesNeutronicsofvectortheΦ
variablesHTofvectortheT
:
/:
SΦTM
ΦQTTN
)(
)()( Thermal-Hydraulic equation
Neutronics spatial kinetic equation
0)()()( xbxxAxF
Nonlinear System:
)()(:2
:11
0
iii xbxxAstep
xofguessinitialstep
SΦTMstep
ΦQTTNstep
ΦTofguessinitialstep
ii
iii
1
11
00
)(:3
)()(:2
,:1
)(\)()(1 iiii xbxAxgx
Iterate step 2 and 3 until converged
Iterate step 2 until converged
It can be also viewed as :Fix point iteration for The nonlinear system
Gauss Seidel style Iteration Parallel style Iteration
SΦTMstep
ΦQTTNstep
ΦTofguessinitialstep
ii
iii
11
11
00
)(:3
)()(:2
,:1
Nested Iteration
Independent Variables in Nonlinear System
)()()(
)()()(
ΦQTTNofsolutionisΦTwhere
SxbΦTMxAΦx
)()(
)(0
0)()(
ΦQ
Sxb
TN
TMxA
T
Φx
Gauss Seidel style Nested Iteration
Parallel style Nested Iteration
New Module in TRAC-M
nestedloop() plays the role of once BackupLoop in trans()
Convergence control passed from PARCS
Also changes in GlobalDatM.f90, NamlistInputM.f90, prep.f90, TDMRTimeCalcM.f90, TDMRVarDeclM.f90
nestedloop.F90
SetTimeStep(): called once in 1st iteration
RestoreOldTimeInfo()
TDMR(3): new power and convergence control from PARCS
prep()
hout()
post()
TDMR(2): new T/H feedback to PARCS
Test Case: OECD MSLB EX2
TRAC-M Core Nodalization
TMI-I nuclear power plant Transient Simulation: EOC, 177 FA, 2772 MW th, 24
axial layers
1 3
4
2
6 5
8
7 9
10
11
12 18
17
16
15
14
13
19
neutronic fuel assembly
reflector assembly
stuck rod location
PARCS and TRAC-M Thermal Hydraulic Channel Mapping
Consistency of Numerical Results
Power vs. Timewith delt_t = 0.1 sec
0.00E+00
2.00E+01
4.00E+01
6.00E+01
8.00E+01
1.00E+02
1.20E+02
1.40E+02
0 5 10 15 20 25 30
time (sec)
Pow
er (%
)
marching forward
nested loop
Total Mass Flow Comparison in Pipe 1with delt_t = 0.1 sec
700
720
740
760
0 5 10 15 20 25 30
time (sec)
tota
l mas
s-flo
w (k
g/s)
marching forward
nested loop
Various Time Scales
Fixed fine time step size (0.1 sec) applied during SCRAM phase: 5 sec – 10 sec
Coarse time step size applied in other transient phases
Thereafter different time step sizes are used for testing
Reactivity vs. Time
-7
-6
-5
-4
-3
-2
-1
0
1
0 5 10 15 20 25 30
time (sec)
Reac
tivity
($)
marching forward 0.1s
marching forward 0.2s
Analysis of Time Step Size
Power vs. Timewith marching forward method
0.00E+00
2.00E+01
4.00E+01
6.00E+01
8.00E+01
1.00E+02
1.20E+02
1.40E+02
0 5 10 15 20 25 30
time (sec)
Pow
er (%
) 0.1sec
0.2 sec
0.5 sec
1.0 sec
Power vs. Timewith nested loop method
0.00E+00
2.00E+01
4.00E+01
6.00E+01
8.00E+01
1.00E+02
1.20E+02
1.40E+02
0 5 10 15 20 25 30
time (sec)
Pow
er (%
) 0.1 sec
0.2 sec
0.5 sec
1.0 sec
Marching Forward Method vs. Nested Loop Method
Cost ComparisonTotal Cost Summary for Various Numerical Solvers
time step size: 0.1 sec, time steps: 250
CPU-time consumed ratios compared with marching forward method are listed in the grey cells
The ratios of PARCS are little smaller than those of TRAC-M: nested outer iteration is the intrinsic solver for sub-nonlinear system of PARCS; however SETS (like predictor-corrector) is applied in TRAC-M, whose cost is more linear to the number of nested loop iterations
Numerical SolverDiff. Power
(%)
CPU-Time (sec)
Nested IterationsTRAC-M PARCS
Marching Forward 0.153 69.3 1.0 298.6 1.0 250
Nested Loop Method - 253.7 3.7 582.7 2.0 971
Excluding the SCRAM time phase
Cost Comparison (cont.)
Total Cost Summary for Various Numerical Solverstime step size: 0.5 sec, time steps: 50
CPU-time consumed ratios still compared with marching forward method with 0.1 sec step size
The cost of PARCS for nested loop method is cheaper than that for marching forward method with 0.1 sec time step size
Excluding the SCRAM time phase
Numerical SolverDiff. Power
(%)
CPU-Time (sec)Nested
IterationsTRAC-M PARCS
Marching Forward 2.97 15.9 0.2 90.5 0.3 50
Nested Loop Method 1.26 61.1 0.9 165.96 0.6 223
Test Case: OECD MSLB EX3
Full plant system: Task 1
Task 2
Transient Simulation
Total Mass Flow in Pipe 1 (hot leg b)
7400
7600
7800
8000
8200
8400
8600
8800
9000
0 10 20 30 40 50 60 70 80 90 100
time (sec)
mas
s flo
w (k
g/se
c)
Reactor Power
0.00E+00
2.00E+01
4.00E+01
6.00E+01
8.00E+01
1.00E+02
1.20E+02
1.40E+02
0 10 20 30 40 50 60 70 80 90 100
time (sec)
reac
tor p
ower
(%fp
)
Reactor Power
0.00E+00
2.00E+01
4.00E+01
6.00E+01
8.00E+01
1.00E+02
1.20E+02
1.40E+02
0 10 20 30 40 50 60 70 80 90 100
time (sec)
reac
tor p
ower
(%fp
)
Time Scale Selection
Only remove SCRAM effect for time step size testing
Fine time step size (10-6-10-1 sec) applied during SCRAM phase: 0 sec – 10 sec
Coarse time step size applied in other transient phases
Thereafter different time step sizes are used for testing
Results for Various Methods
Total Mass Flow in Pipe 1 (hot leg b)
8600
8650
8700
8750
8800
8850
0 5 10 15 20 25 30
time (sec)
mas
s flo
w (k
g/se
c)
marching forward method
nested loop method
Reactor Power
0.00E+00
2.00E+01
4.00E+01
6.00E+01
8.00E+01
1.00E+02
1.20E+02
1.40E+02
0 5 10 15 20 25 30
time (sec)
reac
tor p
ower
(%fp
)
marching forward method
nested loop method
Power curve is much more stable for two methods with same time step size, 0.1 second Signal trips are delayed in the result with nested loop method
Effects of Various Time Step Size Testing cases for larger step sizes are failed around 30-40 second caused by large perturbation Fewer oscillations captured with larger time step size Later study will test large step size after ECC signal triggered Furthermore, adaptive time step size and CS-trigger time step backup for nested loop iteration
Total Mass Flow in Pipe 1 (hot leg b)with marching forward method
8600
8650
8700
8750
8800
8850
0 5 10 15 20 25 30
time (sec)
mas
s flo
w (k
g/se
c)
0.1 sec
0.2 sec
Total Mass Flow in Pipe 1 (hot leg b)with nested loop method
8600
8650
8700
8750
8800
8850
0 5 10 15 20 25 30
time (sec)
mas
s flo
w (k
g/se
c)
0.1 sec
0.2 sec
0.3 sec
Current Results of Larger Step Sizes
Large step size after ECC signal triggered was tested for marching forward method till 0.4 second
Test failed for nested loop method since heat structure backup problem in BackupHS()
Reactor Powerwith marching forward method
0.00E+00
2.00E+01
4.00E+01
6.00E+01
8.00E+01
1.00E+02
1.20E+02
1.40E+02
0 10 20 30 40 50 60 70 80 90 100
time (sec)
reac
tor
pow
er (%
fp)
0.1 sec
0.2 sec
0.4 sec
Total Mass Flow in Pipe 1 (hot leg b)with marching forward method
7400
7600
7800
8000
8200
8400
8600
8800
9000
0 20 40 60 80 100
time (sec)
mas
s flo
w (k
g/se
c)
0.1 sec
0.2 sec
0.4 sec
Some “bug” in BackupHS() Nested loop method crushed by an infinite
logarithm operand in the reactor power period signal evaluation at svProcessHS()
In each nested loop iteration, old time information is reinstalled, and new power from PARCS is used to get new T/H feedback in TRAC-M
The associated variables of SV55, “rpowrn” and “rpowro”, will be backup in BackupHS()
“rpowrn” is changed with whole power, but “rpowro” is always increased about one order in each backup
“rpowro” is kept as initialization value if no backup when original marching forward method applied
*idsv isvn ilcn icn1 icn2
055 19 999 0 0 * Reactor Power Period
rpowrn rpowro
New and old time reactor core power in fuel rod 999
BackupHS()
temp = rodTab(cco)%rpowrnrodTab(cco)%rpowrn = rodTab(cco)%rpowro- (rodTab(cco)%rpowr-rodTab(cco)%rpowro)/ min(dto/delt,2.0d0)rodTab(cco)%rpowro = rodTab(cco)%rpowro- (temp-rodTab(cco)%rpowro)*dto/delt
Newton’s Method
)( :iteration sNewton’ ) F(xx –J xx ii-1i1 i
ii1i
iiii
iii
ii
Δxx
RΔJΔ
)F(x )J(xJ
)F(xR
4)
from solve 3)
2)
1)
Solve: F(x)=0
Inexact Newton method:solve
by iterative solver, such as GMRES, BICG,…
iii RΔJ
Generalized Minimum Residual Method (GMRES … thanks Prof
Saad!)To solve: J Δ =R drop the superscript i
Methodology: find ΔmKm(P-1J, P-1R)=span{ P-1R, P-1JP-1R,…(P-1J)mP-1R}
by minimizing ||rm=R-JΔm||2 increase m, until ||rm||2<tolerance
Algorithm: Δ0=0, r0=P-1R , β :=||r0||2, and v1:= r0 /β
Define the (m+1)×m matrix Hm={hi,j}1≤i≤m+1,1≤j≤m. set Hm=0
For j=1,2,…m Do:Compute wj:=P-1JvjFor I=1,2,…j Do
h i,j :=(wj,vi)
wj :=wj - h i,jvi
Enddohj+1,j=||wj||2. If hj+1,j=0, set m :=j, and break
v j+1=wj/ h j+1,j
EnddoCompute ym the minizer of || βe1-Hmy||2, and Δm= Δ0+Vmym
Matrix Free Inexact Newton MethodWith the following approximation of Jivj,
)()( i
ji
ji xFvxFvJ
vjKm(P-1Ji, P-1Ri), a combination of residuals
Ji does not need to be Constructed Matrix Free
Only need evaluate the residuals: F(xi), and F (xi +vj)
Question: Can we implement MF Newton’s method with a good preconditioner P, without constructing P?
And even do not evaluate the residuals F(xi), and F (xi +vj)?
And implement this in “legacy” codes like TRACM and PARCS
Perhaps … and do it based on codes using the nested method!
Derivation of MF Newton’s MethodBased on Nested Method
)()()( xbxxAxF
)()()( ji
ji
ji
ji vxgvxvxAvxF
)()()()()(
)()()()()()(
)()()()(
1
1)(1
jii
j
iij
ij
i
iiij
ij
ij
ii
ij
ii
jnn
vxgxgv
xgxvxgvx
xgxxAvxgvxvxAxA
xFvxFxAvJxA
No F(xi) and F (xi +vj), Don’t construct Preconditioner
Need g(xi) and g(xi +vj), can be obtained by nested method
)()(
)()()()()()()()(iii
iiiiiiiiii
xgxxA
xbxgxAxbxxAxbxxAxF
Recall: )(\)()( xbxAxg and
Preconditioning
A(xi) is the most convenient preconditioner we can get,Fortunately, it is often a good preconditioner, as:
J(xi)= F(xi)= A(xi)+ A(xi) xi - b(xi)
Implementation in TRACM/PARCS
finish
No
Yes
MATRIX - FREE PRECONDITIONING GMRESIteration j:
estimatewj: = P-1 J vj ≈ [P-1 F(xi+εvj) - r0] / ε
Newton_perturb (xi + εvj )
GMRES_MFP
Back to GMRES:P-1 F(xi+εvj) = (xi + εvj ) -f (xi + εvj )
GMRES Convergence?
GM
RE
S Iteration
PARCS
TRAC-M
'Nx
'/ HTx
Once Nested Coupling Loop
Consistency of Numerical Results
Total Mass Flow Comparison in Pipe 1with delt_t = 0.1 sec
700
720
740
760
0 5 10 15 20 25 30
time (sec)
tota
l mas
s-flo
w (k
g/s)
marching forward
nested loop
newton - krylov
Power vs. Timewith delt_t = 0.1 sec
0.00E+00
2.00E+01
4.00E+01
6.00E+01
8.00E+01
1.00E+02
1.20E+02
1.40E+02
0 5 10 15 20 25 30
time (sec)
Pow
er (%
) marching forward
nested loop
newton - krylov
Power vs. Timewith newton - krylov method
0.00E+00
2.00E+01
4.00E+01
6.00E+01
8.00E+01
1.00E+02
1.20E+02
1.40E+02
0 5 10 15 20 25 30
time (sec)
Pow
er (%
) 0.1 sec
0.2 sec
0.5 sec
Analysis of Time Step Size (cont.)
Marching Forward Method vs. Newton – Krylov Method
Power vs. Timewith marching forward method
0.00E+00
2.00E+01
4.00E+01
6.00E+01
8.00E+01
1.00E+02
1.20E+02
1.40E+02
0 5 10 15 20 25 30
time (sec)
Pow
er (%
) 0.1sec
0.2 sec
0.5 sec
Cost ComparisonTotal Cost Summary for Various Numerical Solvers
time step size: 0.1 sec, time steps: 250
CPU-time consumed ratios compared with marching forward method are listed in the grey cells
The ratios of PARCS are little smaller than those of TRAC-M: nested outer iteration is the intrinsic solver for sub-nonlinear system of PARCS; however SETS (like predictor-corrector) is applied in TRAC-M, whose cost is more linear to the number of nested loop iterations
Numerical SolverDiff. Power
(%)
CPU-Time (sec) Iterations
TRAC-M PARCS NESTED NEWTON GMRES
Marching Forward 0.153 69.3 1.0 298.6 1.0 250 - -
Nested Loop Method - 253.7 3.7 582.7 2.0 971 - -
Newton Method 0.0511 602.6 8.7 1686.7 6.6 2351 693 774Excluding the SCRAM time phase
Cost Comparison (cont.)Total Cost Summary for Various Numerical Solvers
time step size: 0.5 sec, time steps: 50
CPU-time consumed ratios still compared with marching forward method with 0.1 sec step size
The cost of PARCS for nested loop method is cheaper than that for marching forward method with 0.1 sec time step size
Perturbed system in GMRES with large time step size is difficult to achieve convergence for PARCS intrinsic nested loop solver
Excluding the SCRAM time phase
Numerical SolverDiff.
Power (%)
CPU-Time (sec) Iterations
TRAC-M PARCS NESTED NEWTON GMRES
Marching Forward 2.97 15.9 0.2 90.5 0.3 50 - -
Nested Loop Method
1.26 61.1 0.9 165.96 0.6 223 - -
Newton Method 1.35 334.9 4.8 1564.6 5.2 1251 192 480
Conclusions
The Nested and Newton methods have been implemented in the U.S. NRC code system
w/o construction of Jacobi matrix, nonlinear residuals, and w/ innovative preconditioner
Nested and Newton methods improve the accuracy of nonlinear coupled system in nuclear fields for the same time step size, but require a large increase in CPU time
The time step size with Nested and Newton methods can be increased to reduce the CPU requirements
Continuing Work
Work is continuing on optimizing the numerical behavior of the Nested and Newton methods Convergence study for outer Newton & inner GMRES
of Matrix Free Newton-Krylov Alterative approximation study
The tradeoff in accuracy vrs cpu time will then be examined for a wider range of coupled transient systems with more complicated T/H model, like OECD
MSLB EX3, PBTT EX3