summaryrefslogtreecommitdiff
path: root/3843/CH4/EX4.20
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3843/CH4/EX4.20
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3843/CH4/EX4.20')
-rw-r--r--3843/CH4/EX4.20/Ex4_20.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/3843/CH4/EX4.20/Ex4_20.sce b/3843/CH4/EX4.20/Ex4_20.sce
new file mode 100644
index 000000000..7d12b97aa
--- /dev/null
+++ b/3843/CH4/EX4.20/Ex4_20.sce
@@ -0,0 +1,15 @@
+// Example 4_20
+clc;funcprot(0);
+// Given data
+V=20;// The volume of the air tank in m^3
+P_i=10;// The initial pressure in MPa
+T_i=25+273;// K
+R=287;// J/kg.K
+P_f=200;// The final pressure in kPa
+k=1.4;// The specific heat ratio
+
+// Calculation
+m_i=(P_i*10^6*V)/(R*T_i);// The initial mass of air in kg
+m_f=m_i*((P_f*10^3)/(P_i*10^6))^(1/k);// The final mass of air in kg
+T_f=T_i*(m_f/m_i)^(k-1);// The final temperature of air in K
+printf("\nThe mass of air remaining in the tank,m_f=%4.1f kg \nThe final temperature of air in the tank,T_f=%2.2f K or %3.1f°C",m_f,T_f,T_f-273);