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

MECH3750: Engineering Analysis II

Assignment II: Numerical Modelling with the Diffusion Equation in Cylindrical Coordinates

Aim

The aim of this assignment is to have you demonstrate your understanding of parabolic di↵erential equations by developing a numerical scheme that models a physical process in an unfamiliar context (i.e. heat conduction in cylindrical coordinates). Your solutions are to be implemented in Python and formally documented in a report.

Learning Objectives

This assignment supports the following learning objectives, as listed in the Electronic Course Profile:

1.1 Understand which types of mathematical model are appropriate for different sys- tems in mechanical engineering.

1.2 Model systems using algebraic equations, ordinary differential equations, partial di↵erential equations and integral equations.

1.3 Construct system models based on rough descriptions of mechanical engineering situations or problems.

2.3 Implement analytical and numerical solutions to problems in the Python pro- gramming language.

2.5 Compute solutions to partial di↵erential equations using a spectrum of analytical and numerical methods including separation of variables and the finite di↵erence method.

3.1 Interpret the results of analysis in terms of the behaviour of the physical system it models.

3.3 Report on the results of analysis in a required format.

4.1 Understand the language and structure of analytical, asymptotic, and numerical methods suffi ciently to find and understand new methods from the literature.

4.3 Apply new techniques to engineering applications by implementing them in Python programs.

The Problem

Chaff and  Flares  Brewing  create  lagers  and  ales  in  a  backyard  Brisbane  shed.  During winter, it is sometimes necessary to heat the brew kettle to stop ales, which ferment be- tween 20 and 22C, from dropping below the target temperature. This can be achieved

by wrapping the curved wall of the kettle in a thermostat-controlled electric blanket. The goal of your work is to model and numerically simulate the transient temperature distribution inside the kettle.

z

H

r

Figure 1: Schematic diagram of the simplified brew kettle geometry showing (left) the diameter, D, and height, H, and (right) the axes of the cylindrical coordinate system. The shaded area represents the fermenting wort (i.e. the aqueous solution of grain).

The kettle has  diameter,  D  =  0.4 m,  and  height,  H  =  1 m,  and  is  filled  with  V = 90 l of wort with known properties: density  = 1000 kg/m3, thermal conductivity k = 0.6 W/(m K), and specific heat Cp = 4184 J/(kg K). The remaining volume of the kettle is filled with air (= 1.2 kg/m3, k = 0.025 W/(m K), Cp = 700 J/(kg K)). A schematic representation of the kettle is shown in Figure 1.

A thermocouple is located on the central axis of the kettle, 0.25 m from the bottom. The electric blanket is activated when the thermocouple detects that the wort temper-

ature has dropped to 15C. The blanket operates at a stable temperature of 35C and maintains perfect contact with the kettle wall. The top and bottom surfaces of the kettle are perfectly insulated.

If it is assumed that the problem is axisymmetric and the contents of the kettle are stationary (i.e. no convective currents), the transient temperature distribution inside the kettle can be modelled using the di↵usion equation in cylindrical coordinates,

⇢C @ T 1 @ rk @ T  + 1  @ k @ T  + @ k @ T  , (1)

where T (r, $, z) is the temperature in the kettle and r$, and z represent the coordinate system in which $ is the angle of rotation around the z axis.

I. Model of the physical problem

1. Assuming axisymmetry (i.e. the temperature profile in the kettle is independent of $), simplify Equation (1) to define the partial di↵erential equation (PDE) that could be used to model this heat conduction problem. Include a sketch of

the simplified solution domain which names each of the boundaries. [1 mark]

2. Formulate appropriate boundary conditions for all extremities of your solution domain, and clearly link these to the boundary names in your sketch. [4 marks]

II. Numerical method

1. Derive an explicit finite di↵erence scheme to discretise the model PDE in two spatial dimensions, r and z. Write the general, internal nodal update equation for this scheme. [1 mark]

2. Repeat II(1) using an implicit scheme. [1 mark]

3. Derive the discretisation of each of the boundary conditions such that they match the spatial order of convergence of your numerical scheme. [3 marks]

III. Simulation and visualisation

1. Implement and execute the simulation of your explicit scheme for a period of 24 h. Assume that the initial temperature of the wort and air inside the kettle is uniformly 15C. Generate contour plots of the temperature distribution in the kettle at 10 min, 30 min, 1 h, 6 h and 24 h. Also generate a graph of temperature with time at the location of the thermocouple. [15 marks]

2. Repeat III(1) with your implicit scheme. Justify your choice of time step. [15 marks]

3. Compare your explicit and implicit schemes by plotting their predictions of temperature at the thermocouple on a single graph. Comment on your findings. [5 marks]

4. Consider an arrangement where, instead of an electric blanket, the kettle is heated by raising the temperature of the surrounding air. Repeat III(1) using

an  air  temperature  of  25C  and  a  convective  heat  transfer  coeffi  cient  at  the kettle-air interface of ha = 15 W/(K m2). Comment on your results. Hint: Consider how this arrangement changes the boundary condition on the kettle

wall. [5 marks]

5. Repeat III(1) for at least one other choice of grid spacing. Compare your results using the time it takes the thermocouple to reach 20C and, in doing so, comment on the grid-dependence of your numerical predictions. Hints: Be reasonable. If you try to run with a grid spacing of 1 µm you’re most likely going to have a bad time. Also, include something in your code that tells you how far into your simulation you are, so that you know how much longer you have to wait. [10 marks]

The Report

Document your work in a formal report that includes, but is not necessarily limited to, the following:

i. Introduction: A brief description of the problem you have been asked to solve;

ii. Methodology: The definition of your approach to solving this problem, including all working and relevant assumptions;

iii. Results: The appropriate presentation of results, which might include figures, graphs and tables;

iv. Concluding Remarks: A critical discussion of your approach to the problem and your findings. At a minimum this should include comment on the stability, con- vergence, accuracy and computational effi ciency of your scheme.

Submission

You will be required to submit your report and your code. It is expected that your code will be neatly structured and well documented so that it can be run and interrogated during the marking process. A Turnitin submission link for the report will be made available on Blackboard. Your code should be run from the single main.py Python script that contains a function for each of the Part III questions (e.g. def PART III 1(...):),  and submitted via a push to the MECH3750 GitHub Classroom.  The link  to create your repository is https://classroom.github.com/a/k7tLz84B. The due date and time applies to both the report and your code (i.e. if either is late, then your submission is late).