关键词 > AMME2000/BMET2960/BMET9960

AMME2000/BMET2960/BMET9960 - Assignment 1

发布时间:2023-03-23

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

AMME2000/BMET2960/BMET9960 - Assignment 1

Due: 11:59 pm Friday 31st March 2023

Assignment Information

This assignment focuses on your understanding of the analytical and numerical solution to the Heat/Diffusion Equation.

• Your report should be your own work. Any students who use third-party services such as Chegg to post or view assignment questions will receive 0 for the assignment and be reported. These services provide us with detailed data on user viewing/posting because they are hosting our

copyrighted material.  For more information, see the first lecture where academic integrity, including penalties, was discussed at length.

• 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 assignments will receive a mark of 0;

• Marks will be deducted for including screenshots of equations and/or figures;

• Your MATLAB code must be included as an appendix to the assignment report. 10% of the assignment marks are allocated for the readability and quality of your code;

• 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

Antarctic ice sheets are typically composed of fresh water.  The melting of these ice sheets dilutes the surrounding (salty) sea water, disrupting the salt concentration. This has important implications for ocean currents and the ecology of the region [1]. To study how melting ice sheets impacts the salinity of sea water, you designed an experiment in a large test rig. The rig allows a block of ice to melt into salt water, which

Test section

X = 0                                                                                                                   X = L

Figure 1: A systematic sketch of the problem

has 5% salt concentration. Before working with the rig you’d like to do some simplified calculations and simulations to understand what to expect in the experiments.

Assume the salt diffusion can be modeled by the diffusion equation:

                            2

t                  x2

where S(x, t) represents the local salinity at location x and time instant t . A sketch of the problem is shown in figure 1 and the following assumptions have been made:

• The problem is considered one-dimensional in space (depends only on x);

• Ignore all other effects (e.g., pressure, buoyancy, convection) and focus only on diffusion;

• The far end of the test section (x = L) is carefully controlled such that it is always 100% salt water;

• At the inlet (x = 0) the large block of ice means it is always pure fresh water;

• The test section is initially filled with salt water;

• The diffusivity is given by D = 2 × 105m2 \s and the test section is L = 50m long;

• The salinity of the salt water is S = 5%; while the salinity of the fresh water is S = 0%.

Part A Transient development (60%)

Section 1: Analytical solution (30%)

1. Mathematically state the boundary conditions and the initial condition of the problem. (3%)

2.  Since the problem has a non-zero boundary condition at x = L, the overall solution S(x, t) is the sum of a steady-state solution Sss(x) and a homogeneous solution Sh(x, t) . Derive the steady-state solution Sss(x) from the governing equation (1) (4%).

3. Mathematically state the boundary conditions of the homogeneous problem and show that the homo- geneous initial condition is given by Sh(x, 0) = 0.05 − 0.001x . (3%)

4.  Using separation of variables, demonstrate that the homogeneous problem can be recast into the

F\\(x) + p2 F (x) = 0,

G. (t) + Dp2G (t) = 0,

where p2 is the separation constant. (4%)

(2a) (2b)

5. By solving the spatial and temporal ODEs, determine the general solution to the homogeneous problem Sh(x, t) in terms of the unknown Fourier coefficients Bn . Show all relevant working. (5%)

6. Using the appropriate Euler formula and homogeneous initial condition, determine the Bn  Fourier coefficients (note that this will require you to integrate by parts). (5%)

7. Demonstrate that summing more eigenfunctions leads to a better representation of the initial condition. Do this by plotting the true initial condition together with several overlaid curves of Fourier represen-

tations having different numbers of Fourier terms.  (Make sure all of the curves are distinguishable with labels/colours and an appropriate legend.) (5%)

8. Finally, combine your steady-state solution Sss(x) and homogeneous solution Sh(x, t) to give the full solution S(x, t) to the problem. (1%)

Section 2: Numerical solution (30%)

1. Discretise the governing equation (1) using the FTCS scheme and rearrange this to give an explicit expression of salinity Si(t)+1 at location i and time step t + 1. (5%)

2. Implement the FTCS scheme in Matlab for this problem and compare the salinity distribution at t = 10 days using 6 different spatial grid sizes:  n = 9, 17, 33, 65, 129, 257.  In order to ensure numerical stability use Δt = 100s for all your calculations. Compare your numerical solutions with the analytical solution by overlaying them all (i.e.  the analytical solution and 6 different numerical curves) on a single plot. Note that you should use at least m = 100 Fourier terms for the analytical solution. (10%)

3. Using the numerical solution obtained above, verify the order of accuracy of your solution by com- puting the error norms L1 , L2, and L. Present the error norms and order of accuracy in the form of Table 1, and briefly discuss if these error norms meet your expectations. In your answer be sure to demonstrate how to obtain the order of accuracy from the error norms. (5%)

n      L1      L2      L∞     O(L1)    O(L2)    O(L)

9

17

33

65

129

257

Table 1: Grid number n and error norms

4. Demonstrate the temporal evolution of the salinity distribution with time by plotting it at t  = 1, 10, 50, 100 days and at steady-state, all on a single figure. (5%)

5. Plot the salinity evolution at the midpoint (x = 25) against time, up until you think it reaches steady state. You should use n = 129 and Δt = 100s. In your answer, briefly explain how to determine if the solution has reached steady-state in your numerical scheme based on the midpoint salinity. (5%)

Part B: Numerical extensions (20%)

Section 1: Adding a source (forcing) term (10%)

You add some floating sea ice’ blocks with higher salinity to the test section. As a result of the melting ‘sea ice’, the salinity distribution now follows the diffusion equation with an additional source term:

S(x, t) = D      S(x, t) + f (x, t),

where the source term f (x, t) is given by

f (x, t) = Ase ,

and As  = 103 .

(3)

(4)

1. Explain how you would discretise the source term to add it into your FTCS scheme. (4%)

2. Modify your numerical implementation to include the source term and use a plot to compare the salinity distribution at t = 10, 50 days with and without the source term. You should use n = 129 and Δt = 100s.  Do you think this forcing term will change the steady-state salinity distribution?  Give your reasons. (6%)

Section 2: Considering an insulated rig (10%)

Suppose that once the salinity distribution in Part A reaches steady-state, the ends of the rig (x = 0 and x = L) are insulated (i.e., there is zero salinity gradient across the boundary). This is known as a Neumann boundary condition.

The Neumann boundary condition in numerical solutions can be implemented by adding a “ghost” node outside the boundary, such that the gradient at the boundary is enforced by a central stencil. For instance, at boundary x = L, the Neumann boundary condition is implemented as:

 = 0,                                                              (5)

where 0 denotes the value of the desired Neumann boundary condition, xn1  = L − Δx (i.e., within the computational domain) and xn+1 = L + Δx (i.e., outside the computational domain, the ghost node). For the insulated case, 0 = 0.

1. Modify your FTCS numerical implementation from Part A to account for the Neumann boundary conditions and plot the salinity distribution at t = 0(initial condition), 10, 50, 100 days after being insulated.  You should also include two plots zoomed in near the boundary (including the ghost” nodes) to demonstrate the correct implementation of the Neumann boundary condition.(5%)

2. Briefly discuss your code modifications and how this implementation is different from Dirichlet boundary conditions. (5%)

References

[1] Ashish. Would oceans become less salty if all the polar ice caps melted? Science ABC, 2022.