This Website is not fully compatible with Internet Explorer.
For a more complete and secure browsing experience please consider using Microsoft Edge, Firefox, or Chrome

## Code Verification Exemplars

### Introduction

The NAFEMS Simulation Governance & Management Working Group (SGMWG) would like to commission a "Code Verification Exemplar" in the field of solid mechanics. The exemplar would demonstrate the methodology for performing rigorous code verification. Although this exemplar would be in the field of solid mechanics, the methodology demonstrated would apply to any field of computational simulation, for example, fluid dynamics, electromagnetics, and structural mechanics.

### Goal of the Completed Exemplar

Rigorous code verification requires that a series of numerical solutions is computed on continually refined meshes so that the observed order of accuracy of the numerical solution can be determined. The most refined meshes must be in the asymptotic convergence region of the numerical solution to the mathematical model of the system of interest. The observed order of accuracy, also referred to as the observed order of convergence, is determined by examining the rate of change of the numerical error of the solution as a function of the mesh size. Mathematically, the observed order of accuracy is the value of the exponent p of the first term in the power series expansion of the numerical error in terms of the mesh size h, i.e., Chp. The observed order of accuracy can be found by plotting the logarithm of the numerical error of each solution as a function of the logarithm of the representative mesh size of each solution. The slope of the straight line in the asymptotic region on this log-log plot is the observed order of accuracy of the numerical solution. An exact solution of the mathematical model must be available so that the numerical error in quantities of interest (QOI), either the local error in the solution domain or the global error over the entire solution domain, can be computed exactly. Typical QOI are the local displacement or strain energy and the total strain energy in the structure. The numerical solution error is a combination of the discretization error within the solution domain of the original mathematical model, the numerical error due to the imposition of boundary conditions and external loading of the original mathematical model, and the numerical error due to integration of the numerical solution.

This procedure for rigorous code verification goes beyond the traditional technique of assessing numerical accuracy used in NAFEMS benchmarks. The traditional technique compares the numerical solution for QOI on a moderately refined mesh with a “target” or “reference” solution. There are two technical difficulties with this traditional approach. First, the finest mesh may not be refined sufficiently to be in the asymptotic convergence region. Second, the target solution may not be sufficiently accurate to assesses the accuracy of the numerical solution. Most importantly, the traditional technique does not determine the observed order of accuracy of the numerical method. The observed order of accuracy is much more sensitive to any shortcoming in any aspect of the numerical solution procedure, e.g., mesh size, numerical error in imposition of the boundary conditions given in the original mathematical model, and numerical error in the imposition of the structural loading given in the original mathematical model. Because of the effectiveness of the observed order of accuracy method for testing software, the SGMWG is seeking the development and documentation of an exemplar using this method. For a detailed discussion of the methodology for determining the observed order of accuracy, see Knupp, P. and K. Salari (2002), Verification of Computer Codes in Computational Science and Engineering, Chapman & Hall/CRC, Boca Raton, Florida, and Oberkampf, W. L. and C. J. Roy (2010), Verification and Validation in Scientific Computing, Cambridge University Press, Cambridge, UK.

### Code Verification Exemplar Formulation and Methodology

The following briefly describes the steps required for formulating and conducting the rigorous code verification exemplar:

1. State the physical problem to be analyzed. The problem should analyze the simple static deflection of a single material metal object, e.g., non-time-dependent, linear material response, homogeneous, with small displacements and no influence of other physical phenomenon, such as heating or contact. The geometry of the object should be 2D or 3D with a simple loading condition. A curved boundary that is not aligned with the analysis coordinate system has the advantage of more rigorous testing of the numerical solution. Some examples to consider are an internally pressurized finite length cylinder, and particularly, a internally pressurized sphere.
2. Clearly state all of the assumptions required for the idealization of the physical problem and the formulation of the mathematical model. The mathematical model should be given by a partial differential or integral equation in two or three dimensional space with clearly stated boundary conditions and loading conditions. The mathematical model should specify the local and global QOI. These QOIs should include displacements, stress/strain components, and force resultants.
3. The solution to the mathematical model must be given by an analytical, closed form, exact solution. The analytical solution should be such that all of the material properties, boundary conditions, loading, etc. are given as input parameters, as opposed to specific numerical values. State the analytical solution to the mathematical model in terms of displacements and stresses for the imposed boundary conditions. The exact solution for all QOI should not be given by an infinite series.
4. Clearly state all numerical approximations that are required to solve the mathematical model using a numerical method. For example, describe the discretization of the problem, types of finite elements used, their shape functions and integration scheme, etc. The mathematical model should be numerically solved using either one of the primary commercially-available software packages, an academically-available solver, or an open-source software package. It is very important that the numerical method and the FEM methods used are easily recognized and duplicable by a wide range of computational analysts who use commercial software packages.
5. Generate a series of structured meshes with various mesh resolutions over the solution domain. The meshes must be closely related in the sense that each finer mesh must be a uniform refinement of the coarser mesh over the entire solution domain. That is, the mesh refinement factor must be the same over the entire solution domain as the mesh is refined. The finest mesh size must be sufficiently refined so that the numerical solution on the finest mesh is within the asymptotic convergence region. Note that highly skewed or distorted mesh elements will make it more difficult to achieve the asymptotic convergence region of the numerical solution.
6. Compute the numerical solution for each QOI on each of the uniformly refined meshes. These solutions should be computed using representative numerical values for input parameters such as Young’s modulus, Poisson’s ratio, geometry, loading, etc. Since numerical integration is usually required to obtain QOI, clearly state the numerical integration procedure and any numerical parameters required for integration.
7. Using the exact analytical solution and the numerical solution on each mesh, compute the numerical error for each QOI on each mesh. These errors can be for local QOI, e.g., local displacement, and they can be errors for global QOI, e.g., total strain energy over the solution domain. For a local QOI, the error measure should be computed over the solution domain using two vector norms, L2 (root mean square) and L (maximum).
8. Plot the numerical error for each QOI for each mesh versus the mesh size on a log-log scale. If the finest meshes are in the asymptotic convergence region, the observed order of convergence can be determined by computing the slope of the line on the log-log plot. If all aspects of the numerical solution procedure are working properly, the observed order of accuracy will match the formal order of accuracy of the numerical method. The formal order of accuracy of a finite element method is also referred to as the degree of the polynomial approximation over each element of the mesh, or simply as p.
9. Discuss the results obtained for the observed order of convergence. If different types of finite elements or different numerical solver options are used, discuss the results for each of these results. If any non-monotonic behavior is observed for the numerical solution procedure, or if the observed order of accuracy does not match the formal order of accuracy of the numerical method, discuss the significance of this behavior. Note that the formal order of accuracy can be different for different QOI. The intent of this exemplar problem is to choose a simple mathematical model with a well behaved analytical and numerical solution such that the observed order of accuracy matches the formal order of accuracy in the asymptotic convergence region.

### Competencies to be Identified by Exemplar

The proposal should identify which competencies from the Verification and Validation Technical of the NAFEMS Professional Simulation Engineer scheme will be addressed by the exemplar problem.

### Documentation of the Exemplar

The main body of the documentation of the exemplar should generally follow the steps outlined above. Note that some of these steps can be combined into major sections of the main body of the documentation, as appropriate. The appendix should give information and procedures that are excessively detailed for the main body of the text, for example, the procedure used to generate the series of uniformly refined meshes and the input and output data files for the software package used to solve the numerical model. The information should be adequately explained and commented so that it is easily understood and reproducible by other computational analysts.

### Cost / Timescale / Expected Length

The total cost is not expected to exceed £2K (GBP), and it is expected that the document will be completed within 6 months from NAFEMS approval. The length of the document is not anticipated to exceed 20 A4 pages.

### Guidance for Proposals

Each proposal should consist of:

• Work plan including milestones and interim deliveries for early review,
• The proposed structure of the final report document with the titles of the sections to be developed,
• Cost,
• The authors' credentials, curriculum vitae, etc. Proposals from single authors and consortia will be considered.

All proposals should be sent to NAFEMS at sgmwg@nafems.org to arrive no later than 1 July 2022. Further details are available from theSGMWG chairman who are contactable using sgmwg@nafems.org.