Professional Documents
Culture Documents
This Excel workbook includes Visual Basic for Application function subroutines.
Macros must be enabled for them to work.
Problem Statement:
Calculate the viscosity of a mixture of n-hexane (10 mole%), n-heptane (50 mole%), and n-
octane (40 mole%), at 20 degC
Input
Component mole% MW Viscosity at 20C, cP
n-hexane 0.1 86.18 0.310
n-heptane 0.5 100.21 0.409
n-octane 0.4 114.23 0.540
1.0
Calculations
Component mol% x MW wt% ln(viscosity) wt% x ln(mu)
n-hexane 8.62 0.08 -1.1711829815 (0.10)
n-heptane 50.11 0.48 -0.8940401229 (0.43)
n-octane 45.69 0.44 -0.6161861394 (0.27)
104.42 1.00 (0.80)
Answer: 0.451 cP
Problem Statement:
Estimate the viscosity of an emulsion
Inputs
Continuous Phase
Viscosity 20 cP
Dispersed Phase
Viscosity 30 cP
Volume Fraction in the emulsion 0.3
Output
Viscosity of the emulsion 36.29 cP
Problem Statement:
Calculate Antoine Coefficients
Same calculation procedure, but choosing from different mixture concentrations instead of a list of pure compounds
209.523086 2.4E+08
0.99999913
Problem Statement:
Given the air pressure and wet and dry bulb temperatures, calculate
the relative humidity
Input
Dry bulb temperature 100 deg F 37.77778 deg C 559.67 deg R
Wet bulb temperature 80 deg F 26.66667 deg C 539.67 deg R
Pressure 760 mm Hg
Constants
Critical Pressure 166818 mm Hg
Critical Temperature 1165.67 deg R
Equation Parameters
C0 4.39553 K0 0.000367
C1 -0.0034691 K1 1571
C2 3.0721E-06 K2 32
C3 -8.8331E-10
PD1 -1.941551197
PW1 -1.872169197
PD2 0.962275446
PW2 0.894729798
PD3 -0.154849295
PW3 -0.138834684
KD 3.261404955
KW 3.279255917
PD 49.07449487
Calculated using the VBA
PW 26.2065928 function subroutine
PM 5.748841248
Output
RH 41.69 #VALUE!
alculated using the VBA
nction subroutine
Problem Statement:
Demonstrate the use of IAWPS VBA functions to estimate the properties of water and steam
Inputs
Temperature deg K 400
Pressure bar, abs 3
Note: the answer "-1" is returned if the input data are outside the allowable range
Property
Density, single-phase kg/m3 #VALUE!
Specific internal energy, single-phase kJ/kg #VALUE!
Specific enthalpy, single-phase kJ/kg #VALUE!
Specific entropy, single-phase kJ/kg #VALUE!
Specific isobaric heat capacity, single-phase kJ/(kg-K) #VALUE!
Specific isochoric heat capacity, single-phase kJ/(kg-K) #VALUE!
Dynamic viscosity, single-phase Pa-s #VALUE!
Thermal conductivity, single-phase W/(m-K) #VALUE!
Boiling point as a function of pressure K #VALUE!
Vapor pressure bar, abs #VALUE!
Input
Select gas CO2
Temperature 60 deg C -- applicable range -45 C to 150 C
Liquid Density 840 kg/m3 at 15.5 degC
Pressure 1 atm, absolute
Vapor pressure of liquid 0 atm, absolute -- required if greater than 10% of total pressure
Output
Gas solubility in liquid #VALUE! ppm by weight
Data
Gas Ostwald Coeffcient at 0C Molecular Weight
He 0.01 4.003
Ne 0.021 20.179
H2 0.039 2.0158
N2 0.075 28.0134
Air 0.095 28.850334
CO 0.1 28.0104
O2 0.15 31.9988
Ar 0.23 39.948
CO2 1 44.0098
Kr 1.3 83.8
Xe 2 131.3
NH3 2.8 17.0304
Notes
Reference: "Rules of Thumb for Chemical Engineers"
Calculation is performed in a Visual Basic for Applications function call named "GasSol"
er than 10% of total pressure
Problem Statement:
Determine the surface tension of benzene at 100 deg C. Its surface tension is 29 dynes/cm at 20 deg
C and its critical temperature is 288.5 deg C
Input
Chemical Benzene
Surface Tension 29.0 dynes/cm
Surface Tension temperature 20.0 C
Critical temperature 288.5 C
Desired Temperature 100.0 C
Output
Surface tension at 100.0 C 19.0 The measured surface tension for benzene at 100 C is 18.2 dynes/cm
s/cm at 20 deg
Output
Compressibility Factor Z #VALUE! #VALUE!
Air
mole frac Pc Tc y*Pc y*Tc
Nitrogen 0.78 33.5 -146.9 26.1 -114.6
Oxygen 0.21 49.8 -118.6 10.5 -24.9
Argon 0.009 48.1 -122.3 0.4 -1.1
Water 0.001 217.8 373.9 0.2 0.4
Pseudo-Critical Pressure and Temperature 37.24 atm -140.24 C
Function ZSI(P, T, Pc, Tc)
' calculates compressibility factor, Z, using SI units
' P = gas pressure, kPa
' T = gas temperature, C
' Pc = gas pseudo-critical pressure, atm
' Tc = gas pseudo-critical temperature, C
Perry's, except
water: IAPWS
isopentane: CAMEO Chemicals, NOAA, http://cameochemicals.noaa.gov/
air: CodeCogs, http://www.codecogs.com/reference/engineering/thermodynamics
hemicals.noaa.gov/
gineering/thermodynamics/critical_temperature_and_pressure.php