Get Instant Help From 5000+ Experts For

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Solving Second Order ODE using Runge-Kutta method

Assessment Instructions

Assessment Instructions

This assignment requires you to use the 4th order Runge-Kutta method to solve a second order Ordinary Differential Equation (ODE). You are required to solve the problem using both MS Excel and MATLAB.

This assignment is worth 20% of the total marks for this component.

Any material considered not being the student's own work will not be awarded marks.

Your final submission should include the following three elements:

1. Handwritten Submission:

Using the state-space method, document the steps required to reduce the given second order equation to a set first order equations. Scan and save your handwritten solution as a pdf document  using the following  naming scheme :

tastname_firstname_A2.pdf

Note: You must include the coversheet provided with this submission (see Brightspace). (20 marks)

2. MATLAB:

Using the state variables identified in part 1, solve the ODE using MATLAB's ode45 solver. You should create a script file to run the code and a function file to hold the function definition. Your code should produce a plot showing the variation of the dependent variable(s) with the independent variable for the results you obtained.

Save you MATLAB files using the following naming scheme:

lastname_firstname_A2_s.m                                 ..script file

lastname_firstname_A2_f.m                                  ...function file

3. MS Excel:

Create an Excel spreadsheet with the Runge-Kutta (RK4) solution.Include a plot showing the variation of the dependent variable(s) with the independent variable.

Save you Excel file using the following naming scheme:

lastname_firstname_A2.xlsx  (50 marks)

The following equation can be used to model the deflection of a mast subject to a wind force:

Where:

a is the constant wind force,

E is the modulus of elasticity,

L is the mast length, and

I is the second moment of area.

Calculate the deflection of the mast using the 4th order Runge-Kutta method with the following initial

conditions:

y = 0 & jt = 0 at z = 0

Perform the first analysis with ndivisions of the length L to define the step (see the table below for your assigned value of n). Repeat the analysis with twice the number of divisions (i.e. 2n divisions). Produce a graph of the deflection vs height of mast (see Figure 1) and of the curvature vs height of mast (see Figure 2) for the two cases.

Finally, solve the same problem using MATLAB and plot the same graphs with the results obtained from these calculations.

Important:Make sure you identify correctly which one is the independent variable in the problem and consequently which are the dependent variable(s).

 Data Set a (N] E(N/m2] I (m'J L (m] # of divisions,n 1 2 - 50 58 1.20E+08  - 1.43E+08 0.05 0.03 30 35 6 7 3 48 1.38E+08 0.04 32 8 4 59 1.42E+08 0.05 26 9 5 - 6           7 52 f 37 33 1.48E+08 1.27E+08 - 1.03E+08 0.06 0.07 0.08 20 30 30 - 10 6 7 - 8 58 1.48E+08 0.04 38 8 9 51 1.10E+08 0.05 26 9 0 51 1.10E+08 0.05 27 10

Table 1:Data for problem

Adapted from: Numerical Methods for Engineers, Chapra

Figure 1:Typical plot of Deflection vs.Height (MS Excel)

Figure 2:Typical plot of Curvature vs. Height (MS Excel)