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 --- 32/CH3/EX3.22/3_22.sce | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 32/CH3/EX3.22/3_22.sce (limited to '32/CH3/EX3.22') diff --git a/32/CH3/EX3.22/3_22.sce b/32/CH3/EX3.22/3_22.sce new file mode 100755 index 000000000..92c1229b6 --- /dev/null +++ b/32/CH3/EX3.22/3_22.sce @@ -0,0 +1,37 @@ +//pathname=get_absolute_file_path('3.22.sce') +//filename=pathname+filesep()+'3.22-data.sci' +//exec(filename) +//Pressure at state 1(in bar): +p1=1.5 +//Temperature at state 1(in K): +T1=77+273 +//Pressure at state 2(in bar): +p2=7.5 +//Mass of the air(in kg): +m=3 +//Value of n: +n=1.2 +//Gas constant for air(in kJ/kg.K): +Ra=0.287 +//Temperature at state 2(in K): +T2=T1*(p2/p1)^((n-1)/n) +//Initial volume(in m^3): +v1=m*Ra*T1/(p1*10^2) +//Volume at state 2(in m^3): +v2=(p1*(v1^n)/p2)^(1/n) +//Temperature at state 3(in K): +T3=T1 +//Volume at state 3(in m^3): +v3=v2*T3/T2 +//Pressure at state 3(in bar): +p3=7.5 +//Compression work during process 1-2(in kJ): +W12=m*Ra*(T2-T1)/(1-n) +//Work during process 2-3(in kJ): +W23=p2*(10^2)*(v3-v2) +//Work during process 3-1(in kJ): +W31=p3*10^2*v3*log(v1/v3) +//Net work(in kJ): +Wn=W12+W23+W31 +printf("\nRESULT\n") +printf("\nHeat transferred from the system = %f kJ",-Wn) \ No newline at end of file -- cgit