Code verification for finite volume multiphase scalar equations using the method of manufactured solutions
Code verification answers the question: “Is this code solving the equations correctly?” Validation answers the question: “Is this code solving the correct equations?” Code verification must be performed before attempting validation and is the focus of this paper. Here we present a novel method of applying the method of manufactured solutions (MMS) to finite volume multiphase codes. MMS is a procedure for generating analytic source terms and adding them to the governing equations such that the numerical solution converges to a previously determined analytic (manufactured) solution. This is a powerful method for generating exact benchmark solutions which can test the most general capabilities of a code. We present a series of manufactured solutions (MS) ranging from single-phase to multiphase flows to test all aspects of an example code. The chief obstacle to applying MMS to multiphase flow lies in the discontinuous nature of the material properties at the interface. An extension of the MMS procedure to multiphase flow is presented here using an adaptive marching tetrahedron style algorithm to compute the source terms near the interface. We also present guidelines for the use of the MMS to help locate coding mistakes (i.e. bugs). This is accomplished by the use of progressively simpler MS and material property variations.