# HLPW-4: What is Code Verification?

### Code Verification

The verification of code is concerned with whether the code is solving equations correctly and does not consider whether the model has any relationship to the real world. Verification evaluates whether the CFD model (the mathematical and computer code representation of the physical system) is solved correctly.

This is done by ensuring that code, with systematic mesh refinement, results in improved observed order of accuracy. The verification of code provides confidence that the code will converge to the right solution at the proper rate. The verification process traditionally compares computational solutions to the “correct answer,” which is provided by highly accurate solutions for the test problem, in order to quantify numerical solution error. The resulting confidence is the knowledge that computational error is acceptably small on the set of tests.

Verification can be divided into two types: code verification and solution verification. The five major sources of errors in CFD solutions are spatial discretisation error, temporal discretisation error, iterative error, computer round-off error and computer programming errors. The first four errors are referred to as solution verification, whereas programming errors can be referred to as code verification. Solution verification ensures that the numerical error in a given computational solution are reduced sufficiently to meet the required level of accuracy. One of the most significant and widely recognised sources of solution verification error is discretisation error which is caused by poor mesh resolution. Both code and solution verification are needed before the validation process.