CS Project PDF
CS Project PDF
By Baishali Sur
2111240, Int. Msc.
What is Modelling and Simulation?
We have a system in the real world that interests us, and want to know the
properties about. Often, real-world systems are very complicated, so we
must decide which details can be left out; removing details is called
abstraction.
The result of abstraction is a model, which describes the system and
includes only the features we think are essential. A model can be
represented in the form of diagrams and equations, which can be used for
mathematical analysis. It can also be implemented in the form of a
computer program, which can run simulations.
The result of analysis and simulation might be a prediction about what the
system will do, an explanation of why it behaves the way it does, or a
design intended to achieve a purpose.
The Baseball Problem:
Let’s simulate the flight of a baseball that is batted from home plate at an
angle of 45° and initial speed 40 m/s. Using the center of home plate as the
origin, the x-axis is parallel to the ground; the y-axis is vertical. The initial
height is about 1 m.
Modelling the flight of a baseball
Our objective is to choose the length of the cord, L, and its spring constant, k,
so that the jumper falls all the way to the teacup, but no farther!
First, we’ll create a Param object to contain the quantities we'll need:
After reaching the lowest point, the jumper springs back almost to almost 70 m and
oscillates several times. That looks like more oscillation that we expect from an actual
jump, which suggests that there is some dissipation of energy in the real world that is not
captured in our model.
We see that the jumper does not reach the full length, so the cord length or the cord
tension need to be modified. We find out the cord length for which the jumper’s lowest
point is exactly 0.
To find the length of the cord
required to make the jump, we
write an error function that
simulates a bungee jump, and
returns the lowest point.
In the previous case study, we assume that the cord applies no force to the
jumper until it is stretched. It is tempting to say that the cord has no effect
because it falls along with the jumper, but that intuition is incorrect. As the
cord falls, it transfers energy to the jumper. So, we modify our model to
accommodate the force due to the jumper.
With accommodating that, the acceleration of the jumper becomes:
Where g is the acceleration due to gravity, L is the length of the cord, and
μ is the ratio of the mass of the cord, m, and the mass of the jumper, M.
Assumptions:
Following the previous case study, we'll model the jump with the following assumptions:
1. Initially, the bungee cord hangs from a crane with an attachment point 80 m above a cup
of tea.
2. Until the cord is fully extended, it applies a force to the jumper as explained above.
3. After the cord is fully extended, it obeys Hooke’s law, that is, it applies a force to the
jumper proportional to the extension beyond its resting length.
4. The jumper is subject to drag force proportional to the square of their velocity, opposite
their direction of motion.
5. Let's assume that the jumper's mass is 75 kg and the cord's mass is also 75 kg, so mu=1.
6. The jumper's frontal area is 1 square meter, and terminal velocity is 60 m/s. I'll use these
values to back out the coefficient of drag.
7. The length of the bungee cord is L = 25 m.
8. The spring constant of the cord is k = 40 N / m when the cord is stretched, and 0 when it's
compressed.
We divide the simulation into Phases 1 and Phase 2, phase 1 for which the
jumper has not fallen the entire length of the rope and the rope is slack, and
phase 2 for which the rope is extended.
For phase 1, we only modify the function which computes the acceleration of
the jumper.
And then we run the simulation with an event function that stops the
simulation when we get to the end of the cord.
For phase 2, Once the jumper has falled more than the length of the cord,
acceleration due to energy transfer from the cord stops abruptly. As the cord
stretches, it starts to exert a spring force.
Then we follow similar procedure as before, and run the simulation. The position vs time
plot will look like:
I tried to investigate how would the jump vary with the variation of the mass of
the cord, here is the result. With varying mass of cord, the μ varies, and so does
the force exerted by the cord. The difference between lowest and highest
value of μ is the difference in lowest points of the jump, which is 1 meter. The
rest of the values of μ are in between them.
I also tried to investigate how these trajectories vary with the mass of the
jumper. Here is the plot for the position vs time of the jumper for different
masses of the jumper. It is as expected, with the lightest jumper falling to the
least length and the heaviest jumper falling the most.
Applying the model to a
different scenario: The
falling body problem