Presentation is loading. Please wait.

Presentation is loading. Please wait.

AE 427 THERMODYNAMIC CYCLE SIMULATION Prof.Dr. Demir Bayka.

Similar presentations


Presentation on theme: "AE 427 THERMODYNAMIC CYCLE SIMULATION Prof.Dr. Demir Bayka."— Presentation transcript:

1 AE 427 THERMODYNAMIC CYCLE SIMULATION Prof.Dr. Demir Bayka

2 function Cp(I,K:Integer;T:Real):extended; var Sum : extended; J : Integer; begin Sum := 0; case I of 1..12 : begin for J := 1 to 5 do Sum := Sum + C[I,J,K]*Exp((J-1)*Ln(T)); Cp := Sum * Rmol; end; 13..21: begin for J := 1 to 4 do Sum := Sum + C[I,J,K]*Exp((J-1)*Ln(T/1000)); Sum := Sum + C[I,5,K]/sqr(T/1000); Cp := 4.184 * Sum; end;

3 function Enthalpy(I,K:Integer;T:Real):extended; var J : Integer; Sum : extended; begin Sum := 0; case I of 1..12 : begin for J := 1 to 5 do Sum := Sum + C[I,J,K]*Exp(J*Ln(T))/J; Sum := Sum + C[I,6,K]; Enthalpy := Sum * Rmol; end; 13..21: begin for J := 1 to 4 do Sum := Sum + C[I,J,K]*Exp(J*Ln(T/1000))/J; Sum := Sum - C[I,5,K]*1000/T + C[I,6,K] +C[I,7,K]; Enthalpy := 4184 * Sum; end;

4 function IEnergy(I,K:Integer;T:Real):extended; begin IEnergy := Enthalpy(I,K,T) - Rmol * T ; end; function Entropy; var Sum : Real; J : Integer; begin Sum := 0; for J := 2 to 5 do Sum := Sum + C[I,J,K]*Exp((J-1)*Ln(T))/(J-1); Sum := C[I,1,K]*Ln(T) + Sum + C[I,7,K]; Entropy := Rmol * Sum; end;

5 Procedure Properties; var I : Integer; S1,S2,R,cpp : Real; Begin cpm := 0; S1 := 0; S2 := 0; if GasType='R' then begin {Index 1:A 2:CO 3:H2O 4:CO2 5:02 6:N2 7:N 8:H 9:H2 10:O 11:NO 12:0H 13:Methane 14:Propane 15:Hexane 16:Iso-Octane 17:Methanol 18:Ethanol 19:Gasoline 20:Gasoline 21:Diesel}

6 R := Rreac; cpm := Cp(FuelType,1,Temp) * MolFrac[FuelType]; S1 := MolFrac[FuelType] * MuZero[FuelType] * sqrt(MolWeight[FuelType]); S2 := MolFrac[FuelType] * sqrt(MolWeight[FuelType]); I := 0; for I := 1 to 6 do begin cpm := cpm + Cp(I,1,Temp) * MolFrac[I]; S1 := S1 + MolFrac[I] * MuZero[I] * sqrt(MolWeight[I]); S2 := S2 + MolFrac[I] * sqrt(MolWeight[I]); end; cpm := cpm + Cp(9,1,Temp) * MolFrac[9]; S1 := S1 + MolFrac[9] * MuZero[9] * sqrt(MolWeight[9]); S2 := S2 + MolFrac[9] * sqrt(MolWeight[9]); I := 9; end

7 else begin R := Rprod; for I := 1 to 12 do begin cpm := cpm + Cp(I,2,Temp) * MolFracp[I]; S1 := S1 + MolFracp[I] * MuZero[I] * sqrt(MolWeight[I]); S2 := S2 + MolFracp[I] * sqrt(MolWeight[I]); end; Viscosity := (S1/S2) * Exp(0.645 * Ln(Temp)); Cvm := Cpm - Rmol; k := Cpm/Cvm; Cpm := Cpm/MWmix; Cvm := Cpm - R; Conductivity := Cpm * Viscosity / 0.7; Density := Press/(R * Temp); end;


Download ppt "AE 427 THERMODYNAMIC CYCLE SIMULATION Prof.Dr. Demir Bayka."

Similar presentations


Ads by Google