Professional Documents
Culture Documents
Advect Report
Advect Report
Advect Report
NUMERICAL METHODS
Assessment Of Numerical Schemes For Advection
!
!
!
By:!
MAHANTESH NINGARADDY
LALITHYA RANI SUKUMAR
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
1.INTRODUCTION
The advection mechanism is present in most transport equations in mechanical engineering.
In spite of its apparent simplicity, its discretization remains a major issue, in particular for
computational fluid mechanics dedicated to compressible flows, for which strong discontinuities are
likely to appear. For this practical work, we will study the relative performance of standard finite
difference schemes to represent this mechanism. The tests will be carried out on the simplest case of
one-dimensional linear advection equation, discretized on a periodic domain, which is sufficient to
observe the main features of these numerical schemes.
2 Numerical tests
2.1
0<CFL1 is the stability margin range which we obtained after solving the above
equation analytically for Upwind first order scheme. For the same range we have
checked stability in program and we got system stable for range 0 to 1. System is
unstable for values more than 1. We also saw that for a CFL between -1 and 0, the
program also gave a good solution but that is because it changes automatically the
direction of upwinding. Unstability occurs when the signal takes more time than the
required time, otherwise it is stable.
2!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
Harmonic signal is selected in order to initialize the solution. For a given number of
periods, accuracy will increase with the increase in number of points. And for a fixed
number of points accuracy will increase by increasing the periods. This is because we
are decreasing the number of points per period. Then, the following parameter is
obtained:
! =!
Where:
N = Number of points per wavelength
! = Wavelength or number of periods
! = Number of points
To maintain the accuracy of the system, N should be constant. If we increase the number
of points or decrease the wavelength N increases, in turn we will have high accuracy.
Following graph shows the error modulus (G) as a function of for CFL = 0.5.
Now, the result for CFL = 0.1 is shown. When we tried for a CFL = 0.1, we observed that the
curve has the same shape as the obtained earlier when we checked for a CFL = 0.9.
3!
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
In this case we see that for higher values of we have a smaller error, comparing with the
CFL = 0.5 case. We have checked for other values and we can conclude that for this CFL range
the maximum amplitude error is obtained for CFL = 0.5.
Now, the result for CFL = 1.1 is shown here the error magnitude is blowing up hence the
system is unstable.
For a fixed value of CFL=0.5, The empirical modulus of numerical gain is calculated.
From the gnu plot for 0.5 CFL we have the diffusive error of 0.72357 i.e.
Numerical gain:
!!"#
=! !
!!"#
=!
0.72357!
1!
4!
!
100
= 0.723568
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
Where:
Amax = Amplitude of the numerical solution
Aref = Amplitude of the exact solution
G = Numerical gain
n = Iterations
!
!""
= 0.723568
! = 0.9967
Comparing theoretical and experimental values
The phase shift is given by, = !! = !
!!
!
!
!
100
=!
= 20
!
5
=!
2!
= 0.3141
20
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
2.2
For the above scheme the system is unstable hence we will prefer to add a physical diffusion,
so that we consider:
!"#
!" !
0<CFL1 is the stability margin range which we got after solving the above equation
analytically for Second order scheme. For the same range we have checked stability
in program and we got system stable for range 0 to 1. System is unstable for values
more than 1.
For different values of CFL ranging from 0 to 1we checked stability for reduced
viscosity, and the system is stable for reduced viscosity range 0.1 to 0.5. After this
range the system is unstable.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
We tabulated values for s varying with CFL value and the graph is plotted for the above, this
shows the domain of stability in terms of CFL and reduced viscosity. The area inside the domain
represents the stability points. The theoretical estimation of reduced viscosity value for stable
condition resulted in following condition ( given in appendix)
S
!!
!
CFL#V/S#'S'#
'S'#
0.6!
0.4!
Stable!!
0.2!
Unstable!!
0!
0!
0.2!
0.4!
0.6!
0.8!
CFL#
7!
!
1!
1.2!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
2.3
By comparison with the FTCS scheme, we note that it adds a numerical diffusion term which
will help to stabilize the computation.
G= [(2 cos! - 2 +1) + i (- sin!)]
G= [2 cos! - 2 +1]2 + (- sin!)]2 1
-1<CFL1 is the stability margin range which we got after solving the above equation
analytically for Lax-Wendroff scheme. For the same range we have checked stability in
program and we got system stable for range 0 to 1. System is unstable for values more than 1.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
Magnitude of dispersive error is present in LW scheme unlike in other two schemes i.e.FO
and SO scheme. Phase shift is lagging in this method.
The solution obtained for an initialization with a square impulse and for fixed CFL = 0.5.
For this particular case, there is less diffusive error when compared to dispersive error (i.e.
Phase lag is present). It is seen that the Diffusive error is minimized since we employ the SO
scheme, which is more accurate. In this case, some oscillations arise, and these are due to the
discontinuity at the corners of the input function. The oscillations are generated by the error in
the numerical algorithm as a result of continuous iteration of the process. In case of the
Sinusoidal input, the oscillations do not arise due to the absence of discontinuity.
9!
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
The dispersive error is the function of the time step which we are fixing in this case. From the
below graphs we observed that as the CFL decreases, in turn the dispersive error increases
and vice versa.
CFL = 0.3
CFL = 0.5
CFL = 0.8
Fig.12: Stability
Note that, for a negative velocity, the scheme is given in a similar way by inverting the
direction of upwinding.
LW scheme is modified in order to get BW scheme.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
Solution of Beam Warming scheme and Lax-Wendroff scheme are one and the same, but
instead of phase lag we saw phase leading in BW scheme. Dispersive error is upwards and there
is less diffusive error and we can neglect it.
For stability range for CFL values 0 to 2 we got stable system and for the other values system
is unstable.
The stability margin for LW scheme is between CFL range of 0 and 1. For beam
warming scheme it is found to be between 0 and 2.
11!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
2.4
Fromm scheme
Fromm scheme is the combination of both LW and BW schemes. In this scheme there is no
Diffusive error.
Fromm scheme will become LW scheme for higher CFL values and phase lag in the signal. For lower
CFL values this scheme will become BW scheme and phase leads in the signal.
Steady solution is obtained for 0.5 CFL. In this case, the Dispersive error is symmetric and there is no
Diffusive error.
12!
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
Fig.20: CFL=0.5
Comparison of hybrid scheme with LW and BW schemes
For CFL 0.5 value there will be no dispersive as well as diffusive error.
No oscillations for CFL=1, because it is the mean CFL value for this scheme.
Fig.21: CFL=1
Conclusion
We have studied different cases
First Order scheme: This is the simplest numerical scheme. The main advantages are that it is
easy to implement and that it results in very stable calculations, but it also very diffusive.
Gradients in the flow field tend to be smeared out. This is often the best scheme to start
calculations with. The rst Order scheme will be stable as long as the CFL lies between 0 and
1 (0 <CFL<1). However, the amplitude error is maximum when CFL=0 .5
Second order scheme: !This is more accurate than the first order upwind scheme, but it leads
to oscillations in the solution due to addition of viscosity term.
13!
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Numerical!Methods!
!
Lax-Wendroff scheme: is second order accurate in both space and time. This scheme is better
than the two previous schemes as it has no diffusive error but it has a phase lag. The CFL
value near to 1 would be recommended for this scheme.
Beam Warming scheme: It is implicit second order type. There is no diffusive error but
dispersive error is in upward direction i.e phase leads. CFL range for stability is 0 to 2.
Fromm scheme: This scheme is combination of both LW and BW schemes. There will be no
dispersive as well as diffusive error at certain values of CFL. Solution signal coincides with
the reference signal. This is the only ideal case.
14!
!
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner