0% found this document useful (0 votes)
114 views4 pages

Assignment1 PDF

This document provides the details of Numerical Modelling assignment 1, including: 1) Questions about differential equations, meshing, explicit/implicit schemes, and boundary conditions. 2) Using finite differences to solve a 1D heat equation problem for a metal bar with given boundary/initial conditions. 3) Deriving and applying an implicit finite difference scheme to solve a 1D heat equation problem for a thin rod with specified boundary/initial conditions. Simultaneous equations are set up in matrix form. The key tasks are to derive finite difference approximations of partial differential equations, set up the discretized equations, and use Matlab to solve the matrix equations modeling transient heat transfer over time.

Uploaded by

Vuyo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views4 pages

Assignment1 PDF

This document provides the details of Numerical Modelling assignment 1, including: 1) Questions about differential equations, meshing, explicit/implicit schemes, and boundary conditions. 2) Using finite differences to solve a 1D heat equation problem for a metal bar with given boundary/initial conditions. 3) Deriving and applying an implicit finite difference scheme to solve a 1D heat equation problem for a thin rod with specified boundary/initial conditions. Simultaneous equations are set up in matrix form. The key tasks are to derive finite difference approximations of partial differential equations, set up the discretized equations, and use Matlab to solve the matrix equations modeling transient heat transfer over time.

Uploaded by

Vuyo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Numerical Modelling NMG580S, Assignment 1

Prof G J Oliver

2023

Total marks =100

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)

Show that the solution to the heat equation


∂2T ∂T
2

∂t ∂x
can be represented by

Tin+1 = (1 − 2λ)Tin + λ(Ti+1


n n
+ Ti−1 )

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:

Tin+1 = Tin + λ(Ti+1


n
− 2T n + Ti−1
n
)
(3)

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

(1 + 2λ)T1n+1 − λT2n+1 = 0 + λ100


n+1
Similarly for the right boundary condition Tm+1 = fm+1 (tn+1 ) which
fm+1 (t) is function representing the value of the right boundary con-
dition over time. For this particular problem fm+1 (t) = 50.
(Tm ) is :
n+1 n+1 n n+1
−λTm−1 + (1 + 2λ)Tm = Tm + λTm+1
n+1 n+1 n
−λTm−1 + (1 + 2λ)Tm = Tm + λfm+1 (tn+1 )
which for our specific problem is

−λT3n+1 + (1 + 2λ)T4n+1 = 0 + λ50

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)

solve simultaneous equations which can be written in matrix vector


form as
   1  
(1 + 2λ) −λ 0 0 T1 0 + λ100
 −λ (1 + 2λ) −λ 0  T21   T20 
 = = 
 0 −λ (1 + 2λ) −λ  T31   T30 
0 0 −λ (1 + 2λ) T41 0 + λ50

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]

You might also like