Numerical Analysis Methods Flashcards
(12 cards)
Describe the formula used in a basic finite difference scheme
dy/dt = (y(t + Δt) - y(t))/Δt
How can this be derived?
By use of a Taylor Series: y(t + Δt) = y(t) + dy/dt * Δt + (1/2!) * d2y/dt2 * Δt^2 + etc, so subtracting y(t) gives dy/dt * Δt + (1/2!)d2y/dt2*Δt^2 + etc
What are the three forms of finite difference schemes?
Forward difference: dy/dt = (y(t+Δt) - y(t))/Δt
Backward difference: dy/dt = (y(t)-y(t-Δt))/Δt
Central difference: dy/dt = (y(t+Δt) - y(t-Δt))/2Δt
How can a differential equation be turned into a difference equation?
Wherever a differential appears, simply sub in the difference equation form. It can be useful to use Yn, Yn+1, Yn-1 etc notation, subbing in Yn for y, (Yn+1-Yn)/Δt for dy/dt, etc
What is a hyperbolic equation?
Equation of the form 0 = du/dt + Adu/dx (where d is partial differential)
eg scalar convection
What is an elliptic equation?
Equation of the form:
0 = d2u/dx2 + d2u/dy2, where d is partial differentials
eg steady incompressible flow
What is a parabolic equation?
Equation of the form du/dt - d2u/dx2 = 0 where d is partial differential
eg heat diffusion
What is the CFL number?
The CFL number, c, is a number denoting stability, where stable if c <= 1
c = ΔtA/Δx
(Applies to upwind space difference, with forward time and centered space)
Describe the Lax Wendroff Scheme
The Lax Wendroff Scheme attenots to remove false diffusion by including a term in higher order of time, adding the next step in the Taylor series
Give the equation for the Lax Wendroff scheme applied to difference equation u(n+1)(i) = u(n)(i) - c/2 (u(n)(i+1) - u(n)(i-1))
u(n+1)(i) = u(n)(i) - c/2 (u(n)(i+1) - u(n)(i-1)) + (c^2)/2(u(n)(i+1) - 2u(n)(i) + u(n)(i-1)D
Describe the MacCormack Scheme
Use an explicit time step to create a prediction for u(“n+1”)(i), then use that to judge rate of change and then use an implicit time step for find the true u(n+1)(i)
Give the formula for the predictor and corrector in the MacCormack Scheme
Predictor: u(“n+1”)(i) = u(n)(i) - A(Δt/Δx)(u(n)(i+1) - u(n)(i)) <– Simple forward difference in “i”
Corrector: u(n+1)(i) = 1/2 [u(“n+1”)(i) + u(n)(i) - AΔt/Δx (u(“n+1”)(i) - u(“n+1)(i-1))]
Note that predictor uses forward difference in “i”, corrector uses backward. Corrector is effectively the average of the predicted result, and a backwards difference step made with predicted results.
Same as LW for linear convection