100% Guaranteed Results


CST8233 – Numerical Earthquake Simulation Solved
$ 20.99
Category:

Description

5/5 – (1 vote)

NOTE: Plan to finish a few days early to avoid last minute hardware/software issues for which there is no allowance.

Purpose: This application uses a file of earthquake data to run a simulation of the effect it would have on a building. It is the Northridge earthquake of 1994. Here is a quote regarding the earthquake:

Data from the earthquake is in the supplied file Northridge.txt in the form of ground movement (column 2) recorded at different times (column 1). Each row in the file is time t in seconds followed by a space followed by the ground displacement x in centimetres (you must divide by 100.0 to get it in metres for calculations). The data is shown on the right.
It covers the first 10 seconds.

The assignment uses centred numerical differentiation, as given in lectures (equation 12), to calculate the ground acceleration associated with the ground displacement at each time. Then in one possible model this acceleration is used to drive the building movement simulation according to the ordinary differential acceleration equation (ODE):
d2x
2  a  kx bv dt
k and b are constants; k = 20.0, b = 10.0.

In this expression is the net acceleration of the building that is the resultant of:
• the external acceleration a from the earthquake (that you just calculated using the centred numerical differentiation)
• the opposing deceleration kx caused by the building springiness that increases as the movement x increases
• the opposing deceleration bv from friction that increases with the building velocity v =

This is the ODE used in the algorithm and the purpose is to solve for x and v as time t increases from 0.0 onwards to the end of the data in the Northridge file. You should use Heun’s algorithm.
Note that in your algorithm the second order differential equation is broken down into two first order equations:
1. dv/dt = d2x/dt2 = a – kx – bv = f(x,v)
2. dx/dt = v

so you will be applying Heun’s algorithm separately to each of them.
Algorithm
While the user wishes to continue, the application asks the user to run the simulation one more time. The simulation uses Heun’s improvement of Euler’s method, as explained in lectures, iteratively to solve the differential equations above.
You need to generate the ground acceleration from the Northridge ground movement. This could be done initially before the iterative solution to the ODEs and stored dynamically, or it could be done as needed during the iteration.
Before the iterative process starts, the building is at rest so the initial condition is time t=0.0, v = 0.0 and x = 0.0.
During the simulation the differential equations are solved iteratively using Heun’s method to generate the building movement x and velocity v at the end of each step in time using the ground acceleration from your calculation and the x and v from the last iteration that are needed to calculate the terms in the differential equation above.
Finally, at the end, all the x and v values at the time intervals are saved in a comma‐delimited text file (named Results1.txt in the example below) that can be read into MS Excel to generate graphs. This file contains the following columns:

column 1: time from column 1 of Northridge.txt column 2: ground movement from column 2 of Northridge.txt column 3: calculated ground acceleration a using the centred numerical differentiation column 4: calculated building movement x from solving the differential equations column 5: calculated building velocity v from solving the differential equations

The graph at the end shows what your x data might look like (although yours might be different if you have adopted a different strategy for using the Heun method).
An example of the output of the running application is given at the end.

See the Marking Sheet for how you can lose marks but note the following:
• at any time the dynamic memory allocated is just sufficient for the amount of data to process and when the application terminates it releases all dynamically allocated memory so it does not have a resource leak,
• before you submit the code, check that it builds and executes in Visual Studio 2015 as you expect, • if must not crash in normal operation,
• make sure you have submitted the correct file – if I cannot build it because the file is wrong or missing from the zip, even if it’s an honest mistake, you get 0,
• this is the last assignment and it cannot be late – there’s no time.

What to Submit : Use Blackboard to submit this assignment as a zip file (not RAR not 7‐Zip not 9 Zip) containing the source code file(s) ass3.cpp (definitely not the entire project!). The name of the zipped folder must contain your name as a prefix so that I can identify it, for example using my name the file would be tyleraAss3CST8233.zip. It is also vital that you include the Cover Information (as specified in the Submission Standard) as a file header in your source file so the file can be identified as yours. Use comment lines in the file to include the header.

Example Output:

Earthquake Simulation
1. run the simulation
2. Quit
1
Please enter the name of the earthquake file to open: Northridge.txt
File opened; 218 rows of data
OPEN FILE TO SAVE
Please enter the name of the file to open: Results1.txt

Earthquake Simulation
1. run the simulation
2. Quit

Graphed output of from Results1.txt of building movement x in metres against time t in seconds.

Reviews

There are no reviews yet.

Be the first to review “CST8233 – Numerical Earthquake Simulation Solved”

Your email address will not be published. Required fields are marked *

Related products