1.1.3.3. The Modified Differential Equation¶
1.1.3.3.1. The Truncation Error¶
The truncation error is the difference between the numerical scheme and the differential equation.
NOTE: The exact solution of the numerical scheme satisfies a MODIFIED differential equation
1.1.3.3.2. Modified Differential Equation¶
Consider exact solution of the discretised equation \(\rightarrow \bar{u}_i^n\):
From before, with \(u = \bar{u}\)
The above implies that for the exact solution:
Hence:
Take \(\partial \over {\partial t}\):
Or:
i.e.
Substitute Equation (2) into Equation (1). The exact solution to the numerical scheme \(\bar{u}\) satisfies the following differential equation - called the Modified Differential Equation
Observations: The Modified Differential Equation is NOT a convection equation, it is a convection-diffusion equation, with a numerical diffusion coefficient equal to:
This is negative diffusion - a process of explosion
This shows why the scheme is UNSTABLE - it will amplify any disturbance exponentially
The Modified Differential Equation and the Truncation Error provide essential information about the scheme
1.1.3.3.2.1. Summary of the Method for obtaining the Modified DE¶
Denote \(D(u)=0\) the mathematical model we are to solve numerically (the Differential Equation)
And \(N(u_i^n)=0\) the numerical scheme (the Numerical Scheme)
How to obtain the Modified Differential Equation?
Perform consistency analysis, using Taylor series and obtain the truncation error \(\epsilon_T\)
Consider the exact solution of the numerical scheme \(\bar{u}_i^n\) defined by
leaning to the differential equation \(D(\bar(u)_i^n)=-\epsilon_T\)
Replace lowest time derivative by space derivatives in \(\epsilon_T\) by applying Differential Equation from 2)
The Modified Differential Equation is defined as an equation obtained after replacement step 3), restricted to the lowest order terms (contains only space derivatives)
1.1.3.3.3. Example: Convection with 1st order Upwind (BD in space, FD in time)¶
Introduce the Taylor expansions as before
Follow steps just listed
The Modified Differential Equation looks like this:
The Diffusion Term is:
1.1.3.3.4. CFL Condition¶
The CFL Condition is to ensure stability of the scheme:
\(\sigma\) is called the CFL number, the Courant-Friedrichs-Lewy number
CFL has a deep physical significance
For a constant value of \(\sigma \lt 1\) this scheme has numerical diffusion of \(O(\Delta x)\) which is generally excessive (the scheme has poor accuracy)