Examples5 PDF
Examples5 PDF
Examples5 PDF
061
Examples for home preparation
with diffusivity κ = 0.001 and convective velocity u = 1. First discretize the problem
in space on a uniform grid with ∆x = 10−2 using second order central differencing,
to form an initial value problem
∂Tj
= Ajk Tk . (2)
∂t
Then discretize this initial value problem using Crank-Nicolson method with the
time-step ∆t = 5 × 10−3 . Compute the numerical solution at t = 1.
5.2 Repeat the previous example, but use the 4-point upwind scheme for the first spatial
derivative:
n n
Tj+1 − Tj−1 Tj−2 − 3Tj−1 + 3Tjn − Tj+1
∂x T ≈ + (3)
2∆x 6∆x
On the second grid point from left use the standard second order centered scheme.
5.3 Assume that T (x, t) is a local temperature. We want to impose a zero-flux on both
boundaries, such that the total amount of heat Q ∝ T̄ inside of the domain Ω is
conserved. This can be achieved by applying Robin condition on both boundaries
∂T
(~u · ~n)T − κ = 0 at x = −2 and x = 2
∂~n
1
Exercise 5 322.061: Fundamentals of Numerical Thermo-Fluid Dynamics
5.4 We want to write a numerical solver for steady two-dimensional thermal diffusion
with heating
The best way to verify the implementation is to compare the numerical result to an
exact analytical solution. Let us consider a given temperature profile
Discretize the problem using second-order centered finite difference scheme. Imple-
ment the discretization in MatLab using the same grid spacing in both directions
∆x = ∆y.