diff options
Diffstat (limited to '3685/CH8/EX8.4/Ex8_4.sce')
-rw-r--r-- | 3685/CH8/EX8.4/Ex8_4.sce | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/3685/CH8/EX8.4/Ex8_4.sce b/3685/CH8/EX8.4/Ex8_4.sce new file mode 100644 index 000000000..953fbad4d --- /dev/null +++ b/3685/CH8/EX8.4/Ex8_4.sce @@ -0,0 +1,19 @@ +clc
+Ts_ = 15 // Ambient temperature in degree Celsius
+Tw1_ = 95 // Temperature of water sample 1 in degree Celsius
+Tw2_ = 35// Temperature of water sample 2 in degree Celsius
+m1 = 25 // Mass of water sample 1 in kg
+m2 = 35 // Mass of water sample 2 in kg
+cp = 4.2 // Specific heat capacity of water in kJ/kgK
+printf("\n Example 8.4")
+Ts = Ts_+273// Ambient temperature in K
+Tw1 = Tw1_+273 // Temperature of water sample 1 in K
+Tw2 = Tw2_+273// Temperature of water sample 2 in K
+AE25 = integrate('m1*cp*(1-(Ts/T))','T',Ts,Tw1)
+AE35 = integrate('m2*cp*(1-(Ts/T))','T',Ts,Tw2)
+AEt = AE25 + AE35
+Tm = (m1*Tw1+m2*Tw2)/(m1+m2) // Temperature after mixing
+AE60 = integrate('(m1+m2)*cp*(1-(Ts/T))','T',Ts,Tm)
+AE = AEt - AE60
+printf("\n The decrease in the available energy is %f kJ",AE)
+
|