Assignment1 PDF
Assignment1 PDF
Prof G J Oliver
2023
1. Answer the following questions in reference to core notes A for the course
p81-117 in particular as well as other supporting material provided
(a) How are differential equations related to numerical modelling? Give
examples? [3]
(b) Give examples of of Elliptic and Parabolic equations [2]
(c) How could you solve a fluid problem numerically versus analytically?
Give examples. [6]
(d) What is the purpose of meshing or the creation of a grid when solving
fluid or thermal problems numerically? [2]
(e) Is it better to use finite difference and finite volume method with
structured or unstructured meshes? Explain and advantages or dis-
advantages [4]
(f) What is meant when referring to an explicit versus and implicit
scheme. What are the differences? [4]
(g) Which of the following is most accurate and why: Forward difference,
Backward Difference or Central Difference finite difference approxi-
mations. [6]
(h) Describe what is meant by Dirichlet and Neumann boundary condi-
tions and give examples of each [4]
2. Use finite differences to solve the following questions:
(a) Consider a metal bar length L for which we want to solve for the
temperature T which is attached to a constant thermal reservoir on
the left and the right as in the figure below
1
(2)
where
∆t
λ = α2 and α is the conductivity
(∆x)2
[8]
(b) Use the solution technique above to find the temperatures of the
discretized rod for the following problem. A bar length 1.0m is heated
to 800 C ; then, connected to large ice cubes at both end providing a
constant temperature of 00 C Find the temperature profile of the bar
for the first 2s with a time step of 1s and a 1D grid of 7 points by
hand. [16]
(c) Is this a steady-state or transient problem? [1]
(d) Determine if this is and elliptic or parabolic differential equation
using the formula [3]
3. The heat-conduction equation is given by
∂2T ∂T
k =
∂x2 ∂t
For a thin rod of length of length 10cm with k = 0.8cm2 /s. The initial
condition for the temperature in the rod: at t = 0, T = 0. Boundary
conditions T (0) = 1000 C ∀t and T (10) = 500 C ∀t
(a) Show that we can use the following Finite difference approximation
to represent the heat-conduction equation
n
Ti+1 − 2Tin + Ti−1
n
T n+1 − Tin
k 2
= i
(∆x) ∆t
Why did we need to say this was for a thin rod?Is this approximation
first order or second order accurate?
Explain. [5]
(b) If we let
k∆t
λ=
(∆x)2
Then we can derive an explicit scheme for determining the Temper-
ature in the interior of the rod as:
Use this explicit scheme with ∆x = 2 and ∆t = 0.1 for 2 time steps
(i.e. solve for t = 0.1 and t = 0.2 ). Note the number of interior
points to solve for is 4 : x = 2, x = 4, x = 6, x = 8. [10]
(c) The above explicit scheme requires that ∆t ≤ ∆x2 /k for it to con-
verge to the solution and be stable. Does it meet this requirement? [2]
(d) For the implicit method we approximate the second spatial derivative
at a future time:
∂2T T n+1 − 2Tin+1 + Ti−1
n+1
2
= i+1 2
∂x (∆x)
which gives the implicit scheme finite difference approximation of the
heat-conduction equation as
n+1
Ti+1 − 2Tin+1 + Ti−1
n+1
Tin+1 − Tin
=
(∆x)2 ∆t
which by rearranging and defining λ as before can be written as
n+1
−λTi−1 + (1 + 2λ)Tin+1 − λTi+1
n+1
= Tin
For the left end we can right the boundary condition as T0n+1 =
f0 (tn+1 ) which f0 (t) is function representing the value of the left
boundary condition over time. For this particular problem f0 (t) =
100 Using the left boundary condition the difference equation first
interior node
(T1 ) is:
(1 + 2λ)T1n+1 − λT2n+1 = T1n + λT0n+1
which is
(1 + 2λ)T1n+1 − λT2n+1 = T1n + λf0 (tn+1 )
which for our problem is
Show that the for the solution of all interior points by the Implicit
scheme for our problem for the next time (t = 0.1) that we have to
(4)
What does the RHS become for the next time step t = 0.2 Make use
of Matlab to solve the matrix vector equations for the first ( t = 0.1)
and second steps ( t = 0.2) [20]