You are on page 1of 22

Lecture 7: Unsteady Conduction (Cont’d)

Accuracy and Stability of Numerical


Schemes
Last Time…

Looked at
z TDMA and line-by-line TDMA
z Unsteady diffusion
» Explicit scheme
This Time…

Continue looking at unsteady 2D conduction problems


z Implicit scheme
z Crank-Nicholson scheme
z Consider the accuracy and stability properties of these
schemes
Discrete Equation Set

z Dropping superscript (1) for


compactness
z Notice old values in discrete
equation
z To make sense of this
equation, we will look at
particular values of time
interpolation factor f (f = 0,
1, 0.5)
Explicit Scheme

z Explicit scheme is derived by assuming f=0

φ1 Profile
φ assumption
over time
step
φ0

t0 t1 t
Implicit Scheme

z Derived by assuming f=1

φ1 Profile
φ assumption
over time
step
φ0

t0 t1 t
Implicit Scheme: Discrete Equations

z Linear algebraic set


at new time level
Properties of Implicit Scheme

z Linear algebraic set at current time level – need linear


solver
z When ∆t→∞, steady state equation is recovered.
z When steady state is reached, φP= φ0P. In this limit,
steady discrete equations are recovered.
» Steady state does not depend on history of time
stepping
» Will get the same answer in steady state by time
marching as solving the original steady state
equations directly
z Will show later that truncation error is O (∆t)
Properties (cont’d)

z Note that
z This implies that φ is bounded by neighbor values at
current time, and old values, as expected of parabolic
equations
z Also satisfies Scarborough criterion
z Can show that Implicit scheme is unconditionally
stable. Can take as big a time step as you wish, and
still obtain convergence of iterative solutions
z May still want to take small time steps to keep solution
accurate
Crank-Nicholson Scheme

z Crank-Nicholson scheme uses f=0.5


φ1 Linear profile
φ assumption
across time
step
φ0

t0 t1 t
Crank-Nicholson: Discrete Equations

z Linear equation
set at current
time level
Properties of Crank-Nicholson Scheme

z Linear algebraic set at current time level – need linear


solver
z When steady state is reached, φP= φ0P. In this limit,
steady discrete equations are recovered.
» Steady state does not depend on history of time
stepping
» Will get the same answer in steady state by time
marching as solving the original steady state
equations directly
z Will show later that truncation error is O (∆t2)
Properties (cont’d)

z What if
z Crank-Nicholson scheme can be shown to be
unconditionally stable. But if time step is too large, we
can obtain oscillatory solutions
Truncation Error: Spatial Approximations

z Face mean value of Je represented by face centroid


value
z Source term represented by centroid value:

S ∆V = ( SC + S PφP ) ∆V

z Gradient at face represented by linear variation


between cell centroid: ⎛ ∂φ ⎞ φE − φ P
⎜ ⎟ =
⎝ ∂x ⎠e δ xe
z What is the truncation error in these approximations?
Mean Value Approximation

z Consider 1-D approximation and uniform grid.


z What is the error in representing the mean value over
a face (or a volume) by its centroid value?
z Expand in Taylor series about P
Mean Value Approximation (cont’d)

z Integrate over control volume:


Mean Value Approximation (cont’d)

z Complete integration to find:

z Rearranging:

z Thus φ = φP is a second-order accurate


representation
Gradient Approximation
⎛ ∂φ ⎞
z To find ⎜ ⎟ expand about ‘e’ face
⎝ ∂x ⎠e

z Subtract to find:

z Linear profile assumption => second-order


approximation
Temporal Truncation Error: Implicit
Scheme

z Cell centroid value (ρφ) = (ρφ)P at both time levels


» Same as the mean value approximation
» Second-order approximation
z Value of φP1 prevails over time step
z Source term at (1) prevails overtime step
z What is the truncation error of these two
approximations?
Truncation Error in Implicit Scheme
(cont’d)

z Consider a variable S(t) which we want to integrate


over the time step:

z Expand in Taylor series about new time level (1):


Truncation Error in Implicit Scheme
(cont’d)

z Integrate over time step:

z Thus, representing the mean value over the time step


by S=S1 is a first-order accurate approximation
Closure

In this lecture,
z We completed our consideration of 3 different time
stepping schemes
» Explicit
» Implicit
» Crank-Nicholson
z We looked at the accuracy of both steady and
unsteady schemes

You might also like