Discusses the similarities or differences between the


Part -1:

Introduction

A type of electrical switch can be modelled as a simply-supported beam (Fig. 1), where the middle of the switch is pushed down until it makes contact and completes the circuit. Measure- ments have been made of the deflection of the switch; these measurements have been averaged at each location, with the averages stored in the file ass3q1in.csv.

a1737_Figure.jpg

Figure 1: Simply-supported beam. The roller support on the left end provides a vertical reaction force which prevents vertical motion; the pin support on the right end provides both vertical and horizontal reaction forces, which prevent both vertical and horizontal motion. There is a point load with force P located in the middle of the beam.

The theoretical formula for the deflection is:

v(x) = - Px/48EI (3L2 - 4x2),  0 ≤ x ≤ L/2

       = - Px/48EI (L2 - 8Lx + 4x2),  L/2 < x ≤ L/2   

For your assignment, the following values are to be used:

E = 9.7492 × 102 GPa

I = bh3/12

b = 0.5mm

h = 0.25 mm

P = Ea

a = 10-10 m2a

L = 2.0 cm

where b is the width of the beam (in the z-direction), h is the thickness of the beam (in the y-direction) and a is a variable which doesn't represent any component of the structure.

Requirements

For this assessment item, you must perform hand calculations:

1. Derive the formulae for the slope ( v'), curvature (v'') and v''' of the beam from Eq. (1).

2. Estimate the value of the slope at the second measurement point using backward, forward and central differences.

3. Validate your answers from Requirement 2 using the appropriate formula from Requirement 1.

4. Estimate the numerical errors in the calculations of Requirement 2 using the appropriate formulae from Requirement 1. What is the ratio of (the numerical error) to (the deviations from the theoretical values calculated in Requirement 3)? Be careful to get the sign consistent between the errors (i.e. that you compare the same thing)!

5. Discuss which is the best result out of the backward, forward and central differences and why.

You must also produce MATLAB code which:

6. Calculates backward, forward and central differences for the length of the beam. 7.Verifies the results from Requirement 6 using the results of Requirement 2.

8. Calculates the theoretical values at the measurement locations using the appropriate for- mula from Requirement 1. Calculates the error between the numerical and theoretical values.

9. Estimates the numerical error in the calculations of Requirement 6. Perform this using: (a)analytical derivatives obtained from Eq. (1) (b)numerical derivatives (for data spaced evenly in x) for as many data points as possible (you won't be able to calculate these at the ends of the data):

d2y/dx2|xi = yi-1 - 2yi + yi+1/(Δx)2

d3y/dx3|xi = yi+2 - 2yi+1 + yi-1 - yi -22/(Δx)2

10. Plots the results from Requirements 6 and 8 on the same graph.

11. Plots the results from Requirements 8 and 9 and discusses the results, including which is the best method, reporting to the Command Window1.

12. Has appropriate comments throughout.

Part -2:

Introduction

One of the challenges with calculating derivatives is that noise in the data is amplified when the data is differentiated. However, random noise in data is diminished when the data is integrated. This is the philosophy behind the Integrated Radial Basis Function (IRBF) [1]. The file ass3q2in.csv contains data on the slope for the same beam as Question 1 with the same relative level of noise in the data as Question 1. Your task in this question is to compare integration versus differentiation.

Requirements

For this assessment item, you must perform hand calculations:

1. Use the trapezoidal method to determine the deflections at the mid-point and end of the beam using the data in ass3q2in.csv. Perform the calculations using the data at 5 mm intervals (do not calculate based on all the data).
2. Validate your answers using the theoretical values from Eq. (1).

You must also produce MATLAB code which:

3. Uses the trapezoidal method to determine the deflections at the mid-point and end of the beam using the same data as Requirement 1.
4. Verifies the results from Requirement 3 using the results of Requirement 1.

5. Uses the trapezoidal method to determine the deflections at the mid-point and end of the beam using all the data in ass3q2in.csv.

6. Reports the values from Requirements 3 and 5 and the theoretical values from Eq. (1), discussing the reasons for similarities or differences.

7. Estimates, reports and discusses the numerical error in the calculations of Requirement 5.

Perform this using:

(a)analytical derivatives obtained from Eq. (1) (b)numerical derivatives based on the data in ass3q2in.csv

8. Plots the data from from ass3q2in.csv with the numerical results from Question 1 and the theoretical slope.

9. Plots the data from from ass3q1in.csv with trapezoidal integration of ass3q2in.csv at all locations of x and the theoretical deflection.

10. Discusses the results from the plots.

11.Has appropriate comments throughout.

Part -3:

Introduction

A heat exchanger is being used to heat water in liquid phase at 1 atm (= 1 atmospheric pressure = 101.3 kPa) from T = Tin to Tout. The appropriate formula for this process is (T is in Kelvin):

dρcpT/dt = Q.'''

where ρ is the water's density, cp the specific heat at constant pressure and Q.''' is the volumetric heat transfer rate [dimensions of energy per unit (time × volume)]. Some properties of water as a function of temperature are recorded in Table 1 and the heat transfer rate can be modelled by:

Q·''' = { 100(393 - T ) kW/m3 , 273 K ≤ T ≤ 343 K

          { 500/3 (T - 313) kW/m3, 343 K < T ≤ 373 K

Table 1: Thermodynamic properties of liquid water at 1 atm. The thermal conductivity k will be used in Question 5.

T (K)

ρ (kg/m3)

c(kJ/kg.K)

k (W/m.K)

273

999.84

4.2176

0.5610

283

999.70

4.1921

0.5800

293

998.21

4.1818

0.5984

298

997.05

4.1814

0.6072

303

995.65

4.1784

0.6155

313

992.21

4.1785

0.6306

323

988.04

4.1806

0.6436

333

983.21

4.1843

0.6544

343

977.78

4.1895

0.6631

353

971.80

4.1963

0.6700

363

965.31

4.2050

0.6753

373

958.35

4.2159

0.6790

For your assignment, the following values are to be used:

Tin = 273 K
Tout = 7.5466 × 10 + 273 K
tres = 9.3199 × 10 s ,

where tres is the residence time (the total duration a parcel of fluid is present in the heat exchanger, i.e. the time required for a parcel of fluid to flow from the start to the end of the heat exchanger).

Requirements

For this assessment item, you must perform hand calculations:

1. Assume that the properties of water are constant (use the values from Table 1 at 273 K). Use Euler's method to estimate the temperature after 10 s using five equal steps. Only use the first formula for Q·''' (even if the temperature goes over 343 K).

2. Given the assumptions of Requirement 1, use Eq. (4) to obtain an analytical formula for d2T/dt2 that is a function of T.

3. Find the analytical solution of Eq. (4) given the assumptions of Requirement 1 and use that to determine if the temperature will reach 343 K before tres.

You must also produce MATLAB code which: 4.Repeats Requirement 1 to verify the method.

5. Repeats Requirement 1 using an appropriate timestep (which must be reported) to de- termine if the water's temperature reaches Tout and 373 K before tres. For both target temperatures:
- If the target temperature is reached, the time required to reach that temperature should be reported.
- If the target temperature is not reached, the temperature at tres should be reported.

6. Repeats Requirement 5 using the values of ρ and cp from Table 1.

7. Repeats Requirements 5 and 6 using the following MATLAB ode solvers:

(a)ode23

(b)ode45

If you use the default settings, report this, otherwise report what values you used for any changed settings.

8. Repeats Requirement 5 using Simulink with Euler's method and the same solvers as Requirement 7. For this Requirement, only test whether Tout reaches 343 K.

9. Repeats Requirement 5 using a variable timestep so that the numerical error divided by the change in temperature at each timestep (take the absolute value of this ratio) is:

(a) 0%
(b) 1% (c)0.1%

Estimate the numerical error using the formula from Requirement 2. The average timestep for each simulation is to be reported.

10. Plots the temperature versus the time normalised by residence time to non-dimensionalise the time axis. The following plots are to be produced:

(a) All results with constant values of thermodynamic properties.

(b) All results with variable values of thermodynamic properties.

(c) All results using Euler's method.

All plots where constant values of thermodynamic properties are shown must also show the analytical solution.

11. Compares the different methods shown in each plot and discusses which is the best for this problem.

12. Has appropriate comments throughout.

Part -4:

Introduction

A person pushes on the middle of a switch, as shown in Fig. 2. Your task is to determine if the design of the switch will guarantee that the beam will deflect sufficiently to make contact with the terminal below the beam.

1385_Figure1.jpg

Figure 2: Switch modelled as a simply-supported beam. The roller support on the left end provides a vertical reaction force which prevents vertical motion; the pin support on the right end provides both vertical and horizontal reaction forces, which prevent both vertical and horizontal motion. There is a pressure p located in the middle of the beam which acts across the entire width and some of the length. The terminal for the switch is the block located the distance δ below the beam and in the middle of the beam.

The appropriate formula to describe the transient behaviour of the deflection of the beam is the Euler-Lagrange equation:

EI.∂4v/∂x4 = -μ∂4v/∂t2 + q(x)

where E is Young's modulus, I is the second-moment of area, v is the deflection in the y- direction, µ is the mass-per-unit-length of the beam and q(x) is the externally applied load at location x (units of force-per-unit-length). The Euler-Lagrange equation is numerically unstable unless you are able to separate the variables (which is not applicable in this case), so in this problem only the steady-state situation will be analysed, which is the Euler-Bernoulli equation:

EI.∂4v/∂x4 = q(x)

Appropriate boundary conditions are:

v(0) = 0
v(L) = 0
v''(0) = 0
v''(L) = 0

For your assignment, the following values are to be used:

E = 210 GPa

I = bh3/12

b = 0.5 mm

h = 0.25 mm

L = 2.0 cm

δ = 2.418 ÷ 10 mm

Requirements

For this assessment item, you must produce MATLAB code which:

1. Calculates the curvature profile under steady-state conditions, i.e. determines ω(x) = v''(x). To achieve this, re-write the steady-state form of Eq. (7) so that ω is the dependent variable and solve.

2. Calculates the steady-state deflection profile directly from Eq. (7) and uses this result to determine if the beam deflects sufficiently to contact the terminal. To do this, do not solve Eq. (7) at the first interior nodes: instead, apply the curvature boundary conditions by specifying that the gradient between the boundary and first interior node is equal to the gradient between the first and second interior nodes (i.e. set vtt = 0 at the first interior node). From these results, calculate the curvature.

3. Plots the curvature and deflection results from all previous Requirements, also marking where the terminal is located on the deflection plot.

4. Discusses the similarities or differences between the curvature results and any reasons for them.

5. Has appropriate comments throughout.

Part -5:

Introduction

The heat exchanger from Question 3 will be re-examined. In Question 3, the temporal derivative was Lagrangian (i.e. the temperature result was for a parcel of fluid flowing through the heat exchanger), which could mathematically be done because the system was considered to be steady-state. In this question, the start-up process from all the water being a temperature of Tin will be simulated. The formula for this process can be modelled as (T is in Kelvin):

ρcp ∂T/∂t + uρcp∂T/∂x = k∂x2 + Q''' (12)

where ρ is the water's density, cp the specific heat at constant pressure, u is the speed in the x- direction, k is the thermal conductivity and Q''' is the volumetric heat transfer rate [dimensions of energy per unit (time × volume)]. Some properties of water as a function of temperature are recorded in Table 1 and the heat transfer rate can be modelled by:

Q·''' = 50(x/L)2 GW/m3   (13)

For your assignment, the following values are to be used (L is the length of the pipe):

Tin = 273 K

2T/∂x2|x = L = 0

u = 8.3443 cm/s

L = 1 m .

Requirements

For this assessment item, you must produce MATLAB code which:

1. Simulates the system for a duration of 5 ms. The convective term [second term in Eq. (12)] should be "upwinded", i.e. use a backward difference.

2. Plots the temperature distribution in the pipe at initial conditions, final conditions and when the temperature at the outlet becomes greater than a multiple of 10?C, i.e. when T (L, t) = 273 K, 283 K, 293 K etc. Report on the plot how long it takes to reach each of these distributions.

3. Has appropriate comments throughout.

Part -6:

You are to write a brief report (about 100 words, excluding any code), which includes:

1. A description of an instance during the writing of your code for this assignment where there was a problem (e.g. a bug, an error, an unexpected result) or the most challenging aspect to overcome.

2. What steps you took to overcome the problem or challenge (including any code you wrote to test the problem/challenge).

3. The code before you resolved the problem or challenge, highlighting the line(s) of code where the problem or challenge occurred.

4. The code after you resolved the problem/overcame the challenge.

5. Code from the MATLAB editor is to be copied into Word; screenshots should be taken of the Command window.

Attachment:- Assignment.rar

Request for Solution File

Ask an Expert for Answer!!
MATLAB Programming: Discusses the similarities or differences between the
Reference No:- TGS01656003

Expected delivery within 24 Hours