You are on page 1of 15

Ex.

No-7

SIMULATION OF HYDRAULIC CYLINDER USING MATLAB

Aim: To simulate a Hydraulic cylinder using MAT LAB software. Pump supplies oil at 0.002 m3/Sec to a 50 mm diameter double acting cylinder and rod diameter is 0.4 times of cylinder diameter. The load acting on both extending and retracting stroke is 6000N. Find 1. Piston velocity during extension stroke and retraction stroke 2. Pressure during extension stroke and retraction stroke 3. Power during extension and retraction stroke Software MAT Lab Procedure: Discharge Q=0.002 m3/Sec Piston Diameter D=0.05 m Piston Rod Diameter d=0.02 m Load F=6000N Area of Piston during extension stroke Area of Piston during retraction stroke Velocity during Extension Stroke Velocity during Retraction Stroke Ap=(pi/4)*D^2 Ar= (pi/4)*d^2 Ve=Q/Ap Vr=Q/ (Ap-Ar)

Cylinder Pressure during Extension Stroke Pe=F/Ap Cylinder Pressure during Retraction Stroke Pr=F/(Ap-Ar) Power during Extension Stroke Power during Retraction Stroke Poe=(Pe*Q/1000) Por=(Pr*Q/1000)

MATLAB PROGRAM WITH ERROR: % SIMULATION OF HYDRAULIC CYLINDER Q=0.002 %Discharge in m3/sec D=0.05 %Diameter of cylinder in m d=0.02 %Piston Rod Diameter in m F=6000 %Load in N Ap=(pi/4)*D^2 %Area of Piston in m2 Ar= (pi/4)*d^2 %Area of Piston Rod Diameter in m2 pause Ve=Q/Ap %Velocity during Extension Stroke in m/sec sprintf(Piston Velocity During Extension Stroke=%f, Ve) Vr=Q/ (Ap-Ar) %Velocity during retraction Stroke in m/sec Sprintf(Piston Velocity During Retraction Stroke=%f, Vr) pause Pe=F/Ap %Pressure during Extension Stroke in N/m2 Sprintf(Cylinder Pressure During Extension Stroke)=%f, Pe) pause Pr=F/ (Ap-Ar) %Pressure during Retraction Stroke in N/m2 Sprintf(Cylinder Pressure During Retraction Stroke)=%f, Pr) pause PE=(Pe*Q/1000) %Power During Extension Stroke in KW Sprintf(Cylinder Power During Extension Stroke)%f, PE) pause PR=(Pr*Q/1000) %Power During Retraction Stroke in KW Sprintf(Cylinder Power During Retraction Stroke)%f, PR)

ACTUAL PROGRAM % SIMULATION OF HYDRAULIC CYLINDER Q=0.002 %Discharge in m3/sec D=0.05 %Diameter of cylinder in m d=0.02 %Piston Rod Diameter in m F=6000 %Load in N Ap=(pi/4)*D^2 %Area of Piston in m2 Ar= (pi/4)*d^2 %Area of Piston Rod Diameter in m2 pause Ve=Q/Ap %Velocity during Extension Stroke in m/sec sprintf('Piston Velocity During Extension Stroke=%f', Ve) Vr=Q/ (Ap-Ar) %Velocity during retraction Stroke in m/sec sprintf('Piston Velocity During Retraction Stroke=%f', Vr) pause Pe=F/Ap %Pressure during Extension Stroke in N/m2 sprintf('Cylinder Pressure During Extension Stroke)=%f', Pe) pause Pr=F/ (Ap-Ar) %Pressure during Retraction Stroke in N/m2 sprintf('Cylinder Pressure During Retraction Stroke)=%f', Pr) pause PE=(Pe*Q/1000) %Power During Extension Stroke in KW sprintf('Cylinder Power During Extension Stroke)%f', PE) pause PR=(Pr*Q/1000) %Power During Retraction Stroke in KW sprintf('Cylinder Power During Retraction Stroke)%f', PR)

MATLAB SIMULATION RESULT: Q = 0.002 D = 0.05 D = 0.02 F = 6000 Ap = 0.0020 Ar = 3.1416e-004 Ve = 1.0186 ans = Piston Velocity During Extension Stroke) = 1.0186 Vr = 1.2126 ans = Piston Velocity During Retraction Stroke) = 1.2126 Pe = 3.0558e+006 ans = Cylinder Pressure During Extension Stroke)=3055774.907364 Pr = 3.6378e+006 ans = Cylinder Pressure During Retraction Stroke)= 3.6378e+006 PE = 6.1115e+005 ans = Cylinder Power During Extension Stroke) = 6.1115e+005 PR = 7.2757e+005 ans = Cylinder Power During Retraction Stroke) = 7.2757e+005

Result: Thus the simulation of Hydraulic cylinder was performed using MAT LAB for the given dimensions of Hydraulic Cylinder.

Ex.No-8

SIMULATION OF APPLICATION OF SECOND LAW OF THERMODYNAMICS

Aim: To solve the application of second law of thermodynamics using MATLAB software. A reversible heat engine operates between two reservoirs at a temperature of 600C and 40C. The engine drives a reversible refrigerator which operates between the reservoir temperature of -20C and 40C. The heat transfer to the heat engine is 2000KJ. Net work output of combined engine refrigerator plant is 360KJ. Evaluate the heat transfer and net heat transfer to the reservoir at 40C. Software MAT Lab Procedure: Source temperature of heat engine T1=873 K. Sink temperature of heat engine T2=313 K Source temperature of refrigerator plant T3=253 K Heat transfer to the heat engine Q1=2000KJ Work output of combined heat engine refrigerator plant W=360 KJ. Max Efficiency Work Output of Heat Engine Work Input to the Refrigerator Coefficient of Performance Heat Input to the Refrigerator Heat output from the Refrigerator Heat output from the Heat Engine Total Heat Supply to the sink = [1-(T2/T1)] W1= *Q1 W2=W1-W COP = [T3/ (T2-T3)] Q4=W2*COP Q3=Q4+W2 Q2=Q1-W1 Q=Q2+Q3

T1=873 K

T3=253 K

Q1 W1 W2

Q4

H E

Re f

Q2

W=360 KJ

Q3

T2=313 K

MATLAB PROGRAM WITH ERROR: %APPLICATION OF SECOND LAW OF THERMODYNAMICS T1=873 %Source temperature of heat engine T2=313 %Sink temperature of heat engine T3=253 % Source temperature of refrigerator plant Q1=2000 % Heat transfer to the heat engine W=360 % Work output of combined heat engine refrigerator plant n= (1-(T2/T1) % Max Efficiency sprintf(Max Efficiency=%f,n) W1=n*Q1 %Work Output from Heat Engine sprintf(Work Output from Heat Engine=%f,W1) W2=W1-W % Work Input to the Refrigerator sprintf(Work Input to the Refrigerator =%f,W2) cop=(T3/(T2-T3)) % Coefficient of Performance sprintf(Coefficient of Performance =%f,cop) Q4=W2*cop % Heat Input to the Refrigerator sprintf(Heat Input to the Refrigerator=%f,Q4) Q3=Q4+W2 % Heat output from the Refrigerator sprintf(Heat output from the Refrigerator=%f,Q3) Q2=Q1-W1 % Heat output from the Heat Engine sprintf(Heat output from the Heat Engine=%f,Q2) Q=Q2+Q3 % Total Heat Supply to the sink sprintf(Total Heat Supply to the sink =%f,Q)

ACTUAL PROGRAM: T1=873 %Source temperature of heat engine T2=313 %Sink temperature of heat engine T3=253 % Source temperature of refrigerator plant Q1=2000 % Heat transfer to the heat engine W=360 % Work output of combined heat engine refrigerator plant n= (1-(T2/T1)) % Max Efficiency sprintf('Max Efficiency=%f',n) W1=n*Q1 %Work Output from Heat Engine sprintf('Work Output from Heat Engine=%f',W1) W2=W1-W % Work Input to the Refrigerator sprintf('Work Input to the Refrigerator =%f',W2) cop=(T3/(T2-T3)) % Coefficient of Performance sprintf('Coefficient of Performance =%f',cop) Q4=W2*cop % Heat Input to the Refrigerator sprintf('Heat Input to the Refrigerator=%f',Q4) Q3=Q4+W2 % Heat output from the Refrigerator sprintf('Heat output from the Refrigerator=%f',Q3) Q2=Q1-W1 % Heat output from the Heat Engine sprintf('Heat output from the Heat Engine=%f',Q2) Q=Q2+Q3 % Total Heat Supply to the sink sprintf('Total Heat Supply to the sink =%f',Q)

MATLAB SIMULATION RESULT:

T1 = 873 T2 = 313 T3 = 253 Q1 = 2000 W = 360 n = 0.6415 ans = Max Efficiency = 0.641466 W1 = 1.2829e+003 ans = Work Output from Heat Engine=1.2829e+003 W2 = 922.9324 ans = Work Input to the Refrigerator=922.9324 cop = 4.2167 ans = Coefficient of Performance =4.2167 Q4 = 3.8917e+003 ans = Heat Input to the Refrigerator=3.8917e+003 Q3 = 4.8146e+003 ans = Heat output from the Refrigerator=4.8146e+003 Q2 = 717.0676 ans = Heat output from the Heat Engine= 717.0676 Q = 5.5317E+003 ans = Total Heat Supply to the sink =5.5317E+003

Result: Thus the simulation of application of second law of thermodynamics was performed by using MATLAB software for the given temperature conditions of refrigerator and heat engine system.

Ex.No-9

SIMULATION OF CAM AND FOLLOWER

Aim: To simulate the cam and follower using MATLAB software. A cam is to be designed for a knife edge follower with the following data: 1. Cam lift = 40mm during 90 of cam rotation with simple harmonic motion 2. Dwell for the next 30 3. During the next 60 of cam rotation, the follower returns to its original position with simple harmonic motion. 4. Dwell during the remaining 180 The radius of base circle of the cam is 40mm. determine the maximum velocity and acceleration of the follower during its ascent and descent. If the cam rotates at 240 r.p.m. Software MAT Lab Procedure: Maximum velocity of the follower during its ascent and descent The angular velocity of the cam, 2 N = =
60

The maximum velocity of the follower during its ascent, .S vO = = 2O and maximum velocity of the follower during its descent, .S vR = = 2R Maximum acceleration of the follower during its ascent and descent The maximum acceleration of the follower during its ascent, 22 .S aO = = 2(O ) 2 and maximum acceleration of the follower during its descent, 22 .S aR = = 2 (R ) 2

MATLAB PROGRAM: %Simulation of cam and follower S=0.04 %Stroke in m Oo=1.571 %Outstroke in rad Or=1.047 %Return Stroke in rad N=240 %Speed in rpm W=(2*pi*N)/60 %Angular Velocity of cam in rad/sec sprintf('Angular Velocity of Cam =%f',W) Vo=(pi*W*S)/(2*Oo) sprintf('Maximum Velocity of follower during its ascent=%f',Vo) Vr=(pi*W*S)/(2*Or) sprintf('Maximum Velocity of follower during its descent=%f',Vr) ao=(pi^2*W^2*S)/(2*(Oo^2)) sprintf('Maximum Acceleration of follower during its ascent=%f',ao) ar=(pi^2*W^2*S)/(2*(Or^2)) sprintf('Maximum Acceleration of follower during its descent=%f',ar) MATLAB SIMULATION: S = 0.0400 Oo = 1.5710 Or = 1.0470 N = 240 W = 25.1327 ans = Angular Velocity of Cam =25.132741 Vo = 1.0052 ans = Maximum Velocity of follower during its ascent=1.005179 Vr = 1.5082 ans = Maximum Velocity of follower during its descent=1.508249 ao = 50.5193 ans = Maximum Acceleration of follower during its ascent=50.519273 ar = 113.7408 ans = Maximum Acceleration of follower during its descent=113.740752 Result: Thus the simulation of cam and follower was performed by using MATLAB software for the given problem.

Ex.No-10

SIMULATION OF SPRING MASS DAMPER SYSTEM CONTROL

Aim: To simulate the spring mass damper system control using MATLAB software. The measurements on a mechanical vibrating system show that it has a mass of 8Kg and that the springs can be combined to give an equivalent spring of stiffness 5.4N/mm. if the vibrating system have a dashpot attached which exerts a force of 40N when the mass has a velocity of 1m/sec, find 1. Critical damping coefficient 2. Damping factor 3. Logarithmic decrement Software MAT Lab Procedure: m = 8 kg; s = 5.4 N/mm = 5400 N/m Since the force exerted by dashpot is 40 N, and the mass has a velocity of 1 m/s, therefore Damping coefficient (actual), c = 40 N/m/s 1. Critical damping coefficient, cc = 2m.n = 2m 2. Damping factor =
c = cc
=
s = m

3. Logarithmic decrement, 2c = 2

(c c ) c 2

MATLAB PROGRAM:

%Simulation of spring mass damper system control m=8 %mass in Kg s=5400 %Stiffness in N/m c=40 %Damping Coefficient Wn=(s/m)^1/2 %Angular Velocity pause Cc=2*m*Wn %Critical Damping Coefficient sprintf('Critical Damping Coefficient=%f',Cc) pause Df=c/Cc %Damping factor sprintf('Damping factor=%f',Df) pause d=(2*pi*c)/((Cc^2-c^2)^0.5) sprintf('Logarithimic decrement=%f',d) MATLAB SIMULATION: m= 8 s = 5400 c = 40 Wn = 337.5000 Cc = 5400 ans = Critical Damping Coefficient=5400.000000 Df = 0.0074 ans = Damping factor=0.007407 d = 0.0465 ans = Logarithimic decrement=0.046543

Result: Thus the simulation of spring mass damper control was performed by using MATLAB software for the given problem.

Ex.No-11

SIMULATION OF HEAT EXCHANGER PROCESS

Aim: To simulate the heat exchanger process using MATLAB software. A parallel flow heat exchanger is used to cool 4.2Kg/min of hot liquid of specific heat 3.5KJ/Kg K at 130C. A cooling water of specific heat 4.18KJ/Kg K is used for cooling purpose at a temperature of 15C. the mass flow rate of cooling water is 17kg/min. calculate the following i. ii. Outlet temperature of liquid Outlet temperature of liquid

Take overall heat transfer coefficient is 1100 W/m2K and heat exchanger area is 0.30m2. Software MAT Lab Procedure: Mass flow rate of hot liquid, mh = 4.2 kg/min mh = 0.07 kg/s Specific heat of hot liquid, Cph = 3.5 kJ/kg K Cph = 3.5 103 J/kg K Inlet temperature of hot liquid, T1 = 130 C Specific heat of water, Cpc = 4.18 kJ/kg K Cpc = 4.18 103 J/kg K Inlet temperature of cooling water, t1 = 15C Mass flow rater of cooling water, mc = 17 kg/min Mc = 0.28 kg/s Overall heat transfer co-efficient, U = 1100 w/m2K Area, A = 0.30 m2 Capacity rate of hot liquid, C = mh Cph = Capacity rate of water, C = mc Cpc = Cmin=245 W/K Number of transfer units, NTU =

W/K W/K

UA [ From HMT data book page no. 135] C min

Maximum possible heat transfer Qmax Actual transfer rate Q Heat transfer, Q

= Cmin (T1 t1) = Qmax = mc Cpc (t2 t1) t2 = C C

Outlet temperature of cold water, t2 = Heat transfer Q = mh Cph (T1 T2) T2 = C Outlet temperature of hot liquid, T2 = MATLAB PROGRAM:

%Simulation of Heat Exchanger Process mh=0.07 %Mass flow rate of hot fluid in kg/sec mc=0.28 %Mass flow rate of cold fluid in kg/sec Cph=3500 %Specific heat of hot fluid in J/Kg K Cpc=4180 %Specific heat of cold fluid in J/Kg K T1=130 %Inlet Temperature of hot liquid in C t1=15 %Inlet Temperature of cooling water in C e=0.64 %effectiveness of heat exchanger U=1100 %Overall Heat transfer Coefficient in W/m2K A=0.30 %Area in m2 Cmin=245 %Capacity rate of cold fluid in W/K NTU=U*A/Cmin %Number of Transfer units pause Qmax=(Cmin*(T1-t1)) %Maximum heat transfer in W sprintf('Maximum heat transfer=%f',Qmax) pause Q=e*Qmax sprintf('Actual Heat Transfer=%f',Q) pause t2=(Q/(mc*Cpc))+t1 sprintf('Outlet temperature of cold water=%f',t2) pause T2=T1-(Q/(mh*Cph)) sprintf('Outlet temperature of hot fluid =%f',T2)

MATLAB SIMULATION RESULTS: mh = 0.0700 mc = 0.2800

Cph = 3500 Cpc = 4180 T1 = 130 t1 = 15 e = 0.6400 U = 1100 A = 0.3000 Cmin = 245 NTU = 1.3469 Qmax = 28175 ans = Maximum heat transfer=28175.000000 Q = 18032 ans = Actual Heat Transfer=18032.000000 t2 = 30.4067 ans = Outlet temperature of cold water=30.406699 T2 = 56.4000 ans = Outlet temperature of hot fluid=56.400000

Result: Thus the simulation of heat exchanger process was performed by using MATLAB software for the given problem.

You might also like