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.21/3_21.sce | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 32/CH3/EX3.21/3_21.sce (limited to '32/CH3/EX3.21') diff --git a/32/CH3/EX3.21/3_21.sce b/32/CH3/EX3.21/3_21.sce new file mode 100755 index 000000000..29d8b510c --- /dev/null +++ b/32/CH3/EX3.21/3_21.sce @@ -0,0 +1,38 @@ +//pathname=get_absolute_file_path('3.21.sce') +//filename=pathname+filesep()+'3.21-data.sci' +//exec(filename) +//Volume of bottle(in m^3): +v1=0.3 +//Pressure in the bottle(in bar): +p1=35 +//Temperature in the bottle(in K): +T1=40+273 +//Turbo generator's actual output(in kJ/s): +w1=5 +//Final prssure(in bar): +p2=1 +//Final volume(in m^3): +v2=v1 +//Gas constant for air(in kJ/kg.K): +Ra=0.287 +//Compression ratio: +r=1.4 +//% of output which is consumed= 60% +//Specific heat at const volume(in kJ/kg): +Cv=0.718 +//Specific heat at const pressure(in kJ/kg): +Cp=1.005 +//Final temperature(in K): +T2=T1*(p2/p1)^((r-1)/r) +//Initial mass in the bottle(in kg): +m1=p1*10^2*v1/(Ra*T1) +//Final mass in the bottle(in kg): +m2=p2*10^2*v2/(Ra*T2) +//Maximum work that can be obtained(in kJ): +W=(m1*Cv*T1-m2*Cv*T2)-(m1-m2)*Cp*T2 +//Input to the turbo generator(in kJ/s): +i=w1/0.6 +//Time duration(in s): +t=W/i +printf("\nRESULT\n") +printf("\nDuration = %f seconds",t) \ No newline at end of file -- cgit