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 --- 1913/CH2/EX2.7/ex7.sce | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 1913/CH2/EX2.7/ex7.sce (limited to '1913/CH2/EX2.7/ex7.sce') diff --git a/1913/CH2/EX2.7/ex7.sce b/1913/CH2/EX2.7/ex7.sce new file mode 100755 index 000000000..136db5b4c --- /dev/null +++ b/1913/CH2/EX2.7/ex7.sce @@ -0,0 +1,19 @@ +clc +clear +//Input data +m=3;//Mass of substance in the system in kg +P1=500;//Initial pressure of the system in kPa +P2=100;//Final pressure of the system in kPa +V1=0.22;//Initial volume of the system in m^3 +n=1.2;//Polytropic index +Q1=30;//Heat transfer for the another process + +//Calculations +V2=V1*(P1/P2)^(1/1.2);//Final volume of the system in m^3 +U=3.56*(P2*V2-P1*V1);//Total change in internal energy in kJ +W1=(P2*V2-P1*V1)/(1-n);//Work done for the 1-2 process in kJ +Q=U+W1;//Heat developed in the process in kJ +W2=Q1-U;//Work done for the another process in kJ + +//Output +printf('(a)Total change in internal energy U = %3.0f kJ \n (b)Work done for the 1-2 process W = %3.0f kJ \n (c)Heat developed in the process Q = %3.0f kJ \n (d)Work done for the another process W = %3.0f kJ ',U,W1,Q,W2) -- cgit