Presentation is loading. Please wait.

Presentation is loading. Please wait.

21th Lecture - Advection - Diffusion

Similar presentations


Presentation on theme: "21th Lecture - Advection - Diffusion"— Presentation transcript:

1 21th Lecture - Advection - Diffusion
Séries de Taylor Series to obtain the algebraic equations.

2 Equation Forms The rate of accumulation is equal to what flow in minus what flow out plus production minus consumption: Written as the flux divergence: Where the 1st term of the 2nd member is the symetric of the flux divergence, i.e. what is entering minus what is leaving. In the conventional form:

3 Taylor Series They are the basis of the finite – difference methods that are of the same family as the finite-volumes. The finite Elements/boundary elements are the other big family of numerical methods.

4 What is a Taylor Series representing?
c Δc 1st Derivative: Δc/ Δt t1 t1+Δt Others derivatives Δt Δc

5 How to use Taylor series to compute derivatives?
Explicit Method: The derivative is computed at the left “at t” having 1st order accuracy. This means that ignored derivatives are multiplied by To be computed at the left means “at the left of the time interval, i.e. at time “t”. As a consequence all the derivatives (i.e. all equation terms) are calculated at time “t”. The truncation error is proportional to meaning that the truncation error increase linearly with the time step (in fact to the time step divided by the period being simulated).

6 If the calculation was done at the right of the time step
Others derivatives 1st Derivative: Δc/ Δt t c Implicit Method: In this case the derivative is computed at “t+dt” and has also 1st order truncation error Explicit and implicit method have the same truncation error, although the latter is more stable.

7 To compute the derivative at the centre of the time interval, one can compute the values at the extremes as a function of that: Subtracting one from the other: This method has second order truncation error. It means that it would generate the exact solution in a parabolic evolution. Ignored derivatives are multiplied by

8 What does a Taylor series represent?
c Explicit method Implicit method Central Difference Method t1 t1+Δt Other Derivatives Δt Δc 1st Derivative: Δc/ Δt

9 Spatial Derivatives Derivative at the right, downwind Method, if the velocity is positive In this method the spatial derivative at a point is computed using information at the computing point and at its right. We will see further down that this method is fine when the velocity is negative, but it creates problems when the velocity is positive because it violates the transportive property of advection.

10 Spatial Derivatives Derivative at the left: “upwind method” if velocity is positive and downwind is it is negative. This method respects the transportive property when the velocity is positive but tot when it is negative. The best combination is to use this method when the velocity is positive and the derivative at the right when the velocity is negative.

11 Subtracting one equation from the other one gets:
Central Differences

12 2ª Derivative Adding:

13 Algebraic Equations. Truncation error, Initial Conditions And Boundary Conditions.

14 Algebraic Equations They are Obtained subtracting the derivatives by the algebraic approximations: Explicit, central differences. 2nd order accuracy in space first in time. Semi-implicit (Crank-Nicholson) spatial central differences. 2nd order accuracy in space and time. What do we pay for second order accuracy in time?

15 How to obtain values at time (t+Δt/2) ? Calculating the average…..
Adding the equations! Replacing in the previous equations, one gets the equations to be solved.

16 Explicit Upwind 1st order accuracy in space and time for advection. Second for diffusion in space. This equation can re reorganized as:

17 Generic Form of the Equation
K=1=> implicit. K=0 => Explicit, k=0.5=> Crank-Nicholson: Explicit, upwind: Courant and Diffusion numbers

18 About calculation accuracy
In implicit and explicit methods, derivatives are calculated at the extremes of the time interval. As a consequence these methods ignore all derivatives but the first and consequently they are first order accurate. The Taylor series terms ignored are multiplied by When the derivative is computed at the centre of the time interval, the second derivative is still accounted and the method is second order accurate. The ignored derivatives are multiplied by But and thus it seems that the higher is the accuracy, the larger is the coefficient multiplying the terms ignored. Why is this so?

19 Why does accuracy increase with the exponent of ?
Because the terms ignored are of the form: The denominator of the derivative is proportional to the time step with exponent “n” and the coefficient multiplying the derivative is proportional to half of the time step with exponent (n-1). As a consequence the whole term is proportional to The higher is “n” smaller is the term neglected. This result is consistent with the idea that derivatives loose importance as their order increases.

20 Boundary and initial conditions
Initial conditions are often not importante because natural systems are dissipative and open, i.e. they Exchange through open boundaries. For the same reason boundary conditions are very importante. How do they appear? Ci Ci-1 Ci+1

21 Boundary Conditions Diffusion: Advecction:
The calculation of the diffusive terms across a surface require the knowledge of diffusivity over the surface and of the value on the other side of the surface. When they are not know, the best solution is usually to consider null flux. Diffusion involves a second derivative and thus requires a boundary condition all over the boundary. Advecction: When the flow enters into the domain it is imperative to know the properties being advected. If not known the simulation can make sense only if the source/sink terms inside the domain are the main responsible for the values of the properties. Because it involves a 1st derivative advection requires only one boundary condition (at the entrance) if upwind discretization is used.

22 Heat Transport In case of heat, bottom fluxes are usually less important than fluxes across the free surface and across the open boundaries and can be neglected. Fluxes across the free surface control the eat budget and have to be computed (radiation, sensitive and latent heat).


Download ppt "21th Lecture - Advection - Diffusion"

Similar presentations


Ads by Google