MATLAB Tutorials Session VI Engineering Applications using MATLAB Rajeev Madazhy Email: rmadaz1@lsu.edu Dept of Mechanical Engineering LSU Department of Mechanical Engineering, LSU Session VI Last Session…. Solving Double Integrals Ordinary Differential Equations Examples of ODE using MATLAB…. Mention of DDE’s Department of Mechanical Engineering, LSU Session VI Session VI Outline…. Engineering Applications using MATLAB…. Solving non linear differential equations Algorithm analysis for four bar linkage problem Other mechanical problems Department of Mechanical Engineering, LSU Session VI Solving non-linear Diff Equation…. Same as linear differential equations (use ode45) Incorporate differences in the function Consider the previous example of spring-mass-damper system let there be an external force of 0.1*sin(w*t) where w is the frequency of the input and the value of c and k varies as follows C=1 for x(1)>0.5m/s and 5 for x(1)<=0.5m/s K=10 for x(2)>=-0.25m and 20 for x(2)<-0.25 Department of Mechanical Engineering, LSU Session VI Function…. Department of Mechanical Engineering, LSU Session VI Command window…. Department of Mechanical Engineering, LSU Session VI Output…. Department of Mechanical Engineering, LSU Session VI Output…. Department of Mechanical Engineering, LSU Session VI Example 2: Four Bar Linkage…. C y B A Department of Mechanical Engineering, LSU D x Session VI Algorithm analysis…. The lengths of AB, BC, CD, DA are known To determine the coordinate (x, y) of point C at each rotation angle of ABD or . Basic formula. B c a C b A c a b 2ab cos(C ) 2 2 2 Department of Mechanical Engineering, LSU Session VI Cont…. Step 1: Calculate length of BD Step 3: Calculate angle Step 2: Calculate angle Step 4: The coordinate of point C is as follows: Department of Mechanical Engineering, LSU Session VI Cont…. xC DA CD cos( ) yC CD sin( ) ( If 0< <pi ) xC DA CD cos( ) ( If pi < <2pi ) yC CD sin( ) Department of Mechanical Engineering, LSU Session VI MATLAB program…. Department of Mechanical Engineering, LSU Session VI MATLAB program…. Department of Mechanical Engineering, LSU Session VI MATLAB program…. Department of Mechanical Engineering, LSU Session VI MATLAB program…. Department of Mechanical Engineering, LSU Session VI Animated output…. Department of Mechanical Engineering, LSU Session VI Moving block in an inclined plane…. N (x1,y1) v1 N Moving object from (x1,y1) to (x2,y2). The friction coefficient is =0.1. The starting velocity at 1 is v1. Calculate v2 (velocity at 2), t (time), and a (acceleration) mgcos mgsin (x2,y2) v2 mg Department of Mechanical Engineering, LSU Session VI MATLAB Program…. Department of Mechanical Engineering, LSU Session VI Output…. Department of Mechanical Engineering, LSU Session VI Determining Diameter of the pipe from the flow rate…. d L Q Department of Mechanical Engineering, LSU Session VI Fountain.m Department of Mechanical Engineering, LSU Session VI Fountain.m cont…. Department of Mechanical Engineering, LSU Session VI Piping.m Department of Mechanical Engineering, LSU Session VI Piping.m cont… Department of Mechanical Engineering, LSU Session VI Recap…. What have we learnt today? Engineering Applications using MATLAB…. Solving non linear differential equations Algorithm analysis for four bar linkage problem Other mechanical problems Department of Mechanical Engineering, LSU Session VI Thank You Department of Mechanical Engineering, LSU Session VI