# Problem 14.09 Temperature Change Upon Ethylene Expansion in Throttle Valves Using a High Precision EOS¶

Ethylene is expanded from P1 = 3000 bar, T1 = 600 K to P2 = 300 bar by a first valve, and then to P3 = 1 bar by a second valve. What are the temperatures T2 and T3? Neglect the velocity term in the solution.

## Solution¶

This is straightforward - an initial PT flash calculation, followed by two separate PH flash calculations.

[1]:

# Set the conditions and imports
from scipy.constants import bar, hour
from thermo import ChemicalConstantsPackage, PRMIX, CEOSLiquid, CoolPropLiquid, CEOSGas, CoolPropGas, FlashPureVLS
fluid = 'ethylene'
constants, correlations = ChemicalConstantsPackage.from_IDs([fluid])

T1 = 600
P1 = 3000*bar
P2 = 300*bar
P3 = 1*bar
zs = [1]

[2]:

backend = 'HEOS'
gas = CoolPropGas(backend, fluid, T=T1, P=P1, zs=zs)
liquid = CoolPropLiquid(backend, fluid, T=T1, P=P1, zs=zs)

flasher = FlashPureVLS(constants, correlations, gas=gas, liquids=[liquid], solids=[])

# Flash at inlet conditions to obtain initial enthalpy
state_1 = flasher.flash(T=T1, P=P1)
state_2 = flasher.flash(H=state_1.H(), P=P2)
state_3 = flasher.flash(H=state_1.H(), P=P3)

print(f'The second temperature is {state_2.T: .2f} K')
print(f'The third temperature is {state_3.T: .2f} K')

The second temperature is  676.94 K
The third temperature is  651.47 K