0% found this document useful (0 votes)
3 views2 pages

practical5_assessed

This document outlines a practical exercise to solve the heat equation using finite differences, focusing on the temperature evolution in a cooling dyke. It includes specific tasks such as deriving initial and boundary conditions, writing a Matlab code for simulation, and analyzing temperature distribution over time. The document emphasizes the importance of providing answers and plots without including code in the final submission.

Uploaded by

Anglo-Saxon NO.1
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)
3 views2 pages

practical5_assessed

This document outlines a practical exercise to solve the heat equation using finite differences, focusing on the temperature evolution in a cooling dyke. It includes specific tasks such as deriving initial and boundary conditions, writing a Matlab code for simulation, and analyzing temperature distribution over time. The document emphasizes the importance of providing answers and plots without including code in the final submission.

Uploaded by

Anglo-Saxon NO.1
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/ 2

Solving the heat equation with finite di↵erences

The goal of this practical is to write your first piece of code to solve a geophysically relevant
case of the heat equation using finite di↵erences.

What is required: Answer all the questions, and produce a document containing your an-
swers and the plots as requested. DO NOT COPY YOUR CODE into the final document, but
attach all your .m files with your submission.

NOTE: Questions 1, 2, 3 and 7 do not require any coding!

1
Here we would like to compute the evolution of temperature across a cooling dyke as a
function of time. The governing equation for the temperature T is

@T @2T
=↵ 2, (1)
@t @x
where t is the time, ↵ is the thermal di↵usivity of the rock, and x is the distance across the dyke
(x = 0 at the center).
We assume the following initial condition:

T (x, t = 0) = T0 + (Td T0 ) ⇥ exp x2 /(2w2 ) , (2)

where w is the width of the dyke and Td its peak center temperature. The boundary conditions
are a constant temperature far from the dyke T (x = L, t) = T0 (where L w), and zero flux
at the center of the dyke @T /@x = 0 at x = 0.

Question 1. What will the solution T (x, t) look like? Use an annotated sketch of the solution
for temperature T as a function of position x at t = 0, and a few additionnal time steps. [10%]

Question 2. Discretise the space coordinate x and the time t, and write a finite di↵erence
numerical scheme for Equation 1 and its boundary conditions. [10%]

Question 3. How do you choose the time and space steps ? Justify. [15%]

Question 4. Write a Matlab code that solves the problem for t = 0 to tfinal = 100 days, using
the following parameter values: [15%]
↵ = 1 mm2 /s
L = 20 m
T0 = 0 C
Td = 1000 C
w = 20 cm.

Question 5. Plot the evolution of temperature as a function of space and time. (try a range
of Matlab functions, like pcolor, contour, or use regular plot commands, and produce one or
two clear figures. Think about the (ink)/(information) ratio !). [15%]

Question 6. Write a Matlab code to extract and plot the maximum temperature reached at
every point x throughout cooling. [10%]

Question 7. At which position x10% is the temperature perturbation less than 0.1Td ? Does
that depend on Td ? [10%]

Question 8. Repeat the calculation and the plot of question 5 for a range of w and ↵. How
does the position x10% scales wth w and ↵? [Hint: this is where nondimensional quantities can
be useful!] [15%]

You might also like