[go: up one dir, main page]

0% found this document useful (0 votes)
121 views10 pages

ENG2005 Workshop W10

cccc

Uploaded by

liamlast2102
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)
121 views10 pages

ENG2005 Workshop W10

cccc

Uploaded by

liamlast2102
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/ 10

ENG2005

Student’s name: Applied class leader’s name:

Workshop Week 10

Before the workshop

Week 10 Own-time tasks Tick


Watch all the pre-recorded videos
Take the lecture quiz

In the workshop, after the workshop, and before the deadline

Tasks on Moodle Assessment Tick


Workshop Activity 1: maximum 4 marks
Complete the workshop quiz
Workshop Activity 2: maximum 3 marks
Submit scanned fully worked worksheets
Workshop Activity 3: maximum 3 marks
Submit a published version of the MATLAB code

In this workshop you will practise:

• The advection equation

• The method of separation of variables

• Understanding initial conditions and boundary conditions for the heat equation

• Solving the heat equation by separation of variables

The Heat Equation in 1D is a partial differential equation that models the diffusion of heat through a
material in a single dimension. It describes how the temperature of a material changes over time, given
an initial temperature distribution and a heat source. The equation takes into account heat conduction,
convection, and radiation and is commonly used in fields such as engineering, physics, and biology. The heat
equation is a fundamental tool for understanding and designing systems that involve heat transfer, such as
power plants, refrigeration systems, and insulation materials.

1
1 The method of Separation of Variables for PDEs
Find a solution of the partial differential equation
∂u ∂u
+ = 2(x + y)u
∂x ∂y
using the method of separation of variables, with the following steps:

(a) Set u(x, y) = X(x)Y (y), calculate its first-order (b) Separate the variables x and y using a separa-
partial derivatives, and insert them into the tion constant λ to obtain two ordinary differ-
equation. ential equations.

(c) Solve one equation for X(x). (d) Solve the other equation for Y (y).

2
2 The advection equation
Advection1 is a partial differential equation that governs the motion of a conserved scalar field as it is
advected by a known velocity vector field. The best image to have in mind is the transport of salt dumped
in a river. If the river is originally fresh water and is flowing quickly, the predominant form of transport
of the salt in the water will be advective, as the water flow itself would transport the salt. If the river
was not flowing the salt would simply disperse outwards from its source in a diffusive manner, which is not
advection.
In Cartesian coordinates the advection operator is
∂ ∂ ∂
u·∇=u +v +w
∂x ∂y ∂z
where the velocity vector u has components u, v and w in the x, y and z directions respectively. The
advection equation for a scalar ψ, such as temperature, is expressed mathematically as:
∂ψ
+ ∇ · (ψu) = 0
∂t
where ∇· is the divergence operator and u is the vector field. Frequently, it is assumed that the velocity
field is incompressible, that is, that ∇ · u = 0. If this is so, the above equation reduces to
∂ψ
+ u · ∇ψ = 0
∂t

In particular, if the flow is steady ( ∂ψ


∂t = 0), the equation is u · ∇ψ = 0 which shows that ψ is constant
along a streamline.
In one space dimension and with constant velocity u = (u, 0, 0), the system the equation becomes

∂ψ ∂ψ
+u =0 (1)
∂t ∂x
where ψ = ψ(x, t) is the scalar being advected.

(a) If ψ = ψ(y, t) is the scalar being advected and the velocity vector is u = (0, v, 0) write the advection
equation:

(b) What would be a good initial condition for the advection equation (1)?

(i) ψ(x = 0, t = 0) = ψ0 (x), where ψ0 (x) is a given function.

(ii) ψ(x, t) = ψ0 (x), where ψ0 (0, 0) is a given constant.

(iii) ψ(x, t = 0) = ψ0 (x), where ψ0 (x) is a given function.

(iv) ψ(y, t = 0) = ψ0 (x), where ψ0 (x) is a given function.

1
Applications:
Advection often refers to the transport of some property of the atmosphere or ocean, such as heat, humidity (see moisture) or
salinity. Meteorological or oceanographic advection follows isobaric surfaces and is therefore predominantly horizontal.
Mathematical models have long proved useful for analyzing or predicting the transport of contaminants in streams and rivers,
including contaminant exchange with fluvial sediments and the surrounding stream bed. Constituents in surface waters may
involve a range of chemicals, including toxic trace elements, pesticides, nutrients, radionuclides, industrial solvents, pathogenic
microorganisms, and a variety of water quality variables such as total salinity or dissolved oxygen. The transport of contaminants
in streams and rivers is complex and often nonlinear, with many chemical and biological processes affecting it; therefore analytical
and quasi-analytical approaches are useful for simplified analyses of a variety of contaminant transport scenarios.

3
(c) Consider the advection equation
∂u(x, t) ∂u(x, t)
+2 =0
∂t ∂x
(i) Find the characteristic curves

(ii) Use the characteristic curves obtained in (i) to write the general solution to the advection equation.

∂u(x, t) ∂u(x, t)
(iii) Find the solution to the advection equation +2 = 0 which satisfies the initial
2
∂t ∂x
value condition u(x, 0) = e−x .

(iv) Use MATLAB to create an animation of your solution. You should plot the solution as a function
of x over the domain −5 ≤ x ≤ 15, animating it with time changing in the range 0 ≤ t ≤ 5.
Describe how u behaves below.

4
3 The Heat Equation
(a) Verify by hand and in MATLAB that the function u(x, t) satisfies the heat equation

∂u ∂2u
=κ 2
∂t ∂x
and determine the value of κ in each case.

(i) u(x, t) = e−t sin(2x) (ii) u(x, t) = x + 2 + e−2t sin(πx)

(b) Suppose we have a homogeneous bar of length L = 1 with ends kept at temperature zero and initial
temperature function u(x, 0) = f (x) = x sin(πx), for 0 ≤ x ≤ L. The temperature distribution satisfies
the heat equation ut = uxx for 0 < x < L, t > 0 and is given by its general form2 :
∞  nπx  2 π 2 kt/L2
X
u(x, t) = bn sin e−n
L
n=1

Choose the correct relation to find bn :


2 L L
Z  nπx  Z
1  nπx 
(i) bn = x sin dx (iii) bn = f (x) sin dx
L 0 L L 0 L

2 L L
Z  nπx  Z
1  nπx 
(ii) bn = f (x) sin dx (iv) bn = x sin dx
L 0 L L 0 L

Calculate b1 and choose its correct expression from the list:


−8
(i) 9π 2

(ii) − 21

(iii) − 41

(iv) 0
1
(v) 4
1
(vi) 2

(vii) 1
2
the boundary conditions have been already incorporated in previous steps taken to derive this general form of the solution

5
Choose the correct temperature surface u(x, t) for this problem.

6
4 Heat equation initial and boundary conditions
A rod of length L coincides with the interval [0, L] on the x-axis.
Write down the differential equations and the mathematical relations for the initial conditions and the
boundary conditions of each scenario. You do not need to solve the equations.

(a) The left end is held at a temperature zero, and the right end is insulated. The initial temperature is
f (x) throughout.

(b) The left end is held a temperature u0 , and the right end is held at temperature u1 . The initial
temperature is zero throughout.

(c) The left end is held at temperature 100◦ C, and there is heat transfer via convection from the right
end into the surrounding fluid at temperature zero. The initial temperature is f (x) throughout.
This scenario is just beyond the scope of ENG2005, but for interest note that the rate of heat transfer
for convection is proportional to the difference in temperature between the body and the surrounding
medium, resulting in a Robin boundary condition.

(d) The ends are insulated, and there is heat transfer from the lateral surface into the surrounding medium
at temperature 50◦ C. In this case the heat equation is modified to be
∂u ∂2u
= κ 2 − h (u − 50) .
∂t ∂x
The initial temperature is 100◦ C throughout.

7
5 Solving the 1D Heat Equation
Solve the heat equation
∂u(x, t) ∂ 2 u(x, t)

∂t ∂x2
subject to the insulated boundary conditions

∂u(x, t) ∂u(x, t)
= =0
∂x x=0 ∂x x=π

and the initial condition


u(x, 0) = 2 cos2 (x).

(a) Apply the method of separation of variables for the one-dimensional heat equation with κ = 1, to
obtain two ordinary differential equations containing the separation constant λ. That is, assume
u(x, t) = F (x)T (t). Convert the boundary conditions for u(x, t) into boundary conditions for F (x).

(b) Solve the F (x) equation. Use the boxes below to discuss the three possible cases for λ.
λ=0

8
λ = ω2 > 0

λ = −ω 2 < 0

(c) Solve the T (t) equation for each λ that produced a non-trivial solution.

(d) State the general solution u(x, t) by summing each non-trivial solution un (x, t) = Fn (x)Tn (t) found.

9
(e) Find the solution to the heat equation satisfying the initial value condition u(x, 0) = 2 cos2 (x) with
insulated boundaries at x = 0 and x = π. You should not need to do any integration to obtain the
solution.

(f) Use MATLAB to plot the solution for t = 0, t = 0.1, t = 0.5 and t = 5, all on the same axis, identified
by a legend. Describe how u behaves below: What happens for large values of t? What happens at
the boundaries x = 0 and x = π?

10

You might also like