In CFD for which applications do we take the conservative governing equations and for which applications do we use the non-conservative governing equation?
We drive the governing equations by considering a finite control volume. This control volume may be fixed in space with the fluid moving through it or the control volume may be moving with the fluid in a sense that same fluid particles are always remain inside the control volume. If the first case is taken then the governing equations will be in conservation form else these will be in nonconservation form.
See the book "Computational Fluid Dynamics - The Basics and Applications" by Jhon D. Anderson
We drive the governing equations by considering a finite control volume. This control volume may be fixed in space with the fluid moving through it or the control volume may be moving with the fluid in a sense that same fluid particles are always remain inside the control volume. If the first case is taken then the governing equations will be in conservation form else these will be in nonconservation form.
See the book "Computational Fluid Dynamics - The Basics and Applications" by Jhon D. Anderson
it may refer to how we descritise a term in a PDE. Consider U(dU/dx) or 1/2*(dU^2/dx). In the 1st case you are free to use the current time step or the previous for each of the temrs (U and dU/dx); however, in the 2nd case you have 1 term, dU^2/dx and there is only one way for you to choose, current, previous time step, a combination of them, or any descritising method. But there is one way for you, I hope it ll be helpful.
It is true that, using exact arithmetic, then (say) UdU/dx=(1/2)d/dx(U^2); the same is not true numerically. This has direct consequences on the conservation properties of the discretisation. For combustion simulations (where density plays an active role) we always use the conservative form since, notwithstanding time discretisation errors, the spatial discretisation is generally better behaved. The choice of dependent variables (conservative or primitive) plays a significant role on long term stability; there are a couple of papers by Yee where the Navier-Stokes equation are symmetrized with respect to an entropy variable. Thes formulations apparently have better long term behaviour.
For problems containing shocks in the solution the conservative form is preferred. In fact, the discretization of nonconservative form lead to a nonconservative difference equations and one can readily verify, with Burgers equation as an example(discretize this equation in conservative form u_t+(u^2/2)^2_x=0 and nonconservative form u_t+uu_x=0), that this form is not suitable in presence of shocks.
See chapter 12 of “R. Leveque, Numerical Methods for conservation laws, Birkhasuser, 1992. “
In Computational Astrophysics, and more generally in plasma physics, conservative versions of the equations are preferred. The conservative form reflects a basic laws of nature and, thus, one shall try to preserve properties such as baryonic mass conservation, momentum conservation or energy conservation. Since Rankine-Hugoniot conditions across shocks simply express the continuity of the flux of mass, momentum and energy, if one does not explicitly conserve such quantities, there is no reason to obtain a physically acceptable speed of propagation for shocks (in more mathematical words, there is no reason why the weak solution one uses is the physically relevant -entropy satisfying- solution).
Certainly, in some cases, when the main action of the system is not driven by the hyperbolic part of your equations, but by other microphysics or transport phenomena (e.g., reacting flows, nuclear networks, cooling/heating, etc.), a conservative version of the equations can be prone to severe difficulties. Even in Newtonian Fluid dynamics, when the flow enters a ballistic regime, where the kinetic energy is much larger than the flow internal energy, full conservative equations may be troublesome. In such cases, one either writes some non-conservative equation for the internal energy/pressure, that may back up the algorithm, but still, one tends to write the rest of the equations in conservation form.
The conservation equations, in general, represent the classical physics of the problem. On the other hand, the non-conservation equations results due to the approximation (or simplification) of the classical physics.
For instance, let us look at the mass conservation principle which states that the mass of the system must remain constant over time.
Assume, D= Density; A=Area; V=Velocity, T=Time; Q=Volumetric flow rate (=A*V*T), M = Mass flow rate (=D*Q/T or D*A*V).
In fluid dynamics, conservation of mass is represented by the mass continuity equation, i.e., mass flow rate (M) through the system must remain constant, written as:
[d(M) + divergence (M) = 0]… Eq (1).
Eq.(1) shows the classical physics of mass conservation.
Alternatively, if it considered that fluid is incompressible and so the density of the fluid is not changing with time. In this case, Eq. (1) may be simplified as below:
[d(M) + divergence (M) = 0]
=> [d(D*A*V) + divergence (D*A*V) = 0]
=> [D*d(A*V) + D*divergence (A*V) = 0]
=> D[d(A*V)/dt + divergence (A*V)] = 0…Eq. (2)
Eq. (2) shows the non-conservation form of the mass continuity equation as it has modified the actual physics due to the neglected degrees of freedom or from time-dependent potentials.
The conservative forms are needed whenever you have something that doesn't experience other conservation-breaking effects, and which needs to persist for long times in a simulation. Consider for example a simple problem like finding the steady state of a propagating 1D packet of high density in a low density background with surface tension and diffusion. If you don't use a conservative form, the only thing changing the amount of material in the packet will be numerical error (there are no balancing forces like sources or sinks to mask that error) so over long times as you try to converge to steady state, the packet will either evaporate or grow to infinity. Furthermore, the velocity of the packet will change if you don't use momentum-conserving methods as well.
On the other hand, if you were simulating a short segment of multiphase pipe flow with an inlet and outlet boundary condition, then losses and gains due to using non-conservative methods won't have a chance to build up since such errors are constantly being removed from the system by the outlet boundary. So in a case like that you may find it more efficient to use a non-conservative form (which can be more numerically stable in other ways, e.g. certain flux-limiting methods which prevent the growth of spurious high-frequency oscillations).
Solution conservative equation depend only two state initial and end. Solution no conservative equation depend of the trajectory from state initial and end.
In plain words conservative is a form of the pde when the multipliers of derivatives are constant or if variable their derivatives do not appear in the equation.So d(ρu)/dx is conservative whereas the equivalent ρdu/dx+udρ/dx is not if density ρ is variable.Conservative forms are generally preferable although in some cases are more expensive.
If the solution is non-smooth, i.e., there are shocks, then the conservative equations should be used and discretized in a conservative way. If the solution is smooth, even at supersonic speeds but more commonly at subsonic speeds, the two equations are equivalent. Hence it does not matter which form is chosen. The important property is provable numerical stability. If proven stable, two discretizations, conservative and non-conservative will yield very similar answers given that the orders of accuracy are the same. I recommend the book by Gustafsson, Kreiss and Oliger, Time dependent problems and difference methods.
You provided the example of momentum in the X direction and said that if the density multiplier is constant (incompressible flow), then the momentum in the X direction is a conserved variable. However, in the example you provided, if density is variable, its derivative still appears in the equation ρdu/dx+udρ/dx, making the momentum in the X direction a non-conserved variable.
I have a little trouble understanding the second bit of your explanation - the one pertaining to when the multiplier of the derivative is variable. Could you provide an example where the multiplier of a derivative is variable AND the derivative of the multiplier does not appear in the conservation equation of that variable? Thank you.
It has been my experience that it is best to solve ode's and pde's in conservative, rather than non-conservative form, an excellent example being Navier-Stokes. I usually solve heat transfer equations in p & h, rather than p & t, besides the fact that p & t aren't always independent.
In the physical laws the variation of a property is expressed as gradient, often expressed as the rate of something and function of other properties which is natural. In all the physical laws rate is what is of importance. (When the gradient of property entering and leaving a system are equal then we call it conservative.)
when two variables dependent on each other are expressed together as a rate of some independent variable and that the amount of the resultant property leaving or entering system are same then the product quantity is said to be conserved.
However when we take a property , out of the rate equation it is no longer conserved , as it does not follow physical rate form. Rather we approximate variation of one property and multiply it to another.
It does not represent the mutual correspondence of the two properties together at any given point.
Instead they vary as individuals, continuity does not allow independent changes on individual properties, to follow the property one property has to be the functions of another, so the form is not conserved.
e.g In a family a person wants to open a shop, but family members want him to run the family business. If the person stays in the family and runs the shop then it is non-conservative, but if he makes family members agree to his decision and runs the shop or he agrees to the family members and runs the family business than it is conservative.
To my experience while dealing with developing my own algorithm in lubrication, non-conservative equation will give me certain amount errors so that the solutions will never satisfy the conservation law. IMO,even though the two solutions look alike, I'll tend to choose the code developed based on conservative equations. If you develope your own code, always choose conservative equations.
A cnservative scheme conserves some integral properties of the corresponding physical system, while a non-conservative scheme only approxiamtely conserves these properties. In fluid mechanics mass conservation is essential, e.g., you dont want twice the mass entering a channel to exit the channel. If mass is not conserved sufissiently well a CFD solution becomes useless. Therefore, if you have the choice between a pretty accurate non-conservative solver and a less accurate conservative solver you should pick in most cases the conservative scheme (where as usual other considerations may force you to use the non-conservative scheme, in which case you better check if some conservative properties are violated.
Both the forms are mathematically equivalent. However when discretised, the conservative form satisfies the telescopic property. For example if a one-dimensional continuity equation is discretised using Finite Differences(FD) and the equation solved, the mass flow into the domain will be equal to the mass flow out of the domain in a conservative form while it will not be so in the non-conservative form You should do this example and see the resulting FD equation of the nonconservative form of the equation
A comment on the replies of Andreas Class and Kishore Kumar Sankara.
The two forms are NOT equivalent if the solution is NON-SMOOTH. They are only equivalent IF the solution is SMOOTH. It is only for the conservative form that weak solutions can be defined. That is why a conservative discretizations must be used when approximating, e.g. shocks. FV schemes are by definition conservative. FD schemes CAN be conservative.
For smooth solutions other properties than conservation are important. Linear stability and accuracy are necessary and sufficient properties. In the smooth linear regime conservation is not be necessary to enforce unless demanded for stability or accuracy. Hence, conservation is possibly a consequence, not a necessary condition, in the linear regime. When the solution is smooth, i.e. subsonic flows, it does not matter if the scheme is conservative or non-conservative. In fact, one can use conservation as a measure of accuracy for a non-conservative scheme. If the mass is not conserved to high accuracy it means that the solution is very inaccurate.
For a conservative scheme, for instance mass is conserved by definition but that is the one thing we know a priori and it's not the purpose of the simulation to find out that mass is conserved. However, mass conservation CANNOT be used as a measure of accuracy. It can not be used for anything. The solution may be completely and utterly wrong while still conserving mass, momentum and energy.
Conservative equations are formulated based on the conservative variables. In such equations, the conservative variable (rho) is always inside the derivative (ex, eq of continuity (rho)t +(rho*u)x =0 where all derivative are partial derivative
But non-conservative equations are formulated based on non-conservative variable. In such equations, the conservative variable (say rho) appears outside the derivative (ex. eq of continuity (rho)t +rho(u)x where derivative are total derivative
Conservative equation are applicable to the stationary system either fixed control volume fixed in space or infinitesimally small element fixed in space. Whereas non conservative equations are used for moving system. Finite control volume fixed mass moving with flow or infinitesimally small fluid element of fixed mass (fluid particle) moving with the flow. That is why total derivative is used in non-conservative equations.
Formulations based on non–conservative variables fail at shock waves. They give the wrong jump conditions. Consequently they give the wrong shock strength, the wrong shock speed and thus the wrong shock position. It has shown that non–conservative schemes do not converge to the correct solution if a shock wave is present in the solution. One needs to work with conservative methods if shock waves are part of the solution.
refe. Eleuterio F. Toro-Riemann Solvers and Numerical Methods for Fluid Dynamics_ A Practical Introduction, Third Edition (2009)
If we are using Langrangein frame of reference in which the control volume contracts or expands with the particles movement inside, we are looking at a case of non-conservation equation. In this convection flux would be zero because control volume realigns itself for any movement of particle. In the case of conservation equations, we are essentially looking at Eulerian frame of reference in which our Control volume is fixed and particles and move in and out from it.
Stick to the conservative equations. Taylor series does not work for a discontinuity. If you use conserved form, the flux variables became continuous variables (such as inviscid fluxes across a shock wave) and the Taylor series will work.