Code Verification of Multiphase Flow with MFIX A N I R U D D H A C H O U D H A R Y ( A N I R U D D @ V T. E D U ), C H R I S T O P H E R J. ROY ( C J R O Y @ V T. E D U ), ( V I R G I N I A T E C H ) 23 R D M A Y 2 0 1 3
Outline Overview Code Verification Method of Manufactured Solutions (MMS) MFIX Code Governing Equations Past Work/ Challenges Results 2D, 3D, steady-state, single-phase verification Unsteady verification (time-dependent MS) Two-phase baseline verification Summary and Future Work 2
Code Verification 3 Verification addresses the correctness of the computer code and accuracy of the numerical solution to a selected model Code verification assesses whether the algorithm has been accurately implemented in the software and the numerical algorithm is consistent/ convergent Order of accuracy test: whether observed order of accuracy of the numerical computations matches the formal order of accuracy in the asymptotic range Observed order of accuracy is the order at which the discretization error of the numerical solution reduces over a set of systematically refined grids Formal order of accuracy is usually determined by the term with the lowest order in the truncation error expression
Method of Manufactured Solutions (MMS) (Roache and Steinberg, 1984) A manufactured solution (MS) is an assumed solution based on which a modified set of governing equations and BCs are found for code verification 4 Selection of manufactured solutions: Smooth, analytical functions with smooth derivatives Non-zero derivatives (including the cross-derivatives, if present) Relative magnitude of terms should be of the same order Realizable solutions (e.g., no negative temperature, density) Advantages: Sensitivity to coding errors, Verification of most coding options, Coupled and nonlinear equations, Applicable to FDM, FEM and FVM codes Disadvantages: Code-intrusive, Presupposes smooth solutions, Cannot detect mistakes affecting robustness of the code
Method of Manufactured Solutions (MMS) Steps in performing order of accuracy test using MMS Select appropriate manufactured solution (MS) Obtain analytical source terms Obtain the modified governing equations (original + source terms) Solve the modified governing equations on multiple meshes Obtain global DE norms for different mesh levels Perform the order of accuracy test 5 For evaluation of global DE norms, different norm definitions (L 1, L 2, L ) can be used If the observed order does not match the formal order, local discretization error can be studied in order to help isolate coding or implementation mistakes
Multiphase Flow with Interphase exchanges (MFIX) 6 An open source code to simulate chemical reactions and heat transfer for fluids with multiple solid phase components (typical of energy conversion and chemical reactor processes) Features of regular MFIX: Finite-volume Eulerian-Eulerian framework Based upon two-fluid model (Ishii, 1974) Fluid-solids coupling via interphase exchange terms (i.e., drag models, kinetic theory, frictional stress models) Staggered-grid approach First-order/ second-order, spatial and temporal discretization schemes SIMPLE-based algorithm using a pressure-projection method
Gas continuity: Solids continuity: (for solid phases m = 1, M) Gas momentum: Solids momentum: Governing Equations Others: gas and solids energy equations, gas and solids species equations, granular temperature equations for solid phases Constitutive equations, drag models, kinetic theory models, frictional stress models 7 t ε gρ g + N g ε x g ρ g U gi = R gn i n=1 t ε m ρ m + N m ε x m ρ m U mi = R mn i t ε gρ g U gi + x j = ε g x i t ε m ρ m U mi + x j = ε m x i ε g ρ g U gj U gi n=1 P g + M τ x gij I gmi j ε m ρ m U mj U mi m=1 mass transfer due to chemical reactions (not investigated) P g + M τ x mij + I gmi I kmi j + f gi + ε g ρ g g i k=1 + ε m ρ m g i
Challenges/ Past Work Challenges: Multiphase equations with interphase coupling terms, system of coupled non-linear equations, divergence-free condition for incompressible carrier phase, staggered mesh Shunn and Ham (2007) used MMS to verify an unstructured variable density flow solver for a miscible two-fluid system Various studies on MMS-based code verification for multiphase scalar equations (e.g., temperature solver) with discontinuous material properties [Roache et al. (1990), Crockett et al. (2011), Brady et al. (2012)] Vedovoto et al. (2011) used MS mimicking the corrugated flame front, for verification of a pressure-based finite-volume numerical scheme Eça et al. (2007) developed MS for 2D/ 3D, steady, wall-bounded, incompressible, turbulent flow 8
2D Rectangular Channel Case 9 2D, Laminar, steady-state, Navier-Stokes equations (Poiseulle flow) 2 nd order linear ODE, directly solvable for y h Single gas species, Cyclic (periodic) BC along x-direction, 2 nd order discretization x Gov. Equation: Observed order (L2 Norms) U-velocity Exact Solution:
2D, Steady-state, Single-phase, Flow Simple divergence-free manufactured solution (Vedovoto et al., 2011) u = Sin 2π x + y 2 v = Cos 2π x + y 2 p = Cos 2π x + y 10 Velocity streamlines, Pressure contours Observed order, Superbee Observed order, Central Scheme Uncovered issues with: (a) Superbee discretization at the West, South, Bottom boundaries, (b) evolution of cross-terms of the strain-rate tensor within steadystate sub-iterations (though not significantly affecting unsteady simulations)
3D, Steady-state, Single-phase, Flow (Curl-based General Manufactured Solutions) Where, (e.g.) Define: F = φ u x, y, z, φ v x, y, z, φ w x, y, z φ u = u 0 + u x Sin a ux πx L x + u xy Cos a uxy πxy L x L y Hence, V = F is always a divergence-free velocity field 11 + u y Cos a uy πy L y + u yz Sin a uyz πyz L y L z + u z Cos a uz πz L z + u zx Cos a uzx πxz L x L z U-velocity MS V-velocity MS W-velocity MS
Pressure MS <- 3D, Steady-state, Single-phase, Flow Curl-based General Manufactured Solutions 12 Observed order (L2 Norms), Central scheme Observed order (Linf Norms), Central scheme Pressure errors 3D Stretched Mesh Some errors in pressure solution for stretched meshes (other quantities still 2 nd order accurate) (under investigation)
Temporal Order Verification 13 Unsteady equations solved for multiple gridlevels and time-steps using time-dependent manufactured solutions to obtain observed spatial and temporal orders, p and q in Temporal observed order for formally 1 st order time-stepping h ε t hx = g x h p q x + g t h t Grid-levels and time-steps determined such that the combined spatial-temporal refinements lead to spatial and temporal errors of similar order of magnitude (Refer Veluri and Roy, 2012, Oberkampf and Roy, 2011) Euler-Implicit time-stepping verified 1 st order accurate (more popular with MFIX users) Spatial observed order for formally 2 nd order spatial scheme Crank-Nicolson time-stepping failed verification test (under investigation)
2D, Two-Phase, Baseline Equations 14 Only solids and gas momentum equations considered (volume fractions, ε g, ε m, and densities, ρ g, ρ m, assumed constant) Gas velocity field: curl-based Solids velocity field: sinusoidal Drag coupling and solid stress constitutive relations ignored Gas velocity streamlines, Gas pressure contours Solid velocity streamlines, Gas pressure contours
15 Observed order (L2 Norms), Superbee Observed order (L2 Norms), Central Observed order (Linf Norms), Superbee Observed order (Linf Norms), Central Solids momentum equations verified to be 2 nd order accurate (for Central scheme) without any fluid-solids coupling
Summary and Future Work 16 Different parts of code verified: Discretization of momentum, pressure-correction equations, for 2D/3D, uniform/stretched, steady/unsteady, single-phase, incompressible, constant viscosity flows Discretization of 2D, steady-state, solids momentum equation with constant density, constant viscosity, constant volume fraction, and without drag coupling or viscosity relations Possible issues identified: Issues with Superbee at the W,S,B boundaries, evolution of cross-terms of the strain-rate tensor (for steady-state runs only), viscosity specification at the ghost cells (possibly only an issue for MMS cases), issues with Crank-Nicolson timestepping Challenges and work ahead: Verification of baseline 3D, two-phase, governing equations with variable volume fraction, variable density (mild-compressibility option), energy and temperature equations Boundary conditions and turbulence models Drag models and constitutive relations (mostly algebraic models) via unit-testing
Acknowledgements Thanks to the MFIX team we are collaborating with for their consistent help and helpful comments during this study: Mehrdad Shahnam Jeff Dietiker Rahul Garg Tingwen Li Aytekin Gel This work was supported by the National Energy Technology Laboratory (NETL) through URS Corp. under contract T034:4000.3.671.238.003.413. Questions?