4.9 Reference States in Thermodynamics

4.9 Reference States in Thermodynamics#

In thermodynamics, a reference state serves as a baseline or zero point for measuring thermodynamic properties such as enthalpy (H) and entropy (S). Choosing different reference states doesn’t affect the differences in properties calculated using different states of a substance.

For substances such as refrigerants (e.g., R-134a), commonly used reference states include the Normal Boiling Point (NBP) and the International Institute of Refrigeration (IIR) standard:

NBP: It sets the enthalpy and entropy at the boiling point of the substance under 1 atmosphere to zero. This is a common reference for refrigerants.

IIR: This reference state, set by the International Institute of Refrigeration, defines the enthalpy and entropy at 0°C and a pressure where the liquid is saturated to be zero for refrigerants.

For refrigerants, the ASHRAE reference state typically sets a specific point where the enthalpy and entropy are defined to be zero. This point is the saturated liquid state at a specified temperature, often associated with a standard condition such as under a temperature of -40°C or -40°F. (This is what is being followed in the textbook!)

Despite the reference state chosen, the differences in enthalpy (ΔH) and entropy (ΔS) between two defined states of R-134a remain the same. These differences are intrinsic and are not influenced by the reference points, as you’ll observe in the CoolProp calculations that follow.

Problem statement:#

Use threee different references and calculate absolute and relative differences of S, H for R134a refigerant fluid.

## add internal energy as another property
## make it clear what the textbook uses, in this case it is ASHRAE. A note at the end would be great.

Solution#

import CoolProp.CoolProp as CP

# Define two states for R-134a
T1 = 280  # Temperature in K for state 1
P1 = 101325  # Pressure in Pa for state 1 (1 atm)
T2 = 300  # Temperature in K for state 2
P2 = 200000  # Pressure in Pa for state 2

# Set the IIR reference state
CP.set_reference_state('R134a', 'IIR')

# Calculate enthalpy and entropy for both states with the IIR reference
h1_iir = CP.PropsSI('H', 'T', T1, 'P', P1, 'R134a') 
s1_iir = CP.PropsSI('S', 'T', T1, 'P', P1, 'R134a') 
h2_iir = CP.PropsSI('H', 'T', T2, 'P', P2, 'R134a') 
s2_iir = CP.PropsSI('S', 'T', T2, 'P', P2, 'R134a') 

# Calculate differences with IIR reference
dh_iir = (h2_iir - h1_iir) / 1000
ds_iir = (s2_iir - s1_iir) / 1000

# Set the NBP reference state
CP.set_reference_state('R134a', 'NBP')

# Calculate enthalpy and entropy for both states with the NBP reference
h1_nbp = CP.PropsSI('H', 'T', T1, 'P', P1, 'R134a') 
s1_nbp = CP.PropsSI('S', 'T', T1, 'P', P1, 'R134a') 
h2_nbp = CP.PropsSI('H', 'T', T2, 'P', P2, 'R134a') 
s2_nbp = CP.PropsSI('S', 'T', T2, 'P', P2, 'R134a') 

# Calculate differences with NBP reference
dh_nbp = (h2_nbp - h1_nbp) / 1000
ds_nbp = (s2_nbp - s1_nbp) / 1000

# Set the ASHRAE reference state
CP.set_reference_state('R134a', 'ASHRAE')

# Calculate enthalpy and entropy for both states with the ASHRAE reference
h1_ashrae = CP.PropsSI('H', 'T', T1, 'P', P1, 'R134a') 
s1_ashrae = CP.PropsSI('S', 'T', T1, 'P', P1, 'R134a') 
h2_ashrae = CP.PropsSI('H', 'T', T2, 'P', P2, 'R134a') 
s2_ashrae = CP.PropsSI('S', 'T', T2, 'P', P2, 'R134a') 

# Calculate differences with ASHRAE reference
dh_ashrae = (h2_ashrae - h1_ashrae) / 1000
ds_ashrae = (s2_ashrae - s1_ashrae) / 1000

print("Properties at T = 280 K and P = 1 bar")
# Print statements for each state
print("IIR Reference State:")
print(f"State 1 Enthalpy (kJ/kg): {h1_iir / 1000:.3f}")
print(f"State 1 Entropy (kJ/kgK): {s1_iir / 1000:.3f}")
print(f"State 2 Enthalpy (kJ/kg): {h2_iir / 1000:.3f}")
print(f"State 2 Entropy (kJ/kgK): {s2_iir / 1000:.3f}")
print(f"Enthalpy Difference (kJ/kg): {dh_iir:.3f}")
print(f"Entropy Difference (kJ/kgK): {ds_iir:.3f}\n")

print("NBP Reference State:")
print(f"State 1 Enthalpy (kJ/kg): {h1_nbp / 1000:.3f}")
print(f"State 1 Entropy (kJ/kgK): {s1_nbp / 1000:.3f}")
print(f"State 2 Enthalpy (kJ/kg): {h2_nbp / 1000:.3f}")
print(f"State 2 Entropy (kJ/kgK): {s2_nbp / 1000:.3f}")
print(f"Enthalpy Difference (kJ/kg): {dh_nbp:.3f}")
print(f"Entropy Difference (kJ/kgK): {ds_nbp:.3f}\n")

print("ASHRAE Reference State:")
print(f"State 1 Enthalpy (kJ/kg): {h1_ashrae / 1000:.3f}")
print(f"State 1 Entropy (kJ/kgK): {s1_ashrae / 1000:.3f}")
print(f"State 2 Enthalpy (kJ/kg): {h2_ashrae / 1000:.3f}")
print(f"State 2 Entropy (kJ/kgK): {s2_ashrae / 1000:.3f}")
print(f"Enthalpy Difference (kJ/kg): {dh_ashrae:.3f}")
print(f"Entropy Difference (kJ/kgK): {ds_ashrae:.3f}\n")
Properties at T = 280 K and P = 1 bar
IIR Reference State:
State 1 Enthalpy (kJ/kg): 409.317
State 1 Entropy (kJ/kgK): 1.848
State 2 Enthalpy (kJ/kg): 424.282
State 2 Entropy (kJ/kgK): 1.846
Enthalpy Difference (kJ/kg): 14.965
Entropy Difference (kJ/kgK): -0.002

NBP Reference State:
State 1 Enthalpy (kJ/kg): 243.507
State 1 Entropy (kJ/kgK): 0.979
State 2 Enthalpy (kJ/kg): 258.472
State 2 Entropy (kJ/kgK): 0.977
Enthalpy Difference (kJ/kg): 14.965
Entropy Difference (kJ/kgK): -0.002

ASHRAE Reference State:
State 1 Enthalpy (kJ/kg): 261.173
State 1 Entropy (kJ/kgK): 1.052
State 2 Enthalpy (kJ/kg): 276.138
State 2 Entropy (kJ/kgK): 1.050
Enthalpy Difference (kJ/kg): 14.965
Entropy Difference (kJ/kgK): -0.002

Reference

State

Enthalpy (kJ/kg)

Entropy (kJ/(kg·K))

ΔH (kJ/kg)

ΔS (kJ/(kg·K))

IIR

1(280 K, 1bar)

409.317

1.848

IIR

2

424.282

1.846

14.965

-0.002

NBP

1

243.507

0.979

NBP

2

258.472

0.977

14.965

-0.002

ASHRAE

1

261.173

1.052

ASHRAE

2

276.138

1.050

14.965

-0.002

import numpy as np

# Arrays of known points
x_points = np.array([0, 10])
y_points = np.array([1.0333, 1.0628])

# Point to interpolate
x= 280 - 273.15
# Perform interpolation
y = np.interp(x, x_points, y_points)

print("Interpolated value at x = {}: y = {}".format(round(x,3), round(y,3)))
Interpolated value at x = 6.85: y = 1.054
import numpy as np

# Arrays of known points
x_points = np.array([20, 30])
y_points = np.array([270.20, 278.91])

# Point to interpolate
x= 300 - 273.15
# Perform interpolation
y = np.interp(x, x_points, y_points)

print("Interpolated value at x = {}: y = {}".format(round(x,2), round(y,2)))
Interpolated value at x = 26.85: y = 276.17