AIR STANDARD CYCLE - USING MATLAB
OTTO CYCLE - PV DIAGRAM AND THERMAL EFFICIENCY
AIM:
To determine the Thermal Efficiency and Plotting the PV diagram of calculated values in Otto Cycle by using MATLAB.
THEORIES:
PRESSURE:
It is defined as the pressure that would act on the piston during the entire power stroke, to produce the same amount of net work as that would be produced during the actual cycle.
VOLUME:
The volume ratio is called the "isentropic expansion ratio". ( For the Otto cycle is the same as the compression ratio. ). Mechanically this is the expansion of the hot gaseous mixture in the cylinder known as expansion (power) stroke.
TEMPERATURE:
The Otto cycle is a description of what happens to a mass of gas as it is subjected to changes of pressure, temperature, volume, addition of heat, and removal of heat. The mass of gas that is subjected to those changes is called the system. The system, in this case, is defined to be the fluid (gas) within the cylinder.
SWEPT VOLUME:
Swept volume is the displacement of one cylinder. It is the volume between top dead center (TDC) and bottom dead center (BDC). As the piston travels from top to bottom, it "sweeps" its total volume.
CLEARANCE VOLUME:
Clearance volume is a volume between the cylinder head and the piston top when the piston is at top dead center (TDC). It can also be defined as the volume of cylinder that is not swept by the piston. ... Each time the piston goes up, it compress the fuel air mixture in the clearance volume before ignition takes place.
COMPRESSON RATIO:
The ratio of the maximum to minimum volume in the cylinder of an internal combustion engine.
THERMAL EFFICIENCY:
Thermal Efficiency for Otto Cycle. In general the thermal efficiency, ηth, of any heat engine is defined as the ratio of the work it does, W, to the heat input at the high temperature, QH. In this equation, the ratio V1/V2 is known as the compression ratio, CR.
EXPLANATION:
Fig:1.1 PV diagram Fig:1.2 Engine
In the above Fig : 1.1 Shows the PV diagram,
⦁ Process (1:2) = Isentropic Compression.
⦁ Process (2:3) = Constant Volume Heat Addition.
⦁ Process (3:4) = Isentropic Expansion.
⦁ Process (4:1) = Constant Volume Heat Rejection.
CALCULATION:
Given Inputs;
Pressure1 = 101325
Temperature1 = 500
Temperature3 = 2300
Compression Ratio = 12
Bore = 0.1
Stroke = 0.1
Connecting Rod Length = 0.15
gamma = 1.4
To Find;
1. Pressure (P2,P3,P4).
2. Temperature(T2,T4).
3. Volume(V1,V2,V3,v4).
4. Swept Volume(s_v).
5. Clearance Volume(c_v).
6. Ratio(R).
7. Crank pin radius(a).
8. Thermal Efficiency.
Formula;
Swept Volume = pi/4*Bore^2*stroke
Clearance Volume = s_v/Cr-1
Volume1 = s_v + c_v
volume2 = c_v
Ratio = Connecting rod length / crank pin radius
crank pin radius = stroke/2
Efficiency = 1-(1/cr^(gamma-1)
PROGRAM:
1) Function Program in Otto Cycle Using MATLAB:
%Function of Otto Cycle
function [V]=Engine_Otto(bore,stroke,crl,cr,stck,endck)
a=stroke/2;
R=crl/a;
theta=linspace(stck,endck,180);
s_v = (pi/4)*bore^2*stroke;
c_v = s_v/(cr-1);
%V=(1+1/2(cr-1)[R+1-cosd(theta)-(R^2-sind(theta)^2)^1/2])*c_v
term1=0.5*(cr-1);
term2=R+1-cosd(theta);
term3=(R^2-sind(theta).^2).^0.5
V=(1+term1*(term2-term3)).*c_v;
end
2)PV drawing Program in otto cycle Using MATLAB:
% Otto cycle
%formula
%(t2/t1)=(v1/v2)^gamma-1
%(p2/p1)=(v1/v2)^gamma
%p3/t3=p2/t2
%inputs
p1=101325;
t1=500;
cr=12;
gamma=1.4;
t3=2300;
bore=0.1;
stroke=0.1;
crl=0.15;
% to find swept volume and clearance volume
s_v = (pi/4)*bore^2*stroke;
c_v = s_v/(cr-1);
v1 = s_v+c_v;
v2 = c_v;
% find p2 (p2/p1)=(v1/v2)^gamma
p2= cr^gamma*p1;
% find t2 (t2/t1)=(v1/v2)^gamma-1
V_compression=Engine_Otto(bore,stroke,crl,cr,0,300)
constant = p1*v1^gamma;
P_compression = constant./ V_compression.^gamma;
t2=cr^(gamma-1)*t1;
% find v3
v3=v2;
%find p3 (p3/t3)=(p2/t2)
p3=(p2*t3)/t2;
V_expansion=Engine_Otto(bore,stroke,crl,cr,0,360)
constant = p3*v3^gamma;
P_expansion = constant ./ V_expansion.^gamma;
%find v4
v4=v1;
% find p4 (p4/p3)=(v3/v4)^gamma
p4=(1/cr)^gamma*p3;
% find t4 (p4/t4)=(p3/t3)
t4=p4*t3/p3
%otto Efficiency
Thermal_efficiency=1-(1/cr^(gamma-1))
figure(1)
hold on
plot(v1,p1,'*','color','r')
plot(V_compression,P_compression);
plot(v2,p2,'*','color','r')
plot([v2 v3],[p2 p3]);
plot(v3,p3,'*','color','r')
plot(V_expansion,P_expansion);
plot(v4,p4,'*','color','r')
plot([v4 v1],[p4 p1]);
xlabel('volume')
ylabel('pressure')
grid on
%figure(2)
%plot([v1,v2,v3,v4,v1],[p1,p2,p3,p4,p1])
xlabel('volume')
ylabel('pressure')
grid on
Explanation Of the Code:
⦁ Using the given inputs and formula,we have to substitute the values in the MATLAB program for getting the result for PV diagram.
⦁ And we have to find all the values like p2,p3,p3,v1,v2,v3,v4,t2,t4,r,a,s_v,c_v etc.., to get the Points for PV diagram.
⦁ After that,Function loop have to be programmed with certain codes and steps with the calculated inputs.
⦁ Function loop have to be inserted to the PV diagram program to Plot the points and get the exact Otto Cycle diagram.
⦁ Xaxis is labeld as Volume and Yaxis as Pressure.
⦁ Finally, We have to find the Thermal Efficiency of the Otto Cycle.
VALUES :
ERROR AND CORRECTION:
ERROR :
CORRECTION:
As we are using the Arrays in the Program,we Have to use the element operator at the Required place.So,i found the mistake and placed the '.' Element operator in the program.
RESULT AND CONCLUSION:
OUTPUT PV Diagram:
Thermal Efficiency of Otto Cycle =
Finally,We have undergone many Calculations,Program and rectifying the Errors.As per our given inputs,we got PV diagram and Thermal efficiency of Otto Cycle by using MATLAB.