Report With Contents Page

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

CEE 212 Fall 2016 Impact

School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Table of Contents
1) Introduction: ............................................................................................................................................. 1
2) Theory:...................................................................................................................................................... 2
Characterizing the motion: ........................................................................................................................ 2
Detecting contact: ..................................................................................................................................... 2
Two cases of contact: ................................................................................................................................ 3
Contact resolution: .................................................................................................................................... 3
Finding Time of Impact: ........................................................................................................................... 4
Code Verification:..................................................................................................................................... 4
Angles vs Time: .................................................................................................................................... 4
Phase portrait: ....................................................................................................................................... 5
Trajectory: ............................................................................................................................................. 6
Energy vs time graph: ........................................................................................................................... 6
Input Data for original MATLAB CODE: ............................................................................................ 7
3) Study and Results: .................................................................................................................................... 8
4) New Observation: ................................................................................................................................... 11
5) Conclusion: ............................................................................................................................................. 13
6) Appendix ................................................................................................................................................ 14
MATLAB Code: ..................................................................................................................................... 14

Page # 0
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Computing Project 4
Impact

1) Introduction:
Fourth computing project is known as Impact. This project is about the model of two bars which
will swing freely around their hinges. They may have positions close to each other to contact
with each other. When they will have contact with each other then they will definitely lose some
energy and they will in contact with each other and this will be according to law of conversation
of momentum.

Fig. 1 Bars which will contact with each other

Figure number 1 shows the bars which will contact with each other again and again. Rod’s
motion’s equation can be derived from conservation of energy. It can also taken from angular
momentum balance. The equation which we will get after this process will be like simple
pendulum equations. We should account for impact in this problem. Therefore, we will stand in
need to do phase-II analysis of the system. We suppose the ideal condition (contact is
frictionless) so the force of contact is normal to surface of contact. We will suppose that this
system will have a restitution coefficient that is supposed to be the ratio of impulse throughout
recovery to the impulse throughout deformation.
Contact between two physical forms of creature, can be a big reason for concern as forces grown
can be substantial and contact can give us outcome to damage to both physical forms of creature.

Page # 1
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University


The equation of motion for each of the pendulums which are is free motion will give us the
equation,
𝑑2𝛳 3𝑔𝑠𝑖𝑛𝛳(𝑡)
+ =0
𝑑𝑡 2 2𝐿
Where,
g = Gravitational acceleration
L = Pendulum length
ϴ = Angle of vertical with the pendulum
Natural Frequency equation is,
1
3𝑔 2
ꙍ= ( 2𝐿 )
This equation will help us for conformation results for calculations.

2) Theory:
Characterizing the motion:
We will track through two angles which are 𝛳1 and 𝛳2 . The equation of motion through two
angles will become,

𝑊1 𝐿21 𝑑 2 𝛳1 𝑊1 𝐿1 𝑠𝑖𝑛𝛳1
+ = 0  For Bar 1
𝑔𝑑𝐿2 2

𝑊2 𝐿22 𝑑 2 𝛳2 𝑊2 𝐿2 𝑠𝑖𝑛𝛳2
+ = 0  For Bar 2
𝑔𝑑𝐿2 2

Most of time will use these equations. For instant times we will have contact. By numerical
integration we will find the solution of these equations. We will need to detect and solve the
contact problem when it happens.

Detecting contact:
For detecting the contact we will create the vector for hinge A to the tip of Bar 2. Now we can
compute those as,

Xn2 + c and Xn+12 + c

For Bar 1 we can create vector as,

Page # 2
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University


2
(𝑋𝑛2 + 𝑐). 𝑚1𝑛 and (𝑋𝑛+1 + 𝑐). 𝑚1𝑛+1

If the first one which is for Bar 2 will be positive then contact must have taken during time step.

Contact detection test gives us the condition for contact as,


2
(𝑋𝑛2 + 𝑐). 𝑚1𝑛 >0 and (𝑋𝑛+1 + 𝑐). 𝑚1𝑛+1 <0

If we will take the computation for projections then we will get the conditions,

2
(𝑋𝑛2 + 𝑐). 𝑛1𝑛 > L1 and (𝑋𝑛+1 + 𝑐). 𝑛1𝑛+1 > L1

Contact will not happen in the result of upper equation so we will do out test now with additional
condition which will be as,

2
0 < (𝑋𝑛+1 + 𝑐). 𝑛1𝑛+1 < L1

And condition for L2 will be as,

2
0 < (𝑋𝑛+1 − 𝑐). 𝑛1𝑛+1 < L2

Two cases of contact:


If the case 1 is true then by vector addition we will have,
𝑧2 𝑛2 = 𝐿1 𝑛1 − 𝑐
𝑧3 = 𝐿1 (𝑛1 . 𝑛2 ) − (𝑐. 𝑛2 )
If 0<z2<L2, Bar 1 tip Bar 2 side.
If 2nd condition is true then we will have,
𝑧1 𝑛1 = 𝐿2 𝑛2 + 𝑐
𝑧1 = 𝐿2 (𝑛1 . 𝑛2 ) + (𝑐. 𝑛1 )
If If 0<z1<L1, Bar 2 tip Bar 1 side.

Contact resolution:
End results of both the cases can be explained as, for Case 1,
𝐿1 cos(𝛳2 − 𝛳1 ) −𝑧2 𝛳 .+
[ 𝑊2 ] { 1. + } =
𝑧2 𝐿1 /𝐿2 (𝑊 ) 𝐿2 cos(𝛳2 − 𝛳1 ) 𝛳2
1
−𝑒𝐿1 cos(𝛳2 − 𝛳1 ) 𝑒𝑧2 𝛳 .−
[ 𝑊2 ] { 1. − }
𝑧2 𝐿1 /𝐿2 ( ) 𝐿2 cos(𝛳2 − 𝛳1 ) 𝛳2
𝑊1

Page # 3
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Now for case 2 we will have final equation as,

𝑧1 −𝐿2 cos(𝛳2 − 𝛳1 ) 𝛳 . + −𝑒𝑧1 𝑒𝐿2 cos(𝛳2 − 𝛳1 ) 𝛳 . −


[ 𝑊2 ] { 1. + } = [ 𝑊2 ] { 1. − }
𝐿1 cos(𝛳2 − 𝛳1 ) (𝑊 ) 𝑧1 (L2 /L1 ) 𝛳 2
𝐿1 cos (𝛳2 − 𝛳1 ) ( ) 𝑧1 (L 2 /L1 ) 𝛳2
1 𝑊1

Finding Time of Impact:


For finding time of impact we need ξ, We will find it as,
𝑓(𝑋𝑛 )
ξ = 𝑓(𝑋
𝑛 )−𝑓(𝑥𝑛+1 )

So, now we will find time, position, velocity and acceleration of contact as,
tcontact = (1- ξ)told + ξtnew
xcontact = (1- ξ)xold + ξxnew
vcontact = (1- ξ)vold + ξvnew
acontact = (1- ξ)aold + ξanew
This linear interpolation is not exact but it will provide good results.

Code Verification:
For code verification part we have four plots which we have got as Angles vs Time, Phase
Portrait, Trajectory and Total energy of the system. We saw that our code is correct according to
the requirement of the benchmark file. We enter the same data in our code as we were asked to
enter in benchmark file. We match all results with the default given benchmark file and results
are matching as a whole. Here we attached the plots which we have got as the result of
simulation of MATLAB code of our project.

Angles vs Time:
We have done with this graph by plotting between Angles and Time. t is taken on x-axis and ϴ is
taken on y-axis. We may compare both real and benchmark files by putting side by side both
plots as,

Page # 4
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Fig. 2a MATLAB Angles vs Time Fig. 2b Benchmark Angles vs Time


Figure A is for MATLAB simulations and Figure B is taken from benchmark files. We can see
that both are same. So we show that we have taken same graph in the result of simulation of our
MATLAB code.

Phase portrait:
We have four plots in this MATLAB Project. So, we will compare all files which we have got
from our MATLAB CODE and default benchmark file. Now compare phase portrait plotas,

Fig. 3a MATLAB Phase Portrait Fig. 3b Benchmark Phase Portrait

Page # 5
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

We may see by comparing figures 3a and 3b that they are giving us same results with same color
of both (MATLAB and benchmark) plots. Hence phase portrait confirmation has been done!!

Trajectory:
We got a graph by plotting MATLAB trajectory of this project. We can see clearly that both bars
will come near to each other and they are experiencing a contact at a point. The trajectory for
both bars can be plotted by given data on benchmark input data file. So we have got trajectory
plot as,

Fig. 4 MATLAB Trajectory plot


We can see from the plot given in figure 4 that the cross between both bars trajectories (where
both read and blue trajectories are crossing each other) is showing they are making contact with
each other.

Energy vs time graph:


At the end we will compare both graphs (MATLAB and Benchmark) for TOTAL ENERGY. We
have taken Total energy on y-axis and time on x-axis. We may see the results as:

Page # 6
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Fig. 5a MATLAB total energy plot Fig. 5b Benchmark total energy plot
In the upper given graph blue is kinetic energy, red is potential energy and black is the sum of
kinetic plus potential. We compare the variation in energy by seeing the plots.

Input Data for original MATLAB CODE:


We put input data same as we were asking to do in benchmark file:

Page # 7
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

3) Study and Results:


We learnt in this project that both impact and contact are important for various types of
engineering problems. We can take the example of earthquake that if earth will experience
earthquake then we should have its solution before the earthquake. This problem will give us a
solution for it. If two building will be built close to each other then they will start to pound
against each other and it will surely cause of lots of damage. So, pounding is very important
design issue for tall buildings. Almost all of the dynamic loads start with a very small source of
contact. This problem explores major issues of contact. We will get three issues that are
requiring attention in problem. I-e we have to find a way to examine that if contact is happening
for two time steps. In the result of implementation of this kind of contact it will be complicated
to do all the computations as both bodies are moving in this case. The 2nd problem is that state
variables interpolation and time to approximate identification of both the state and time of
contact. This part is same as particle in a box. 3rd one is computation of contact resolution by
using the model that is obeying law of conservation of momentum between two bodies and idea
of coefficient of restitution. In 3rd and last step we will find the new angular velocity of both bars
that will be resulted from impact.

We can explore our problem with the changing values of inputs (Length etc.) We will not get a
blind mark which will able to plot graphs but for different values plots will also be changes. If
we reduce the Length of bar 2 to 6 then we can put the values in the formulas with the help of
our MATLAB simulations and will be able to know that plots will also be changed. So, we are
now changing the physical property (Length) of bar 2 and now in integration of equations we
will change the value of final time from 10 to 30. Number o of time step and number of steps to

Page # 8
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University


report will also be tripled (3000 now). Time increment and Numerical integration (beta) will
remain same. Initial conditions also experience changes in them. Initial angle of bar 1 will be
changed as we have changed the length of bar 2. So, now input data which is shown on
command window is as,

Now if we will see plots we plotted with the help of blind mark code. First in Angles vs Time
graph we can see clearly in plot shown below in fig. 6 that frequency is increased and angle ϴ’s
span has also been changed.

Fig. 6 Blind-mark Angles vs Time plot

Page # 9
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Now we are coming forward to analyze change in phase portrait. We can observe by seeing
blind-mark plot shown in fig. 7 and MATLAB original plot shown in figure 3a that phase
compact is experiencing a compact in it and shape of phase portrait is shown is figure below as,

Fig. 7 Blind-mark phase portrait plot

Fig. 8 Blind-mark Trajectory plot

Page # 10
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University


Now to analyze change in phase portrait we should see upper shown plots in fig. 8 and fig. 4. We
can observe that by changing the length of bar 2, phase portrait will also be changed. Red color
trajectory is showing the movement of bar 2 and blue one is showing the trajectory of bar 1.
There point of contact will also be changed as their amplitudes are different from each other now
because of difference in length for original MALTAB plot and Blind-mark plot.

If we will compare fig. 9 and fig 5a then we will find a change is energies both (potential and
kinetic). So, total energy (Kinetic energy + Potential energy) will also be changed. Hence by
seeing at both the plots we may observe that now all energies are being changed.

Fig. 9 Blind-mark total energy plot

In upper plot Blue color is showing the kinetic energy while red color is showing potential
energy and black one is showing the total energy of the system.

4) New Observation:
We have done with the new observation to check that this code is working for another problem
too. We have changed the values of some constants and got the new plots. We have reduced the
length of bar 1 from 10 to 5 and another change we have made is that we have reduced the
weight of bar 1 from 10 to 5. All other parameters remain same. We have got some new plots
from new observation, which are showing that code is also working for another problem. We

Page # 11
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University


know the relation of TIME PERIOD and LENGTH OF PENDULUM that time period of
pendulum is directly proportional to square root of pendulum. The relation is,

𝑙
T = 2π.(𝑔)1/2

 T ∞ (𝑙)1/2

Fig. 10 New obs. Angles vs Time plot Fig. 11 New obs. phase portrait plot

Fig. 12 New obs. Trajectory plot Fig. 13 New obs. total energy plot

Page # 12
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University


5) Conclusion:
After analyzing results of this project the conclusion was to explain phenomena of both impact
and contact. Both are very much important and to explain may kinds of engineering problems.
We have already said for the application of this project is our results section. We concluded that
pounding is an important design issue for most of tall buildings. It was analyzed that contact
problem is important in the case of rigid bodies. We took two bars as rigid bodies and completed
our analysis. Bars were moving about their hinges freely, they were close enough to experience
contact with each other. Engineers may use this problem by prediction that how the structure will
stand before vibrations, wind and seismic tremors. Understanding all of these fundamental ideas
and concluded that dynamics is the key to outlining a safe work. Project remained successful as
we were able to draw plots given in benchmark file.

Page # 13
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University


6) Appendix
MATLAB Code:

Page # 14
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Page # 15
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Page # 16
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Page # 17
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Page # 18
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Page # 19
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Page # 20
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Page # 21
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Page # 22
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Page # 23
CEE 212 Fall 2016 Impact
School of Sustainable Engineering and The Built Environment

Fall 2016 Arizona State University

Page # 24

You might also like