Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
AMME2000/BMET2960/BMET9960 - Assignment
Assignment Information
This assignment focuses on your understanding of the analytical and numerical solution to the
Heat/Diffusion Equation.
• Present your assignment as a concise report in PDF format;
• 10% of the assignment marks are allocated for overall clarity and presentation of the report;
• The entire report must be typed, including all mathematical working; handwritten assign-
ments will receive a mark of 0;
• Marks will be deducted for including screenshots of equations and/or figures;
• Your MATLAB code is to be included as an appendix to the assignment report;
• The report should not exceed 10 pages; additional pages will not be marked, so aim to be
concise. (NOTE: The page limit does NOT include your MATLAB code in the appendix);
• Structure the report using the appropriate Section and Question numbers (e.g. 1.1, 1.2).
Each question will be marked separately, so make sure all relevant working and final answers
are in that section;
• All figures and tables in your report must be numbered and must be referred to and discussed;
• Your report should be submitted to Turnitin by the due date. Late submissions
will incur a penalty of 5% per day late.
We have prepared an exemplary assignment to guide you in writing your own. You can access this
here. Alternatively, you can access it from Canvas > Modules > Useful Resources.
Introduction
The 2019-2020 fire season in Australia was one of the worst on record. Known as ‘The Black
Summer’, an estimated 300, 000km2 of bushland was burnt.[1] An important ecological effect of
fires is a change in soil phosphate level. Phosphate is a problem if it leaches into waterways.
Therefore, the Department of Agriculture, Water and the Environment has set maximum limits of
100µg/L for a river and 50µg/L for lakes.[2]
In this assignment you will evaluate how a change in soil phosphate level will impact a section of
the Murrumbidgee River which empties into an ecologically sensitive lake. To protect this lake the
river has been temporarily walled off (i.e. the river has been dammed). A schematic of the river
system is given in Figure 1 and the following information has been collected to aid your analysis:
1
• Bends in the river can be neglected, so it may be modelled as a narrow, straight channel (in
the y-direction) with a length L = 80 km;
• The concentration of phosphate where it enters the river (i.e. at y = 0 m) is C0 = 50 mg/L;
• The dam stops any outflow of water, therefore the boundary at y = L can be treated as
insulated;
• The diffusivity of phosphate is D = 2.37× 102 m2s−1;
• The water is initially unpolluted;
• The limiting concentration of phosphate in the river is Cmax = 50 µg/L.
Figure 1: Simplified river schematic
The concentration of phosphate in the river as a function of space and time, C(y, t), can be
modelled with the governing equation given by:
∂
∂t
C(y, t)−D ∂
2
∂y2
C(y, t) = 0 (1)
2
Section 1: Analytic Solution to the Diffusion Equation (45%)
In this section you will use the methods developed in the lectures and tutorials to derive and
explain the analytical solution to this problem.
1. State the boundary conditions and the initial condition of the problem. (3%)
2. Due to the non-zero Dirichlet boundary condition where the phosphate enters the river,
the concentration C(y, t) should be represented by the sum of a steady state Css(y) and
homogeneous Ch(y, t) solution. Derive the steady state solution and show that this solution
still satisfies the governing equation (Equation 1). (3%)
3. If we assume that the function Ch(y, t) can be separated into functions of y and t indepen-
dently (as described in the lectures), show how we can obtain two resulting ODEs;
F ′′(y) + p2F (y) = 0 (2)
G˙(t) +Dp2G(t) = 0 (3)
where p2 is the separation constant. (4%)
4. State the general solution to Ch(y, t) in terms of the unknown Fourier coefficients by deriving
F (y) and G(t). Show all working, including the use of the homogeneous boundary conditions.
(10%)
5. Now determine the initial condition for the homogeneous problem and hence derive the
unknown Fourier coefficient. State your complete solution to the concentration C(y, t) as a
sum of the steady state solution Css(y) and homogeneous solution Ch(y, t). (10%)
6. From your solution:
(a) Briefly explain what F (y) and G(t) mean in terms of how the phosphate is diffusing in
the river (5%); and
(b) Show how summing more eigenfunctions provides an increasingly better approximation
to the initial condition. (Note: here you should just present a single plot with overlaid
curves that are properly labelled.) (5%)
7. Determine how long it will take for the entire length of the river to exceed the maximum
permissible phosphate level. (5%)
Section 2: Numerical Solution to the Diffusion Equation (45%)
In this section you will solve the phosphate pollution problem numerically, validate your numerical
solution using the analytical solution from Part 1, then further develop the numerical model to be
more realistic.
1. The numerical stencil for this problem is shown in Equation (4). It has two forms depending
upon whether you are at the Neumann boundary (at y = L) or within the rest of the domain.
This is necessary to enforce a gradient at y = L rather than simply defining a value.
Cn+1i =
Cni +
D∆t
∆y2
(
Cni+1 − 2Cni + Cni−1
)
i = 2 : ny − 1
Cni +
D∆t
∆y2
(
Cni−1 − Cni
)
i = ny
(4)
3
where ny is the number of grid points in the spatial domain. State the order of accuracy in
time and space for the two stencils in equation (4) and briefly explain how these orders of
accuracy are obtained. (5%)
2. Implement the numerical scheme in MATLAB and compare the phosphate concentration
distribution at t = 28 days for 6 different grid-sizes: ny = 9, 17, 33, 65, 129 & 257.
In each case use the maximum stable time-step obtained for the ny = 257 grid. These
numerical solutions should be presented on a single plot together with the analytical solution.
For the analytical solution use m = 100 Fourier terms and at least 1000 grid-points. To
highlight differences in the comparison, you should also show a second plot zoomed in near
the Neumann boundary. (15%)
3. Verify the order of accuracy of your solution by calculating the L1, L2 and L∞ Error Norms
for the grids in Question 2.2 and present the results in table format (see lectures). Explain
the behaviour of the error values with respect to decreasing grid size and hence suggest
and justify an appropriate y−grid size to use in practice. Are these error norms what you
expected based on your answer to Question 2.1? (10%)
4. You receive some experimental data on the phosphate levels in the water and realise that
your model predictions are off by a significant amount. Your model can be improved by
introducing a source term into the governing equation which accounts for river-bed absorption
of the phosphate - i.e. where the concentration of phosphate in the river is partially reduced
by being absorbed into the river-bed. The new governing equation with the source term
included is presented in Equation 5:
∂
∂t
C(y, t)−D ∂
2
∂y2
C(y, t) = α (Ceq − C(y, t)) (5)
where α = 1.17× 10−6 and the equilibrium concentration Ceq = 1 µg/L.
(a) You now need to reformulate your numerical scheme to include the source term in the
new governing equation. The source term can be evaluated at each individual grid point.
Numerically evaluate the diffusion of the pollutant in the river using the best grid size
you determined from Question 2.3 and the maximum stable time-step size. Compare
the phosphate concentration at y = L = 80km downstream with and without the source
term present and discuss the nature of the source term and its effect on the solution at
14 days. [Note: for solution stability use the stability criteria σ ≤ 1/4] (10%)
(b) A particular chemical can be added to the river to artificially increase the value of α such
that α = 2.0× 10−5. Using appropriate plots and explanation, compare the phosphate
levels for this new value to what you obtained in Question 2.4a. Under these conditions,
could the dam be removed without exceeding the maximum allowed phosphate level for
a lake? (5%)