experimental relap5-3d time step improvements dr. george l mesina relap5 international users seminar...
TRANSCRIPT
Experimental RELAP5-3D Time Step Improvements
Dr. George L Mesina
RELAP5 International Users SeminarNov 18-20, 2008Idaho Falls, ID
Overview
• Background on old method
• Improvements
• Measures
• Results
Background
• RELAP5-3D major time step controls
– Material Courant Limit
– Truncation Error
– Upper and lower time step limits
– Time-targeting
• Must exactly reach plot, output, restart times
– Some other controls via input not relevant
• Trip stop, dump, etc.
Background: Material Courant Limit
• Material Courant Limit (MCL)
• In a control volume:
• Δtin is the time required for fluid to cross from the
entrance to the exit of volume i on time step n.
• Larger time steps with semi-implicit method cause instabilities. Cannot exceed Δti
n in any volume.
• Flow region MCL is:
),max(
),max(ngi
ngi
nfi
nfi
ngi
nfi
ini
vvxt
NVOLitMCL ni ,...1min
Background: Time Step Limits
• Upper and Lower Limits
– The user establishes upper and lower time step limits via input.
– The upper limit creates a minimum number of steps to complete a transient (if Δti
n is never cut).
• Mass Error
– The deviation from perfect solution of the continuity equation.
• The time step is cut if mass error becomes excessive or Δti
n exceeds MCL. . . . Ideally.
Background: Time Step Control
• However, to allow faster code execution, selective violation of MCL was implemented– 5 “bins,” SJ = {Δtn
J+5i | i = 1, 2, . . . , NVOL/5}, J = 1,2,3,4,5
– MCLJ = min(SJ). Note: MCL1 == MCL.
– Δtn = MCL2. Note: Opt 15 sets Δtn = MCL1 = MCL.
• To hit time targets exactly, use halving and doubling.– Plots, minor & major edits, restarts are multiples of DTMAX.
– RULE: Never bypass a target time.
– If we had T=1.75, plot time=2.0, and Δtn = 0.5, the T+dt > 2.0.
• Would need to HALVE Δtn to hit plot time.
• In practice, this is controlled differently.
Background: Time Step Control
• To hit time targets exactly, only double on even time steps. Controlled by integer, NREPET.
• NREPET = Number of Δtn steps needed to reach next multiple of DTMAX.
– Example: Δtn = 0.25*DTMAX, and the cumulative time is: Tn = 5.25*DTMAX, NREPETn = 3.
– Double Δtn implies halve NREPETn. In example, 3/2=1. Wrong!
– Need Δtn+1=0.25*DTMAX. Then Tn+1=5.5*DTMAX, NREPETn+1=2.
– Double now. Δtn+2=0.5*DTMAX. NREPETn+2=1.
Background: Halving & Doubling
• Halving and doubling algorithm based on DTMAX
– Δtn = 2-kDTMAX, 0 < k < log2(DTMAX/DTMIN).
– Halve if MCL or mass error condition violated.
– Double if mass error “low” & Δtn < MCL/2.
• Combining DTMAX limit with selective MCL violation, the flow region MCL is given by:
}2,1{,,...2,1,22
max
JkMCLDTMAXDTMAX
t Jkk
Improvements
• Deficiencies & possible improvements
– Should never violate MCL
• Many users run with exact MCL only.
– Allow time steps other than 2-kDTMAX.
• However, still hit time targets exactly
– Allow code to run above DTMAX (user option).
• Must stay “safely” below MCL.
• Apply multiplier, m<1.0, such that Δtn < m*MCL
Integer Time-step
• All work was done in the context of the integer time-stepping revision of subroutine DTSTEP.– This work enables exact calculation of time in long-running
transients– Important for working with coupled codes.
• To understand integer time-stepping, thing of your computer’s clock cycle.– If it is a 4 GHz machine, it performs 4,000,000,000 ticks per
second.– Each tick is 1/4000000000 sec.– An integer, t, can count the ticks from 1 to 4000000000.– Floating point time T = t/4000000000.0
Time Targets
• A 4-step approach is used to hit time targets.
– Check for target 3 steps in advance.
reachedtargetTime,
stepremainingOne,
stepsremainingTwo,2
stepsremainingThree,3,mod3
saved
edit
edit
editedit
tt
ttt
ttt
tttt
t
Approach MCL if above DTMAX
• DTMAX is often far below MCL
• If the user could allow violation of DTMAX, larger time steps could often be taken.
– Propose making the option controlled on the time step card.
– The user could turn it on and off to examine important parts of the transient as needed.
MCL vs Current Time-step (DTMAX)
• Typpwr
Typpwr Violating DTMAX
•
Selecting the MCL Multiplier, m
• Multiplying the MCL by safety value ensures the time step does not come “too close” to instability.
• A study was done by running numerous test models with a variety of values of m.
– m = 0.5k, k = 1, 2, . . . , 20.
– The input models were taken from the set of problems transmitted with the code.
• The study showed that generally, .85 <= m <= .95 was best.
– In fact, m = 0.9 proved about the best choice.
Background
• b
Background
• b
Combining DTMAX violation and m
• Combined improvements
– Sometimes the number of time steps is reduced significantly.
– Sometimes there is no change.
• Note that use of excessively frequent time targets interferes with every improvement
– Because code must reduce time step to hit target
• For Typical PWR, the reduction is most pronounced.
End
• end
Conclusions
• The existing algorithm for semi-implicit time-stepping was reviewed.
• Several improvements were suggested.
• Two improvements were combined and shown to allow significant reduction in code runtime
• These are the MCL multiplier and DTMAX violation
• It is proposed that these be made a user option.