# Dynamic Energy Consumption Modeling for HVAC Systems in Electric Vehicles
## 2 Materials and Methods
### The HVAC Model
#### 2.1.3 Condenser  
In addition to updating the physical states of the refrigerant fluid, the condenser element calculates the heat exchange between the refrigerant fluid and the external air. The thermal power balance in the condenser can be modeled using the following equation:  
\[\dot{Q}_{c,\Delta T_{ml}}=\dot{Q}_{c,ref}\,, \tag{24}\]  
where \(\dot{Q}_{c,\Delta T_{ml}}\) and \(\dot{Q}_{c,ref}\) are, respectively, the thermal power determined by using the mean logarithmic temperature difference and the thermal power determined from the energy balance on the refrigerant fluid side:  
\[\dot{Q}_{c,\Delta T_{ml}}=f_{c}(U\dot{A})_{cond}\Delta T_{ml}\,, \tag{25}\]  
and  
\[\dot{Q}_{c,ref}=\dot{m}_{ref}(h_{ref,ns}(p_{cond})-h_{ref,sc}(p_{cond}))\,. \tag{26}\]  
Similar to Equation (7), in Equation (25), \(f_{c}\) is a correction factor which depends on the compressor typology [15], \((U\dot{A})_{cond}\) is the global heat transfer coefficient of the compressor multiplied by the heat transfer area of the condenser and \(\Delta T_{ml}\) is the mean logarithmic temperature difference. In Equation (26), \(h_{ref,ns}(p_{cond})\) is the enthalpy of the refrigerant fluid in the state of superheated vapor at the inlet of the condenser and \(h_{ref,sc}(p_{cond})\) is the enthalpy of the refrigerant fluid in the state of subcooled liquid at the outlet of the condenser. Hence, after solving Equation (25), it is possible to use Equation (26) in order to determine the temperature of the condensed refrigerant fluid. In addition, in this case, if the global heat transfer coefficient (\(U_{c}\)) is not known in advance, it is possible to calculate it as follows:  
\[(UA)_{cond}=\frac{1}{\frac{1}{h_{ref,c}A_{int,c}}+\frac{1}{h_{ext,c}A_{ce}}}\,. \tag{27}\]  
In Equation (27), \(\overline{h_{ref,c}}\) is the mean heat transfer coefficient of the refrigerant side (see Equation (28)) and is multiplied by the total inner heat transfer surface of the condenser (\(A_{tot,c,i}\)), and \(h_{air,c}\) is the air-side heat transfer coefficient, which is multiplied by the outer heat transfer surface of the condenser (\(A_{c,o}\)). \[\overline{h_{ref,c}}=h_{r,c}\cdot\left(\frac{A_{tot,c,i}-A_{vs,c,i}}{A_{tot,c,i}}\right)+h_{vs,c}\cdot A_{vs,c,i} \tag{28}\]  
where \(h_{r,c}\) and \(h_{vs,c}\) are the heat transfer coefficients of the refrigerant during its condensing phase and during its cooling from the superheated vapor state to the saturated vapor state. \(A_{vs,c,i}\) is the portion of the condenser heat transfer coefficient in the inner area devoted to cooling of the refrigerant from the superheated vapor state to the saturated vapor state. The heat transfer coefficient \(h_{vs,c}\) can be calculated from the Nusselt number determined by the Dittus-Boelter correlation for the cooling of superheated vapor [15], while the heat transfer coefficient \(h_{r,c}\) can be calculated using the correlation of [PERSON] et al. (2006) [25], reported in the following equation. \[\left\{ \begin{array}{l l}h_{r,c}=h_{A}&\quad\text{for}\quad J_{G}>J_{G}^{T}\\ h_{r,c}=h_{D}&\quad\text{for}\quad J_{G}\leq J_{G}^{T}\end{array} \right. \tag{29}\]  
where  
\[J_{G}=\frac{xG}{[gD_{h}p_{o}(p_{l}-p_{v})]^{0.5}} \tag{30}\]  
and  
\[J_{G}^{T}=\left\{\left[\frac{7.5}{(4.3X_{tt}^{1.111}+1)}\right]^{-3}+C_{T}^{-3 }\right\}^{-(1/3)} \tag{31}\]  
where \(J_{G}\) is the modified Froude number and is used as the dimensionless gas velocity, while \(J_{G}^{T}\) is a threshold parameter involved in determining the transition between the regime in which the heat transfer coefficient depends on the difference between the saturation temperature and the inner wall temperature of the tube and the regime in which it does not depend on this value [25]. In Equation (31), \(X_{tt}\) is the Martinelli parameter and \(C_{T}\) is a parameter that takes into account whether the refrigerant fluid is a hydrocarbon (\(C_{T}=1.6\)) or not (\(C_{T}=2.6\)) [25].