The Method of Manufactured Solutions for Code Verification

Author(s):  
Patrick J. Roache
Author(s):  
João Muralha ◽  
Luís Eça ◽  
Christiaan M. Klaij

Abstract Although most flows in maritime applications can be modeled as incompressible, for certain phenomena like sloshing, slamming, and cavitation, this approximation falls short. For these events, it is necessary to consider compressibility effects. This paper presents the first step toward a solver for multiphase compressible flows: a single-phase compressible flow solver for perfect gases. The main purpose of this work is code verification of the solver using the method of manufactured solutions. For the sake of completeness, the governing equations are described in detail including the changes to the SIMPLE algorithm used in the incompressible flow solver to ensure mass conservation and pressure–velocity–density coupling. A manufactured solution for laminar subsonic flow was therefore designed. With properly defined boundary conditions, the observed order of grid convergence matches the formal order, so it can be concluded that the flow solver is free of coding mistakes, to the extent tested by the method of manufactured solutions. The performance of the pressure-based SIMPLE solver is quantified by reporting iteration counts for all grids. Furthermore, the use of pressure–weighted interpolation (PWI), also known as Rhie–Chow interpolation, to avoid spurious pressure oscillations in incompressible flow, though not strictly necessary for compressible flow, does show some benefits in the low Mach number range.


2019 ◽  
Vol 116 ◽  
pp. 103178 ◽  
Author(s):  
Arman Khoshghalb ◽  
Omid Ghaffaripour ◽  
Kaveh Zamani ◽  
Arash Tootoonchi

Author(s):  
Aaron M. Krueger ◽  
Vincent A. Mousseau ◽  
Yassin A. Hassan

Abstract The Method of Manufactured Solutions (MMS) has proven to be useful for completing code verification studies. MMS allows the code developer to verify that the observed order-of-accuracy matches the theoretical order-of accuracy. Even though the solution to the partial differential equation is not intuitive, it provides an exact solution to a problem that most likely could not be solved analytically. The code developer can then use the exact solution as a debugging tool. While the order-of-accuracy test has been historically treated as the most rigorous of all code verification methods, it fails to indicate code “bugs” that are of the same order as the theoretical order-of-accuracy. The only way to test for these types of code bugs is to verify that the theoretical local truncation error for a particular grid matches the difference between the manufactured solution (MS) and the solution on that grid. The theoretical local truncation error can be computed by using the modified equation analysis (MEA) with the MS and its analytic derivatives, which we call modified equation analysis method of manufactured solutions (MEAMMS). In addition to describing the MEAMMS process, this study shows the results of completing a code verification study on a conservation of mass code. The code was able to compute the leading truncation error term as well as additional higher-order terms. When the code verification process was complete, not only did the observed order-of-accuracy match the theoretical order-of-accuracy for all numerical schemes implemented in the code, but it was also able to cancel the discretization error to within roundoff error for a 64-bit system.


2016 ◽  
Vol 80 ◽  
pp. 150-163 ◽  
Author(s):  
Aniruddha Choudhary ◽  
Christopher J. Roy ◽  
Jean-François Dietiker ◽  
Mehrdad Shahnam ◽  
Rahul Garg ◽  
...  

Sign in / Sign up

Export Citation Format

Share Document