Professional Documents
Culture Documents
1 contributor
Question 1
The pressure drop Δp of a fluid of density ρ and viscosity µ flowing at an mean velocity v through a pipe of diameter D and length L can be determined through an
equation relating the Reynolds number Re, which is defined as
Dρv
Re = ,
µ
and the friction factor f , which is defined as:
Δp D
f= .
2ρv2 L
For Re > 4000, where the fluid flow is turbulent, the friction factor and Reynolds number are related by the von K\'arm\'an-Nikuradse equation
1
= 4.0 log10 (Re√f) − 0.4.
√f
N. What is the pressure drop for water (with density 1000 kg m−3 and viscosity 10−3 Pa s) flowing with a mean velocity of 3 m s−1 across a 1 m length of pipe
with an inner diameter of 2 cm?
S. Plot the friction factor (on the y-axis) against the Reynolds number (on the x-axis) from Re = 4000 to 100000. Use a log scale for both the x- and y-axes.
V. For the system described in part 1, plot the pressure drop as a function of the mean velocity up to 5 m s−1 . Make sure you only include values of the velocity
where Re > 4000.
In [ ]:
Question 2
The ideal gas molar heat capacity can be represented by the Shomate equation, which is given by
where t = T /1000, T is absolute temperature in kelvin, Cp is molar heat capacity in J mol−1 K−1 , and A, B, C, D, and E are constants.
The parameters of the Shomate equation for nitrogen are given below (taken from the NIST webbook):
N. Create a function that takes the temperature as an argument and returns the corresponding value of the ideal gas molar heat capacity. Plot the ideal gas molar
heat capacity of nitrogen with temperature from 100 to 6000 K.
T
H(T ) = H(T0 ) + ∫ dT ′ Cp (T ′ ),
T0
where H is the molar enthalpy, create a function that takes the temperature as an argument and returns the corresponding value of the ideal gas enthalpy. Take
the enthalpy at T = 298.15 K to be equal to zero. Plot the ideal gas enthalpy of nitrogen with temperature from 100 to 6000 K.
In [ ]:
Question 3
Evaluate the following integrals analytically (possibly with help from an integral table) and using sympy:
b
N. ∫ dx εx
a
b
S. ∫ dx (γ − εx)
z
b
V.
ε
∫ dx
a x2
b
[.
ε+x
∫ dx
a x2
b
\.
γ−x
∫ dx
a (ε − x)2
4
]. ∫ dx x ex Hint: use integration by parts.
1
1
^. ∫ dx 2x Hint: use substitution.
0
In [ ]:
Question 4
Consider the gas-water shift reaction
gas Mw Hf Gf
Cp
= a0 + a1 T + a2 T 2 + a3 T 3 + a4 T 4
R
where T is the absolute temperature in kelvin, R = 8.314\,J−1 \,mol\,K−1 is the ideal gas constant, and the coefficients ak are given in the table below.
gas a 0 a 1 × 10 3 a 2 × 10 5 a 3 × 10 8 a 4 × 10 11
K −1 K −2 K −3 K −4
The information in both tables have been summarized in the dictionary data . The stoichiometric coefficients (the stoichiometric coefficient for species k is
typically denoted by the symbol νk ) of the reaction are held in the dictionary nu . Note that product species have a positive stoichiometric coefficient, and reactant
species have a negative stoichiometric coefficient.
In what follows below, assume that the mixtures behave as an ideal gas.
In [1]:
R = 8.314e-3 # ideal gas constant / kJ mol^{-1} K^{-1}
T0 = 298.15 # reference temperature / K
p0 = 1.0e5 # reference pressure / Pa
data = {}
data['CO'] = {'Mw':28.01, 'Hf':-110.5, 'Gf':-137.2 }
data['CO2'] = {'Mw':44.01, 'Hf':-393.3, 'Gf':-394.6 }
data['H2'] = {'Mw': 2.02, 'Hf': 0.0, 'Gf': 0.0 }
data['H2O'] = {'Mw':18.02, 'Hf':-241.8, 'Gf':-228.4 }
nu = {}
nu['CO'] = -1.0
nu['CO2'] = 1.0
nu['H2'] = 1.0
nu['H2O'] = -1.0
Part 1: Enthalpy
The enthalpy can be determined from the heat capacity:
T
H(T ) = Hf + ∫ dT ′ Cp (T ′ )
T0
Task: Using the empirical form of the heat capacity that was provided above, create a function that takes the temperature and component mole numbers as input
and returns the total enthalpy of the mixture.
In [ ]:
import numpy as np
T_data = np.arange(100.0, 500.0)
plt.plot(T_data, H_data)
plt.ylabel(r'enthalpy / kJ')
plt.xlabel(r'temperature / K')
plt.show()
ΔHrxn (T ) = ∑ νk Hf,k (T ).
k
Task: Plot the enthalpy of reaction for the gas-water shift reaction as a function of temperature.
In [ ]:
import numpy as np
T_data = np.arange(100.0, 500.0)
plt.plot(T_data, H_data)
plt.ylabel(r'$\Delta H_{\rm rxn}$ / kJ mol$^{-1}$')
plt.xlabel(r'temperature / K')
plt.show()
© 2022 GitHub, Inc. Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About