Abstract

The method of manufactured solutions (MMS) has become increasingly popular in conducting code verification studies on predictive codes, such as nuclear power system codes and computational fluid dynamic codes. The reason for the popularity of this approach is that it can be used when an analytical solution is not available. Using MMS, code developers are able to verify that their code is free of coding errors that impact the observed order of accuracy. While MMS is still an excellent tool for code verification, it does not identify coding errors that are of the same order as the numerical method. This paper presents a method that combines MMS with modified equation analysis (MEA), which calculates the local truncation error (LTE) to identify coding error up to and including the order of the numerical method. This method is referred to as modified equation analysis methd of manufactured solutions (MEAMMS). MEAMMS is then applied to a custom-built code, which solves the shallow water equations, to test the performance of the code verification method. MEAMMS is able to detect all coding errors that impact the implementation of the numerical scheme. To show how MEAMMS is different than MMS, they are both applied to the same first-order numerical method test problem with a first-order coding error. When there are first-order coding errors, only MEAMMS is able to identify them. This shows that MEAMMS is able to identify a larger set of coding errors while still being able to identify the coding errors MMS is able to identify.

References

1.
ASME,
2009
,
Standard for Verification and Validation in Computational Fluid Dynamics and Heat Transfer
,
American Society of Mechanical Engineers
,
New York
, Report No. V&V 20-2009.
2.
Oberkampf
,
W. L.
, and
Roy
,
C. J.
,
2010
,
Verification and Validation in Scientific Computing
,
Cambridge University Press
,
Cambridge, UK
.
3.
Knupp
,
P.
, and
Salari
,
K.
,
2002
,
Verification of Computer Codes in Computational Science and Engineering
,
CRC Press
,
Boca Raton, FL
.
4.
Roache
,
P. J.
,
2009
,
Fundamentals of Verification and Validation
,
Hermosa Publishers
,
Socorro, NM
.
5.
Knupp
,
P. M.
,
Ober
,
C. C.
, and
Bond
,
R. B.
,
2007
, “
Impact of Coding Mistakes on Numerical Error and Uncertainty in Solutions to PDEs
,” Sandia National Laboratories, Albuquerque, NM, Report No. SAND2017-5341.
6.
Roy
,
C. J.
,
2005
, “
Review of Code and Solution Verification Procedures for Computational Simulation
,”
J. Comput. Phys.
,
205
(
1
), pp.
131
156
.10.1016/j.jcp.2004.10.036
7.
Salari
,
K.
, and
Knupp
,
P.
,
2000
, “
Code Verification by the Method of Manufactured Solutions
,” Sandia National Labs., Albuquerque, NM.
8.
Steinberg
,
S.
, and
Roache
,
P. J.
,
1985
, “
Symbolic Manipulation and Computational Fluid Dynamics
,”
J. Comput. Phys.
,
57
(
2
), pp.
251
284
.10.1016/0021-9991(85)90045-2
9.
Porter
,
N.
,
Mousseau
,
V.
, and
Avramova
,
M.
,
2019
, “
CTF-R: A Novel Residual-Based Thermal Hydraulic Solver
,”
Nucl. Eng. Des.
,
348
, pp.
37
45
.10.1016/j.nucengdes.2019.04.006
10.
Roy
,
C. J.
,
Nelson
,
C.
,
Smith
,
T.
, and
Ober
,
C.
,
2004
, “
Verification of Euler/Navier–Stokes Codes Using the Method of Manufactured Solutions
,”
Int. J. Numer. Methods Fluids
,
44
(
6
), pp.
599
620
.10.1002/fld.660
11.
Eça
,
L.
,
Klaij
,
C. M.
,
Vaz
,
G.
,
Hoekstra
,
M.
, and
Pereira
,
F. S.
,
2016
, “
On Code Verification of RANS Solvers
,”
J. Comput. Phys.
,
310
, pp.
418
439
.10.1016/j.jcp.2016.01.002
12.
Krueger
,
A. M.
,
Mousseau
,
V. A.
, and
Hassan
,
Y. A.
,
2019
, “
Rigorous Code Verification: An Additional Tool to Use With the Method of Manufactured Solutions
,”
ASME
Paper No. VVS2019-5166.10.1115/VVS2019-5166
13.
Warming
,
R.
, and
Hyett
,
B.
,
1974
, “
The Modified Equation Approach to the Stability and Accuracy Analysis of Finite Difference Methods
,”
J. Comput. Phys.
,
14
(
2
), pp.
159
179
.10.1016/0021-9991(74)90011-4
14.
Krueger
,
A. M.
,
2020
, “
Importance of Code and Solution Verification in Credible Simulations
,” Ph.D. thesis,
Texas A&M University
,
College Station, TX
.
15.
Roache
,
P. J.
,
2002
, “
Code Verification by the Method of Manufactured Solutions
,”
Trans. Am. Soc. Mech. Eng. J. Fluids Eng.
,
124
(
1
), pp.
4
10
.10.1115/1.1436090
16.
Richardson
,
L. F.
,
1911
, “
The Approximate Arithmetical Solution by Finite Differences of Physical Problems Involving Differential Equations, With an Application to the Stresses in a Masonry Dam
,”
Philos. Trans. R. Soc. London Ser. A
,
210
, pp.
307
357
.10.1098/rsta.1911.0009
17.
Richardson
,
L. F.
, and
J Arthur Gaunt
,
B.
,
1927
, “
VIII. the Deferred Approach to the Limit
,”
Phil. Trans. R. Soc. London A
,
226
(
636–646
), pp.
299
361
.
18.
Hirt
,
C. W.
,
1968
, “
Heuristic Stability Theory for Finite Difference Equations
,”
J. Comput. Phys.
,
2
(
4
), pp.
339
355
.10.1016/0021-9991(68)90041-7
19.
Cyrus
,
N. J.
, and
Fulton
,
R. E.
,
1968
, “
Accuracy Study of Finite Difference Methods
,” National Aeronautics and Space Administration, Washington, DC, Report No. NASA TN D-4372.
20.
Wolfram Research, Inc.
, “Mathematica 8.0,” Wolfram Research, Champaign, IL.
21.
Toro
,
E. F.
,
2001
,
Shock-Capturing Methods for Free-Surface Shallow Flows
,
Wiley
,
New York
.
22.
Toro
,
E. F.
,
2009
,
Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction
, 3rd ed.,
Springer Science & Business Media
,
Berlin Heidelberg
.
23.
Python Software Foundation, 2015, “Python Language Reference
, Version 3.5,” Python Software Foundation, Beaverton, OR, accessed May 2019, https://docs.python.org/3.5/
24.
Mesinger
,
F.
, and
Arakawa
,
A.
,
1976
,
Numerical Methods Used in Atmospheric Models
,
Global Atmospheric Research Programme (GARP)
,
Geneva, Switzerland
.
25.
Patankar
,
S.
,
2018
,
Numerical Heat Transfer and Fluid Flow
,
CRC Press
,
Washington, DC
.
26.
Harlow
,
F. H.
, and
Welch
,
J. E.
,
1965
, “
Numerical Calculation of Time-Dependent Viscous Incompressible Flow of Fluid With Free Surface
,”
Phys. Fluids
,
8
(
12
), pp.
2182
2189
.10.1063/1.1761178
27.
Arakawa
,
A.
, and
Lamb
,
V. R.
,
1977
, “
Computational Design of the Basic Dynamical Processes of the UCLA General Circulation Model
,”
Gen. Circ. Models Atmos.
,
17
(
Suppl. C
), pp.
173
265
.10.1016/B978-0-12-460817-7.50009-4
28.
Ypma
,
T. J.
,
1995
, “
Historical Development of the Newton–Raphson Method
,”
SIAM Rev.
,
37
(
4
), pp.
531
551
.10.1137/1037125
29.
Knoll
,
D. A.
, and
Keyes
,
D. E.
,
2004
, “
Jacobian-Free Newton–Krylov Methods: A Survey of Approaches and Applications
,”
J. Comput. Phys.
,
193
(
2
), pp.
357
397
.10.1016/j.jcp.2003.08.010
You do not currently have access to this content.