summaryrefslogtreecommitdiff
path: root/1919/CH2/EX2.4/Ex2_4.sce
blob: a06fd2009f877e17e6109381835102f09fbd1854 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Theory and Problems of Thermodynamics
// Chapter 2
// First Law of Thermodynamics
// Example 4

clear ;clc;

//Given data
T = 303          // initial temperature in K
P = 100          // initial pressure in kPa
V_w = 0.001004   // specific volume  for water in m3/kg
V_v = 1.694910   // specific volume  for vapor in m3/kg
H_w = 125.6      // enthalpy of water in kJ/kg
H_v = 2675.47    // enthalphy of vapor in kJ/kg

// determine heat and work interactions
W = P * (V_v - V_w);    // work interaction
del_H = H_v - H_w       // enthalpy difference
Q = del_H               //heat interaction

// Results
mprintf('Work interaction = %7.2f kJ', W)
mprintf('\n Heat interaction = %5.2f kJ', Q)