# Sept 2005: changes reflect text: Woud Sept 2006: added examples first law: during any cycle

a system undergoes, the cyclic integral of the heat is proportional to the cyclic integral of the work pg 83 van Wylen & Sonntag Fundamentals of Classical Thermodynamics 3rd Edition SI Version

First Law

first law for cycle

⌠ ⌠ ⎮ 1 dQ = ⎮ 1 dW ⌡ ⌡

(5.2)

The net energy interaction between a system and its environment is zero for a cycle executed by the system. pg 2 Cravalho and Smith ⌠ ⌠ ⎮ 1 dQ − ⎮ 1 dW = 0 ⌡ ⌡
plot data

where integral are cyclic and dQ = δQ dW = δW

Pressure Volume plot for Processes
2.5

2

p

1.5

1

0.5

0.5

1

1.5 v

2

2.5

⌠ ⌠ ⎮ 1 dQ = ⎮ 1 dW ⌡ ⌡

A process
B process
C process

apply first law to cycle A B

⌠ ⌠ ⌠ ⌠ ⎮ 1 dQA + ⎮ 1 dQB = ⎮ 1 dWA + ⎮ 1 dWB ⌡ ⌡ ⌡ ⌡
1 2 1 2

2

1

2

1

apply first law to cycle A C subtract A C from A B rearrange ... ⌠ ⌠ ⎮ 1 dQ_WB = ⎮ 1 dQ_WC ⌡ ⌡
2 2 1 1 1 1

⌠ ⌠ ⌠ ⌠ ⎮ 1 dQA + ⎮ 1 dQC = ⎮ 1 dWA + ⎮ 1 dWC ⌡ ⌡ ⌡ ⌡
1 2 1 2 1 1

2

1

2

1

⌠ ⌠ ⌠ ⌠ ⎮ 1 dQB − ⎮ 1 dQC = ⎮ 1 dWB − ⎮ 1 dWC ⌡ ⌡ ⌡ ⌡
2 2 2 2

i.e. δQ - δW is a point function ... only dependent upon the end points => define as ...

dE = δQ − δW
9/21/2006 9/21/2006

energy, point function

1

first law for system (Woud: Closed system) - change of state
rearrange and integrate ... δQ = dE + δW Q1_2 = E2 − E1 + W1_2 Q1_2 E1 W1_2 E2

N.B. Woud starts with rate equation and obtains this assuming steady state

is the heat transferred TO system are intial and final values of energy of system and ... is work done BY the system (5.5)

energy E consists of internal energy + kinetic energy + potential energy E = U + KE + PE and first law can be restated ... dE = dU + dKE + dPE δQ = dE + δW = dU + dKE + dPE + δW dU = δQ − δW m_dote = m_doti = 0 (5.4)

Closed System

d U = Q_dot − W_dot dt

(W 2.3)

difference between d and δ

d and δ: VW&S: page 62 Woud page 11 d = differential of point functions state variables δ = differential of path functions - amount depends on path/process: diminutive see discussion of cyclic process below

cycle may be considered a closed system; initial state and final state are identical, For example (detailed
discussion later)

set up limits and calculations

p-v plot of Brayton cycle
6

4 pressure 2 0 0

1

2 volume

3

4

5

closed (cycle)

d U = 0 = Q_dot − W_dot dt

Q_dot = W_dot

Qcycle = Wcycle

(W 2.6)

this is where we started above using different approach to first law

9/21/2006 9/21/2006

2

example 5.3

Sonntag example 5.3: vessel with volume 5 m 3 contains 0.05 m 3 of saturated liquid water and 4.95 m 3 of saturated water vapor at 0.01 MPa. Heat is added until the vessel is filled with saturated vapor. Determine Q. State 1: V := 5m
3

Vvap := 4.95m Vliq := 0.05m

3

MPa := 10 Pa p := 0.1MPa u f := 417.36 kJ

6

kJ := 10 ⋅J

3

3

Vap H2O
1 Q2

constant volume and mass => constant v steam tables at p = 0.1 MPa State 2:

v f := 0.001043 v g := 1.694 V2 = V m

m

3

kg

page 616 kg Sonntag u fg := 2088.7

3

kg v = vg

u g := 2506.1 u = ug W1_2 = 0

kJ kg

kJ kg

Liq

H2O

first law:

Q1_2 = E2 − E1 + W1_2
n

Q1_2 = U2 − U1 Vf massf = vf mass1_vap := Vvap v g

ΔV = 0

Δz = 0

E=U

have volume, determine mass of each Vliq vf

V = m ⋅v n
n

mass1_liq :=

mass1_liq = 47.9386 kg

mass1_vap = 2.9221 kg

x = quality( of_steam)

x 1 :=

mass1_vap mass1_vap + mass1_liq
4

x 1 = 0.0575

x%1 := x 1 ⋅100

x%1 = 5.7453

U1 := mass1_liq⋅u f + mass1_vap⋅u g

U1 = 2.7331 × 10 kJ

intensive property = not dependent on mass (x, v, u, ρ) extensive does (U, V, mass)

or ... using average specific properties u 1 := u f + x 1 ⋅u fg u 1 = 537.3611 kJ kg U11 := u 1 ⋅ mass1_vap + mass1_liq

(

)
3 kJ

U11 = 2.7331 × 10 kJ
3 kJ

4

which can be shown by ... U1 = mass1_liq⋅u f + mass1_vap⋅u g mass1_liq⋅u f + mass1_vap⋅u g mass1_liq + mass1_vap
u g = u f + u fg u fg = 2.0887 × 10 kg u g − u f = 2.0887 × 10 kg

u 1a =

substitute for u g

mass1_liq⋅ u f + mass1_vap⋅ u f + u fg mass1_liq + mass1_vap

(

) = (mass1_liq + mass1_vap)⋅ uf + mass1_vap⋅ ufg = u
mass1_liq + mass1_vap

f + x 1 ⋅u fg

9/21/2006 9/21/2006

3

state 2: need 2 properties, e.g. quality = 100%, can
calculate v (specific volume). T and p will be rising as heat
mass_total := mass1_liq + mass1_vap v 2 := V mass_total v 2 = 0.0983 m
3

kg

and ... is saturated vapor so we need to look up
(interpolate) steam tables for v g = v2
vx − x1 x2 − x1 ⋅(y2 − y1) an interpolation statement v is value between x1 and x 2
result is y at v

my_interp( x2 ,
x1, y2, y1, vx) := y1 +

could use mcd function linterp(vx,vy,x) where:

vx is a vector of real data values in ascending order.
vy is a vector of real data values having the same number of elements as vx .
x is the value of the independent variable at which to interpolate a result. For best results, this
should be in the range encompassed by the values of vx .
using Table A.1.1 values at 1 values at 2 T T1 := 210 T2 := 215 vg v 1g := 0.10441 v 2g := 0.09479⋅ vx := v 2 m
3 3

ug u 1g := 2599.5 kJ kg kJ kg

p g p 1g := 1.9062MPa p 2g := 2.104MPa

kg

m

u 2g := 2601.1

kg

interpolated values at

T2 := my_interp v 2g , v 1g , T2 , T1 , vx

(

) ) )

T2 = 213.1717 p 2 = 2.0317 MPa u 2 = 2.6005 × 10
3 kJ

p 2 := my_interp v 2g , v 1g , p 2g , p 1g , vx u 2 := my_interp v 2g , v 1g , u 2g , u 1g , vx total internal energy at state 2: heat added ...

( (

kg
5

U2 := mass_total⋅ u 2

U2 = 1.3226 × 10 kJ

Q1_2 := U2 − U1

Q1_2 = 104933 kJ

same result can be obtained using Table A.1.2 Pressure Tables my_interp( x2 , x1, y2, y1, vx) := y1 + p p 1g := 2.0MPa p 2g := 2.25MPa vg v 1g := 0.09963 v 2g := 0.08875⋅ m
3

vx − x1 x2 − x1 T

⋅(y2 − y1)

ug u 1g := 2600.3 u 2g := 2602.0 kJ kg kJ kg

values at 1 values at 2

kg m
3

T1 := 212.42 T2 := 218.45

kg

9/21/2006 9/21/2006

4

interpolated values at

vx := v 2

T2 := my_interp v 2g , v 1g , T2 , T1 , vx

(

) ) )

T2 = 213.1529 p 2 = 2.0304 MPa
3 kJ

p 2 := my_interp v 2g , v 1g , p 2g , p 1g , vx

( (

u 2 := my_interp v 2g , v 1g , u 2g , u 1g , vx total internal energy at state 2: heat added ...
example 5.3

u 2 = 2.6005 × 10

kg
5

U2 := mass_total⋅ u 2

U2 = 1.3226 × 10 kJ

Q1_2 := U2 − U1

Q1_2 = 104933 kJ

first law as a rate equation
from above ... δQ = δU + δKE + δPE + δW δQ δt = δU δt + δKE δt + δPE δt +
δW δt
d d d d d d d Q = U + KE + PE + W = E + W dt dt dt dt dt dt dt (5.31 and 5.32) Q1_2 = E2 − E1 + W1_2 = U2 − U1 + KE2 − KE1 + PE2 − PE1 + W1_2 in small time interval δt divide by δt

first law as a rate equation

first law as a rate equation - for a control volume (Woud: system boundary)
Q1_2 = E2 − E1 + W1_2 => δQ δt = E2 − E1 δt + δW (5.38)

Et Et_δt

= energy in control volume at time t

= energy in control volume at time t +dt system consists of control volume and differential entities δmi each with ei, vi, Ti, pi where i = input and differential entities δme each with ee , ve , Te , pe where e = output

E1 := Et + ei⋅δmi

= the energy of the system at time t

E2 := Et_δt + ee⋅δme

= the energy of the system at time t +dt

E2 − E1 → Et_δt + ee⋅δme − Et − ei⋅δmi ee⋅δme − ei⋅δmi

E2 − E1 = Et_δt − Et + ee⋅δme − ei⋅δmi

(5.39)

represents flow of energy across boundary during δt as a result of δmi and δme crossing the control surface

9/21/2006 9/21/2006

5

now consider work associated with masses δmi and δme work done ON mass δmi is ... p i⋅v i⋅δmi p e⋅v e⋅δme ON as work must be done to make it enter system BY as leaving represents work done

work done BY mass δme is ...

work done BY system in δt is then ...

δW + p e⋅v e⋅δme − p i⋅v i⋅δmi δQ δt = E2 − E1 δt

(5.41)

divide by δt and substitute into first law ... (5.38) and combining and rearranging δQ δt δmi δt

+ δW

(5.38)

+

⋅ ei + p i⋅v i =
2

(

)

Et_δt − Et δt

+

δme δt

⋅ ee + p e⋅v e +

(

)

δWc_v δt

(5.42)

e + p ⋅ v = u + pv +

V

2

+ g⋅ z = h +

V

2

H = U + p⋅ V + g⋅ z (5.43) h = u + p⋅ v

2

enthalpy defined - is a property (5.12)

therefore ...
2 2 ⎛ ⎞ E ⎞ δW Vi Ve δme ⎛ ⎜ ⎟ ⎜ ⎟ t_δt − Et c_v + ⋅ ⎜ hi + + g ⋅ zi⎟ = + ⋅ ⎜ he + + g ⋅ ze⎟ +
2 2 δt ⎝ δt ⎝ δt δt
δt ⎠ ⎠

δQ

δmi

(5.44)

δmi
example 5.4

and

δme

are summed over all inputs and outputs ...

Sonntag example 5.4 a cylinder fitted with a piston has volume 0.1m3 and contains 0.5 kg steam at 0.4 MPa. Heat is transferred until the temperature is 300 deg_C while pressure is constant What are the heat and work for this process?
3

V1 := 0.1m T2 := 300 deg_C mass_of_vapor total_mass m
3

mtot := 0.5kg p := 0.4MPa

I think by definition, steam = water + vapor at quality = x 3 V1 m => v 1 := v 1 = 0.2 mtot kg an intensive property 1−x= v fg = 0.4614
m
3

quality =

=x m
3

mass_of_liquid total_mass

v f := 0.001084

kg

v g := 0.4625

kg x :=

v fg := v g − v f v1 − vf v fg

kg

v 1 = v f + x ⋅ v fg constant pressure Q1_2 = E2 − E1 + W1_2

x = 0.4311

W1_2 = p ⋅ V2 − V1 = p ⋅ mtot⋅ v 2 − v 1 E2 − E1 = U2 − U1

(

)

(

)

as ΔV^2 and Δz = 0

9/21/2006 9/21/2006

6

E2 − E1 = U2 − U1 = mtot⋅ u 2 − u 1

(

)
( )

Q1_2 = E2 − E1 + W1_2 = mtot⋅ u 2 − u 1 + p ⋅ mtot⋅ v 2 − v 1 = mtot⎡u 2 + p ⋅ v 2 − u 1 + p ⋅ v 1 ⎤ ⎣ ⎦
h f := 604.74 kJ kg h fg := 2133.8 kJ kg h 1 := h f + x ⋅ h fg Q1_2 = 771.0904 kJ m
3

(

)

(

)

h 1 = 1.5246 × 10

3 kJ

Q1_2 := mtot⋅ h 2 − h 1 m
3

(

)

kg

h 2 := 3066.8

kJ kg

Table A.1.2 Saturated Steam Pressure Table

v 2 := 0.6548

Table A.1.2 Saturated Steam Pressure Table

kg

v 1 = 0.2

W1_2 := p ⋅ mtot⋅ v 2 − v 1

(

)

kg

W1_2 = 90.96 kJ

Q1_2 = E2 − E1 + W1_2 = U2 − U1 + W1_2
U2 − U1 = Q1_2 − W1_2 = Q1_2 − p ⋅ mtot⋅ v 2 −
v 1 ΔU := Q1_2 − p ⋅ mtot⋅ v 2 − v 1

(

)

(

)

ΔU = 680.1304 kJ

example 5.4

9/21/2006 9/21/2006

7

first law as a rate equation - for a control volume
2 ⎡ ⎛ ⎞⎤ Vi ⎢ ⎜ ⎟⎥ d m_doti⋅ ⎜ h i + + g ⋅ zi⎟⎥ = Ec_v + ⎢ 2 ⎣ ⎝
⎠⎦ dt 2 ⎡ ⎛ ⎞⎤ Ve ⎢ ⎜ ⎟⎥ d (5.45) m_dote⋅ ⎜ h e + + g ⋅ ze⎟⎥ + Wc_v ⎢ 2 ⎣ ⎝
⎠⎦ dt

d Qc_v + dt

n

n

this is where Woud starts
W_dot
system boundary

m_dote, ve, he Q_dot ze

Q_dot = heat_flow W_dot = work_flow m_dot = mass_flow

z = elevation i = inlet e = exit m = mass_system U = internal_energy_system

m_doti, vi, hi zi

v = velocity
m, U

h = specific_enthalpy

First law: change of energy within the system equals the heat flow into the system, minus the work flow delivered by the system, plus the difference in the enthalpy, H, kinetic energy E kin and potential energy Epot of the entering and exiting mass flows. assuming energy E = U + Ekin + Epot
2

and ...
2

Ekin = Epot = 0

E=U

⎛ ⎞ ⎛ ⎞ Ve Vi ⎜ ⎟ ⎜ ⎟ d U = Q_dot − W_dot + m_doti⋅ ⎜ h i + + g ⋅ zi⎟ − m_dote⋅ ⎜ h e + + g ⋅ z e⎟ 2 2 dt ⎝

⎝ ⎠

enthalpy = H = U + p ⋅ V enthalpy = h = U + p ⋅ v

N.B. dot => rate not d( )/dt W (2.1)

a defined property

assumptions ... 1. control volume does not move relative to the coordinate frame 2. the mass in the control volume does not vary with time 3. the mass flux and the state of mass at each discrete area of flow on the control surface do not vary with time and .. the rates at which heat and work cross the control surface remain constant. d mc_v = 0 dt d Ec_v = 0 dt

9/21/2006 9/21/2006

8

m_dot = flow_rate (5.46)

m_dotin = ∑ m_doten
n n 2 ⎡ ⎛ ⎞⎤ Ve ⎢ ⎜ ⎟⎥ d ⎢m_doten⋅ ⎜ he + 2 + g⋅ ze⎟⎥ + dt Wc_v ⎣ ⎝
⎠⎦

d Qc_v + dt

n

2 ⎡ ⎛ ⎞⎤ Vi ⎢ ⎜ ⎟⎥ ⎢m_dotin⋅ ⎜ h i + 2 + g ⋅ zi⎟⎥ = ⎣ ⎝
⎠⎦

n

(5.47)

2 2 ⎡ ⎤ Vi − Ve ⎢ ⎥ W_dot = Q_dot + m_dot⋅ ⎢h i − h e + + g ⋅ ( zi − ze)⎥ 2 ⎣ ⎦

(W 2.8) see text for examples of application to steam turbine, boiler or heat exchanger, nozzle and throttle

q=

d Qc_v dt m_dot

w=

d
Wc_v dt
m_dot

are heat transfer and work per unit mass flow (5.51)

2 2

q + hi + + g ⋅ zi = h e + 2

Vi

Ve
2

+ g ⋅ ze
+ w

(5.50)

uniform state, uniform flow process USUF
1. control volume remains constant relative to the coordinate frame 2. state of mass within the control volume may change with time, but at any instant of time is uniform throughout the entire control volume - I define this as f(t) but not of space 3. the state of mass crossing each of the areas of flow on the control surface is constant with time although the mass flow rates may be changing d mc_v + dt
t

at time t, continuity equation ...

∑ m_doten − ∑ m_dotin = 0
n n

integrating over time gives change in mass of the control volume

⌠ ⎮ d m dt = m2_c_v − m1_c_v ⎮ dt c_v ⌡
0

mass entering and leaving

⌠ ⎮ ⎮ ⎮ ⌡

t

n

m_doti dt = n

n

mi n

0

⌠ ⎮ ⎮ ⎮ ⌡

t

m_doten dt = ∑ men
n n

0

9/21/2006 9/21/2006

9

continuity for USUF process ...

m2_c_v − m1_c_v +

∑ men − ∑ min = 0
n n

(5.53)

apply first law at time t (5.45)
2 ⎡ ⎛ ⎞⎤ Vi ⎢ ⎜ ⎟⎥ d m_doti⋅ ⎜ h i + + g ⋅ zi⎟⎥ = Ec_v + ⎢ 2 ⎣ ⎝ ⎠⎦ dt 2 ⎡ ⎛ ⎞⎤ Ve ⎢ ⎜ ⎟⎥ d (5.45) m_dote⋅ ⎜ h e + + g ⋅ ze⎟⎥ + Wc_v ⎢ 2 ⎣ ⎝ ⎠⎦ dt

d Qc_v + dt

n

n

since at time t c.v. is uniform ... d Qc_v + dt

n

now integrate over time t ⌠ ⎮ d Q dt = Qc_v ⎮ dt c_v ⌡
0 t t

2 2 ⎡ ⎛ ⎞⎤ ⎞⎤ Vi Vc_v ⎢ ⎜ ⎟⎥ d ⎡ ⎛ ⎢ ⎜ ⎟⎥ m_doti⋅ ⎜ h i + + g ⋅ zi⎟⎥ = ⎢m⋅ ⎜ u c_v + + g ⋅ zc_v⎟⎥ ... ⎢ 2 2 ⎣ ⎝
⎠⎦ dt ⎣ ⎝ ⎠⎦ 2 ⎡ ⎛ ⎞⎤ Ve ⎢ ⎜ ⎟⎥ d m_dote⋅ ⎜ h e + + g ⋅ ze⎟⎥ + Wc_v + ⎢ 2 ⎣ ⎝
⎠⎦ dt

n

⌠ ⎮ ⎮ ⎮ ⎮ ⌡

t

n

2 ⎡ ⎛ ⎞⎤ Vi ⎢ ⎜ ⎟⎥ ⎢m_doti⋅ ⎜ h i + 2 + g ⋅ zi⎟⎥ dt = ⎣ ⎝
⎠⎦

n

2 ⎡ ⎛ ⎞⎤ Vi ⎢ ⎜ ⎟⎥ ⎢mi⋅ ⎜ hi + 2 + g⋅ zi⎟⎥ ⎣ ⎝
⎠⎦

0

⌠ 2 2 2 ⎡ ⎛ ⎞⎤ ⎛ ⎞ ⎛ ⎞ ⎮ V2 Vc_v V1 ⎢ ⎜ ⎟⎥ ⎜ ⎟ ⎜ ⎟ ⎮ d m⋅ u + + g ⋅ zc_v⎟⎥ dt = m2 ⋅ ⎜ u 2 + + g ⋅ z2⎟ − m1 ⋅ ⎜ u 1 + + g ⋅ z1 ⎟ ⎢ ⎜ c_v ⎮ dt ⎣ ⎝ 2 2 2 ⎠⎦ ⎝

⎠ ⌡
0

⌠ ⎮ ⎮ ⎮ ⎮ ⌡

t

n

2 ⎡ ⎛ ⎞⎤ Ve ⎢ ⎜ ⎟⎥ ⎢m_dote⋅ ⎜ h e + 2 + g ⋅ ze⎟⎥ dt = ⎣ ⎝
⎠⎦

n

2 ⎡ ⎛ ⎞⎤ Ve ⎢ ⎜ ⎟⎥ ⎢me⋅ ⎜ he + 2 + g⋅ ze⎟⎥ ⎣ ⎝
⎠⎦

⌠ ⎮ d W dt = Wc_v ⎮ dt c_v ⌡
0

t

0

uniform state, uniform flow process USUF
Qc_v +

n

2 ⎡ ⎛ ⎞⎤ Vi ⎢ ⎜ ⎟⎥ ⎢min⋅ ⎜ h i + 2 + g ⋅ zi⎟⎥ = ⎣ ⎝
⎠⎦

n

2 ⎡ ⎛ ⎞⎤ Ve ⎢ ⎜ ⎟⎥ ⎢men⋅ ⎜ h e + 2 + g ⋅ ze⎟⎥ ... ⎣ ⎝
⎠⎦

(5.54)

2 2 ⎛ ⎞ ⎛ ⎞ V2 V1 ⎜ ⎟ ⎜ ⎟ + m2 ⋅ ⎜ u 2 + + g ⋅ z2⎟ − m1 ⋅ ⎜ u 1 + + g ⋅ z1⎟ + Wc_v 2 2 ⎝

9/21/2006 9/21/2006

10