## 2 Modelling
### Hydraulic Network Model
#### 2.2.1. Vapour Equations  
Vapour masses (\(M_{(1-2)}\), \(M_{(2-3)}\) and \(M_{(3-4)}\)) are modelled as an ideal gas \(\frac{\partial P_{\rm v}}{\partial\dot{p}_{\rm v}}=\gamma RT_{\rm v}\) (as in Assumption 3), which means that continuity equation \(V_{\rm v}\frac{\partial\rho_{\rm v}}{\partial\dot{t}}=\sum\dot{m}_{\rm v}\) applied to the three vapour masses is rewritten as follows:  
\[\left(\frac{M_{w}V_{(1-2)}}{R_{0}T_{(1-2)}}\right)\frac{dP_{(1-2)}}{dt}=\dot {m}_{1}-\dot{m}_{2}\to C_{fl_{(1-2)}}\frac{dP_{(1-2)}}{dt}=\dot{m}_{1}-\dot{m }_{2}, \tag{11}\]  
\[\left(\frac{M_{w}V_{(2-3)}}{R_{0}T_{(2-3)}}\right)\frac{dP_{(2-3)}}{dt}=\dot{m }_{2}-\dot{m}_{3}\to C_{fl_{(2-3)}}\frac{dP_{(2-3)}}{dt}=\dot{m}_{2}-\dot{m}_{ 3}, \tag{12}\]  
\[\left(\frac{M_{w}V_{(3-4)}}{R_{0}T_{(3-4)}}\right)\frac{dP_{(3-4)}}{dt}=\dot{m }_{3}-\dot{m}_{4}\to C_{fl_{(3-4)}}\frac{dP_{(3-4)}}{dt}=\dot{m}_{3}-\dot{m}_{ 4}, \tag{13}\]  
where \(\dot{m}\) is the mass flow rate, \(P\) is the pressure, \(R_{0}\) is the universal gas constant, \(t\) is time, \(V\) is the tank volume, \(T\) is the temperature of the vapour in the tank, \(M_{w}\) is the atomic weight, and \(C_{th}\) is the flow capacitance. The temperature time derivative, \(\frac{\partial T}{\partial t}\), of the adiabatic vapour masses \(M\) is modelled according to the Clausius-Clapeyron relation,\(\left(\frac{\partial T}{\partial P}\right)_{Sat}=cnst\), as discussed in [32], providing a link between vapour pressure \(P\) and temperature \(T\):  
\[\frac{T_{(1-2)}}{dt}=\left(\frac{\partial T}{\partial P}\right)_{Sat}\frac{P_{(1 -2)}}{dt}, \tag{14}\]  
\[\frac{T_{(2-3)}}{dt}=\left(\frac{\partial T}{\partial P}\right)_{Sat}\frac{P_{(2 -3)}}{dt}, \tag{15}\]  
\[\frac{T_{(3-4)}}{dt}=\left(\frac{\partial T}{\partial P}\right)_{Sat}\frac{P_{( 3-4)}}{dt}. \tag{16}\]  
Following Assumptions 1 and 5, the 1D momentum equations for the vapour flow through the vapour ducts are as follows:  
\[\rho\frac{\partial u}{\partial t}-\
u\frac{\partial^{2}u}{\partial x^{2}}+ \frac{\partial P}{\partial x}=0. \tag{17}\]  
Integrating Equation (17) for each section in the evaporator and adiabatic pipe effective lengths, i.e., \(L_{eff_{(1-2)}}\) and \(L_{eff_{(2-3)}}\), respectively, we obtain  
\[\int_{L_{eff}}\rho\frac{\partial u}{\partial t}\mathrm{d}x-\int_{L_{eff}}\mu \frac{\partial^{2}u}{\partial x^{2}}\mathrm{d}x+\int_{L_{eff}}\frac{\partial P }{\partial x}\mathrm{d}x=0. \tag{18}\]  
Assuming that we have constant fluid properties in time and space, a laminar flow (using Hagen-Poiseuille and Darcy relations), each term of Equation (18) can be developed and reduced as follows:  
\[\int_{L_{eff}}\rho\frac{\partial u}{\partial t}\mathrm{d}x=L_{eff}\rho_{v} \frac{\mathrm{d}u}{\mathrm{d}t}=\frac{L_{eff}}{A_{v}}\frac{\mathrm{d}in}{ \mathrm{d}t}=L_{f\!I}\frac{\mathrm{d}in}{\mathrm{d}t}, \tag{19}\]  
\[\int_{L_{eff}}\mu\frac{\partial^{2}u}{\partial x^{2}}\mathrm{d}x=\frac{8\mu_{ v}L_{eff}}{\rho_{v}A_{v}r_{v}^{2}}\mu_{v}=R_{f\!I}\mu_{v}, \tag{20}\]  
\[\int_{L_{eff}}\frac{\partial P}{\partial x}\mathrm{d}x=\Delta P_{\
u_{L_{eff} }}, \tag{21}\]  
substituting these three terms into (18) for the evaporator and adiabatic pipe length section, i.e., \(L_{eff_{(1-2)}}\) and \(L_{eff_{(2-3)}}\), respectively, we have, finally,  
\[L_{f\!I_{(1-2)}}\frac{d\mu_{2}}{dt}=\left((P_{(1-2)}-P_{(2-3)})-R_{f\!I_{(1-2 )}}\mu_{2}\right), \tag{22}\]  
\[L_{f\!I_{(2-3)}}\frac{d\mu_{3}}{dt}=\left((P_{(2-3)}-P_{(3-4)})-R_{f\!I_{(2-3) }}\mu_{3}\right). \tag{23}\]  
In (22) and (23), electrical analogy is represented as shown in Figure 3. \(R_{f\!I}\) represents the resistance of flow through the vapour path, \(L_{f\!I}\) represents a measure of the effort to the change in the flow rate, \(\Delta P_{\
u_{L_{eff}}}\) represents the resulting force that causes the flow, and \(\dot{m}_{v}\) represents the flow rate.