Black FridayUpgrade your career this Black Friday. Get up to ₹60,000 Scholarship on IIT programsUp to ₹60K Black Friday Scholarship52 seats leftOffer ends Fri, 27 Nov, 11:59 pm IST.

Black Friday Scholarship – IIT Jammu & IIT Roorkee

The best Black Friday deal isn't a gadget. It's your next career move.

Get up to ₹60,000 Black Friday Scholarship on our PG programs with IIT Jammu and iHUB DivyaSampark, IIT Roorkee. IIT certification, 12 live sessions with IIT faculty and 100% placement assistance.

Only 52 seats left. Offer ends Fri, 27 Nov, 11:59 pm IST

3,905 engineers placed since 2019 · 1,276 hiring companies

By submitting you agree to our Terms and Privacy Policy.

Your free demo class is requested

Browse courses

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.

Conservation vs Non-Conservation Form in CFD, With Worked Examples

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.

Two by two grid: a finite control volume and a small element, each either fixed in space with flow passing through (conservation form) or moving with the fluid along a path (non-conservation form)
The four flow models. A fixed volume gives the conservation form (integral or PDE). A volume moving with the fluid gives the non-conservation form. Drawn with code by Skill-Lync.

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:

QuantityBefore (1)After (2)2 ÷ 1
Density (kg/m³)1.22503.26672.6667
Velocity (m/s)680.58255.220.375
Pressure (Pa)101,325455,9624.5
Temperature (K)288.15486.251.6875
Mass flux (kg/m²·s)833.72833.721
Momentum flux (Pa)668,745668,7451
Total enthalpy (J/kg)521,095521,0951

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.

Bar chart of downstream to upstream ratios across a Mach 2 normal shock: density 2.6667, velocity 0.375, pressure 4.5, temperature 1.6875, while mass flux, momentum flux and total enthalpy are exactly 1
Across a Mach 2 shock the primitive variables jump; the fluxes do not. Computed and drawn by Skill-Lync's script.

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:

CaseCellsExactCons.Non-cons.
2001.0001.0000.500
1,6001.0001.0000.500
2001.1251.1251.0082
1,6001.1251.1251.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.

Two plots of u against x at t = 1. With u_R = 0 the conservative scheme puts the shock at x = 1.000 like the exact solution while the non-conservative one stays at 0.500. With u_R = 0.25 the exact shock is at 1.125 and the non-conservative one is at 1.011
Same stencil, same Courant number 0.5, 400 cells. Only the way the equation is written differs. Computed by Skill-Lync's script.

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 nodesExactNon-cons.Cons.
Throat density 0.63390.63850.6666
Throat temperature 0.83330.83640.8476
Throat Mach number1.00000.99940.9534
Exit Mach number3.35903.35323.3791
Mass-flow spread (max − min)00.01170.0019
Worst mass-flow error02.86%1.25%
Mass flow along the quasi-1D nozzle on 31 nodes: the conservation form stays between 0.5840 and 0.5860, the non-conservation form wanders between 0.5835 and 0.5953, exact value 0.5787
Steady mass flow along the nozzle, MacCormack, 31 nodes. The conservation form holds mass flow about 6 times more uniformly. Computed by Skill-Lync's script.

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:

NodesThroat M, non-cons.Throat M, cons.Spread, non-cons.Spread, cons.Ratio
310.99940.95340.01170.00196.1
610.99980.99330.00300.00056.3
1211.00000.99860.00080.00016.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

PointConservation formNon-conservation form
Control volumeFixed in spaceMoves with the fluid
Time derivativeLocal, of Material, of
Unknowns solved forConserved 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 ductNearly constant, even on coarse gridsWanders more on coarse grids
Primitive variables on a coarse gridNeed decoding, can be less accurateDirect, often more accurate
Coding effortExtra step to decode Simpler to write
Typical useFinite volume codes, compressible flowHand 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

Want this on your résumé?

Talk to a counsellor.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.