Cs Report Final
Cs Report Final
I. AIMS OF THE PROJECT 2. We’ll create a params object with all the parameters
we need. We keep the drag coefficient fixed, at 0.33 which
The aims of this project are: is average for a baseball.
1. To model the flight of a baseball, and taking a specific 3. We will use a system object that makes a system
example, apply optimization. with these parameters.
2. Modelling and finding the parameters for a bungee 4. We will use a function that computes the drag force,
dunk. as a function of the velocity and acting on the opposite
direction of the velocity. The formula of the drag force
will be:
II. INTRODUCTION ρ × v 2 × Cd × Area
Fdrag =
2
We are curious about the characteristics of a real-world
system that piques our curiosity. Real-world systems are 5. Then we create slope function which basically re-
frequently quite complex, therefore we must choose which turns the total velocity and acceleration of the ball.
aspects to exclude; this process is known as abstraction. 6. Next, we construct an event function that returns
An abstraction produces a model, which is a description the position coordinate and accepts the same inputs as
of the system that only contains the elements we deem the slope function. The simulation ends as soon as the
necessary. Equations and diagrams are two ways that a coordinate crosses 0.
model can be represented and utilized in mathematical 7. And then we run the simulation, and plot the tra-
analysis. It can also be put into practice as a computer jectory.
software that is capable of simulating situations. An ex- The trajectory looks like:
planation for the system’s behavior, a prediction about
what the system will do, or a purpose-driven design could
be the outcome of analysis and simulation. According to
the optimization principle, an entity will behave in a way
that maximizes the value of a particular combination of
abstract functions while taking certain limitations into
account.
3. The cord adheres to Hooke’s Law once it has reached for which the lowest point of the jump will be exactly
its maximum length, exerting force on the jumper in pro- zero.
portion to the length of the extension above its resting To find the length of cord that is required to make the
length. The jumper weighs seventy-five kilograms. jump, we write an error function that simulates a bungee
4. The jumper’s final velocity is 60 meters per second jump and returns the lowest point.
due to drag force.
Our goal is to determine the cord’s length, L, so that We use root scalar with the error function to find the
the jumper descends to the teacup and no beyond. value of cord length that yields a perfect bungee dunk.
The steps are: The required length is 28.8 m.
1. We will proceed in a similar way as before. First, After simulating with the required length of cord, we
we’ll create a params object to contain the quantities get the position vs time plot as:
we’ll need.
2. Then we will use make system to make a system
from the parameters in params.
3. A function that computes the total force of the
cord on the jumper. When the cord is not stretched, it
returns 0, and when it is stretched, it will return the force
constant multiplied by the length stretched, according to
Hooke’s law.
4. Drag force, which computes the drag force as a
function of velocity. We use the same formula for drag
force as we had used before:
ρ × v 2 × Cd × Area
Fdrag =
2
5. We have the slope function, which gives us the total
acceleration and velocity. FIG. 9: Position vs time plot for the length of cord that
Then we run the simulation, and find the following makes the jump
position vs time plot:
Substitution gives,
µv 2 /2
a=g+
µ(L + y) + 2L
FIG. 11: Position vs time plot for bungee dunk with new FIG. 13: Variation with mass of jumper
model
The falling body problem
I have, once again, used the same procedure to the
problem of a falling body, and tried to map its position
vs. time.
C. Excercises
The position vs time graph is :
D. Additional: Variation with mass of cord and Variation of wire mass with mass of jumper:
mass of jumper and falling body problem We vary the mass of wire and the jumper, and try to
see the effects on the trajectory. For low mass of jumper:
I tried to investigate how would the jump vary with For mass of the jumper=20 kg, we have,
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.
FIG. 19