Conservation vs Non-Conservation Form in CFD, With Worked Examples
Conservation and non-conservation forms of the CFD governing equations: how each is derived, how to convert between them, and three worked examples (a Mach 2 shock, Burgers' equation and the MacCormack nozzle) showing why solvers use the conservation form.

The conservation and non-conservation forms of the CFD governing equations describe the same physics: conservation of mass, momentum and energy. They differ in how the equations are written. The conservation form puts every flux inside the divergence operator, . The non-conservation form expands it using the material derivative, . On paper they are equivalent. On a computer they are not. A scheme built on the conservation form moves shocks at the right speed and keeps mass flow constant through a duct. A scheme built on the non-conservation form can converge to a wrong answer. This guide derives both forms, then shows the difference with three worked examples you can rerun.
Key takeaways (numbers computed by Skill-Lync's verification script, 22 Nov 2026)
- Across a Mach 2 normal shock in air, density jumps by 2.667 times, pressure by 4.5 times and velocity falls to 0.375 of its upstream value. The mass flux , momentum flux and total enthalpy are the same on both sides. That is why codes solve for fluxes.
- In Burgers' equation with , a conservative upwind scheme moves the shock to x = 1.000 at t = 1 (exact 1.000). The non-conservative version of the same scheme leaves it at x = 0.500, and a finer grid does not fix it.
- In the classic quasi-1D nozzle solved by MacCormack's method on 31 nodes, mass flow varies by 0.0117 along the nozzle in non-conservation form and by 0.0019 in conservation form, about 6 times less. The ratio stays about 6 on 61 and 121 nodes.
- Theory backs this up: Lax and Wendroff (1960) proved that a convergent conservative scheme converges to a weak solution with correct shocks. Hou and LeFloch (1994) showed that non-conservative schemes generally do not.
- Production solvers such as SU2 and OpenFOAM use the conservation form, as the finite volume method naturally does.
What is the conservation form of the governing equations?
An equation is in conservation form when every spatial derivative is the divergence of a flux. A flux is something like mass, momentum or energy crossing a surface per unit area per unit time. The time derivative acts on a conserved quantity per unit volume, such as , or . Nothing sits outside the derivatives as a multiplier.
For continuity, the conservation form is:
Here is the mass flux in kg/(m²·s). Read it as a balance: the rate at which mass builds up in a fixed box equals the net mass flowing in through its faces. In one dimension, the compressible Euler equations (inviscid flow, mass, momentum and energy) have the compact vector form that most CFD textbooks and codes start from:
holds the conserved variables. holds their fluxes. is the total energy per unit mass. SU2's theory documentation writes its compressible Navier-Stokes equations in exactly this structure, with the conservative variables as the working variables.
What is the non-conservation form?
The non-conservation form uses the material (substantial) derivative, . That is the rate of change you would measure while riding along with a fluid particle. For continuity:
Two features give it away. First, the time derivative follows the fluid instead of sitting at a fixed point. Second, sits outside the divergence as a multiplier. The unknowns are the primitive variables (, , or ), the quantities you would measure with a probe. The x-momentum equation for inviscid flow shows the same pattern. In non-conservation form:
and in conservation form:
If you want the material derivative itself explained with a number, try our solved GATE question on a temperature probe drifting with the flow.
Where do the two forms come from?
They come from where you place the control volume. A volume fixed in space gives the conservation form. A volume that moves with the fluid gives the non-conservation form. Each can be a finite volume, which gives integral equations, or a small element, which gives partial differential equations. That makes four flow models in total. John D. Anderson's textbook Computational Fluid Dynamics: The Basics with Applications organises its derivations the same way.
Old notes sometimes say "Eulerian gives conservation, Lagrangian gives non-conservation". That is a useful shorthand, but the precise statement is about the control volume. Both forms are written in Eulerian field variables, , and the material derivative is just the Lagrangian rate expressed with Eulerian fields. Chapter 3 of our free Fluid Mechanics book derives continuity on a fixed element step by step.
How do you convert one form into the other?
You use the product rule for the divergence: . Substituting it into the conservation form regroups the terms into a material derivative:
The momentum equation converts the same way. Expand , and the terms multiplied by form the continuity equation, which is zero. What remains is .
The catch is hidden in that product rule. It assumes and are differentiable. At a shock wave they jump, so the expanded form no longer means the same thing. The conservation form still holds there in its integral (weak) sense. This one line of calculus is the reason the two forms behave differently in a solver. The GATE question on finding a missing velocity component uses the smooth-flow version.
Why do the fluxes stay constant across a shock?
Because a shock is thin and steady in its own frame, nothing can accumulate inside it. Mass, momentum and energy flowing in must flow out. So the fluxes , and are equal on both sides, while density, velocity, pressure and temperature jump. These equalities are the Rankine-Hugoniot conditions.
Worked example 1: a Mach 2 normal shock. Take sea-level air: = 101,325 Pa, = 288.15 K, = 1.4, R = 287.05 J/(kg·K). Then = 1.2250 kg/m³, the speed of sound is 340.29 m/s and = 680.58 m/s. The normal shock relations (tabulated in NACA Report 1135) give:
| Quantity | Before (1) | After (2) | 2 ÷ 1 |
|---|---|---|---|
| Density (kg/m³) | 1.2250 | 3.2667 | 2.6667 |
| Velocity (m/s) | 680.58 | 255.22 | 0.375 |
| Pressure (Pa) | 101,325 | 455,962 | 4.5 |
| Temperature (K) | 288.15 | 486.25 | 1.6875 |
| Mass flux (kg/m²·s) | 833.72 | 833.72 | 1 |
| Momentum flux (Pa) | 668,745 | 668,745 | 1 |
| Total enthalpy (J/kg) | 521,095 | 521,095 | 1 |
Our script finds state 2 twice: once from the closed-form relations, and once by solving the three flux equalities directly with a root finder. The two answers agree to 10 significant figures. The downstream Mach number is 0.5774.
A scheme that updates , and by adding and subtracting face fluxes works with smooth, continuous quantities even at the shock. A scheme that differentiates , and directly must take derivatives of a step. To see the full set of shock relations, use our shock tube calculator. Unit 9 of the Fluid Mechanics book derives them.
Does the non-conservation form give wrong answers?
For smooth flow, no: both forms converge to the same solution as the grid is refined. With shocks, yes, it can. Lax and Wendroff proved in 1960 that if a conservative scheme converges, it converges to a weak solution, so the shock sits where the jump conditions put it. Hou and LeFloch showed in 1994 that non-conservative schemes generally converge to the solution of a different equation, so their shocks move at the wrong speed.
Worked example 2: Burgers' equation. Inviscid Burgers' equation, , is the simplest equation that forms shocks. Start with for and to the right. The exact shock speed from the jump condition is . We solve it on with a first-order upwind scheme at Courant number 0.5, written two ways:
Conservative (difference of fluxes):
Non-conservative (velocity times a velocity difference):
The two schemes have the same stencil and give the same answer wherever is smooth. Here is where each puts the shock (its x position) at t = 1:
| Case | Cells | Exact | Cons. | Non-cons. |
|---|---|---|---|---|
| 200 | 1.000 | 1.000 | 0.500 | |
| 1,600 | 1.000 | 1.000 | 0.500 | |
| 200 | 1.125 | 1.125 | 1.0082 | |
| 1,600 | 1.125 | 1.125 | 1.0125 |
With , the non-conservative update in the first cell right of the shock is at every step, so the shock never moves. With , it moves at about 0.51 (x = 1.0125 at t = 1, so (1.0125 - 0.5)/1) instead of 0.625. Refining the grid eight times barely changes that. This is the failure mode Hou and LeFloch analysed: the scheme is consistent with the PDE but converges to the wrong shock.
Worked example 3: the quasi-1D nozzle in both forms
The subsonic-supersonic nozzle from Anderson's textbook is the standard exercise for comparing the forms. It is also a weekly challenge in Skill-Lync's CFD programme. The area is for , with the throat at x = 1.5. The set-up uses non-dimensional variables, = 1.4, 31 grid points, Courant number 0.5 and MacCormack's predictor-corrector scheme. In conservation form the unknowns are
Here is the mass flow itself. We ran both forms to a steady state (5,000 time steps) and compared them with the exact isentropic solution, where the mass flow is = 0.5787.
| 31 nodes | Exact | Non-cons. | Cons. |
|---|---|---|---|
| Throat density | 0.6339 | 0.6385 | 0.6666 |
| Throat temperature | 0.8333 | 0.8364 | 0.8476 |
| Throat Mach number | 1.0000 | 0.9994 | 0.9534 |
| Exit Mach number | 3.3590 | 3.3532 | 3.3791 |
| Mass-flow spread (max − min) | 0 | 0.0117 | 0.0019 |
| Worst mass-flow error | 0 | 2.86% | 1.25% |
This is the honest trade-off. The conservation form keeps the conserved quantity, mass flow, nearly constant. On this coarse grid, the non-conservation form gives more accurate primitive variables at the throat. The reason is that the conservation form solves for and then decodes from them, which adds error on a coarse grid. Both improve when you refine:
| Nodes | Throat M, non-cons. | Throat M, cons. | Spread, non-cons. | Spread, cons. | Ratio |
|---|---|---|---|---|---|
| 31 | 0.9994 | 0.9534 | 0.0117 | 0.0019 | 6.1 |
| 61 | 0.9998 | 0.9933 | 0.0030 | 0.0005 | 6.3 |
| 121 | 1.0000 | 0.9986 | 0.0008 | 0.0001 | 6.5 |
If you are doing this challenge, compare your numbers with these and with the exact area-Mach relation. Our converging-diverging nozzle calculator gives the exact solution, and a learner's write-up of the same comparison is in Skill-Lync's student projects. A common bug is treating the inlet in conservation form: fix and , extrapolate , and rebuild from them.
Conservation vs non-conservation form: side-by-side comparison
| Point | Conservation form | Non-conservation form |
|---|---|---|
| Control volume | Fixed in space | Moves with the fluid |
| Time derivative | Local, of | Material, of |
| Unknowns solved for | Conserved variables (flux variables) | Primitive variables |
| Shocks (shock capturing) | Correct jump and speed (Lax-Wendroff theorem) | Can converge to the wrong shock |
| Mass flow in a duct | Nearly constant, even on coarse grids | Wanders more on coarse grids |
| Primitive variables on a coarse grid | Need decoding, can be less accurate | Direct, often more accurate |
| Coding effort | Extra step to decode | Simpler to write |
| Typical use | Finite volume codes, compressible flow | Hand derivations, shock fitting, smooth flows |
Which form do Ansys Fluent, OpenFOAM and SU2 use?
They use the conservation form, in its integral finite-volume version. SU2's documentation writes the compressible Navier-Stokes equations as , with conservative variables as the working variables. OpenFOAM's finite volume method turns divergence terms into sums of face fluxes using Gauss's theorem. Ansys Fluent is also a finite-volume solver. Because each face flux leaves one cell and enters its neighbour, whatever leaves one cell arrives in the next, and the scheme conserves mass, momentum and energy by construction.
In OpenFOAM this shows up in fvSchemes. An entry such as div(phi,U) Gauss linearUpwind grad(U); tells the solver to integrate the convection term over cell faces, where phi is the face flux. So even when you are not writing a solver, choosing settings in these codes means choosing how fluxes are interpolated in a conservative scheme. For how the finite volume, finite difference and finite element methods discretise these equations, see our post on discretization methods in CFD.
What are shock capturing and shock fitting?
Shock capturing lets shocks form anywhere in the grid as steep but smooth gradients, with no special treatment. It needs the conservation form to get the jump right. Shock fitting treats the shock as a sharp internal boundary: you place it explicitly and connect the two sides with the Rankine-Hugoniot relations. Shock fitting can use the non-conservation form between shocks, because the solver never differentiates across one.
Almost all general-purpose codes use shock capturing, because in complex 3D flows you rarely know in advance how many shocks there are or where. Shock fitting survives in specialised work, such as blunt-body and nozzle studies, where one dominant shock's position is known. The GATE question on a normal shock in a nozzle is shock fitting by hand: you place the shock and apply the jump relations.
When is it fine to use the non-conservation form?
Use it when the flow has no discontinuities: incompressible flow, subsonic compressible flow, heat conduction, and smooth boundary layers. In those cases both forms converge to the same solution, and the non-conservation form is often easier to derive, linearise and code. It is also how many textbook derivations and stability analyses are written. Switch to the conservation form as soon as shocks, contact surfaces or strong gradients can appear, or when you need exact mass balance, such as for combustion, multiphase or species transport.
How do you learn to write CFD solvers?
Write the three examples above yourself: Burgers' equation in both forms, the normal shock check and the MacCormack nozzle. They take a few hundred lines of Python or MATLAB and teach more than reading derivations. Skill-Lync's Introduction to CFD using MATLAB and OpenFOAM covers these exercises. For solver development as a career skill, see the Master's in CFD solver development, or the full PG Program in CFD if you want industry tools as well. Not sure which fits your background? Talk to a Skill-Lync counsellor. If you are still getting the basics in place, start with the fundamentals of CFD, worked by hand.
Frequently asked questions
Are the conservation and non-conservation forms mathematically equivalent?
For smooth flows, yes. The product rule turns one into the other, and both express conservation of mass, momentum and energy. At a shock the variables are discontinuous, the product rule no longer applies, and only the conservation form, read in its integral or weak sense, still gives the correct jump.
Why is the conservation form preferred in CFD?
Because a discretised conservation form adds and subtracts face fluxes. Whatever leaves one cell enters its neighbour, so mass, momentum and energy are conserved on any grid. By the Lax-Wendroff theorem (1960), a convergent conservative scheme also captures shocks at the correct position and speed. Non-conservative schemes can converge to wrong shocks.
What are flux variables and primitive variables?
Primitive variables are what a probe measures: density, velocity, pressure and temperature. Conserved (flux) variables are density, momentum per unit volume and total energy per unit volume , whose fluxes are , and . Conservation-form solvers march the conserved variables and decode the primitives from them.
Is the Navier-Stokes equation in conservation form?
It can be written either way. Textbooks often derive the momentum equation as , which is non-conservation form. Compressible solvers such as SU2 write it in conservation form, , with convective and viscous fluxes inside the divergence.
Which form is used in the finite volume method?
The integral conservation form. The finite volume method applies conservation to each fixed cell: the rate of change inside equals the sum of fluxes through its faces. Ansys Fluent, OpenFOAM and SU2 all work this way. That is why finite volume codes conserve mass exactly, even on coarse or poor-quality meshes, although accuracy still depends on the mesh.
Sources and further reading
- J. D. Anderson, Computational Fluid Dynamics: The Basics with Applications, McGraw-Hill, 1995: chapter 2 (models of flow, forms of the equations) and chapter 7 (quasi-1D nozzle by MacCormack's method).
- P. Lax and B. Wendroff, "Systems of conservation laws", Communications on Pure and Applied Mathematics 13(2), 217-237, 1960. doi:10.1002/cpa.3160130205. Accessed 22 Nov 2026.
- T. Y. Hou and P. G. LeFloch, "Why nonconservative schemes converge to wrong solutions: error analysis", Mathematics of Computation 62, 497-530, 1994. doi:10.1090/S0025-5718-1994-1201068-0. Accessed 22 Nov 2026.
- R. J. LeVeque, Numerical Methods for Conservation Laws, Birkhäuser, 1992. doi:10.1007/978-3-0348-8629-1. Accessed 22 Nov 2026.
- Ames Research Staff, NACA Report 1135, Equations, tables, and charts for compressible flow, 1953, NASA Technical Reports Server. Accessed 22 Nov 2026.
- SU2 documentation: Governing equations in SU2, SU2 Foundation. Accessed 22 Nov 2026.
- Ansys Fluent Theory Guide 2024 R2: General scalar transport equation, discretization and solution (control-volume-based technique), Ansys. Accessed 22 Nov 2026.
- OpenFOAM v13 User Guide: fvSchemes (divergence schemes), CFD Direct. Accessed 22 Nov 2026.
- Worked numbers and figures: Skill-Lync verification script (normal shock, Burgers' equation, MacCormack nozzle in both forms), run 22 Nov 2026.


