summaryrefslogtreecommitdiff
path: root/3831/CH4/EX4.5
diff options
context:
space:
mode:
Diffstat (limited to '3831/CH4/EX4.5')
-rw-r--r--3831/CH4/EX4.5/Ex4_5.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/3831/CH4/EX4.5/Ex4_5.sce b/3831/CH4/EX4.5/Ex4_5.sce
new file mode 100644
index 000000000..84f10efb6
--- /dev/null
+++ b/3831/CH4/EX4.5/Ex4_5.sce
@@ -0,0 +1,16 @@
+// Example 4_5
+clc;funcprot(0);
+// Given data
+T_1=20.0;// °C
+n=1.35;// The polytropic index
+m=0.0100;// kg
+p_1=0.100;// MPa
+m_2=0.0100;// kg
+p_2=10.0;// MPa
+
+// Solution
+T_2=((T_1+273.15)*(p_2/p_1)^((n-1)/n))-273.15;// °C
+// Using Table C.13b of Thermodynamic Tables to accompany Modern Engineering Thermodynamics to find the value of the gas constant for methane,
+R_methane=0.518;// kJ/kg.K
+W_12=(m*R_methane*((T_2+273.15)-(T_1+273.15)))/(1-n);// kJ
+printf('\nThe moving boundary work required,W_12=%1.2f kJ',W_12);