From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2339/CH3/EX3.18.1/Ex3_18.sce | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 2339/CH3/EX3.18.1/Ex3_18.sce (limited to '2339/CH3/EX3.18.1') diff --git a/2339/CH3/EX3.18.1/Ex3_18.sce b/2339/CH3/EX3.18.1/Ex3_18.sce new file mode 100755 index 000000000..97010da21 --- /dev/null +++ b/2339/CH3/EX3.18.1/Ex3_18.sce @@ -0,0 +1,26 @@ +clc +clear + +//Inputs +//The Values in the program are as follows: +//Temperature in Celcius converted to Kelvin(by adding 273) +//Pressure in bar converted to kPa (by multiplying 100) +//Volume in m^3 +//Value of R,Cp and Cv in kJ/kg K +V1=1.5; +m=2; +T1=27+273; +T2=207+273; +V2=V1; +M=28; +Ro=8.314; + +R=Ro/M; + +P1=(m*R*T1)/V1; +printf('The initial pressure of gas: %3.3f bar',P1/100); +printf('\n'); + +P2=(P1*T2)/T1; +printf('The final pressure of gas: %3.3f bar',P2/100); +printf('\n'); -- cgit