SlideShare a Scribd company logo
The Pennsylvania State University
The Graduate School
College of Engineering
INITIAL RESIDUAL FORMULATION OF CTF
A Thesis in
Nuclear Engineering
by
Christopher A. Dances
© 2015 Christopher A. Dances
Submitted in Partial Fulfillment
of the Requirements
for the Degree of
Master of Science
May 2015
The thesis of Christopher A. Dances was reviewed and approved∗
by the following:
Maria Avramova
Associate Professor of Nuclear Engineering
Thesis Advisor
Kostadin Ivanov
Distinghuished Professor of Nuclear Engineering
Vince Mousseau
Mentor from Sandia National Labs
Special Signatory
Arthur Motta
Professor of Nuclear Engineering and Materias Science and Engineering
Chair of Nuclear Engineering
∗
Signatures are on file in the Graduate School.
ii
Abstract
Nuclear engineering codes are being used to simulate more challenging problems and at higher
fidelities than they were initially developed for. In order to expand the capabilities of these codes,
state of the art numerical methods and computer science need to be implemented. One of the key
players in this effort is the Consortium for Advanced Simulation of Light Water Reactors (CASL)
and through development of the Virtual Environment for Reactor Applications (VERA). The
sub-channel thermal hydraulic code used in VERA is CTF, which is a version of COBRA-TF
(Coolant-Boiling in Rod Arrays - Three Fluids) partially developed at the Pennsylvania State
University by the Reactor Dynamics and Fuel Management Research Group (RDFMG).
Currently, CTF solves 8 conservation equations for liquid, entrained droplet, and vapor phases
of water boiling within the rod structure of a LWR reactor core. The conservation equations
analytically reduce into a pressure matrix and are solved using a semi-implicit method. The solid
conduction equations are then implicitly solved to determine the temperature within the fuel.
Since the liquid solution is solved independent of the solid solution, the solid and liquid equations
are explicitly coupled.
In an effort to help meet the objectives of CASL, a version of CTF has been developed that
solves the residual formulation of the 1D single-phase conservation equations. The formulation of
the base equations as residuals allows the code to be run semi-implicitly or fully implicitly while
clearly defining the original conservation equations. This thesis outlines the work to integrate 1D
solid conduction equations into the residual formulation. This expands the solid liquid coupling
to be either explicit or implicit. Different physical models, such as the homogeneous liquid solid
energy model, can be readily implemented by adding the residual functions and variables. A
simple test problem consisting of a single liquid channel and fuel pin was designed to compare the
original version of CTF to the different numerical and physical models available through the new
residual formulation. The methods are compared both for steady state and transient conditions
to quantify the accuracy and stability of each method. The input parameters are varied over a
variety of conditions to demonstrate when different methods are most appropriate. The ability to
choose appropriate numerical methods and physical models will allow for greater fidelity, and
decrease computational expenses.
iii
Table of Contents
List of Figures vi
List of Tables viii
List of Symbols ix
Acknowledgments xi
Chapter 1
Introduction 1
Chapter 2
Conservation Equations 2
2.1 Single Phase Liquid Euler Equations . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 1-D Radial Solid Conduction Equation . . . . . . . . . . . . . . . . . . . . . . . . 4
Chapter 3
Solution Methods 8
3.1 Residual Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 Jacobian Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Chapter 4
Isokinetic Step Advection 11
4.1 Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Density Advection and Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.3 Modified Equation Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4 Scaling of Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Chapter 5
Shock Tube 17
5.1 Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2 Analytical Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.3 Results and Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.4 Scaling of Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
iv
Chapter 6
Isokinetic Sine Wave Advection 23
6.1 Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.2 Code Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.3 Richardson Extrapolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.4 Convergence of Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.5 Order of Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Chapter 7
Uniform Heating Problem 30
7.1 Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.2 Steady State Analytical Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.3 Steady State Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.4 Transient Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Chapter 8
Conclusions 36
Bibliography 36
v
List of Figures
2.1 The finite volume structure for CTF . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 Rod Axial Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Radial Rod Meshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Radial Rod Meshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1 Structure of the Jacobian matrix for single phase liquid . . . . . . . . . . . . . . 9
3.2 Structure of Jacobian matrix for single phase liquid explicitly coupled to solid
conduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3 Structure of the Jacobian matrix for single phase liquid implicitly coupled to solid
conduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.1 Setup for the isokinetic advection problem . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Comparison of density advection to analytical solution . . . . . . . . . . . . . . . 12
4.3 Scaling of numerical error with constant time step size for density . . . . . . . . 15
4.4 Temporal Order of Accuracy for density . . . . . . . . . . . . . . . . . . . . . . . 15
4.5 Advection of isokinetic density wave kg
m3 in time and space for CFL=1 . . . . . . 16
5.1 Setup for the shock tube problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2 Regions within the shock tube based on rarefaction and compression . . . . . . . 19
5.3 Comparison of analytical and numerical results for shock tube . . . . . . . . . . . 20
5.4 Truncation error for shock tube . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.5 Richardson extrapolation of the shock tube results N=50 . . . . . . . . . . . . . 22
5.6 Temporal Order of Accuracy for shock tube . . . . . . . . . . . . . . . . . . . . . 22
6.1 Enthalpy Near the Inlet and the Analytical Solution . . . . . . . . . . . . . . . . 24
6.2 Density Near the Inlet and the Analytical Solution . . . . . . . . . . . . . . . . . 25
6.3 Code Convergence Criteria for the Original Version of CTF . . . . . . . . . . . . 25
6.4 Summation of the Residuals for the Residual Version of CTF . . . . . . . . . . . 26
6.5 Difference Between Successive Temporal Refinements for Density . . . . . . . . . 27
6.6 Difference Between Successive Spatial Refinements for Density . . . . . . . . . . 27
6.7 Temporal Order of Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.8 Spatial Order of Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.9 Comparison of the Error for Density . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.1 Steady State Radial Temperature Distribution Difference to Rod Surface Temper-
ature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
vi
7.2 Error of Different Numerical Methods to Analytical Solution . . . . . . . . . . . 32
7.3 Steady State Axial and Radial Temperature Distribution in the Fuel Rod . . . . 33
7.4 Plot of the Radial Nodal Temperatures for the Semi-Implicit Method . . . . . . . 34
7.5 Plot of the Radial Nodal Temperatures for the Implicit Method . . . . . . . . . . 34
7.6 Temperature profile over time for the Semi-Implicit Method . . . . . . . . . . . . 35
7.7 Temperature profile over time for the Implicit Method . . . . . . . . . . . . . . . 35
vii
List of Tables
4.1 Input Parameters for Isokinetic Advection . . . . . . . . . . . . . . . . . . . . . . 12
5.1 Input Parameters for Shock Tube Verification Problem . . . . . . . . . . . . . . . 18
6.1 Problem Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.1 Problem Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.2 Relative Error of Difference Between Fuel Centerline to Rod Surface Temperature 32
viii
List of Symbols
ρ Density
h Enthalpy
u Velocity
P Pressure
T Temperature
x Axial Location
r Radial Location
t Time
g Gravitional Acceleration
k Iterative Index
i Spatial Index
n Time Index
J Jacobian Matrix
F Equation Residual Vector
δX Variable Residual Vector
Perturbation Value
CFL Courant Limit
p Order of Accuracy
L Active Fuel Length
kfuel Fuel Thermal Conductivity
kclad Clad Thermal Conductivity
ix
cp,fuel Fuel Specific Heat
cp,clad Clad Specific Heat
hfluid Liquid Heat Transfer Coefficient
hgap Gap Heat Transfer Coefficient
x
Acknowledgments
The Constortium for the Advanced Simulation of Light Water Reactors (CASL)
The Reactor Dynamics Fuel Management Group (RDFMG) at Penn State
The Toshiba Westinghouse Fellows Program (TWFP)
xi
Dedication
To my family, friends, and mentors who have supported me in pursuing my education.
xii
Chapter 1 |
Introduction
For the past several decades, the primary focus in nuclear engineering within the United States
has been on light water reactors (LWR). Commercially, all nuclear reactors are either boiling
water reactors (BWR) or pressurized water reactors (PWR). Correct computation of the thermal
hydraulics within the reactor core leads to efficient design and accuracy in the safety analysis.
CASL is a key player in the effort, and through VERA [1] utilizes the popular subchannel code,
CTF, for modeling the hydrodynamics within the reactor core. This FORTRAN based code
developed from COBRA-TF solves 8 conservation equations for liquid, entrained droplet, and
vapor phases phases, plus one conservation equation for non-condensible gases [2]. The energy of
the entrained droplets is assumed to be in thermal equilibrium with the liquid phase.
The set of procedures for ensuring that simulation codes such as CTF are accurate and
reliable is called software validation and verification [3]. CTF has undergone software uncertainty
quantification and benchmark validation [4]. The current version of CTF has standard verification
practices that focus on software quality engineering similar to those in other versions of COBRA-
TF [5], but currently lacks an in depth verification document that focuses on numerical algorithm
verification. This work focuses on this second type of verification for the original version of CTF
as well as a residual formulation.
The 1-D residual formulation of the code has been created for single phase liquid coupled
to radial conduction. While other residual formulations have been formed for other versions of
COBRA-TF [6], none have been integrated into the CASL version of CTF. This work details
the verification of both the residual formulation and the original version of CTF for the single
phase liquid and radial conduction equations. The verification problems will study of the order
of accuracy of the errors, which is considered one of the more rigorous verification criteria [7].
This work will be considered a starting point for future work to perform verification on the single
phase equations in both axial and transverse dimensions [8], and two phase flow [9].
1
Chapter 2 |
Conservation Equations
2.1 Single Phase Liquid Euler Equations
The finite volume structure in CTF in figure 2.1 is for a one-dimensional channel in the axial
direction with n number of cells. The first and last cells at 0 and n + 1 are ghost cells and
act as the boundary conditions for the problem. Pressure, enthalpy, and density are averaged
over the cell volume and are located at the center of the cell. Velocity is located at the faces in
between cells and averaged over the flow area of the surface. The cells are represented with an
index i, and the faces with indexes of i + 1
2 or i − 1
2 . This project will initially focus on this 1-D
configuration. Usually the code is three dimensional, with channels connecting to each other in
two more dimensions. Fully 3-D equations will be considered in future work.
Figure 2.1. The finite volume structure for CTF
2
The thermal hydraulics of a LWR core is an important part of nuclear reactor design. CTF
solves 8 conservation equations for liquid, entrained droplet, and vapor phases of water boiling
within the rod structure of a LWR reactor core [10]. Currently, the discretized conservation
equations are analytically reduced into a pressure matrix. This pressure matrix is then solved for
using a semi-implicit method and the new time fluid quantities are back calculated using the new
time pressure values. The rod temperatures are implicitly solved for using an explicit coupling
with the fluid solution. This work involves representing the 1-D single phase liquid conservation
equations and calculated variables in a residual formulation. The full Jacobian matrix can then
be built numerically, and can then either be reduced to a pressure matrix or solved directly.
Verification of the residuals was done by comparing calculated results to analytical solutions for
isokinetic advection and shock tube problems. For each verification problem, a scaling study of
the truncation error was compared to the predicted behavior derived from modified equation
analysis using Richardson extrapolation. Further work was then applied to represent 1-D heat
conduction within nuclear rod types. The fluid solution can be solved for semi-implicitly, or
implicitly with either explicit or implicit coupling to the solid implicit solution . The single phase
Euler partial differential equations for mass (2.1), momentum (2.2), and energy (2.3) correspond
to the unknown variables pressure P, velocity u, and enthalpy h. The equation of state (2.4)
relates density ρ as a function of pressure and enthalpy. The first terms in each of the equations
are temporal terms. The rest of the terms are steady state spatial terms. The last term in
the energy equation represents the net heat transfer from the adjacent rods to the current fluid
subchannel.
∂ρ
∂t
+ ρu = 0 (2.1)
∂ρu
∂t
+ ρu2
+ P − ρg = 0 (2.2)
∂ρh
∂t
−
∂P
∂t
+ (ρuh) +
qrod
∀fluid
= 0 (2.3)
ρ = EOS(P, h) (2.4)
The 1-D formulation of the Euler Equations will assume a direction x as shown in the 1-D
mass equation (2.5). The momentum and energy equations are represented in a non-conservative
form as shown in equations (2.6) and (2.8). The momentum equation contains a term that has a
product of the left hand side of the 1-D mass equation. This terms can therefore be dropped since
it is equivalent to zero, and the entire equation can be divided by density to give a simpler form
of the momentum equation (2.7). The last term in the energy equation represents the net heat
transfer from the adjacent rods to the current fluid subchannel. This is equated as the surface
area of the rod liquid interface times the heat transfer coefficient and temperature difference
between the wall and bulk fluid temperatures.
3
∂ρ
∂t
+
∂ρu
∂x
= 0 (2.5)
ρ
∂u
∂t
+ u
∂ρ
∂t
+
∂ρu
∂x
+ ρu
∂u
∂x
+
∂P
∂x
− ρg = 0 (2.6)
∂u
∂t
+ u
∂u
∂x
+
1
ρ
∂P
∂x
− g = 0 (2.7)
ρ
∂h
∂t
−
∂P
∂t
+ h
∂ρ
∂t
+ ρu
∂h
∂x
+ h
∂ρu
∂x
+
2πrrod
Ai
hl (Twall − Tfluid) = 0 (2.8)
The 1-D equations are then evaluated at a position index i and a certain time n in order to
solve for the next time value of n + 1. In the mass equation (2.9), the velocities are located at
the cell faces i + 1
2 and i − 1
2 . The density in the mass and energy equations is upwinded ˙ρn
i+ 1
2
and averaged ¯ρn
i+ 1
2
in the momentum equation. In equation (2.10), the derivative ∂u
∂x is upwinded
assuming that the flow is positive. In the energy equation, (2.11) the enthalpy values in the first
spatial term are upwinded and shown here assuming a positive velocity. The equation of state
(2.12) solves for density assuming that it is a linear combination of changes due to pressure and
enthalpy. The partial derivatives in the equation are calculated from steam tables as functions of
old time pressure and enthalpy.
ρn+1
i − ρn
i
∆t
+
˙ρn
i+ 1
2
un+1
i+ 1
2
− ˙ρn
i− 1
2
un+1
i− 1
2
∆x
= 0 (2.9)
un+1
i+ 1
2
− un
i+ 1
2
∆t
+ un
i+ 1
2
un
i+ 1
2
− un
i− 1
2
∆x
+
1
¯ρn
i+ 1
2
Pn+1
i+1 − Pn+1
i
∆x
− g = 0 (2.10)
ρn
i
hn+1
i − hn
i
∆t
+ hn
i
ρn+1
i − ρn
i
∆t
−
Pn+1
i − Pn
i
∆t
+ (ρu)
n
i
hn
i − hn
i−1
∆x
+ hn
i
˙ρn
i+ 1
2
un+1
i+ 1
2
− ˙ρn
i− 1
2
un+1
i− 1
2
∆x
+
2πrrod
Ai
hl (Twall − Tfluid) = 0 (2.11)
ρn+1
i − ρn
i =
∂ρ
∂P
n
i
Pn+1
i − Pn
i +
∂ρ
∂h
n
i
hn+1
i − hn
i (2.12)
2.2 1-D Radial Solid Conduction Equation
The conduction equation for a cylindrical system is given in equation 2.13. The first term
represents the amount of energy stored within the solid area within a unit time. The second term
is the conduction in the radial direction. The second and third terms are the conduction in the
azimuthal and axial directions, respectively. The last term represents the heat generation within
the solid.
4
ρfuelcp
∂T
∂t
−
1
r
∂
∂r
kr
∂T
∂r
−
1
r2
∂
∂θ
k
∂T
∂θ
−
∂
∂z
k
∂T
∂z
− q = 0 (2.13)
This work focuses on the 1D radial equations setting the derivatives with respect to the angular
and axial directions to zero. Equation 2.13 now reduces to equation 2.14.
ρfuelcp
∂T
∂t
−
1
r
∂
∂r
kr
∂T
∂r
− q = 0 (2.14)
When the radius is zero, the fuel temperature is considered to be a maximum giving the
boundary condition in equation 2.15
∂T
∂r r=0
= 0 (2.15)
Figure 2.2. Rod Axial Mesh
The nuclear rod geometry types in CTF are meshed at each axial level according to figure
2.2. Each axial level will be meshed as seen in figure 2.3 where the red region is fuel and the
gray region is cladding. The black dots represent the nodes within the fuel. Each node covers a
region within the rod as bounded by the dashed lines. The nodes within the fuel are located at
the center of the region. Each region is assumed to have uniform properties with values evaluated
at the node. The last node within the fuel is located at the surface of the fuel at the interface
with the gap. There are two additional nodes that represent the outer clad surface and the inner
clad surface respectively. The gap between the outer surface of the fuel and the inner surface
of the cladding has a specified heat transfer coefficient or is calculated using the dynamic gap
conductance model.
The outer surface of the cladding is assumed to be in contact with the fluid in the adjacent
channel on that axial level. The rods have the same number of axial levels as the fluid, but do not
5
Figure 2.3. Radial Rod Meshing
have ghost cells at the top and bottom. Instead the first and last fluid axial levels are connected
to two rod axial levels as shown by Figure 2.4, where the rod axial levels are on the left, and the
fluid axial levels are on the right. The light blue cells are the fluid ghost cells.
Figure 2.4. Radial Rod Meshing
The conduction equation can be approximated using the finite difference method, or the
control volume difference method [11]. The control volume method will be used since it is the
same method utilized in the original version of CTF. The implicit finite difference equation now
looks like equation 2.16.
ρfuelcp,i
Tn+1
i − Tn
i
∆t
−
2π
Ai
ki+ 1
2
ri+ 1
2
Tn+1
i+1 − Tn+1
i
∆ri+ 1
2
− ki− 1
2
ri− 1
2
Tn+1
i − Tn+1
i−1
∆ri− 1
2
−qi = 0 (2.16)
The density on the temporal term is defined as the cold mass of the node divided by the
6
volume of the node. The temporal derivative is approximated with first order accurate forward
differencing. The spatial derivatives are evaluated at the right boundary, i + 1
2 , and at the left
boundary,i − 1
2 using first order forward differencing. When i = 1 at the inner most node, the
radius at the left boundary and the derivative of the temperature is zero. At the boundary
between the surface of the fuel and the inside surface of the cladding, a different set of finite
difference equations are needed as given by equation 2.17
ρfuelcp,i
Tn+1
i − Tn
i
∆t
+
2π
Ai
ki− 1
2
ri− 1
2
Tn+1
i − Tn+1
i−1
∆ri− 1
2
−
2πrihgap
Ai
Tn+1
i+1 − Tn+1
i −qi = 0 (2.17)
The finite difference equation between the inner and outer cladding surfaces given by equation
2.18 has no heat generation or conduction from the fuel. Instead the volumetric heat rate is
calculated using the term for the volumetric heat rate across the gap and a similar term but
for the volumetric heat rate across the cladding. Since the cladding does not have any heat
generation, this term is represented as the temperature difference across the cladding times the
thermal resistance across the cladding times the perimeter of the cladding divided by the area of
the inner cladding region.
ρcladcp,i
Tn+1
i − Tn
i
∆t
+
2πrihgap
Ai
Tn+1
i − Tn+1
i−1 −
2π
Ai
ki+ 1
2
ri+ 1
2
Tn+1
i+1 − Tn+1
i
∆ri+ 1
2
= 0 (2.18)
The finite difference equation between the inner and outer cladding surfaces given by equation
2.19 relates the wall temperature to the bulk fluid temperature at the same axial level. The
volumetric heat rate lost to the fluid is represented as the temperature difference between the wall
and the fluid times the thermal resistance of the fluid and divided by the outer cladding region.
ρcladcp,i
Tn+1
i − Tn
i
∆t
+
2π
Ai
ki− 1
2
ri− 1
2
Tn+1
i − Tn+1
i−1
∆ri− 1
2
−
2πrihfluid
Ai
Tn+1
i − Tk
fluid = 0 (2.19)
The numerator in the last term is also in the fluid energy conservation equation. The heat
transfer coefficient is currently calculated using the Dittus-Boelter correlation [12]. The fluid
properties are evaluated at the bulk fluid temperature. When the fluid finite equations are solved
for implicitly, they will impact the solid conduction equations through the calculation of the heat
transfer coefficient and the fluid temperature.
7
Chapter 3 |
Solution Methods
3.1 Residual Formulation
A residual is simply the difference between the value at some future time n + 1 and the value at
the current iteration k [13]. This can be applied to desired variables as shown in equations (3.1),
(3.2), (3.3), and (3.4). Residuals can also be applied to the conservation equations by substituting
the definition of the residual variables into the conservation equations. This will effectively change
any variables evaluated at n + 1 to k. Each cell will have three residual variables and three
residual equations. For the entire solution, we will then have a residual variable array δX, and a
residual function array F(X) which defines a linear system as seen in equation (3.5).
δPi = Pn+1
i − Pk
i (3.1)
δhi = hn+1
i − hk
i (3.2)
δui+ 1
2
= un+1
i+ 1
2
− uk
i+ 1
2
(3.3)
δρi = ρn+1
i − ρk
i (3.4)
JδX = −F(X) (3.5)
3.2 Jacobian Construction
The Jacobian matrix is defined in equation (3.6) as the derivative of each response of the function
Fj with respect to each variable Xi. The derivative can be calculated numerically as shown by
equation (3.7) where is a small numerical value. For CTF the equations are linear, and this
numerical approximation of the Jacobian matrix is exact. This produces the same Jacobian
8
matrix that CTF currently generates analytically.
Ji,j =
∂Fj(X)
∂Xi
(3.6)
Ji,j ≈
Fj(Xi + ) − Fj(X)
(3.7)
To build the Jacobian matrix, an object oriented class was created that contains three pointers.
1. Residual Function
2. Value within a Target Variable Array
3. The Index of the Target Variable
These objects are append into a single array that dictates the order of the jacobian construction
as seen in figure 3.1.
Figure 3.1. Structure of the Jacobian matrix for single phase liquid
The explicitly coupled solid liquid Jacobian matrix can be seen in figure 3.2, where blue values
represent negative entries and red values positive entries. The black lines were drawn on top of the
image to represent artificial boundaries between the liquid Jacobian matrix in the top left corner
and the solid Jacobian matrix in the bottom right corner. The fluid Jacobian matrix contains 3
conservation equations for every axial level. The liquid function residuals are appended in the
order of mass conservation, energy conservation, and momentum conservation for each axial level.
These correspond the pressure, enthalpy, and velocity at each axial level. The liquid Jacobian
matrix can be evaluated as either semi-implicit or fully implicit. The solid Jacobian matrix
contains 1 energy conservation equation for each node in the rod. Since axial and azimuthal
conduction are not computed, each radial level is computed separately from the rest. This can be
seen by the lack of cross terms in the Jacobian matrix at each axial level. The Jacobian matrix on
in figure 3.3 is an implicit coupling between the implicit liquid Jacobian matrix and the implicit
solid matrix. The cross terms in the top right corner represent the effect of the wall temperature
on the energy equation in the liquid Jacobian matrix. The terms on the bottom left represent the
effects of pressure, enthalpy, and velocity on the energy equation in the solid Jacobian matrix.
The implicit matrix is unconditionally stable, allowing for time steps greater than the material
9
Courant limits. Once the coupled Jacobian matrix is constructed, it is solved using the linear
Krylov solver [14] from PETSc [15]. The residuals for each of the conservation equations are then
L2 normalized over the domain to determine the convergence of the system.
Figure 3.2. Structure of Jacobian matrix for single phase liquid explicitly coupled to solid conduction
Figure 3.3. Structure of the Jacobian matrix for single phase liquid implicitly coupled to solid conduction
Numerically building the matrix in this fashion can be very computationally expensive. An
easy way to optimize the construction of the matrix, is to not compute the indexes which are
known to be zero. An optional optimization flag was added to the code that allows for the
non-zero structure to be remembered after the first construction, and following constructions
only compute entries that were previously non-zero. This drastically decreases computations
cost, but at the risk of serious potential error in the event of previously zero entries becoming
non-zero later in the problem. For the verification problems covered in this work, this does not
occur and therefore this optimization method is appropriate. Other optimization work could be
in the parallelization of the construction and solution of the Jacobian matrix similar to what was
done for the original version of CTF [10].
10
Chapter 4 |
Isokinetic Step Advection
4.1 Problem Setup
A tube with no gravity acting in the direction of fluid flow has an initial condition of U1, ρ1, h1, P1, ˙m1
everywhere except at the starting position that has an initial conditions of h2, ρ2, ˙m2. When the
time step for the calculation is taken be exactly equal to the CFL number as seen in equation 4.1,
the inlet conditions should advect through the rest of the system in the form of a square wave.
This is a unique situation where the CFL can be held constant throughout the simulation, and
where the spatial and temporal truncation error can cancel each other out at CFL = 1. When
the CFL is less than 1, numerical diffusion occurs based on the truncation terms produced by the
modified equation analysis.
CFL =
∆tU1
∆x
(4.1)
Figure 4.1. Setup for the isokinetic advection problem
The problem was set up using the parameters given in table 4.1. Initial temperature, density,
and mass flow rate of the system differs from the inlet temperature, density, and mass flow rate.
The pressure and velocity of the system remains constant. The transient runs until the center of
the advected wave reaches the end of the tube at roughly 60 seconds. The value of the parameters
are more or less arbitrary, but approximate a single channel about the length of a fuel assembly
undergoing a 10 C temperature difference. The water is close to standard temperature and
11
pressure.
Table 4.1. Input Parameters for Isokinetic Advection
Length 3.00 m
Channel Area 0.0001 m2
Wetted Perimeter 0.040 m
Pressure 1.00 bar
Initial Temperature 40.00 C
Inlet Temperature 30.00 C
Inlet Mass Flow Rate 0.005 kg/s
Inlet Density 992.61 kg/m3
Velocity 0.050372 m/s
4.2 Density Advection and Error
Figure 4.2 compares the analytical and numerical advection of density through the domain for a
CFL number of 0.500. The higher density in the colder region is on the left, and the lower density
of the warmer region is on the right. The red line on the right of the figure depicts the truncation
error at the current time step. The truncation error occurs around the original discontinuity as it
advects through the solution. As the discontinuity propagates it becomes more diffuse spatially.
Once it reaches the outlet the discontinuity leaves the domain and the overall error drops to nearly
zero. For this problem, the truncation error can be shown to be a direct function of the CFL
number and can be reduced to nearly zero throughout the simulation. This simplified problem
with an exact solution is used for code verification.
Figure 4.2. Comparison of density advection to analytical solution
12
4.3 Modified Equation Analysis
The order of accuracy in time and space can be analytically determined for this problem through
a modified equation analysis [16]. The goal will be to isolate the original PDE and define the
truncation error. For this isokinetic problem, the original mass balance equation can be re-written
to look like equation 4.2. Using upwinding, the finite difference can be written to look like
equation 4.3. A second order Taylor series approximation can be used for ρn+1
i and ρn
i−1 as shown
in equations 4.4 and 4.5 respectively. The higher order terms (O(∆x2
, ∆t2
)) are not taken into
account for this approximation. The Taylor series approximations can then be substituted into
4.3 to yield 4.6. This is the beginning of the modified equation analysis.
∂ρ
∂t
+ U0
∂ρ
∂x
= 0 (4.2)
ρn+1
i − ρn
i
∆t
+ U0
ρn
i − ρn
i−1
∆x
= 0 (4.3)
ρn+1
i = ρn
i +
∂ρ
∂t
∆t +
1
2
∂2
ρ
∂t2
∆t2
+ O(∆t3
) (4.4)
ρn
i−1 = ρn
i −
∂ρ
∂x
∆x +
1
2
∂2
ρ
∂x2
∆x2
+ O(∆x3
) (4.5)
The lengthy equation 4.6 can be reduced to equation 4.7 since the ρn
i terms subtract out and
the ∆t and ∆x terms in the denominator cancel out. This reduced equation can the be re-written
into equation 4.8, with the original PDE followed by the truncation error shown in brackets.
Since the truncation error scales linearly with ∆t and ∆x, it is said to be first order accurate
with respect to time and space. Notice how the truncation error is also dependent on the second
derivatives of density with respect to space and time.
ρn
i + ∂ρ
∂t ∆t + 1
2
∂2
ρ
∂t2 ∆t2
− ρn
i
∆t
+ U0
ρn
i − ρn
i − ∂ρ
∂x ∆x + 1
2
∂2
ρ
∂x2 ∆x2
∆x
+ O(∆x2
, ∆t2
) = 0 (4.6)
∂ρ
∂t
+
1
2
∂2
ρ
∂t2
∆t + U0
∂ρ
∂x
−
1
2
∂2
ρ
∂x2
∆x + O(∆x2
, ∆t2
) = 0 (4.7)
∂ρ
∂t
+ U0
∂ρ
∂x
+
1
2
∂2
ρ
∂t2
∆t − U0
1
2
∂2
ρ
∂x2
∆x + O(∆x2
, ∆t2
) = 0 (4.8)
While the truncation error has been identified, some additional analysis is still possible since
the problem is isokinetic. The derivative of the original PDE with respect to space and time can
be taken as shown in equations 4.9 and 4.10 respectively. These two derivatives can substitute
13
into each other using the common term ∂2
ρ
∂x∂t . The second derivatives of density with respect to
space and time are therefore related by the velocity squared as shown by equation 4.11.
∂2
ρ
∂t2
+ U0
∂2
ρ
∂x∂t
= 0 (4.9)
∂2
ρ
∂t∂x
+ U0
∂2
ρ
∂x2
= 0 (4.10)
∂2
ρ
∂t2
= U2
0
∂2
ρ
∂x2
(4.11)
This relationship can then be substituted back into equation 4.8, which can be reduced to
equation 4.13 after ignoring the higher order terms. The error depends on the CFL number, the
axial spacing, and the second order derivative of density with respect to space. This derivative is
what gives the error the characteristics of diffusion. When the CFL number is less than one, the
error term is negative and the diffusion is dampening. When the CFL number is greater than
one, the error term becomes positive, and the accumulation of the error destabilizes the solution.
∂ρ
∂t
+ U0
∂ρ
∂x
−
1
2
∆xU0
∂2
ρ
∂x2
− U2
0
∂2
ρ
∂x2
∆t + O(∆x2
, ∆t2
) = 0 (4.12)
∂ρ
∂t
+ U0
∂ρ
∂x
−
∆xU0
2
∂2
ρ
∂x2
(1 − CFL) + O(∆x2
, ∆t2
) = 0 (4.13)
Modified equation analysis can be applied to the energy balance equation presented in equation
4.14. The energy equation is presented in a form where the momentum equation was substituted
in as zero and then divided through by density. The result presented in equation 4.15 is similar
in form to the result for the mass balance equation 4.13.
∂h
∂t
−
1
ρ
∂P
∂t
+ U0
∂h
∂x
= 0 (4.14)
∂h
∂t
−
1
ρ
∂P
∂t
+ U0
∂h
∂x
−
∆xU0
2
∂2
h
∂x2
(1 − CFL) = 0 (4.15)
4.4 Scaling of Error
From the modified equation analysis, the advection problem is shown to be first order accurate in
time and space. Assuming a fixed number of points, the time step was halved several times. The
relative difference between each step was taken and 1 normalized across space at at a particular
time. The plot of this difference can be seen for density in figure 4.3.
The power fit for density has a high correlation coefficient, and shows that the order of accuracy
temporally is close to 1. Richardson extrapolation to determine the order of accuracy at each
14
Figure 4.3. Scaling of numerical error with constant time step size for density
point as shown by figure 4.4. As the time step size decreases, the order of accuracy approaches
1.0 due to smaller higher order terms.
Figure 4.4. Temporal Order of Accuracy for density
When the CFL number is set to 1, the spatial error and temporal error cancel out producing
a perfect square wave in time and space as shown by figure 4.5. This holds true for a variety of
spatial mesh sizes, confirming that both the temporal and spatial errors are first order accurate.
15
Figure 4.5. Advection of isokinetic density wave kg
m3 in time and space for CFL=1
16
Chapter 5 |
Shock Tube
5.1 Problem Setup
A shock tube is a very common and standard method of verification for momentum and pressure.
However, an exact analytical solution is more readily obtained for an ideal gas such as air. A
shock tube is created by setting the initial mass flow rate and velocity to zero with no gravity.
The boundary conditions at the inlet and outlet are also set to zero, simulating a closed system.
A region of high pressure is defined for one half of the domain, and a region of low pressure for
the second half. An imaginary diaphragm divides the two regions before the simulation, and at
t = 0 disappears.
Figure 5.1. Setup for the shock tube problem
The problem was set up using the parameters given in table 5.1. The geometry is similar to
the previous problem, but the length of the tube was elongated to take into account the faster
propagation of the rarefaction and compression waves. The temperature and pressure of the air
are near standard conditions.
Each region has a unique density corresponding to the different pressures using the equation of
state for air given in equation 5.1 where γ = 1.4 is the ratio of specific heats for air. Additionally,
the specific heat Cp = 1.005 kJ
kg−K to convert between enthalpy and temperature. The initial
enthalpy of the system is constant, but will change non-uniformly as a function of time. The
17
Table 5.1. Input Parameters for Shock Tube Verification Problem
Length 25.00 m
Channel Area 0.0001 m2
Wetted Perimeter 0.040 m
Initial Pressure 1.00 bar
Initial Enthalpy 304.66575 kJ/kg
Initial Mass Flow Rate 0.000 kg/s
Initial Pressure Drop 0.09576 bar
velocity is initially set to zero, but will change as the compression and rarefaction waves move.
Since the velocity is set to zero initially, it can’t be used to evaluate the time step size. Instead
the speed of sound can be evaluated using equation 5.2, and this velocity can be used to calculate
the time step. While there might be some slight change in the speed of sound due to enthalpy
changes, it should remain effectively constant.
ρ =
γ
γ − 1
Pabs
h
(5.1)
a = (γ − 1) h (5.2)
γ =
Cp
Cv
(5.3)
5.2 Analytical Solution
When the diaphragm disappears, a compression wave will move to the right and a rarefaction
wave to the left. These two waves split the domain into four distinct regions as shown in figure
5.2.
1. left of the rarefaction wave
2. between the rarefaction wave and the initial location of the diaphragm
3. between the initial location of the diaphragm and the compression wave
4. right of the compression wave
The analytical solution does not take into account reflection off of the walls, however the
numerical solution can due to the applied boundary conditions for mass flow rate.
For a perfectly caloric gas, the following equations are provided [17, p. 238] given the initial
conditions for state 1 and 4 in conjunction with equation 5.2. An iterative method is required to
solve 5.4 for P2
P1
. Once the region properties are obtained, the regions themselves are mapped by
comparing the current position and time to the velocity of the rarefaction and compression wave.
18
Figure 5.2. Regions within the shock tube based on rarefaction and compression
P4
P1
=
P2
P1
1 − (γ − 1)(a1
a4
)(P2
P1
− 1)
2γ 2γ + (γ + 1)(P2
P1
− 1)
− 2γ
γ−1
(5.4)
T2
T1
=
P2
P1
γ+1
γ−1 + P2
P1
1 + (γ+1
γ−1 )P2
P1
(5.5)
ρ2
ρ1
=
1 + (γ+1
γ−1 )P2
P1
γ+1
γ−1 + P2
P1
(5.6)
W = a1
γ + 1
2γ
P2
P1
− 1 + 1 (5.7)
P2 = P3 (5.8)
P3
P4
=
ρ3
ρ4
γ
=
T3
T4
γ
γ−1
(5.9)
5.3 Results and Error
Enthalpy and density have a discontinuity as seen in figure 5.3 where the diaphragm was initially
placed. Similarly there are discontinuities that move with the rarefacation and compression waves
for pressure, density, and velocity. The largest error occurs around these discontinuities as seen in
figure 5.4. A fine spatial mesh and a small time step are needed to accurately reflect the exact
solution.
19
Figure 5.3. Comparison of analytical and numerical results for shock tube
20
Figure 5.4. Truncation error for shock tube
21
5.4 Scaling of Error
A Richardson extrapolation was performed on the density, enthalpy, and mass flow rate for the
shock tube analysis in time. The error approaches zero as the time step size gets smaller as seen
in figure 5.5. The order of accuracy with respect to time is converges to first order accurate as the
time step size decreases. The range of time step values shown are within the asymptotic limit.
Figure 5.5. Richardson extrapolation of the shock tube results N=50
Figure 5.6. Temporal Order of Accuracy for shock tube
22
Chapter 6 |
Isokinetic Sine Wave Advection
The procedures that can be used for code verification, from least to most rigorous, include: expert
judgment, error quantification, consistency/convergence, and order of accuracy [3]. For this work,
the Richardson extrapolation will be used to check for convergence and order of accuracy of the
error in space and time. The error should converge to zero, and the order of accuracy should
converge to the 1 as obtained through the modified equation analysis in section 4.3.
6.1 Problem Setup
To obtain an analytical solution for a subchannel code, typically the method of manufactured
solutions [18] is needed. To readily obtain an analytical solution and isolate only the mass and
energy conservation equations, several simplifications to the verification problem are made. Only
one channel is considered to make the problem 1-D. In order to make the problem perfectly
isobaric and isokinetic, grid spacer losses, frictional losses, and gravity head losses are set to zero
representing a smooth horizontal pipe. Small fluctuations in pressure and velocity may still occur
due to the assumption that the EOS is linear. The channel geometry and operating conditions
approximate a standard PWR as shown in table 6.1. The inlet of the channel has a constant
velocity with a fluctuating enthalpy that corresponds to be near the standard PWR rod bundle
coolant channel inlet conditions. The problem will aslo have constant axial spacing and time step
size. The length of the transient was defined to be quadruple the time needed for the liquid at
the inlet to advect to the outlet. The frequency of the sine wave was defined to generate a full
period of a spatial wave across the length of the channel. With these simplifications, the method
of manufacturing solutions is unnecessary since the known solutions are simply the advection of
the transient inlet conditions. The functions for the enthalpy h and mass flow rate, ˙m, are given
in equations 6.1 and 6.2 where x is the length from the inlet and t is the simulated time. The
functions smoothly transition to the initial condition of a straight line across the domain. The
enthalpy and mass flow rate vary proportionally to the density such that an isokinetic boundary
condition is created at the inlet. While these simplifications do not model a realistic problem,
they appropriately isolate the 1-D single phase mass and energy conservation equations for the
purpose of verification.
23
Table 6.1. Problem Parameters
Parameter Symbol Value Unit
Axial Length L 3.6586 m
Channel Area Ach 4.94E-005 m2
Wetted Perimeter Pw 1.49E-002 m
Velocity Vo 7.35 m
s
Pressure Po 155.00 bar
Temperature 1 T1 289.500 ◦
C
Temperature 2 T2 327.00 ◦
C
Enthalpy 1 h1 1281.55 kJ
kg
Enthalpy 2 h2 1497.21 kJ
kg
Mass Flow Rate 1 ˙m1 0.2713 kg
s
Mass Flow Rate 2 ˙m2 0.2399 kg
s
Final Time tf 2.00 sec
Wave Frequency ω 1.00 Hz
h(i, j) =
1
2
(h1 + h2) + (h1 − h2)cos ω j∆t +
i∆x
Vo
(6.1)
˙m(i, j) =
1
2
( ˙m1 + ˙m2) + ( ˙m1 − ˙m2)cos ω j∆t +
i∆x
Vo
(6.2)
The comparison between the data table and the output in CTF are shown for enthalpy and
mass flow rate in figures 6.1 and 6.2, respectively. The CTF output was read from the high
precision VTK data files [19] at each point in time, which omitted the actual ghost cell where
these values were applied. The CTF values are located at the nearest node to the inlet, and
will experience small amounts of numerical diffusion. For large mesh sizes, this discrepancy is
negligible as can be seen by the overlapping profiles in figures 6.1 and 6.2.
Figure 6.1. Enthalpy Near the Inlet and the Analytical Solution
The pressure and the velocity fluctuate by less than 0.25% during the simulation due to
24
Figure 6.2. Density Near the Inlet and the Analytical Solution
approximating the EOS as a linear function. This is considered small for this problem and should
not greatly affect the order of accuracy of the error. The VTK output files allow for a high level
of precision, reducing round off error in the output during the post processing.
6.2 Code Convergence
The current version of CTF uses global code convergence criteria that are used to estimate the
rate of change of global mass and energy conservation. The transient values of these criteria are
shown in figure 6.3 for the original version of CTF simulating the verification problem. Mass
balance and storage are in units of kg
s . The energy balance, fluid energy, and solid energy are in
units of kW. The solid energy storage is zero since there are not any heat structures present. The
fluctuating values represent differences between the energy and mass entering and leaving the
system. The flat profile for the mass storage term means that the sine wave has fully developed
spatially through the channel.
Figure 6.3. Code Convergence Criteria for the Original Version of CTF
25
Figure 6.4. Summation of the Residuals for the Residual Version of CTF
The residual formulation prints out the summation of the equation residuals across the domain
to an output file at the end of each time step and can be seen in figure 6.4. The mass equation
residual is in units of kg
m3s . The energy equation residual is in units of kW
m3 . The momentum
residual is in units of kg
m2s2 . The flat profile of the mass and energy residuals shows that the sine
wave has fully developed spatially through the channel.
6.3 Richardson Extrapolation
The Richardson extrapolation was performed by refining the spatial and temporal step sizes by a
factor of 2 for a set number of times. The spatial and temporal studies are refined separately
in their own study in order to isolate the spatial and temporal affects on the solution. The
generation of the inputs, running of the codes, and analysis of the output were automated with a
python [20] script in order to reduce user input errors and increase repeatability. For this analysis,
a significant amount of information was added to the VTK output files, increasing memory usage
and run time. The computational resources for the spatial study was much higher than the
temporal study due to the need to keep the CFL number below 0.500. To keep the computational
resources needed to perform this analysis reasonable, fewer spatial refinements were performed
compared to the temporal analysis.
6.4 Convergence of Error
The difference between iterations was computed at each time step and spatial location for each
quantity of interest. This difference is considered as the error between each iteration. For the
spatial refinement, the lower iterate values were numerically integrated to match the shape of
the initial domain. The errors were then summed over the entire domain to yield a total error
for each variable. The total error for density is plotted in figures 6.5 and 6.6 as a function of
temporal and spatial step size.
The data points were chosen to be inside of the asymptotic range as shown by the good power
26
Figure 6.5. Difference Between Successive Temporal Refinements for Density
fit with an exponent near 1. The power fit shows that as the temporal and spatial step sizes
are reduced, the numerical error approaches zero. The discretization error between the original
version of CTF is relatively small and is most likely due to the small fluctuations in the velocity
present in the original version of the code.
Figure 6.6. Difference Between Successive Spatial Refinements for Density
6.5 Order of Accuracy
The order of accuracy for this verification problem is first order as shown by the modified equation
analysis. This can be considered to be the exponent on the power fits as seen in figures 6.5.
However the order of accuracy p can be calculated by using equation 6.3 where f1, f2, f3 are
27
consecutive levels within the same Richardson extrapolation study. The refinement factor, R, has
the constant value of 2 for both the spatial and temporal studies.
p =
ln f3−f2
f2−f1
ln(R)
(6.3)
The order of accuracy for all of the variables are presented for the temporal analysis and
spatial analysis in figures 6.7 and 6.8 respectively. The temporal order of accuracy is well within
the asymptotic range for the whole analysis, and moves closer to 1.0 with decreasing time step
size. The spatial order of accuracy is a slightly outside the asymptotic range, but approaches an
order of accuracy of 1.0 with decreasing mesh size.
Figure 6.7. Temporal Order of Accuracy
The slight differences between the original version of CTF and the residual formulation might
be due to the different solution methods and back substitution of variables. Despite the small
differences, both versions of the code exhibit order of accuracies very close the values obtained
through the modified equation analysis.
Taking the derivative of the analytical solution, the exact local numerical error can be calculated
from the modified equation analysis. However the numerical error obtained from CTF is a global
error in which the error will accumulate from the inlet to the outlet. When the local error was
scaled by a factor of x
L , it closely matched the global error as shown in figure 6.9. The graph
on the left compares numerical and analytical results for the density, and the figure on the right
compares the observed global numerical error from CTF and the scaled analytical local error.
The temporal and spatial mesh sizes were selected to have order of accuracies that were closest to
1. The error at these small mesh sizes is very small at under 5 decimal points of precision. The
agreement between the expected errors is very good with only subtle differences. This difference
could be due to the artificial scaling factor applied to the local error, the approximate solution of
the Jacobian matrix, or truncation error in values read in from CTF.
28
Figure 6.8. Spatial Order of Accuracy
Figure 6.9. Comparison of the Error for Density
29
Chapter 7 |
Uniform Heating Problem
7.1 Problem Setup
The test problem is a nuclear rod with uniform heat generation with parameters given in Table
7.1. The fuel and cladding are assumed to have constant material properties. The mass flow
rate, reference pressure, and inlet temperature approximate normal PWR operating conditions.
However, the heat generation rate is much less than normal PWR operating conditions to ensure
that the problem remains well within the single-phase regime with an expected outlet temperature
of under 300.0 ◦
C. Additionally, the problem is set up so that the calculation of the heat transfer
coefficient using the Dittus-Boelter correlation [12] is appropriate. The subchannel is rod centered
with no grid spacers or frictional losses. Gravity pressure losses in the vertical direction are taken
into account.
Table 7.1. Problem Parameters
Parameter Symbol Value Unit
Mass Flow Rate ˙m 0.300 kg
sec
Pressure Po 165.00 bar
Inlet Temperature Tinlet 290.00 ◦
C
Linear Heat Rate q 4.00 kW
m−rod
Active Fuel Length L 3.658 m
Fuel Radius rfuel 0.4096 cm
Outer Cladding Radius rco 0.475 cm
Inner Cladding Radius rci 0.4174 cm
Rod Pitch p 12.60 cm
Clad Specific Heat cp,clad 0.431 kJ
kg−K
Clad Density ρclad 8470.57 kg
m3
Clad Thermal Conductivity kclad 14.83 W
m−k
Fuel Specific Heat Capacity cp,fuel 0.289 kJ/kg − K
Fuel Density ρf uel 10970.40 kg
m3
Fuel Thermal Conductivity kf uel 14.83 W
m−k
Gap Heat Transfer Coefficient hgap 5678.30 W
m2−K
30
7.2 Steady State Analytical Solution
At steady state conditions and for uniform heat generation, the original conduction equation can
be integrated to obtain equation 7.1 for 0.0 ≤ r < rfuel.
Trod(r, z) − Trod(rfuel, z) =
q r2
fuel
4kfuel
1 −
r2
r2
fuel
(7.1)
The temperature at the fuel surface can be calculated from the cladding inner surface
temperature and the thermal resistance across the gap as given in equation 7.2 for rfuel ≤ r < rci.
Trod(rfuel, z) − Trod(rci, z) =
q
2πrhgap
(7.2)
The temperature at the inner surface of the cladding can be calculated from the cladding
inner surface temperature and the thermal resistance across the cladding as given by equation 7.3
for rci ≤ r < rco.
Trod(rci, z) − Trod(rco, z) =
q
2πkclad
(7.3)
The temperature at the outer surface of the cladding can be calculated from the fluid
temperature and the thermal resistance due to convection as given by equation 7.4 for r = rco.
Trod(rco, z) − Tfluid(z) =
q
2πrcohfluid
(7.4)
The temperatures can be computed by working from the known fluid temperature, and working
solving for temperatures from the outside surface of the cladding to the center of the fuel. Notice
that the difference between any radial temperature and the fluid temperature at the same axial
level is independent of the axial height. This difference will be compared first to verify that the
conduction equation is working properly
7.3 Steady State Results
The temperature distribution within the fuel rod relative to the wall surface temperature can be
seen in figure 7.1. The analytical solution matches well with the different solution methods both
within the fuel and at the cladding surfaces. The difference between the analytical solution and
the numerical solutions are highest at the fuel centerline as can be seen by figure 7.2. This error
is due to the numerical error from the finite differencing approximations made within the fuel.
The fuel centerline temperature is extrapolated from the first and second nodal temperatures
using a second order accurate forward differencing approximation of the boundary condition in
equation 2.15. Normally CTF uses a different extrapolation method, but to consistently compare
to the residual formulation was not used.
The relative error given in Table 7.2 is shown to scale with the inverse of the number of radial
nodes in the fuel. The relative error does not scale with heat flux, but the temperature gradient
31
Figure 7.1. Steady State Radial Temperature Distribution Difference to Rod Surface Temperature
Figure 7.2. Error of Different Numerical Methods to Analytical Solution
from the fuel centerline to the rod wall does. The numerical error will also change for non-uniform
heating and variable material properties within the fuel. The implicit transient solution method
has slightly higher numerical error than the semi-implicit transient and implicit steady state
solution methods. However, all three residual formulation methods have lower numerical error
compared to the original steady state method from CTF. The order of accuracy is difficult to
compute, since CTF uses non-uniform meshing near the rod center and since the fuel centerline
temperature is extrapolated using a second order accurate method.
Table 7.2. Relative Error of Difference Between Fuel Centerline to Rod Surface Temperature
NR SI Trans I Trans I SS Original SS
5 1.33 % 1.35% 1.32% 2.15%
10 0.45 % 0.48% 0.45% 0.78%
20 0.15 % 0.18% 0.14% 0.20%
While there is no conduction in the axial direction, the fluid will have a temperature gradient
in the axial direction. This will cause a 2-D temperature distribution as shown by figure 7.3.
The fluid temperature only changes by about 10 ◦
C from the inlet to the outlet, but the fuel
temperature changes by about 90 ◦
C from the outer surface of the cladding to the fuel centerline
temperature. The hottest location of the fuel is located on the centerline at the top of the rod.
32
The centerline fuel temperature is slightly under predicted by both the residual formulation and
the original versions of CTF. However as table 7.2 shows, this is attributable to numerical error.
Figure 7.3. Steady State Axial and Radial Temperature Distribution in the Fuel Rod
7.4 Transient Results
The transient simulations were run for 30.0 seconds to reach a pseudo-steady state condition.
Two different solution methods were used. The first explicitly couples a semi-implicit fluid matrix
to an implicit solid matrix. The second implicitly couples an implicit fluid matrix to an implicit
solid matrix. The rate of change of the temperatures have reached near steady state conditions
as shown by figures 7.4 and 7.5 for the first and second solution methods respectively. The red
lines are fuel node temperatures, and the black lines are cladding node temperatures. For the
explicitly coupled solution, a maximum time step size of 0.02 sec was needed to ensure stability.
For the implicitly coupled solution, time step sizes well over 0.2 seconds could be taken. For the
data in the figure, time steps of 1.0 second were used. The implicit Jacobian matrix is stiffer than
the Jacobian matrix for the first method and therefore takes longer to solve. Additionally, for
time steps with large residuals multiple up to 5 iterations are needed. However the advantage of
being able to take significantly longer time steps makes up for the increased computational cost
per time step. The temperatures obtained from the explicitly coupled solution and the implicitly
coupled solution methods do not differ by significant amounts.
The transient behavior of temperature profile is shown in figures 7.6 and 7.7 for the explicitly
coupled and implicitly coupled solutions respectively. The flat green line is the initial condition,
33
Figure 7.4. Plot of the Radial Nodal Temperatures for the Semi-Implicit Method
Figure 7.5. Plot of the Radial Nodal Temperatures for the Implicit Method
the red line is the final profile, and the black lines are intermediate time steps. These graph
more clearly show difference in the number of time steps between the two coupling methods. The
intermediary time steps are have the same temperatures, as does the final solution. While the
semi-implicit solution method for the fluid domain has less numerical error than the implicit
solution method for the fluid domain, the explicitly and implicitly solid liquid coupling methods
should have comparable error.
34
Figure 7.6. Temperature profile over time for the Semi-Implicit Method
Figure 7.7. Temperature profile over time for the Implicit Method
35
Chapter 8 |
Conclusions
The residual formulation of CTF allows for a numerical computation of the multivariable Jacobian
matrix and produces comparable results to the original code which uses an analytical derivation
of a pressure matrix. The 1-D single phase liquid verification problems were able to isolate
of the order of accuracies for the conservation equations and show that they match the values
obtained from the modified equation analysis. The discretization error for both versions of the
code converged to zero with decreasing time step and axial mesh size. The order of accuracy for
the temporal and spatial refinements matched very closely with the modified equation analysis for
both codes. For all of these data points, the residual formulation of the code showed discretization
errors that were very close with the original version of the code. The numerical error obtained
from the output matched closely to the analytical error predicted by the modified equation
analysis using the derivatives of the known solutions while within the asymptotic range. Future
work will involve adding in form losses, transverse flow, and multiple phases.
Combining the liquid and solid equations into a single Jacobian matrix allowed for easy explicit
or implicit coupling. This solution method was tested against the analytical solution for a single
rod with uniform heat generation and shown to give good results for both the residual formulation
and the original version of CTF. The discrepancy between the results from CTF and the analytical
solution were shown to be dependent on the radial mesh size. Future verification work will involve
performing a Richardson extrapolation to obtain an order of accuracy. A modified equation
analysis of the explicit and implicit coupling methods would also prove very useful. The effect
of temperature dependent material properties and dynamic gap conductance should also be
considered. A homogeneous energy equation can now be easily implemented by adding the
liquid and solid conservation equations. Future work will be analyzing the homogeneous energy
approximation over a state space to see when the approximation is valid. Future work will also
involve extending the conduction equations to azimuthal and axial directions.
36
Bibliography
[1] Schmidt, R. and et al. (2014) “An approach for coupled-code multiphysics core simulations
from a common input,” Annals of Nuclear Energy.
URL http://dx.doi.org/10.1016/j.anucene.2014.11.015
[2] Salko, R. K. and M. N. Avramova (2014) “CTF Theory Manual,” The Pennsylvania
State University.
[3] Oberkampf, W. L. and T. G. Trucano (2008) “Verification and Validation Benchmarks,”
Nuclear Engineering and Design, 238, pp. 716–743.
URL http://dx.doi.org/10.1016/j.nucengdes.2007.02.032
[4] Avramova, M., K. Ivanov, and et al. (2015) “Multi-physics and multi-scale benchmarking
and uncertainty quantification within OECD/NEA framework,” Annals of Nuclear Energy.
URL http://dx.doi.org/10.1016/j.anucene.2014.12.014
[5] Aumiller, D. L., G. W. Swartele, F. X. Lane, J. W. Buschman, and M. Meholic
(2013) “Development of Verification Testing Capabilities for Safety Codes,” NURETH-15.
[6] Lloyd, L. J. (2014) Development of a Spatially-Selective, Nonlinear Refinement Algorithm
for Thermal-Hydraulic Safety Analysis, Ph.D. thesis, The University of Wisconsin Madison.
[7] Roy, C. J. (2005) “Review of code and solution verification procedures for computational
simulation,” Journal of Computational Physics, 205, pp. 131–156.
URL http://dx.doi.org/10.1016/j.jcp.2004.10.036
[8] Merroun, O., A. Almers, T. E. Bardouni, B. E. Bakkari, and E. Chakir (2009)
“Analytical benchmarks for verification of thermal-hydraulic codes based on sub-channel
approach,” Nuclear Engineering and Design, 239, pp. 735–748.
[9] Mahadevan, V., V. Mousseau, and J. C. Ragusa (2009) “Verification of multiphysics
software: Space and time convergence studies for nonlinearly coupled applications,” Interna-
tional Conference on Mathematics, Computational Methods & Reactor Physics.
URL http://mathematicsandcomputation.cowhosting.net/MC09/pdfs/201961.pdf
[10] Salko, R. K., R. C. Schmidt, and M. N. Avramova (2014) “Optimization and par-
allelization of the thermal hydraulic subchannel code CTF for high-fidelity multi-physics
applications,” Annals of Nuclear Energy.
URL http://dx.doi.org/10.1016/j.anucene.2014.11.005
[11] Botte, G., J. Ritter, and R. White (2000) “Comparison of finite difference and control
volume methods for solving differential equations,” Computers and Chemical Engineering,
24, pp. 2633–2654.
37
[12] Incropera, F., D. Dewitt, T. Bergman, and A. Lavine (2007) Fundamentals of Mass
and Heat Transfer, John Wiley & Sons, sixth ed.
[13] Kelly, C. (1995) Iterative Methods for linear nad nonlinear equations, Society for Industrial
and Applied Mathematics.
[14] ——— (2003) Solving Nonlinear Equations with Newton’s Method, Society for Industrial and
Applied Mathematics.
[15] Balay and et al. (2014), “PETSc Users Manual,” Mathematics and Computer Science
Division, Argonne National Laboratory.
URL http://www.mcs.anl.gov/petsc/petsc-current/docs/manual.pdf
[16] Villatoro, F. and J. Ramos (1999), “On the method of modified equations. I: Asymptotic
analysis of the Euler forward difference method,” .
URL http://dx.doi.org/10.1016/S0096-3003(98)10031-0
[17] Anderson, J. D. (1990) Modern Compressible Flow With Historical Perspective, McGraw-
Hill Inc.
[18] Salari, K. and P. Knupp (2000) Code Verification by the Method of Manufactured Solutions,
Tech. Rep. SAND2000-1444, Aerosciences and Compressible Fluid Mechanics Department,
Parallel Computing Sciences Department at Sandia National Laboratories, P.O. Box 5800,
Albuquerque, NM 87185-0825.
[19] Schroeder, W. (1998) The VTK user’s guide, Kitware Inc.
[20] (2014), “Python Language Reference, version 2.7,” Python Software Foundation.
URL http://www.python.org
38

More Related Content

PDF
PDF
phd-2013-dkennett
PDF
Diederik Fokkema - Thesis
PDF
MSci Report
PDF
WillieOngPhDThesisFinalDuke2015
PDF
Ali-Dissertation-5June2015
PDF
Nonlinear Simulation of Rotor-Bearing System Dynamics
phd-2013-dkennett
Diederik Fokkema - Thesis
MSci Report
WillieOngPhDThesisFinalDuke2015
Ali-Dissertation-5June2015
Nonlinear Simulation of Rotor-Bearing System Dynamics

What's hot (18)

PDF
Dissertation_Austin_Kana_FINAL
PDF
Physical Introduction
PDF
Fundamentals of computational_fluid_dynamics_-_h._lomax__t._pulliam__d._zingg
PDF
Thesis
PDF
Classification System for Impedance Spectra
PDF
20120112-Dissertation7-2
PDF
PDF
Thesis
PDF
thesis-cannings-2004
PDF
PDF
CERN-THESIS-2012-056
PDF
Seismic Tomograhy for Concrete Investigation
PDF
Lower Bound methods for the Shakedown problem of WC-Co composites
PDF
ThesisJoshua
PDF
Internship Report: Interaction of two particles in a pipe flow
PDF
Coulomb gas formalism in conformal field theory
PDF
Thesis_Main
PDF
Stochastic Processes in R
Dissertation_Austin_Kana_FINAL
Physical Introduction
Fundamentals of computational_fluid_dynamics_-_h._lomax__t._pulliam__d._zingg
Thesis
Classification System for Impedance Spectra
20120112-Dissertation7-2
Thesis
thesis-cannings-2004
CERN-THESIS-2012-056
Seismic Tomograhy for Concrete Investigation
Lower Bound methods for the Shakedown problem of WC-Co composites
ThesisJoshua
Internship Report: Interaction of two particles in a pipe flow
Coulomb gas formalism in conformal field theory
Thesis_Main
Stochastic Processes in R
Ad

Viewers also liked (15)

PDF
Tratados de paz
DOCX
RÉSUMÉ_FOR_ABHAY-KUMAR-JHA_2017
PPT
Business Presentation
DOCX
CV Tapas K Prasad
PDF
GM Articles (2)
PDF
Causas segunda guerra mundial
PPTX
Inflation on brazil
DOCX
Collage alex
DOCX
Administración estatal
PDF
Best Of CES
PDF
Brain Foods
PPTX
Duolingo: Gamifying Irish-language learning
PPTX
Gamification for Second Language Acquisition
PPTX
Gamification lecture for #BR4041UL
PPTX
EuroCALL2015
Tratados de paz
RÉSUMÉ_FOR_ABHAY-KUMAR-JHA_2017
Business Presentation
CV Tapas K Prasad
GM Articles (2)
Causas segunda guerra mundial
Inflation on brazil
Collage alex
Administración estatal
Best Of CES
Brain Foods
Duolingo: Gamifying Irish-language learning
Gamification for Second Language Acquisition
Gamification lecture for #BR4041UL
EuroCALL2015
Ad

Similar to CADances-thesis (20)

PDF
Nonlinear steady state heat transfer NASA.pdf
PDF
peters_corrected-1
PPT
numerical.ppt
PPT
This is related to numberical method, in engineering college
PPT
introduction to numerical analysis .ppt
PPTX
Numerical methods for 2 d heat transfer
PPTX
Graphical methods for 2 d heat transfer
PPT
Application of Numerical Methods (Finite Difference) in Heat Transfer
PPTX
project presentation
PDF
Numerical Modelling of Trans-Triple Point Temperature Near-Field Sonic Disper...
PDF
Multicomponent, multiphase flow in porous media with temprature variation wi...
PDF
Temperature characteristics of fiber optic gyroscope sensing coils
PDF
lecture notes heat transfer.pdf
PDF
lecture notes heat transfer.pdf
PDF
PhD_Thesis_J_R_Richards
PDF
Finite ele ment method for Heat Transfer.pdf
PDF
Heat flow through concrete floor
PDF
Chemical engineering journal volume 317 issue 2017 [doi 10.1016%2 fj.cej.2017...
PDF
Heat Conduction Simulation with FDM
PDF
Numerical simulation on laminar free convection flow and heat transfer over a...
Nonlinear steady state heat transfer NASA.pdf
peters_corrected-1
numerical.ppt
This is related to numberical method, in engineering college
introduction to numerical analysis .ppt
Numerical methods for 2 d heat transfer
Graphical methods for 2 d heat transfer
Application of Numerical Methods (Finite Difference) in Heat Transfer
project presentation
Numerical Modelling of Trans-Triple Point Temperature Near-Field Sonic Disper...
Multicomponent, multiphase flow in porous media with temprature variation wi...
Temperature characteristics of fiber optic gyroscope sensing coils
lecture notes heat transfer.pdf
lecture notes heat transfer.pdf
PhD_Thesis_J_R_Richards
Finite ele ment method for Heat Transfer.pdf
Heat flow through concrete floor
Chemical engineering journal volume 317 issue 2017 [doi 10.1016%2 fj.cej.2017...
Heat Conduction Simulation with FDM
Numerical simulation on laminar free convection flow and heat transfer over a...

CADances-thesis

  • 1. The Pennsylvania State University The Graduate School College of Engineering INITIAL RESIDUAL FORMULATION OF CTF A Thesis in Nuclear Engineering by Christopher A. Dances © 2015 Christopher A. Dances Submitted in Partial Fulfillment of the Requirements for the Degree of Master of Science May 2015
  • 2. The thesis of Christopher A. Dances was reviewed and approved∗ by the following: Maria Avramova Associate Professor of Nuclear Engineering Thesis Advisor Kostadin Ivanov Distinghuished Professor of Nuclear Engineering Vince Mousseau Mentor from Sandia National Labs Special Signatory Arthur Motta Professor of Nuclear Engineering and Materias Science and Engineering Chair of Nuclear Engineering ∗ Signatures are on file in the Graduate School. ii
  • 3. Abstract Nuclear engineering codes are being used to simulate more challenging problems and at higher fidelities than they were initially developed for. In order to expand the capabilities of these codes, state of the art numerical methods and computer science need to be implemented. One of the key players in this effort is the Consortium for Advanced Simulation of Light Water Reactors (CASL) and through development of the Virtual Environment for Reactor Applications (VERA). The sub-channel thermal hydraulic code used in VERA is CTF, which is a version of COBRA-TF (Coolant-Boiling in Rod Arrays - Three Fluids) partially developed at the Pennsylvania State University by the Reactor Dynamics and Fuel Management Research Group (RDFMG). Currently, CTF solves 8 conservation equations for liquid, entrained droplet, and vapor phases of water boiling within the rod structure of a LWR reactor core. The conservation equations analytically reduce into a pressure matrix and are solved using a semi-implicit method. The solid conduction equations are then implicitly solved to determine the temperature within the fuel. Since the liquid solution is solved independent of the solid solution, the solid and liquid equations are explicitly coupled. In an effort to help meet the objectives of CASL, a version of CTF has been developed that solves the residual formulation of the 1D single-phase conservation equations. The formulation of the base equations as residuals allows the code to be run semi-implicitly or fully implicitly while clearly defining the original conservation equations. This thesis outlines the work to integrate 1D solid conduction equations into the residual formulation. This expands the solid liquid coupling to be either explicit or implicit. Different physical models, such as the homogeneous liquid solid energy model, can be readily implemented by adding the residual functions and variables. A simple test problem consisting of a single liquid channel and fuel pin was designed to compare the original version of CTF to the different numerical and physical models available through the new residual formulation. The methods are compared both for steady state and transient conditions to quantify the accuracy and stability of each method. The input parameters are varied over a variety of conditions to demonstrate when different methods are most appropriate. The ability to choose appropriate numerical methods and physical models will allow for greater fidelity, and decrease computational expenses. iii
  • 4. Table of Contents List of Figures vi List of Tables viii List of Symbols ix Acknowledgments xi Chapter 1 Introduction 1 Chapter 2 Conservation Equations 2 2.1 Single Phase Liquid Euler Equations . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 1-D Radial Solid Conduction Equation . . . . . . . . . . . . . . . . . . . . . . . . 4 Chapter 3 Solution Methods 8 3.1 Residual Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 Jacobian Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Chapter 4 Isokinetic Step Advection 11 4.1 Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.2 Density Advection and Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.3 Modified Equation Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.4 Scaling of Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Chapter 5 Shock Tube 17 5.1 Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.2 Analytical Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.3 Results and Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.4 Scaling of Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 iv
  • 5. Chapter 6 Isokinetic Sine Wave Advection 23 6.1 Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.2 Code Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 6.3 Richardson Extrapolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.4 Convergence of Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.5 Order of Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Chapter 7 Uniform Heating Problem 30 7.1 Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 7.2 Steady State Analytical Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7.3 Steady State Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7.4 Transient Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Chapter 8 Conclusions 36 Bibliography 36 v
  • 6. List of Figures 2.1 The finite volume structure for CTF . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 Rod Axial Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.3 Radial Rod Meshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4 Radial Rod Meshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1 Structure of the Jacobian matrix for single phase liquid . . . . . . . . . . . . . . 9 3.2 Structure of Jacobian matrix for single phase liquid explicitly coupled to solid conduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.3 Structure of the Jacobian matrix for single phase liquid implicitly coupled to solid conduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.1 Setup for the isokinetic advection problem . . . . . . . . . . . . . . . . . . . . . . 11 4.2 Comparison of density advection to analytical solution . . . . . . . . . . . . . . . 12 4.3 Scaling of numerical error with constant time step size for density . . . . . . . . 15 4.4 Temporal Order of Accuracy for density . . . . . . . . . . . . . . . . . . . . . . . 15 4.5 Advection of isokinetic density wave kg m3 in time and space for CFL=1 . . . . . . 16 5.1 Setup for the shock tube problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.2 Regions within the shock tube based on rarefaction and compression . . . . . . . 19 5.3 Comparison of analytical and numerical results for shock tube . . . . . . . . . . . 20 5.4 Truncation error for shock tube . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.5 Richardson extrapolation of the shock tube results N=50 . . . . . . . . . . . . . 22 5.6 Temporal Order of Accuracy for shock tube . . . . . . . . . . . . . . . . . . . . . 22 6.1 Enthalpy Near the Inlet and the Analytical Solution . . . . . . . . . . . . . . . . 24 6.2 Density Near the Inlet and the Analytical Solution . . . . . . . . . . . . . . . . . 25 6.3 Code Convergence Criteria for the Original Version of CTF . . . . . . . . . . . . 25 6.4 Summation of the Residuals for the Residual Version of CTF . . . . . . . . . . . 26 6.5 Difference Between Successive Temporal Refinements for Density . . . . . . . . . 27 6.6 Difference Between Successive Spatial Refinements for Density . . . . . . . . . . 27 6.7 Temporal Order of Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.8 Spatial Order of Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 6.9 Comparison of the Error for Density . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.1 Steady State Radial Temperature Distribution Difference to Rod Surface Temper- ature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 vi
  • 7. 7.2 Error of Different Numerical Methods to Analytical Solution . . . . . . . . . . . 32 7.3 Steady State Axial and Radial Temperature Distribution in the Fuel Rod . . . . 33 7.4 Plot of the Radial Nodal Temperatures for the Semi-Implicit Method . . . . . . . 34 7.5 Plot of the Radial Nodal Temperatures for the Implicit Method . . . . . . . . . . 34 7.6 Temperature profile over time for the Semi-Implicit Method . . . . . . . . . . . . 35 7.7 Temperature profile over time for the Implicit Method . . . . . . . . . . . . . . . 35 vii
  • 8. List of Tables 4.1 Input Parameters for Isokinetic Advection . . . . . . . . . . . . . . . . . . . . . . 12 5.1 Input Parameters for Shock Tube Verification Problem . . . . . . . . . . . . . . . 18 6.1 Problem Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 7.1 Problem Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 7.2 Relative Error of Difference Between Fuel Centerline to Rod Surface Temperature 32 viii
  • 9. List of Symbols ρ Density h Enthalpy u Velocity P Pressure T Temperature x Axial Location r Radial Location t Time g Gravitional Acceleration k Iterative Index i Spatial Index n Time Index J Jacobian Matrix F Equation Residual Vector δX Variable Residual Vector Perturbation Value CFL Courant Limit p Order of Accuracy L Active Fuel Length kfuel Fuel Thermal Conductivity kclad Clad Thermal Conductivity ix
  • 10. cp,fuel Fuel Specific Heat cp,clad Clad Specific Heat hfluid Liquid Heat Transfer Coefficient hgap Gap Heat Transfer Coefficient x
  • 11. Acknowledgments The Constortium for the Advanced Simulation of Light Water Reactors (CASL) The Reactor Dynamics Fuel Management Group (RDFMG) at Penn State The Toshiba Westinghouse Fellows Program (TWFP) xi
  • 12. Dedication To my family, friends, and mentors who have supported me in pursuing my education. xii
  • 13. Chapter 1 | Introduction For the past several decades, the primary focus in nuclear engineering within the United States has been on light water reactors (LWR). Commercially, all nuclear reactors are either boiling water reactors (BWR) or pressurized water reactors (PWR). Correct computation of the thermal hydraulics within the reactor core leads to efficient design and accuracy in the safety analysis. CASL is a key player in the effort, and through VERA [1] utilizes the popular subchannel code, CTF, for modeling the hydrodynamics within the reactor core. This FORTRAN based code developed from COBRA-TF solves 8 conservation equations for liquid, entrained droplet, and vapor phases phases, plus one conservation equation for non-condensible gases [2]. The energy of the entrained droplets is assumed to be in thermal equilibrium with the liquid phase. The set of procedures for ensuring that simulation codes such as CTF are accurate and reliable is called software validation and verification [3]. CTF has undergone software uncertainty quantification and benchmark validation [4]. The current version of CTF has standard verification practices that focus on software quality engineering similar to those in other versions of COBRA- TF [5], but currently lacks an in depth verification document that focuses on numerical algorithm verification. This work focuses on this second type of verification for the original version of CTF as well as a residual formulation. The 1-D residual formulation of the code has been created for single phase liquid coupled to radial conduction. While other residual formulations have been formed for other versions of COBRA-TF [6], none have been integrated into the CASL version of CTF. This work details the verification of both the residual formulation and the original version of CTF for the single phase liquid and radial conduction equations. The verification problems will study of the order of accuracy of the errors, which is considered one of the more rigorous verification criteria [7]. This work will be considered a starting point for future work to perform verification on the single phase equations in both axial and transverse dimensions [8], and two phase flow [9]. 1
  • 14. Chapter 2 | Conservation Equations 2.1 Single Phase Liquid Euler Equations The finite volume structure in CTF in figure 2.1 is for a one-dimensional channel in the axial direction with n number of cells. The first and last cells at 0 and n + 1 are ghost cells and act as the boundary conditions for the problem. Pressure, enthalpy, and density are averaged over the cell volume and are located at the center of the cell. Velocity is located at the faces in between cells and averaged over the flow area of the surface. The cells are represented with an index i, and the faces with indexes of i + 1 2 or i − 1 2 . This project will initially focus on this 1-D configuration. Usually the code is three dimensional, with channels connecting to each other in two more dimensions. Fully 3-D equations will be considered in future work. Figure 2.1. The finite volume structure for CTF 2
  • 15. The thermal hydraulics of a LWR core is an important part of nuclear reactor design. CTF solves 8 conservation equations for liquid, entrained droplet, and vapor phases of water boiling within the rod structure of a LWR reactor core [10]. Currently, the discretized conservation equations are analytically reduced into a pressure matrix. This pressure matrix is then solved for using a semi-implicit method and the new time fluid quantities are back calculated using the new time pressure values. The rod temperatures are implicitly solved for using an explicit coupling with the fluid solution. This work involves representing the 1-D single phase liquid conservation equations and calculated variables in a residual formulation. The full Jacobian matrix can then be built numerically, and can then either be reduced to a pressure matrix or solved directly. Verification of the residuals was done by comparing calculated results to analytical solutions for isokinetic advection and shock tube problems. For each verification problem, a scaling study of the truncation error was compared to the predicted behavior derived from modified equation analysis using Richardson extrapolation. Further work was then applied to represent 1-D heat conduction within nuclear rod types. The fluid solution can be solved for semi-implicitly, or implicitly with either explicit or implicit coupling to the solid implicit solution . The single phase Euler partial differential equations for mass (2.1), momentum (2.2), and energy (2.3) correspond to the unknown variables pressure P, velocity u, and enthalpy h. The equation of state (2.4) relates density ρ as a function of pressure and enthalpy. The first terms in each of the equations are temporal terms. The rest of the terms are steady state spatial terms. The last term in the energy equation represents the net heat transfer from the adjacent rods to the current fluid subchannel. ∂ρ ∂t + ρu = 0 (2.1) ∂ρu ∂t + ρu2 + P − ρg = 0 (2.2) ∂ρh ∂t − ∂P ∂t + (ρuh) + qrod ∀fluid = 0 (2.3) ρ = EOS(P, h) (2.4) The 1-D formulation of the Euler Equations will assume a direction x as shown in the 1-D mass equation (2.5). The momentum and energy equations are represented in a non-conservative form as shown in equations (2.6) and (2.8). The momentum equation contains a term that has a product of the left hand side of the 1-D mass equation. This terms can therefore be dropped since it is equivalent to zero, and the entire equation can be divided by density to give a simpler form of the momentum equation (2.7). The last term in the energy equation represents the net heat transfer from the adjacent rods to the current fluid subchannel. This is equated as the surface area of the rod liquid interface times the heat transfer coefficient and temperature difference between the wall and bulk fluid temperatures. 3
  • 16. ∂ρ ∂t + ∂ρu ∂x = 0 (2.5) ρ ∂u ∂t + u ∂ρ ∂t + ∂ρu ∂x + ρu ∂u ∂x + ∂P ∂x − ρg = 0 (2.6) ∂u ∂t + u ∂u ∂x + 1 ρ ∂P ∂x − g = 0 (2.7) ρ ∂h ∂t − ∂P ∂t + h ∂ρ ∂t + ρu ∂h ∂x + h ∂ρu ∂x + 2πrrod Ai hl (Twall − Tfluid) = 0 (2.8) The 1-D equations are then evaluated at a position index i and a certain time n in order to solve for the next time value of n + 1. In the mass equation (2.9), the velocities are located at the cell faces i + 1 2 and i − 1 2 . The density in the mass and energy equations is upwinded ˙ρn i+ 1 2 and averaged ¯ρn i+ 1 2 in the momentum equation. In equation (2.10), the derivative ∂u ∂x is upwinded assuming that the flow is positive. In the energy equation, (2.11) the enthalpy values in the first spatial term are upwinded and shown here assuming a positive velocity. The equation of state (2.12) solves for density assuming that it is a linear combination of changes due to pressure and enthalpy. The partial derivatives in the equation are calculated from steam tables as functions of old time pressure and enthalpy. ρn+1 i − ρn i ∆t + ˙ρn i+ 1 2 un+1 i+ 1 2 − ˙ρn i− 1 2 un+1 i− 1 2 ∆x = 0 (2.9) un+1 i+ 1 2 − un i+ 1 2 ∆t + un i+ 1 2 un i+ 1 2 − un i− 1 2 ∆x + 1 ¯ρn i+ 1 2 Pn+1 i+1 − Pn+1 i ∆x − g = 0 (2.10) ρn i hn+1 i − hn i ∆t + hn i ρn+1 i − ρn i ∆t − Pn+1 i − Pn i ∆t + (ρu) n i hn i − hn i−1 ∆x + hn i ˙ρn i+ 1 2 un+1 i+ 1 2 − ˙ρn i− 1 2 un+1 i− 1 2 ∆x + 2πrrod Ai hl (Twall − Tfluid) = 0 (2.11) ρn+1 i − ρn i = ∂ρ ∂P n i Pn+1 i − Pn i + ∂ρ ∂h n i hn+1 i − hn i (2.12) 2.2 1-D Radial Solid Conduction Equation The conduction equation for a cylindrical system is given in equation 2.13. The first term represents the amount of energy stored within the solid area within a unit time. The second term is the conduction in the radial direction. The second and third terms are the conduction in the azimuthal and axial directions, respectively. The last term represents the heat generation within the solid. 4
  • 17. ρfuelcp ∂T ∂t − 1 r ∂ ∂r kr ∂T ∂r − 1 r2 ∂ ∂θ k ∂T ∂θ − ∂ ∂z k ∂T ∂z − q = 0 (2.13) This work focuses on the 1D radial equations setting the derivatives with respect to the angular and axial directions to zero. Equation 2.13 now reduces to equation 2.14. ρfuelcp ∂T ∂t − 1 r ∂ ∂r kr ∂T ∂r − q = 0 (2.14) When the radius is zero, the fuel temperature is considered to be a maximum giving the boundary condition in equation 2.15 ∂T ∂r r=0 = 0 (2.15) Figure 2.2. Rod Axial Mesh The nuclear rod geometry types in CTF are meshed at each axial level according to figure 2.2. Each axial level will be meshed as seen in figure 2.3 where the red region is fuel and the gray region is cladding. The black dots represent the nodes within the fuel. Each node covers a region within the rod as bounded by the dashed lines. The nodes within the fuel are located at the center of the region. Each region is assumed to have uniform properties with values evaluated at the node. The last node within the fuel is located at the surface of the fuel at the interface with the gap. There are two additional nodes that represent the outer clad surface and the inner clad surface respectively. The gap between the outer surface of the fuel and the inner surface of the cladding has a specified heat transfer coefficient or is calculated using the dynamic gap conductance model. The outer surface of the cladding is assumed to be in contact with the fluid in the adjacent channel on that axial level. The rods have the same number of axial levels as the fluid, but do not 5
  • 18. Figure 2.3. Radial Rod Meshing have ghost cells at the top and bottom. Instead the first and last fluid axial levels are connected to two rod axial levels as shown by Figure 2.4, where the rod axial levels are on the left, and the fluid axial levels are on the right. The light blue cells are the fluid ghost cells. Figure 2.4. Radial Rod Meshing The conduction equation can be approximated using the finite difference method, or the control volume difference method [11]. The control volume method will be used since it is the same method utilized in the original version of CTF. The implicit finite difference equation now looks like equation 2.16. ρfuelcp,i Tn+1 i − Tn i ∆t − 2π Ai ki+ 1 2 ri+ 1 2 Tn+1 i+1 − Tn+1 i ∆ri+ 1 2 − ki− 1 2 ri− 1 2 Tn+1 i − Tn+1 i−1 ∆ri− 1 2 −qi = 0 (2.16) The density on the temporal term is defined as the cold mass of the node divided by the 6
  • 19. volume of the node. The temporal derivative is approximated with first order accurate forward differencing. The spatial derivatives are evaluated at the right boundary, i + 1 2 , and at the left boundary,i − 1 2 using first order forward differencing. When i = 1 at the inner most node, the radius at the left boundary and the derivative of the temperature is zero. At the boundary between the surface of the fuel and the inside surface of the cladding, a different set of finite difference equations are needed as given by equation 2.17 ρfuelcp,i Tn+1 i − Tn i ∆t + 2π Ai ki− 1 2 ri− 1 2 Tn+1 i − Tn+1 i−1 ∆ri− 1 2 − 2πrihgap Ai Tn+1 i+1 − Tn+1 i −qi = 0 (2.17) The finite difference equation between the inner and outer cladding surfaces given by equation 2.18 has no heat generation or conduction from the fuel. Instead the volumetric heat rate is calculated using the term for the volumetric heat rate across the gap and a similar term but for the volumetric heat rate across the cladding. Since the cladding does not have any heat generation, this term is represented as the temperature difference across the cladding times the thermal resistance across the cladding times the perimeter of the cladding divided by the area of the inner cladding region. ρcladcp,i Tn+1 i − Tn i ∆t + 2πrihgap Ai Tn+1 i − Tn+1 i−1 − 2π Ai ki+ 1 2 ri+ 1 2 Tn+1 i+1 − Tn+1 i ∆ri+ 1 2 = 0 (2.18) The finite difference equation between the inner and outer cladding surfaces given by equation 2.19 relates the wall temperature to the bulk fluid temperature at the same axial level. The volumetric heat rate lost to the fluid is represented as the temperature difference between the wall and the fluid times the thermal resistance of the fluid and divided by the outer cladding region. ρcladcp,i Tn+1 i − Tn i ∆t + 2π Ai ki− 1 2 ri− 1 2 Tn+1 i − Tn+1 i−1 ∆ri− 1 2 − 2πrihfluid Ai Tn+1 i − Tk fluid = 0 (2.19) The numerator in the last term is also in the fluid energy conservation equation. The heat transfer coefficient is currently calculated using the Dittus-Boelter correlation [12]. The fluid properties are evaluated at the bulk fluid temperature. When the fluid finite equations are solved for implicitly, they will impact the solid conduction equations through the calculation of the heat transfer coefficient and the fluid temperature. 7
  • 20. Chapter 3 | Solution Methods 3.1 Residual Formulation A residual is simply the difference between the value at some future time n + 1 and the value at the current iteration k [13]. This can be applied to desired variables as shown in equations (3.1), (3.2), (3.3), and (3.4). Residuals can also be applied to the conservation equations by substituting the definition of the residual variables into the conservation equations. This will effectively change any variables evaluated at n + 1 to k. Each cell will have three residual variables and three residual equations. For the entire solution, we will then have a residual variable array δX, and a residual function array F(X) which defines a linear system as seen in equation (3.5). δPi = Pn+1 i − Pk i (3.1) δhi = hn+1 i − hk i (3.2) δui+ 1 2 = un+1 i+ 1 2 − uk i+ 1 2 (3.3) δρi = ρn+1 i − ρk i (3.4) JδX = −F(X) (3.5) 3.2 Jacobian Construction The Jacobian matrix is defined in equation (3.6) as the derivative of each response of the function Fj with respect to each variable Xi. The derivative can be calculated numerically as shown by equation (3.7) where is a small numerical value. For CTF the equations are linear, and this numerical approximation of the Jacobian matrix is exact. This produces the same Jacobian 8
  • 21. matrix that CTF currently generates analytically. Ji,j = ∂Fj(X) ∂Xi (3.6) Ji,j ≈ Fj(Xi + ) − Fj(X) (3.7) To build the Jacobian matrix, an object oriented class was created that contains three pointers. 1. Residual Function 2. Value within a Target Variable Array 3. The Index of the Target Variable These objects are append into a single array that dictates the order of the jacobian construction as seen in figure 3.1. Figure 3.1. Structure of the Jacobian matrix for single phase liquid The explicitly coupled solid liquid Jacobian matrix can be seen in figure 3.2, where blue values represent negative entries and red values positive entries. The black lines were drawn on top of the image to represent artificial boundaries between the liquid Jacobian matrix in the top left corner and the solid Jacobian matrix in the bottom right corner. The fluid Jacobian matrix contains 3 conservation equations for every axial level. The liquid function residuals are appended in the order of mass conservation, energy conservation, and momentum conservation for each axial level. These correspond the pressure, enthalpy, and velocity at each axial level. The liquid Jacobian matrix can be evaluated as either semi-implicit or fully implicit. The solid Jacobian matrix contains 1 energy conservation equation for each node in the rod. Since axial and azimuthal conduction are not computed, each radial level is computed separately from the rest. This can be seen by the lack of cross terms in the Jacobian matrix at each axial level. The Jacobian matrix on in figure 3.3 is an implicit coupling between the implicit liquid Jacobian matrix and the implicit solid matrix. The cross terms in the top right corner represent the effect of the wall temperature on the energy equation in the liquid Jacobian matrix. The terms on the bottom left represent the effects of pressure, enthalpy, and velocity on the energy equation in the solid Jacobian matrix. The implicit matrix is unconditionally stable, allowing for time steps greater than the material 9
  • 22. Courant limits. Once the coupled Jacobian matrix is constructed, it is solved using the linear Krylov solver [14] from PETSc [15]. The residuals for each of the conservation equations are then L2 normalized over the domain to determine the convergence of the system. Figure 3.2. Structure of Jacobian matrix for single phase liquid explicitly coupled to solid conduction Figure 3.3. Structure of the Jacobian matrix for single phase liquid implicitly coupled to solid conduction Numerically building the matrix in this fashion can be very computationally expensive. An easy way to optimize the construction of the matrix, is to not compute the indexes which are known to be zero. An optional optimization flag was added to the code that allows for the non-zero structure to be remembered after the first construction, and following constructions only compute entries that were previously non-zero. This drastically decreases computations cost, but at the risk of serious potential error in the event of previously zero entries becoming non-zero later in the problem. For the verification problems covered in this work, this does not occur and therefore this optimization method is appropriate. Other optimization work could be in the parallelization of the construction and solution of the Jacobian matrix similar to what was done for the original version of CTF [10]. 10
  • 23. Chapter 4 | Isokinetic Step Advection 4.1 Problem Setup A tube with no gravity acting in the direction of fluid flow has an initial condition of U1, ρ1, h1, P1, ˙m1 everywhere except at the starting position that has an initial conditions of h2, ρ2, ˙m2. When the time step for the calculation is taken be exactly equal to the CFL number as seen in equation 4.1, the inlet conditions should advect through the rest of the system in the form of a square wave. This is a unique situation where the CFL can be held constant throughout the simulation, and where the spatial and temporal truncation error can cancel each other out at CFL = 1. When the CFL is less than 1, numerical diffusion occurs based on the truncation terms produced by the modified equation analysis. CFL = ∆tU1 ∆x (4.1) Figure 4.1. Setup for the isokinetic advection problem The problem was set up using the parameters given in table 4.1. Initial temperature, density, and mass flow rate of the system differs from the inlet temperature, density, and mass flow rate. The pressure and velocity of the system remains constant. The transient runs until the center of the advected wave reaches the end of the tube at roughly 60 seconds. The value of the parameters are more or less arbitrary, but approximate a single channel about the length of a fuel assembly undergoing a 10 C temperature difference. The water is close to standard temperature and 11
  • 24. pressure. Table 4.1. Input Parameters for Isokinetic Advection Length 3.00 m Channel Area 0.0001 m2 Wetted Perimeter 0.040 m Pressure 1.00 bar Initial Temperature 40.00 C Inlet Temperature 30.00 C Inlet Mass Flow Rate 0.005 kg/s Inlet Density 992.61 kg/m3 Velocity 0.050372 m/s 4.2 Density Advection and Error Figure 4.2 compares the analytical and numerical advection of density through the domain for a CFL number of 0.500. The higher density in the colder region is on the left, and the lower density of the warmer region is on the right. The red line on the right of the figure depicts the truncation error at the current time step. The truncation error occurs around the original discontinuity as it advects through the solution. As the discontinuity propagates it becomes more diffuse spatially. Once it reaches the outlet the discontinuity leaves the domain and the overall error drops to nearly zero. For this problem, the truncation error can be shown to be a direct function of the CFL number and can be reduced to nearly zero throughout the simulation. This simplified problem with an exact solution is used for code verification. Figure 4.2. Comparison of density advection to analytical solution 12
  • 25. 4.3 Modified Equation Analysis The order of accuracy in time and space can be analytically determined for this problem through a modified equation analysis [16]. The goal will be to isolate the original PDE and define the truncation error. For this isokinetic problem, the original mass balance equation can be re-written to look like equation 4.2. Using upwinding, the finite difference can be written to look like equation 4.3. A second order Taylor series approximation can be used for ρn+1 i and ρn i−1 as shown in equations 4.4 and 4.5 respectively. The higher order terms (O(∆x2 , ∆t2 )) are not taken into account for this approximation. The Taylor series approximations can then be substituted into 4.3 to yield 4.6. This is the beginning of the modified equation analysis. ∂ρ ∂t + U0 ∂ρ ∂x = 0 (4.2) ρn+1 i − ρn i ∆t + U0 ρn i − ρn i−1 ∆x = 0 (4.3) ρn+1 i = ρn i + ∂ρ ∂t ∆t + 1 2 ∂2 ρ ∂t2 ∆t2 + O(∆t3 ) (4.4) ρn i−1 = ρn i − ∂ρ ∂x ∆x + 1 2 ∂2 ρ ∂x2 ∆x2 + O(∆x3 ) (4.5) The lengthy equation 4.6 can be reduced to equation 4.7 since the ρn i terms subtract out and the ∆t and ∆x terms in the denominator cancel out. This reduced equation can the be re-written into equation 4.8, with the original PDE followed by the truncation error shown in brackets. Since the truncation error scales linearly with ∆t and ∆x, it is said to be first order accurate with respect to time and space. Notice how the truncation error is also dependent on the second derivatives of density with respect to space and time. ρn i + ∂ρ ∂t ∆t + 1 2 ∂2 ρ ∂t2 ∆t2 − ρn i ∆t + U0 ρn i − ρn i − ∂ρ ∂x ∆x + 1 2 ∂2 ρ ∂x2 ∆x2 ∆x + O(∆x2 , ∆t2 ) = 0 (4.6) ∂ρ ∂t + 1 2 ∂2 ρ ∂t2 ∆t + U0 ∂ρ ∂x − 1 2 ∂2 ρ ∂x2 ∆x + O(∆x2 , ∆t2 ) = 0 (4.7) ∂ρ ∂t + U0 ∂ρ ∂x + 1 2 ∂2 ρ ∂t2 ∆t − U0 1 2 ∂2 ρ ∂x2 ∆x + O(∆x2 , ∆t2 ) = 0 (4.8) While the truncation error has been identified, some additional analysis is still possible since the problem is isokinetic. The derivative of the original PDE with respect to space and time can be taken as shown in equations 4.9 and 4.10 respectively. These two derivatives can substitute 13
  • 26. into each other using the common term ∂2 ρ ∂x∂t . The second derivatives of density with respect to space and time are therefore related by the velocity squared as shown by equation 4.11. ∂2 ρ ∂t2 + U0 ∂2 ρ ∂x∂t = 0 (4.9) ∂2 ρ ∂t∂x + U0 ∂2 ρ ∂x2 = 0 (4.10) ∂2 ρ ∂t2 = U2 0 ∂2 ρ ∂x2 (4.11) This relationship can then be substituted back into equation 4.8, which can be reduced to equation 4.13 after ignoring the higher order terms. The error depends on the CFL number, the axial spacing, and the second order derivative of density with respect to space. This derivative is what gives the error the characteristics of diffusion. When the CFL number is less than one, the error term is negative and the diffusion is dampening. When the CFL number is greater than one, the error term becomes positive, and the accumulation of the error destabilizes the solution. ∂ρ ∂t + U0 ∂ρ ∂x − 1 2 ∆xU0 ∂2 ρ ∂x2 − U2 0 ∂2 ρ ∂x2 ∆t + O(∆x2 , ∆t2 ) = 0 (4.12) ∂ρ ∂t + U0 ∂ρ ∂x − ∆xU0 2 ∂2 ρ ∂x2 (1 − CFL) + O(∆x2 , ∆t2 ) = 0 (4.13) Modified equation analysis can be applied to the energy balance equation presented in equation 4.14. The energy equation is presented in a form where the momentum equation was substituted in as zero and then divided through by density. The result presented in equation 4.15 is similar in form to the result for the mass balance equation 4.13. ∂h ∂t − 1 ρ ∂P ∂t + U0 ∂h ∂x = 0 (4.14) ∂h ∂t − 1 ρ ∂P ∂t + U0 ∂h ∂x − ∆xU0 2 ∂2 h ∂x2 (1 − CFL) = 0 (4.15) 4.4 Scaling of Error From the modified equation analysis, the advection problem is shown to be first order accurate in time and space. Assuming a fixed number of points, the time step was halved several times. The relative difference between each step was taken and 1 normalized across space at at a particular time. The plot of this difference can be seen for density in figure 4.3. The power fit for density has a high correlation coefficient, and shows that the order of accuracy temporally is close to 1. Richardson extrapolation to determine the order of accuracy at each 14
  • 27. Figure 4.3. Scaling of numerical error with constant time step size for density point as shown by figure 4.4. As the time step size decreases, the order of accuracy approaches 1.0 due to smaller higher order terms. Figure 4.4. Temporal Order of Accuracy for density When the CFL number is set to 1, the spatial error and temporal error cancel out producing a perfect square wave in time and space as shown by figure 4.5. This holds true for a variety of spatial mesh sizes, confirming that both the temporal and spatial errors are first order accurate. 15
  • 28. Figure 4.5. Advection of isokinetic density wave kg m3 in time and space for CFL=1 16
  • 29. Chapter 5 | Shock Tube 5.1 Problem Setup A shock tube is a very common and standard method of verification for momentum and pressure. However, an exact analytical solution is more readily obtained for an ideal gas such as air. A shock tube is created by setting the initial mass flow rate and velocity to zero with no gravity. The boundary conditions at the inlet and outlet are also set to zero, simulating a closed system. A region of high pressure is defined for one half of the domain, and a region of low pressure for the second half. An imaginary diaphragm divides the two regions before the simulation, and at t = 0 disappears. Figure 5.1. Setup for the shock tube problem The problem was set up using the parameters given in table 5.1. The geometry is similar to the previous problem, but the length of the tube was elongated to take into account the faster propagation of the rarefaction and compression waves. The temperature and pressure of the air are near standard conditions. Each region has a unique density corresponding to the different pressures using the equation of state for air given in equation 5.1 where γ = 1.4 is the ratio of specific heats for air. Additionally, the specific heat Cp = 1.005 kJ kg−K to convert between enthalpy and temperature. The initial enthalpy of the system is constant, but will change non-uniformly as a function of time. The 17
  • 30. Table 5.1. Input Parameters for Shock Tube Verification Problem Length 25.00 m Channel Area 0.0001 m2 Wetted Perimeter 0.040 m Initial Pressure 1.00 bar Initial Enthalpy 304.66575 kJ/kg Initial Mass Flow Rate 0.000 kg/s Initial Pressure Drop 0.09576 bar velocity is initially set to zero, but will change as the compression and rarefaction waves move. Since the velocity is set to zero initially, it can’t be used to evaluate the time step size. Instead the speed of sound can be evaluated using equation 5.2, and this velocity can be used to calculate the time step. While there might be some slight change in the speed of sound due to enthalpy changes, it should remain effectively constant. ρ = γ γ − 1 Pabs h (5.1) a = (γ − 1) h (5.2) γ = Cp Cv (5.3) 5.2 Analytical Solution When the diaphragm disappears, a compression wave will move to the right and a rarefaction wave to the left. These two waves split the domain into four distinct regions as shown in figure 5.2. 1. left of the rarefaction wave 2. between the rarefaction wave and the initial location of the diaphragm 3. between the initial location of the diaphragm and the compression wave 4. right of the compression wave The analytical solution does not take into account reflection off of the walls, however the numerical solution can due to the applied boundary conditions for mass flow rate. For a perfectly caloric gas, the following equations are provided [17, p. 238] given the initial conditions for state 1 and 4 in conjunction with equation 5.2. An iterative method is required to solve 5.4 for P2 P1 . Once the region properties are obtained, the regions themselves are mapped by comparing the current position and time to the velocity of the rarefaction and compression wave. 18
  • 31. Figure 5.2. Regions within the shock tube based on rarefaction and compression P4 P1 = P2 P1 1 − (γ − 1)(a1 a4 )(P2 P1 − 1) 2γ 2γ + (γ + 1)(P2 P1 − 1) − 2γ γ−1 (5.4) T2 T1 = P2 P1 γ+1 γ−1 + P2 P1 1 + (γ+1 γ−1 )P2 P1 (5.5) ρ2 ρ1 = 1 + (γ+1 γ−1 )P2 P1 γ+1 γ−1 + P2 P1 (5.6) W = a1 γ + 1 2γ P2 P1 − 1 + 1 (5.7) P2 = P3 (5.8) P3 P4 = ρ3 ρ4 γ = T3 T4 γ γ−1 (5.9) 5.3 Results and Error Enthalpy and density have a discontinuity as seen in figure 5.3 where the diaphragm was initially placed. Similarly there are discontinuities that move with the rarefacation and compression waves for pressure, density, and velocity. The largest error occurs around these discontinuities as seen in figure 5.4. A fine spatial mesh and a small time step are needed to accurately reflect the exact solution. 19
  • 32. Figure 5.3. Comparison of analytical and numerical results for shock tube 20
  • 33. Figure 5.4. Truncation error for shock tube 21
  • 34. 5.4 Scaling of Error A Richardson extrapolation was performed on the density, enthalpy, and mass flow rate for the shock tube analysis in time. The error approaches zero as the time step size gets smaller as seen in figure 5.5. The order of accuracy with respect to time is converges to first order accurate as the time step size decreases. The range of time step values shown are within the asymptotic limit. Figure 5.5. Richardson extrapolation of the shock tube results N=50 Figure 5.6. Temporal Order of Accuracy for shock tube 22
  • 35. Chapter 6 | Isokinetic Sine Wave Advection The procedures that can be used for code verification, from least to most rigorous, include: expert judgment, error quantification, consistency/convergence, and order of accuracy [3]. For this work, the Richardson extrapolation will be used to check for convergence and order of accuracy of the error in space and time. The error should converge to zero, and the order of accuracy should converge to the 1 as obtained through the modified equation analysis in section 4.3. 6.1 Problem Setup To obtain an analytical solution for a subchannel code, typically the method of manufactured solutions [18] is needed. To readily obtain an analytical solution and isolate only the mass and energy conservation equations, several simplifications to the verification problem are made. Only one channel is considered to make the problem 1-D. In order to make the problem perfectly isobaric and isokinetic, grid spacer losses, frictional losses, and gravity head losses are set to zero representing a smooth horizontal pipe. Small fluctuations in pressure and velocity may still occur due to the assumption that the EOS is linear. The channel geometry and operating conditions approximate a standard PWR as shown in table 6.1. The inlet of the channel has a constant velocity with a fluctuating enthalpy that corresponds to be near the standard PWR rod bundle coolant channel inlet conditions. The problem will aslo have constant axial spacing and time step size. The length of the transient was defined to be quadruple the time needed for the liquid at the inlet to advect to the outlet. The frequency of the sine wave was defined to generate a full period of a spatial wave across the length of the channel. With these simplifications, the method of manufacturing solutions is unnecessary since the known solutions are simply the advection of the transient inlet conditions. The functions for the enthalpy h and mass flow rate, ˙m, are given in equations 6.1 and 6.2 where x is the length from the inlet and t is the simulated time. The functions smoothly transition to the initial condition of a straight line across the domain. The enthalpy and mass flow rate vary proportionally to the density such that an isokinetic boundary condition is created at the inlet. While these simplifications do not model a realistic problem, they appropriately isolate the 1-D single phase mass and energy conservation equations for the purpose of verification. 23
  • 36. Table 6.1. Problem Parameters Parameter Symbol Value Unit Axial Length L 3.6586 m Channel Area Ach 4.94E-005 m2 Wetted Perimeter Pw 1.49E-002 m Velocity Vo 7.35 m s Pressure Po 155.00 bar Temperature 1 T1 289.500 ◦ C Temperature 2 T2 327.00 ◦ C Enthalpy 1 h1 1281.55 kJ kg Enthalpy 2 h2 1497.21 kJ kg Mass Flow Rate 1 ˙m1 0.2713 kg s Mass Flow Rate 2 ˙m2 0.2399 kg s Final Time tf 2.00 sec Wave Frequency ω 1.00 Hz h(i, j) = 1 2 (h1 + h2) + (h1 − h2)cos ω j∆t + i∆x Vo (6.1) ˙m(i, j) = 1 2 ( ˙m1 + ˙m2) + ( ˙m1 − ˙m2)cos ω j∆t + i∆x Vo (6.2) The comparison between the data table and the output in CTF are shown for enthalpy and mass flow rate in figures 6.1 and 6.2, respectively. The CTF output was read from the high precision VTK data files [19] at each point in time, which omitted the actual ghost cell where these values were applied. The CTF values are located at the nearest node to the inlet, and will experience small amounts of numerical diffusion. For large mesh sizes, this discrepancy is negligible as can be seen by the overlapping profiles in figures 6.1 and 6.2. Figure 6.1. Enthalpy Near the Inlet and the Analytical Solution The pressure and the velocity fluctuate by less than 0.25% during the simulation due to 24
  • 37. Figure 6.2. Density Near the Inlet and the Analytical Solution approximating the EOS as a linear function. This is considered small for this problem and should not greatly affect the order of accuracy of the error. The VTK output files allow for a high level of precision, reducing round off error in the output during the post processing. 6.2 Code Convergence The current version of CTF uses global code convergence criteria that are used to estimate the rate of change of global mass and energy conservation. The transient values of these criteria are shown in figure 6.3 for the original version of CTF simulating the verification problem. Mass balance and storage are in units of kg s . The energy balance, fluid energy, and solid energy are in units of kW. The solid energy storage is zero since there are not any heat structures present. The fluctuating values represent differences between the energy and mass entering and leaving the system. The flat profile for the mass storage term means that the sine wave has fully developed spatially through the channel. Figure 6.3. Code Convergence Criteria for the Original Version of CTF 25
  • 38. Figure 6.4. Summation of the Residuals for the Residual Version of CTF The residual formulation prints out the summation of the equation residuals across the domain to an output file at the end of each time step and can be seen in figure 6.4. The mass equation residual is in units of kg m3s . The energy equation residual is in units of kW m3 . The momentum residual is in units of kg m2s2 . The flat profile of the mass and energy residuals shows that the sine wave has fully developed spatially through the channel. 6.3 Richardson Extrapolation The Richardson extrapolation was performed by refining the spatial and temporal step sizes by a factor of 2 for a set number of times. The spatial and temporal studies are refined separately in their own study in order to isolate the spatial and temporal affects on the solution. The generation of the inputs, running of the codes, and analysis of the output were automated with a python [20] script in order to reduce user input errors and increase repeatability. For this analysis, a significant amount of information was added to the VTK output files, increasing memory usage and run time. The computational resources for the spatial study was much higher than the temporal study due to the need to keep the CFL number below 0.500. To keep the computational resources needed to perform this analysis reasonable, fewer spatial refinements were performed compared to the temporal analysis. 6.4 Convergence of Error The difference between iterations was computed at each time step and spatial location for each quantity of interest. This difference is considered as the error between each iteration. For the spatial refinement, the lower iterate values were numerically integrated to match the shape of the initial domain. The errors were then summed over the entire domain to yield a total error for each variable. The total error for density is plotted in figures 6.5 and 6.6 as a function of temporal and spatial step size. The data points were chosen to be inside of the asymptotic range as shown by the good power 26
  • 39. Figure 6.5. Difference Between Successive Temporal Refinements for Density fit with an exponent near 1. The power fit shows that as the temporal and spatial step sizes are reduced, the numerical error approaches zero. The discretization error between the original version of CTF is relatively small and is most likely due to the small fluctuations in the velocity present in the original version of the code. Figure 6.6. Difference Between Successive Spatial Refinements for Density 6.5 Order of Accuracy The order of accuracy for this verification problem is first order as shown by the modified equation analysis. This can be considered to be the exponent on the power fits as seen in figures 6.5. However the order of accuracy p can be calculated by using equation 6.3 where f1, f2, f3 are 27
  • 40. consecutive levels within the same Richardson extrapolation study. The refinement factor, R, has the constant value of 2 for both the spatial and temporal studies. p = ln f3−f2 f2−f1 ln(R) (6.3) The order of accuracy for all of the variables are presented for the temporal analysis and spatial analysis in figures 6.7 and 6.8 respectively. The temporal order of accuracy is well within the asymptotic range for the whole analysis, and moves closer to 1.0 with decreasing time step size. The spatial order of accuracy is a slightly outside the asymptotic range, but approaches an order of accuracy of 1.0 with decreasing mesh size. Figure 6.7. Temporal Order of Accuracy The slight differences between the original version of CTF and the residual formulation might be due to the different solution methods and back substitution of variables. Despite the small differences, both versions of the code exhibit order of accuracies very close the values obtained through the modified equation analysis. Taking the derivative of the analytical solution, the exact local numerical error can be calculated from the modified equation analysis. However the numerical error obtained from CTF is a global error in which the error will accumulate from the inlet to the outlet. When the local error was scaled by a factor of x L , it closely matched the global error as shown in figure 6.9. The graph on the left compares numerical and analytical results for the density, and the figure on the right compares the observed global numerical error from CTF and the scaled analytical local error. The temporal and spatial mesh sizes were selected to have order of accuracies that were closest to 1. The error at these small mesh sizes is very small at under 5 decimal points of precision. The agreement between the expected errors is very good with only subtle differences. This difference could be due to the artificial scaling factor applied to the local error, the approximate solution of the Jacobian matrix, or truncation error in values read in from CTF. 28
  • 41. Figure 6.8. Spatial Order of Accuracy Figure 6.9. Comparison of the Error for Density 29
  • 42. Chapter 7 | Uniform Heating Problem 7.1 Problem Setup The test problem is a nuclear rod with uniform heat generation with parameters given in Table 7.1. The fuel and cladding are assumed to have constant material properties. The mass flow rate, reference pressure, and inlet temperature approximate normal PWR operating conditions. However, the heat generation rate is much less than normal PWR operating conditions to ensure that the problem remains well within the single-phase regime with an expected outlet temperature of under 300.0 ◦ C. Additionally, the problem is set up so that the calculation of the heat transfer coefficient using the Dittus-Boelter correlation [12] is appropriate. The subchannel is rod centered with no grid spacers or frictional losses. Gravity pressure losses in the vertical direction are taken into account. Table 7.1. Problem Parameters Parameter Symbol Value Unit Mass Flow Rate ˙m 0.300 kg sec Pressure Po 165.00 bar Inlet Temperature Tinlet 290.00 ◦ C Linear Heat Rate q 4.00 kW m−rod Active Fuel Length L 3.658 m Fuel Radius rfuel 0.4096 cm Outer Cladding Radius rco 0.475 cm Inner Cladding Radius rci 0.4174 cm Rod Pitch p 12.60 cm Clad Specific Heat cp,clad 0.431 kJ kg−K Clad Density ρclad 8470.57 kg m3 Clad Thermal Conductivity kclad 14.83 W m−k Fuel Specific Heat Capacity cp,fuel 0.289 kJ/kg − K Fuel Density ρf uel 10970.40 kg m3 Fuel Thermal Conductivity kf uel 14.83 W m−k Gap Heat Transfer Coefficient hgap 5678.30 W m2−K 30
  • 43. 7.2 Steady State Analytical Solution At steady state conditions and for uniform heat generation, the original conduction equation can be integrated to obtain equation 7.1 for 0.0 ≤ r < rfuel. Trod(r, z) − Trod(rfuel, z) = q r2 fuel 4kfuel 1 − r2 r2 fuel (7.1) The temperature at the fuel surface can be calculated from the cladding inner surface temperature and the thermal resistance across the gap as given in equation 7.2 for rfuel ≤ r < rci. Trod(rfuel, z) − Trod(rci, z) = q 2πrhgap (7.2) The temperature at the inner surface of the cladding can be calculated from the cladding inner surface temperature and the thermal resistance across the cladding as given by equation 7.3 for rci ≤ r < rco. Trod(rci, z) − Trod(rco, z) = q 2πkclad (7.3) The temperature at the outer surface of the cladding can be calculated from the fluid temperature and the thermal resistance due to convection as given by equation 7.4 for r = rco. Trod(rco, z) − Tfluid(z) = q 2πrcohfluid (7.4) The temperatures can be computed by working from the known fluid temperature, and working solving for temperatures from the outside surface of the cladding to the center of the fuel. Notice that the difference between any radial temperature and the fluid temperature at the same axial level is independent of the axial height. This difference will be compared first to verify that the conduction equation is working properly 7.3 Steady State Results The temperature distribution within the fuel rod relative to the wall surface temperature can be seen in figure 7.1. The analytical solution matches well with the different solution methods both within the fuel and at the cladding surfaces. The difference between the analytical solution and the numerical solutions are highest at the fuel centerline as can be seen by figure 7.2. This error is due to the numerical error from the finite differencing approximations made within the fuel. The fuel centerline temperature is extrapolated from the first and second nodal temperatures using a second order accurate forward differencing approximation of the boundary condition in equation 2.15. Normally CTF uses a different extrapolation method, but to consistently compare to the residual formulation was not used. The relative error given in Table 7.2 is shown to scale with the inverse of the number of radial nodes in the fuel. The relative error does not scale with heat flux, but the temperature gradient 31
  • 44. Figure 7.1. Steady State Radial Temperature Distribution Difference to Rod Surface Temperature Figure 7.2. Error of Different Numerical Methods to Analytical Solution from the fuel centerline to the rod wall does. The numerical error will also change for non-uniform heating and variable material properties within the fuel. The implicit transient solution method has slightly higher numerical error than the semi-implicit transient and implicit steady state solution methods. However, all three residual formulation methods have lower numerical error compared to the original steady state method from CTF. The order of accuracy is difficult to compute, since CTF uses non-uniform meshing near the rod center and since the fuel centerline temperature is extrapolated using a second order accurate method. Table 7.2. Relative Error of Difference Between Fuel Centerline to Rod Surface Temperature NR SI Trans I Trans I SS Original SS 5 1.33 % 1.35% 1.32% 2.15% 10 0.45 % 0.48% 0.45% 0.78% 20 0.15 % 0.18% 0.14% 0.20% While there is no conduction in the axial direction, the fluid will have a temperature gradient in the axial direction. This will cause a 2-D temperature distribution as shown by figure 7.3. The fluid temperature only changes by about 10 ◦ C from the inlet to the outlet, but the fuel temperature changes by about 90 ◦ C from the outer surface of the cladding to the fuel centerline temperature. The hottest location of the fuel is located on the centerline at the top of the rod. 32
  • 45. The centerline fuel temperature is slightly under predicted by both the residual formulation and the original versions of CTF. However as table 7.2 shows, this is attributable to numerical error. Figure 7.3. Steady State Axial and Radial Temperature Distribution in the Fuel Rod 7.4 Transient Results The transient simulations were run for 30.0 seconds to reach a pseudo-steady state condition. Two different solution methods were used. The first explicitly couples a semi-implicit fluid matrix to an implicit solid matrix. The second implicitly couples an implicit fluid matrix to an implicit solid matrix. The rate of change of the temperatures have reached near steady state conditions as shown by figures 7.4 and 7.5 for the first and second solution methods respectively. The red lines are fuel node temperatures, and the black lines are cladding node temperatures. For the explicitly coupled solution, a maximum time step size of 0.02 sec was needed to ensure stability. For the implicitly coupled solution, time step sizes well over 0.2 seconds could be taken. For the data in the figure, time steps of 1.0 second were used. The implicit Jacobian matrix is stiffer than the Jacobian matrix for the first method and therefore takes longer to solve. Additionally, for time steps with large residuals multiple up to 5 iterations are needed. However the advantage of being able to take significantly longer time steps makes up for the increased computational cost per time step. The temperatures obtained from the explicitly coupled solution and the implicitly coupled solution methods do not differ by significant amounts. The transient behavior of temperature profile is shown in figures 7.6 and 7.7 for the explicitly coupled and implicitly coupled solutions respectively. The flat green line is the initial condition, 33
  • 46. Figure 7.4. Plot of the Radial Nodal Temperatures for the Semi-Implicit Method Figure 7.5. Plot of the Radial Nodal Temperatures for the Implicit Method the red line is the final profile, and the black lines are intermediate time steps. These graph more clearly show difference in the number of time steps between the two coupling methods. The intermediary time steps are have the same temperatures, as does the final solution. While the semi-implicit solution method for the fluid domain has less numerical error than the implicit solution method for the fluid domain, the explicitly and implicitly solid liquid coupling methods should have comparable error. 34
  • 47. Figure 7.6. Temperature profile over time for the Semi-Implicit Method Figure 7.7. Temperature profile over time for the Implicit Method 35
  • 48. Chapter 8 | Conclusions The residual formulation of CTF allows for a numerical computation of the multivariable Jacobian matrix and produces comparable results to the original code which uses an analytical derivation of a pressure matrix. The 1-D single phase liquid verification problems were able to isolate of the order of accuracies for the conservation equations and show that they match the values obtained from the modified equation analysis. The discretization error for both versions of the code converged to zero with decreasing time step and axial mesh size. The order of accuracy for the temporal and spatial refinements matched very closely with the modified equation analysis for both codes. For all of these data points, the residual formulation of the code showed discretization errors that were very close with the original version of the code. The numerical error obtained from the output matched closely to the analytical error predicted by the modified equation analysis using the derivatives of the known solutions while within the asymptotic range. Future work will involve adding in form losses, transverse flow, and multiple phases. Combining the liquid and solid equations into a single Jacobian matrix allowed for easy explicit or implicit coupling. This solution method was tested against the analytical solution for a single rod with uniform heat generation and shown to give good results for both the residual formulation and the original version of CTF. The discrepancy between the results from CTF and the analytical solution were shown to be dependent on the radial mesh size. Future verification work will involve performing a Richardson extrapolation to obtain an order of accuracy. A modified equation analysis of the explicit and implicit coupling methods would also prove very useful. The effect of temperature dependent material properties and dynamic gap conductance should also be considered. A homogeneous energy equation can now be easily implemented by adding the liquid and solid conservation equations. Future work will be analyzing the homogeneous energy approximation over a state space to see when the approximation is valid. Future work will also involve extending the conduction equations to azimuthal and axial directions. 36
  • 49. Bibliography [1] Schmidt, R. and et al. (2014) “An approach for coupled-code multiphysics core simulations from a common input,” Annals of Nuclear Energy. URL http://dx.doi.org/10.1016/j.anucene.2014.11.015 [2] Salko, R. K. and M. N. Avramova (2014) “CTF Theory Manual,” The Pennsylvania State University. [3] Oberkampf, W. L. and T. G. Trucano (2008) “Verification and Validation Benchmarks,” Nuclear Engineering and Design, 238, pp. 716–743. URL http://dx.doi.org/10.1016/j.nucengdes.2007.02.032 [4] Avramova, M., K. Ivanov, and et al. (2015) “Multi-physics and multi-scale benchmarking and uncertainty quantification within OECD/NEA framework,” Annals of Nuclear Energy. URL http://dx.doi.org/10.1016/j.anucene.2014.12.014 [5] Aumiller, D. L., G. W. Swartele, F. X. Lane, J. W. Buschman, and M. Meholic (2013) “Development of Verification Testing Capabilities for Safety Codes,” NURETH-15. [6] Lloyd, L. J. (2014) Development of a Spatially-Selective, Nonlinear Refinement Algorithm for Thermal-Hydraulic Safety Analysis, Ph.D. thesis, The University of Wisconsin Madison. [7] Roy, C. J. (2005) “Review of code and solution verification procedures for computational simulation,” Journal of Computational Physics, 205, pp. 131–156. URL http://dx.doi.org/10.1016/j.jcp.2004.10.036 [8] Merroun, O., A. Almers, T. E. Bardouni, B. E. Bakkari, and E. Chakir (2009) “Analytical benchmarks for verification of thermal-hydraulic codes based on sub-channel approach,” Nuclear Engineering and Design, 239, pp. 735–748. [9] Mahadevan, V., V. Mousseau, and J. C. Ragusa (2009) “Verification of multiphysics software: Space and time convergence studies for nonlinearly coupled applications,” Interna- tional Conference on Mathematics, Computational Methods & Reactor Physics. URL http://mathematicsandcomputation.cowhosting.net/MC09/pdfs/201961.pdf [10] Salko, R. K., R. C. Schmidt, and M. N. Avramova (2014) “Optimization and par- allelization of the thermal hydraulic subchannel code CTF for high-fidelity multi-physics applications,” Annals of Nuclear Energy. URL http://dx.doi.org/10.1016/j.anucene.2014.11.005 [11] Botte, G., J. Ritter, and R. White (2000) “Comparison of finite difference and control volume methods for solving differential equations,” Computers and Chemical Engineering, 24, pp. 2633–2654. 37
  • 50. [12] Incropera, F., D. Dewitt, T. Bergman, and A. Lavine (2007) Fundamentals of Mass and Heat Transfer, John Wiley & Sons, sixth ed. [13] Kelly, C. (1995) Iterative Methods for linear nad nonlinear equations, Society for Industrial and Applied Mathematics. [14] ——— (2003) Solving Nonlinear Equations with Newton’s Method, Society for Industrial and Applied Mathematics. [15] Balay and et al. (2014), “PETSc Users Manual,” Mathematics and Computer Science Division, Argonne National Laboratory. URL http://www.mcs.anl.gov/petsc/petsc-current/docs/manual.pdf [16] Villatoro, F. and J. Ramos (1999), “On the method of modified equations. I: Asymptotic analysis of the Euler forward difference method,” . URL http://dx.doi.org/10.1016/S0096-3003(98)10031-0 [17] Anderson, J. D. (1990) Modern Compressible Flow With Historical Perspective, McGraw- Hill Inc. [18] Salari, K. and P. Knupp (2000) Code Verification by the Method of Manufactured Solutions, Tech. Rep. SAND2000-1444, Aerosciences and Compressible Fluid Mechanics Department, Parallel Computing Sciences Department at Sandia National Laboratories, P.O. Box 5800, Albuquerque, NM 87185-0825. [19] Schroeder, W. (1998) The VTK user’s guide, Kitware Inc. [20] (2014), “Python Language Reference, version 2.7,” Python Software Foundation. URL http://www.python.org 38