- #1
John Kenneth
- 5
- 0
Hi guys,
I am currently working on my master thesis. I am supposed to make a dynamic model for a gas system and have some trouble setting up the energy balance. I am a noob when it comes to uploading pictures, so I don't have a figure for this, but let's consider a general control volume (CV), with one flow in and one flow out.
I am interested in deriving an expression for the change in temperature, dT/dt.
I have attempted to solve the dynamic energy balance with respect to temperature, but this ends up in a pretty nasty expression. I have read a lot on thermodynamics lately to solve this, but I am not sure if my final expression, or approach, is correct. I would be extremely glad if someone with expertise on thermodynamics could look into this and see if it makes sense, or if there are any obvious mistakes or misconceptions!
Okay, so this is my approach for solving the energy balance for an open system:The dynamic energy balance is given as [1]:
\begin{equation}
\boxed{
\frac{dU}{dt} = H_{in} - H_{out} + \delta Q - \delta W
}
\end{equation}
where:
U = internal energy
W = work
H = enthalpy
Hin and Hout are the enthalpy of the flow entering and leaving the control volume, and are defined as
\begin{equation}
\begin{split}
&H_{in} = \dot{m}_{in} h_{in} \\
&H_{out} = \dot{m}_{out} h_{out}
\end{split}
\end{equation}
where the lower case h is the specific enthalpy, h=H/m.Introducing U = H - pV, the energy balance can be expressed with enthalpy as:
\begin{equation}
\frac{dH}{dt} = H_{in} - H_{out} + \delta Q - \delta W + pdV + Vdp
\end{equation}
where:
p = pressure
V = volume
The last two terms, p dV + V dp, are derived from the chain rule for d(pV).
Considering the varying mass, dH can be written as
\begin{equation}
\frac{dH}{dt} = m \frac{dh}{dt} + h \frac{dm}{dt} \Rightarrow m\frac{dh}{dt} = \frac{dH}{dt} - h\frac{dm}{dt}
\end{equation}
The mass balance for the control volume, dm, is defined as:
\begin{equation}
\frac{dm}{dt} = \dot{m}_{in} - \dot{m}_{out}
\end{equation}
With some rearrangement, the energy balance in enthalpy form becomes
\begin{equation}
m_{cv} dh = \dot{m}_{in} h_{in} - \dot{m}_{out} h_{out} + \delta Q - \delta W + pdV + Vdp - h ( \dot{m}_{in} - \dot{m}_{out})
\end{equation}
From what I understand, the last enthalpy term, h, is the enthalpy currently in the control volume, and not the enthalpy "following" the flow in and out.
Combining the enthalpy terms gives:
\begin{equation}
\boxed{
m_{cv} \frac{dh}{dt} = \dot{m}_{in}(h_{in} - h_{cv}) - \dot{m}_{out}(h_{out} - h_{cv}) + \delta Q - \delta W + pdV + Vdp
}
\end{equation}
where mcv is the mass in the control volume.
Now, I will replace the enthalpy and dp terms.
In my project, I am using the Redlich-Kwong equation of state (EOS). This is given as:
\begin{equation}
p = \frac{RT}{V_m-b} - \frac{a}{\sqrt{T} V_m (V_m+b)}
\end{equation}
where:
R = specific gas constant
T = temperature
Vm = specific volume, also defined as ρ-1
a = given constant for the EOS
b = given constant for the EOS
In the Redlich-Kwong EOS, the pressure is given as a function of temperature and specific volume. Therefore, the time derivative of the pressure will be
\begin{equation}
\frac{dp}{dt} = \left(\frac{\partial p}{\partial T}\right) \frac{dT}{dt} + \left(\frac{\partial p}{\partial V_m}\right) \frac{dV_m}{dt}
\end{equation}
The "real" enthalpy can be calculated using residual properties [2]. The residual property gives the enthalpy as a deviation from the ideal enthalpy. This means that the enthalpy can be written
\begin{equation}
h = h_{ideal} + h_{residual}
\end{equation}
The ideal enthalpy can be written as [1]
\begin{equation}
h = \int_{T_{ref}}^{T} c_p dT
\end{equation}
with Tref as the temperature at a set reference state.
It can be shown that the residual enthalpy is
\begin{equation}
h_{residual} = \frac{bRT}{V_m -b} - \frac{a}{\sqrt{T} V_m + b} - \frac{3a}{2 \sqrt{T} b} \ln (\frac{V_m + b}{V_m})
\end{equation}
The dh term on the left side in the energy balance is the time derivative of the combined ideal and residual enthalpy. Derivation of these two requires the partial differential of h in regards to T and Vm :
\begin{equation}
dh = \left(\frac{\partial h}{\partial T}\right) \frac{dT}{dt} + \left(\frac{\partial h}{\partial V_m}\right) \frac{dV_m}{dt}
\end{equation}
This gives
\begin{equation}
dh = \left[c_p + \frac{bR}{V_m-b} + \frac{a}{2 T^{\frac{3}{2}}(V_m+b)} + \frac{3a}{4T^{\frac{3}{2}}b} \ln{\frac{V_m+b}{V_m}}\right] \frac{dT}{dt} + \left[ \frac{bRT}{(V_m-b)^{2}} + \frac{a}{\sqrt{T} (V_m+b)^{2}} + \frac{3a}{2 \sqrt{T} V_m(V_m+b)} \right] \frac{dV_m}{dt}
\end{equation}
Now, we have to replace the enthalpy terms and the dp term. This requires a bit of algebraic manipulation which ends up in a nasty expression, but bear with me!
Inserting for dh and dp:
\begin{equation}
m_{cv} \left(\left[c_p + \frac{bR}{V_m-b} + \frac{a}{2 T^{\frac{3}{2}}(V_m+b)} + \frac{3a}{4T^{\frac{3}{2}}b} \ln{\frac{V_m+b}{V_m}}\right] \frac{dT}{dt} + \left[ \frac{bRT}{(V_m-b)^{2}} + \frac{a}{\sqrt{T} (V_m+b)^{2}} + \frac{3a}{2 \sqrt{T} V_m(V_m+b)} \right] \frac{dV_m}{dt} \right) = \dot{m}_{in}(h_{in} - h_{cv}) - \dot{m}_{out}(h_{out} - h_{cv}) + \delta Q - \delta W + pdV + V \left(\frac{\partial p}{\partial T}\right) \frac{dT}{dt} + V \left(\frac{\partial p}{\partial V_m}\right) \frac{dV_m}{dt}
\end{equation}
Combine dT terms on left side:
\begin{equation}
\left[ m_{cv} \left(c_p + \frac{bR}{V_m-b} + \frac{a}{2 T^{\frac{3}{2}}(V_m+b)} + \frac{3a}{4T^{\frac{3}{2}}b} \ln{\frac{V_m+b}{V_m}}\right) - V\frac{\partial p}{dT} \right] \frac{dT}{dt} = \dot{m}_{in}(h_{in} - h_{cv}) - \dot{m}_{out}(h_{out} - h_{cv}) + \delta Q - \delta W + pdV + m_{cv} \left( V \left(\frac{\partial p}{\partial V_m}\right) \frac{1}{m_{cv}} - \frac{bRT}{(V_m-b)^{2}} + \frac{a}{\sqrt{T} (V_m+b)^{2}} + \frac{3a}{2 \sqrt{T} V_m(V_m+b)} \right) \frac{dV_m}{dt}
\end{equation}
Dividing on the left side to get dT alone:
\begin{equation}
\boxed{
\frac{dT}{dt} = \frac{ \left[ \dot{m}_{in}(h_{in} - h_{cv}) - \dot{m}_{out}(h_{out} - h_{cv}) + \delta Q - \delta W + pdV + m_{cv} \left( V \left(\frac{\partial p}{\partial V_m}\right) \frac{1}{m_{cv}} - \frac{bRT}{(V_m-b)^{2}} + \frac{a}{\sqrt{T} (V_m+b)^{2}} + \frac{3a}{2 \sqrt{T} V_m(V_m+b)} \right) \frac{dV_m}{dt} \right]}{ \left[ m_{cv} \left(c_p + \frac{bR}{V_m-b} + \frac{a}{2 T^{\frac{3}{2}}(V_m+b)} + \frac{3a}{4T^{\frac{3}{2}}b} \ln{\frac{V_m+b}{V_m}}\right) - V\frac{\partial p}{dT} \right]}
}
\end{equation}
So... This is my final expression for the temperature. I hope it was possible to follow this somewhat cumbersome derivation. If not, do not hesitate to ask for more details and I will try to elaborate. As i stated in the introduction, I would really appreciate if someone could take a look at this, as it would be of great help for my thesis.
Thank you in advance! :)Sources:
[1]. SKOGESTAD, Sigurd. Chemical and energy process engineering. CRC press, 2008.
[2]. SANDIP, Roy. Nptel.ac.in. NPTEL :: Chemical Engineering - Chemical Engineering Thermodynamics. (2017). [online] Available at: http://nptel.ac.in/courses/103101004/1 [Accessed 13 Nov. 2017].
I am currently working on my master thesis. I am supposed to make a dynamic model for a gas system and have some trouble setting up the energy balance. I am a noob when it comes to uploading pictures, so I don't have a figure for this, but let's consider a general control volume (CV), with one flow in and one flow out.
I am interested in deriving an expression for the change in temperature, dT/dt.
I have attempted to solve the dynamic energy balance with respect to temperature, but this ends up in a pretty nasty expression. I have read a lot on thermodynamics lately to solve this, but I am not sure if my final expression, or approach, is correct. I would be extremely glad if someone with expertise on thermodynamics could look into this and see if it makes sense, or if there are any obvious mistakes or misconceptions!
Okay, so this is my approach for solving the energy balance for an open system:The dynamic energy balance is given as [1]:
\begin{equation}
\boxed{
\frac{dU}{dt} = H_{in} - H_{out} + \delta Q - \delta W
}
\end{equation}
where:
U = internal energy
W = work
H = enthalpy
Hin and Hout are the enthalpy of the flow entering and leaving the control volume, and are defined as
\begin{equation}
\begin{split}
&H_{in} = \dot{m}_{in} h_{in} \\
&H_{out} = \dot{m}_{out} h_{out}
\end{split}
\end{equation}
where the lower case h is the specific enthalpy, h=H/m.Introducing U = H - pV, the energy balance can be expressed with enthalpy as:
\begin{equation}
\frac{dH}{dt} = H_{in} - H_{out} + \delta Q - \delta W + pdV + Vdp
\end{equation}
where:
p = pressure
V = volume
The last two terms, p dV + V dp, are derived from the chain rule for d(pV).
Considering the varying mass, dH can be written as
\begin{equation}
\frac{dH}{dt} = m \frac{dh}{dt} + h \frac{dm}{dt} \Rightarrow m\frac{dh}{dt} = \frac{dH}{dt} - h\frac{dm}{dt}
\end{equation}
The mass balance for the control volume, dm, is defined as:
\begin{equation}
\frac{dm}{dt} = \dot{m}_{in} - \dot{m}_{out}
\end{equation}
With some rearrangement, the energy balance in enthalpy form becomes
\begin{equation}
m_{cv} dh = \dot{m}_{in} h_{in} - \dot{m}_{out} h_{out} + \delta Q - \delta W + pdV + Vdp - h ( \dot{m}_{in} - \dot{m}_{out})
\end{equation}
From what I understand, the last enthalpy term, h, is the enthalpy currently in the control volume, and not the enthalpy "following" the flow in and out.
Combining the enthalpy terms gives:
\begin{equation}
\boxed{
m_{cv} \frac{dh}{dt} = \dot{m}_{in}(h_{in} - h_{cv}) - \dot{m}_{out}(h_{out} - h_{cv}) + \delta Q - \delta W + pdV + Vdp
}
\end{equation}
where mcv is the mass in the control volume.
Now, I will replace the enthalpy and dp terms.
In my project, I am using the Redlich-Kwong equation of state (EOS). This is given as:
\begin{equation}
p = \frac{RT}{V_m-b} - \frac{a}{\sqrt{T} V_m (V_m+b)}
\end{equation}
where:
R = specific gas constant
T = temperature
Vm = specific volume, also defined as ρ-1
a = given constant for the EOS
b = given constant for the EOS
In the Redlich-Kwong EOS, the pressure is given as a function of temperature and specific volume. Therefore, the time derivative of the pressure will be
\begin{equation}
\frac{dp}{dt} = \left(\frac{\partial p}{\partial T}\right) \frac{dT}{dt} + \left(\frac{\partial p}{\partial V_m}\right) \frac{dV_m}{dt}
\end{equation}
The "real" enthalpy can be calculated using residual properties [2]. The residual property gives the enthalpy as a deviation from the ideal enthalpy. This means that the enthalpy can be written
\begin{equation}
h = h_{ideal} + h_{residual}
\end{equation}
The ideal enthalpy can be written as [1]
\begin{equation}
h = \int_{T_{ref}}^{T} c_p dT
\end{equation}
with Tref as the temperature at a set reference state.
It can be shown that the residual enthalpy is
\begin{equation}
h_{residual} = \frac{bRT}{V_m -b} - \frac{a}{\sqrt{T} V_m + b} - \frac{3a}{2 \sqrt{T} b} \ln (\frac{V_m + b}{V_m})
\end{equation}
The dh term on the left side in the energy balance is the time derivative of the combined ideal and residual enthalpy. Derivation of these two requires the partial differential of h in regards to T and Vm :
\begin{equation}
dh = \left(\frac{\partial h}{\partial T}\right) \frac{dT}{dt} + \left(\frac{\partial h}{\partial V_m}\right) \frac{dV_m}{dt}
\end{equation}
This gives
\begin{equation}
dh = \left[c_p + \frac{bR}{V_m-b} + \frac{a}{2 T^{\frac{3}{2}}(V_m+b)} + \frac{3a}{4T^{\frac{3}{2}}b} \ln{\frac{V_m+b}{V_m}}\right] \frac{dT}{dt} + \left[ \frac{bRT}{(V_m-b)^{2}} + \frac{a}{\sqrt{T} (V_m+b)^{2}} + \frac{3a}{2 \sqrt{T} V_m(V_m+b)} \right] \frac{dV_m}{dt}
\end{equation}
Now, we have to replace the enthalpy terms and the dp term. This requires a bit of algebraic manipulation which ends up in a nasty expression, but bear with me!
Inserting for dh and dp:
\begin{equation}
m_{cv} \left(\left[c_p + \frac{bR}{V_m-b} + \frac{a}{2 T^{\frac{3}{2}}(V_m+b)} + \frac{3a}{4T^{\frac{3}{2}}b} \ln{\frac{V_m+b}{V_m}}\right] \frac{dT}{dt} + \left[ \frac{bRT}{(V_m-b)^{2}} + \frac{a}{\sqrt{T} (V_m+b)^{2}} + \frac{3a}{2 \sqrt{T} V_m(V_m+b)} \right] \frac{dV_m}{dt} \right) = \dot{m}_{in}(h_{in} - h_{cv}) - \dot{m}_{out}(h_{out} - h_{cv}) + \delta Q - \delta W + pdV + V \left(\frac{\partial p}{\partial T}\right) \frac{dT}{dt} + V \left(\frac{\partial p}{\partial V_m}\right) \frac{dV_m}{dt}
\end{equation}
Combine dT terms on left side:
\begin{equation}
\left[ m_{cv} \left(c_p + \frac{bR}{V_m-b} + \frac{a}{2 T^{\frac{3}{2}}(V_m+b)} + \frac{3a}{4T^{\frac{3}{2}}b} \ln{\frac{V_m+b}{V_m}}\right) - V\frac{\partial p}{dT} \right] \frac{dT}{dt} = \dot{m}_{in}(h_{in} - h_{cv}) - \dot{m}_{out}(h_{out} - h_{cv}) + \delta Q - \delta W + pdV + m_{cv} \left( V \left(\frac{\partial p}{\partial V_m}\right) \frac{1}{m_{cv}} - \frac{bRT}{(V_m-b)^{2}} + \frac{a}{\sqrt{T} (V_m+b)^{2}} + \frac{3a}{2 \sqrt{T} V_m(V_m+b)} \right) \frac{dV_m}{dt}
\end{equation}
Dividing on the left side to get dT alone:
\begin{equation}
\boxed{
\frac{dT}{dt} = \frac{ \left[ \dot{m}_{in}(h_{in} - h_{cv}) - \dot{m}_{out}(h_{out} - h_{cv}) + \delta Q - \delta W + pdV + m_{cv} \left( V \left(\frac{\partial p}{\partial V_m}\right) \frac{1}{m_{cv}} - \frac{bRT}{(V_m-b)^{2}} + \frac{a}{\sqrt{T} (V_m+b)^{2}} + \frac{3a}{2 \sqrt{T} V_m(V_m+b)} \right) \frac{dV_m}{dt} \right]}{ \left[ m_{cv} \left(c_p + \frac{bR}{V_m-b} + \frac{a}{2 T^{\frac{3}{2}}(V_m+b)} + \frac{3a}{4T^{\frac{3}{2}}b} \ln{\frac{V_m+b}{V_m}}\right) - V\frac{\partial p}{dT} \right]}
}
\end{equation}
So... This is my final expression for the temperature. I hope it was possible to follow this somewhat cumbersome derivation. If not, do not hesitate to ask for more details and I will try to elaborate. As i stated in the introduction, I would really appreciate if someone could take a look at this, as it would be of great help for my thesis.
Thank you in advance! :)Sources:
[1]. SKOGESTAD, Sigurd. Chemical and energy process engineering. CRC press, 2008.
[2]. SANDIP, Roy. Nptel.ac.in. NPTEL :: Chemical Engineering - Chemical Engineering Thermodynamics. (2017). [online] Available at: http://nptel.ac.in/courses/103101004/1 [Accessed 13 Nov. 2017].