Fluid Dynamics Model Verification Tests
This notebook contains tests that verify that the fluid dynamics partial differential equations (PDE) model works as expected. To run all tests, SelectAll and press Shift+Enter. The results will then be in the section Test Result Inspection.
Note that these tests can also serve as a basis for developing your own fluid dynamics models. As such, the tests are grouped into stationary (time-independent) and transient (time-dependent) tests. In both categories, both Cartesian and axisymmetric test models can be found.
In each test case, the visualization section is there to provide post-processing results for inspection; however, it is not a necessary part of the test. In the interest of saving runtime and reducing memory consumption, the cells in the visualization section are set to not be evaluatable. To make these cells evaluatable, select the cells in question, choose Cell ▶ Cell Properties and make sure "Evaluatable" is ticked.
The fluid dynamics equations are used to solve for the velocity field and pressure in a fluid flow model. Please refer to the information provided in "Laminar Flow" for more general theoretical background for fluid flow analysis, as this monograph assumes basic knowledge of fluid dynamics.
Stationary Tests
This section contains examples of stationary, which means non-time-dependent, fluid dynamics PDE models for the validation.
2D
This section contains examples of a 2D stationary fluid dynamics PDE model.
FluidDynamics-FEM-Stationary-2D-FluidDynamics-0001
The following test demonstrates a 2D stationary flow around a cylinder. The simulation domain is a rectangular region with a width of and a height of
and a cylinder of radius
located at a point
. Notice that the
-coordinate position of cylinder center is slightly below the center of the height of the domain. This is done on purpose to prevent symmetry of the domain.
The flow inside the region is driven by prescribed parabolic inflow on the left side of the domain. The other boundary conditions are no-slip boundary condition on the top and bottom and no traction boundary condition on the right hand side.
[1] https://wwwold.mathematik.tu-dortmund.de/~featflow/en/benchmarks/cfdbenchmarking/flow/dfg_benchmark1_re20.html (last accessed: May 22th, 2025)
This test compares the pressure in front of the circle at point with the pressure at the back of the circle at point
.
This test computes the drag acting on the circle. The drag can be computed as the first component of the traction
where is the Cauchy stress tensor,
is the outward boundary unit normal and the integral is over the boundary of the circle. The resulting number is then scaled to obtain dimensionless drag.
Note the minus in this expression. The represents an outward unit boundary normal vector. However, this verification test requires an outward unit boundary normal vector to the cylinder in the domain; therefore, the vector
now points in the opposite direction and the minus sign is necessary.
This test computes the lift acting on the circle. The lift can be computed as the second component of the traction
where is the Cauchy stress tensor,
is the outward boundary unit normal and the integral is over the boundary of the circle. The resulting number is then scaled to obtain dimensionless lift.
The following cells are marked as not evaluatable to save the runtime and memory consumed. To make these cells evaluatable, select the cells in question, choose Cell ▶ Cell Properties and make sure "Evaluatable" is ticked.
FluidDynamics-FEM-Stationary-2D-FluidDynamics-0002
The following test demonstrates a 2D stationary flow in a lid driven cavity. The domain is a unit rectangle filled with fluid. On the top there is a mechanism that drives the fluid with a fixed flow velocity in the positive direction. The remaining sides are walls and have a no-slip condition.
This test considers a non-Newtonian power-law fluid with various values of parameters. The equations for the power-law fluid can be found in the Laminar Flow monograph. The power-law exponent and a dimensionless Reynolds-like number are used as parameters for the flow. These parameters are varied to obtain different behavior of the fluid. The Reynolds-like number is defined as
where is mass density,
is characteristic length,
is power-law viscosity,
is reference velocity and
is power-law exponent. In the case of this test, the characteristic length and reference velocity are both equal to
. The power-law viscosity is also set to
. This means that the value of the Reynolds-like number is equal to the value of the mass density.
[2] P. Neofytou. A 3rd order upwind finite volume method for generalised Newtonian fluid flows. Advances in Engineering Software, vol. 36, issue 10: pp. 664-680 (2005).
The ExtrapolationHandler is necessary due to the usage of NMaxValue in the tests.
This test computes and verify the dimensionless maximum of the wall shear stress at the bottom part of the boundary. The wall shear stress is the tangent part of the traction; however, in this simple domain it is equal to the shear rate. Note that the wall shear stress is sensitive to mesh refinement and a fine mesh is used.
The precise definition of the wall shear for more general domains can be found in the Blood Flow Modeling in Cerebral Aneurysm application example.
The following cells are marked as not evaluatable to save the runtime and memory consumed. To make these cells evaluatable, select the cells in question, choose Cell ▶ Cell Properties and make sure "Evaluatable" is ticked.
2D Axisymmetric
This section contains examples of a 2D stationary axisymmetric fluid dynamics PDE model.
FluidDynamics-FEM-Stationary-2D-Axisymmetric-FluidDynamics-0001
The following test case considers an axisymmetric flow in a cylindrical pipe driven by a pressure gradient. The model domain is reduced from cylinder to rectangle thanks to the assumed symmetry. The resulting flow is then compared to the exact solution.
Since the exact solution for the problem is knows, all parameters in this test such can be chosen arbitrarily.
[3] M. O. Deville. An Introduction to the Mechanics of Incompressible Fluids, Chapter 3. Springer (2022).
The "ExtrapolationHandler" is necessary due to the usage of NMaxValue in one of the tests. NMaxValue may evaluate the function outside of it's domain. To allow for that and to avoid possible messages the "ExtrapolationHandler" is specified.
The derivative of the pressure with respect to must be equal to
.
The flow has to have parabolic profile all along the domain.
The maximum velocity of the flow has to match the maximum velocity of the exact solution.
This test verifies that the shear stress acting on the wall matches the shear stress of the exact solution.
Transient Tests
This section contains examples of transient, which means time-dependent, fluid dynamics PDE models for the validation.
2D Axisymmetric
This section contains examples of a transient axisymmetric fluid dynamics PDE model.
FluidDynamics-FEM-Transient-2D-Axisymmetric-FluidDynamics-0001
The following test case considers an axisymmetric flow in a cylindrical pipe driven by a pressure gradient. The model domain is reduced from cylinder to rectangle thanks to the assumed symmetry. The resulting flow is then compared to the exact solution.
Since the exact solution for the problem is knows, all parameters in this test such can be chosen arbitrarily.
[4] M. O. Deville. An Introduction to the Mechanics of Incompressible Fluids, Chapter 3. Springer (2022).
This test verifies that the solution has a constant pressure gradient at the time .
This test compares the computed flow profile with the profile of the exact solution. Unlike in the stationary case, in the transient case the exact profile involves an infinite series. This means that an approximation using a truncated sum has to be used. This is most problematic for small times as the profile converges to the parabolic profile of the stationary case for time going to infinity. For example, the approximated exact profile does not satisfy the initial condition. As a result, this test is less accurate than other tests.
3D
This section contains examples of a 3D transient fluid dynamics PDE model.
FluidDynamics-FEM-Transient-3D-FluidDynamics-0001
This test computes a flow inside a cube. An exact solution is used as the initial and boundary conditions. The resulting flow is then compared to the exact solution.
Since the exact solution for the problem is known, most parameters in this test can be chosen arbitrarily. The only exception is the Reynolds number. This is due to the fact that the exact solution derived in the reference article uses a different dimensionless form of the Navier-Stokes equations. This form is equivalent to one implemented in the Wolfram Language only for Reynolds number equal to 1.
[5] C. R. Ethier and D. A. Steinman. Exact fully 3D Navier-Stokes solutions for benchmarking. International Journal for Numerical Methods in Fluids, vol. 19: pp. 369-375 (1994).
The solution defined in the previous cell contains two parameters which have to be specified for numerical computations.
The boundary conditions are based on the exact solution.
The exact solution is also used as the initial condition.
This test verifies that the solution is identical to the exact solution.
The following cells are marked as not evaluatable to save the runtime and memory consumed. To make these cells evaluatable, select the cells in question, choose Cell ▶ Cell Properties and make sure "Evaluatable" is ticked.
Test Result Inspection
This section contains the evaluation of the test runs. It works by collecting all instances of TestResultObject and generating a TestReport.
If the preceding table is empty, all tests succeeded.
References
1. https://wwwold.mathematik.tu-dortmund.de/~featflow/en/benchmarks/cfdbenchmarking/flow/dfg_benchmark1_re20.html (last accessed: May 22th, 2025)
2. P. Neofytou. A 3rd order upwind finite volume method for generalised Newtonian fluid flows. Advances in Engineering Software, vol. 36, issue 10: pp. 664-680 (2005).
3. M. O. Deville. An Introduction to the Mechanics of Incompressible Fluids, Chapter 3. Springer (2022).
4. C. R. Ethier and D. A. Steinman. Exact fully 3D Navier-Stokes solutions for benchmarking. International Journal for Numerical Methods in Fluids, vol. 19: pp. 369-375 (1994).