Energy-Optimal Structures of HVAC System for Cleanrooms as a Function of Key Constant Parameters and External Climate

This article presents approximating relations defining energy-optimal structures of the HVAC (Heating, Ventilation, Air Conditioning) system for cleanrooms as a function of key constant parameters and energy-optimal control algorithms for various options of heat recovery and external climates. The annual unit primary energy demand of the HVAC system for thermodynamic air treatment was adopted as the objective function. Research was performed for wide representative variability ranges of key constant parameters: cleanliness class—Cs (ISO5÷ISO8), unit cooling loads— . qj (100 ÷ 500) W/m2 and percentage of outdoor air—αo (5 ÷ 100)%. HVAC systems are described with vectors x with coordinates defined by constant parameters and decision variables, and the results are presented in the form of approximating functions illustrating zones of energy-optimal structures of the HVAC system x∗ = f (Cs, . qj, αo). In the optimization procedure, the type of heat recovery as an element of optimal structures of the HVAC system and algorithms of energy-optimal control were defined based on an objective function and simulation models. It was proven that using heat recovery is profitable only for HVAC systems without recirculation and with internal recirculation (savings of 5 ÷ 66%, depending on the type of heat recovery and the climate), while it is not profitable (or generates losses) for HVAC systems with external recirculation or external and internal recirculation at the same time.


Introduction
HVAC systems for cleanrooms generate very high energy consumption for thermodynamic treatment and forcing through air. The literature provides a lot of data confirming this thesis. According to Kircher et al. [1], the energy consumption of HVAC systems for cleanrooms in the USA is 30 ÷ 50% times higher than for commercial buildings. According to Tschudi et al. [2], as well as Zhuang et al. [3], this range is wider and equals 10 ÷ 100%. Shan and Wang [4], as well as Tsao et al. [5,6], report that the percentage of energy consumption by HVAC systems in factories with advanced technologies equals 30 ÷ 65%, while, according to Hu et al. [7] and Zhao et al. [8], the percentage for cleanrooms with semiconductor manufacturing equals 40 ÷ 50% of the total energy consumption. Highenergy inputs for air conditioning for cleanrooms inspire research aimed to reduce the energy consumption. Such studies address two issues: the optimization of the structure of the HVAC system or the optimization of control algorithms according to the energy criterion. The support tool here is software for determining energy consumption by the HVAC system of cleanrooms; significant results of work in this area were obtained by Hu et al. [9][10][11]. In Reference [9], the authors presented a validated FES (Fab Energy Simulation) simulation tool to determine energy consumption in an application for a semiconductor manufacturing fab. The mathematical model for the HVAC system was based on the energy balance equations for the individual components. In relation to the commercial comparable program "CleanCalc II", the FES program allowed for the definition of a few additional parameters by the user while showing excellent consistency of the results (2.33%). The In turn, Chang et al. [32] investigated six strategies for controlling a cleanroom HVAC system, indicating the energy-optimal variant. They proved that the setting of the required room temperature is of key importance here; increasing this temperature by 1 • C resulted in a reduction of energy consumption by 1%. Loomans et al. [33,34] and Molnaar [35], on the other hand, simulated and experimentally tested three ventilation strategies in pharmaceutical cleanrooms: Fine-tuning, DCF (Demand Controlled Filtration) and Optimizing airflow pattern. They proved that, using the DCF strategy, it is possible to reduce the energy consumption of fans by up to 70% and 93.6% in the case studies under consideration.
Shao et al. [36] investigated experimentally the effect of airflow reduction as a factor of reducing energy consumption on the relative concentration of particles in a cleanroom. The obtained results and correlations allowed for optimal energetic determination of the air stream as a function of the cleanliness class of the room.
To summarize the current state of research concerning the optimization of HVAC system for cleanrooms, the following can be stated: • until now, researchers have mainly focused on case studies in pharmaceutical and semiconductor industries; • optimal structures of the HVAC system are calculated by performing simulations for several predetermined acceptable variants and indicating the variant for which the annual energy consumption is minimal; • there is no global approach to calculating the optimal structures of the HVAC system as a function of key constants parameters being the input data and describing the HVAC system.
Therefore, there is a methodological gap at the stage of determining the set of acceptable structures of HVAC systems of cleanrooms fulfilling the functional function described by: cleanliness class, temperature, relative humidity, air velocity, degree of turbulence, overpressure, concentration of pollutants and share of outside air.
At the same time, there is a need to undertake research on support tools in order to determine, from a set of acceptable variants, the optimal structure and algorithms of HVAC system control.
Therefore, for the needs of the application, methods and tools are sought that allow, at the starting point, to define a set of acceptable structures of HVAC systems on the basis of output data-the standard parameters defining the utility function, decision variables and limiting conditions. Next, relationships are sought on the basis of which optimal structures and algorithms for controlling HVAC systems can be determined. In applications, it is important that the arguments in these relations are constant parameters constituting the output data in the optimization procedure.
The aim of the presented paper is to calculate approximating functions describing optimal structures of the HVAC system for cleanrooms depending on key constant parameters (arguments): cleanliness class (C s ), percentage of outdoor air (α o ) and unit cooling load (q j ) and determination of the energy-optimal control algorithms for heat recovery options and the outdoor climate. The annual unit primary energy demand of the HVAC system for thermodynamic air treatment was adopted as the objective function.
The proposed method is an original approach, both from the scientific and the application points of view.

Research Problem, General Algorithm
Every HVAC system can be described by a vector with coordinates defined by constant parameters and decision variables. With regards to cleanrooms, the constant parameters are primarily temperature, relative humidity, cleanliness class, percentage of outdoor air, unit cooling load and pressure gradients.
For determined combinations of constant parameters values of a HVAC system, a single optimization problem can be defined concerning calculating the optimal HVAC system for which the annual energy demands (final, primary) reach the minimum values. The constant parameters of a HVAC system for cleanrooms are within realistic value ranges. In general, one can define a set of combinations of constant parameter values in which each constant parameter takes values representing the entire range of variability.
The research problem comes down to calculating the set of optimal structures of a HVAC system assigned to combinations of values of constant parameters representing realistic ranges of variability of these parameters in cleanrooms.
On this basis, it is possible to calculate approximating relations defining structures of HVAC systems as a function of combinations of constant parameter values.
The general algorithm of the optimization procedure partly based on the methodology presented earlier by the authors of References [37,38] is presented in Figure 1. The algorithm includes: • calculating the set of constant parameters x i and the set of decision variables x j ; • two phases of analysis: calculating the matrix of all possible variants of limiting conditions and of acceptable variants, respectively, for: combinations of decision variables values x j for normalizing constant parameters (matrices W i , W, G i , G j and W g ) and - the HVAC system (matrices X J , G and X); • calculating the optimal structures of HVAC systems x * n g k for combinations of values of key constant parameters (arguments): cleanliness class (C sk ), percentage of outdoor air (αok) and unit cooling load (q jk ), k = 1 . . . K; • defining approximation relations x * n g k = f(C sk , α ok , q jk ); • defining algorithms of energy-optimal control for optimal structures of HVAC systems x * n g k based on the objective function; • calculating the optimal variant x * .
Constant parameters are by definition invariant in the optimization procedure, but in general, they can be functions of both time and space. The decision variables change during the optimization procedure and are the arguments of the x describing the HVAC system, the constraint conditions and the objective function. The fragment of the procedure in Figure 1, leading to the determination of the set of acceptable HVAC system structures, the X matrix, is based on the methodology described in detail in Reference [37]. After determining the X matrix, in the next step of the optimization procedure, the real required ranges for the variability of key fixed parameters in cleanroom applications, are determined: cleanliness class (C sk ), share of outside air (α ok ) and unit cooling load (q jk ). Then, on this basis, a representative set of combinations of the values of the key parameters of the HVAC system constants is determined, and for each of these combinations, the optimal structure of the HVAC system x * n g k is determined based on an algorithm from the set of permissible structures (X matrices). In the next step, on the basis of the obtained results, the general algorithm assumes the development of approximating relations defining energy-optimal structures of HVAC systems as a function of key constant parameters x * n g k = f(C sk , α ok , q jk ). In the final stage of the optimization procedure, the objective function is determined-the minimum annual demand for primary energy for thermodynamic treatment, the optimal type of heat recovery for various outdoor climate options and the energy-optimal control algorithms.
The algorithm structure of the general optimization procedure includes three basic steps: • determination of a set of permissible HVAC system structures-X matrix, based on the utility function (normalized constants and limiting conditions); • determination of the optimal structure of the HVAC system-x * n g based on the key constants: C s -cleanliness class, . q j -unit heat load and α o -percentage of outside air; • determination of the energy-optimal variant of the HVAC system-vector x * , taking into account the optimal structure and the optimal type of heat recovery.

Acceptable Structures of HVAC System
The starting point in determining the permissible structures of the HVAC system is the determination of a set of parameters standardized by this system. A wide range of normalized constant parameters in a cleanroom was used: The procedure leading to the determination of acceptable structures of the HVAC system based on the methodology previously developed by the authors of Reference [37] is presented in Appendix A. This procedure uses system analysis and matrix calculus. The forms of the determined matrices are listed in Appendix A; these matrices are described in the following order: Acceptable variants x n g of the structure of the HVAC system for cleanrooms are presented synthetically in a form of a general model in Figure 2. V 2 , ∆V-volume stream of outdoor air, processing air, supply air, exhaust air, external recirculation air, internal recirculation air and balance sheet difference.
V -percentage of outdoor air, processing air, external recirculation air and internal recirculation air; E 1 , E 2 , E 3 -filtration efficiency of the 1 • , 2 • and 3 • stages; HR-heat recovery.

Optimal Structure Selection Algorithm
The calculation algorithm of the optimal structure of the HVAC system is shown in Figure 3. The starting point includes constant parameters of the HVAC system and set of acceptable variants x n g ∈ X. Selection of the optimal structure of the HVAC system is a permissibility function of recirculation (hygienic function) and values of three air streams: Optimal structure of HVAC system -qualitative analysis Allowed recirculation V̇j= max (V̇j s ,V̇j c ,V̇j o ) V̇j c < V js V̇j o < V̇j c αo ≤ 1, α 1 ≠1, α 2 ≠ 0 no αo =1, α 1 = 0, α 2 = 0 (α 2 = 0) no yes yes no "a" "b "c" "d "e"   Optimal structure of HVAC system x � n g * = x � n g  ∆t R max = f(C s , comfort)  V jc min = f . q j -unit air stream as a function of the cooling loads discharged using AHU. In case recirculation is not allowed, the only system acceptable is x 1 ; if allowed, all systems are possible: x 1 , x 2 , x 3 and x 4 .
Unit stream of outdoor air . V jo , depending on the conditions, is within the range corresponding to the percentage of outdoor air α o = 5 ÷ 100%.
Unit air stream as a function of the cleanliness class . V js is calculated based on the average air speed from the range (w min , w max ) required for a specific room cleanliness class according to ASHRAE [39]. Unit air stream for discharging cooling loads using AHU is calculated-taking into consideration the designations in Figure 4-using relation: whereby: . q jc = q j − q jDC (2) with: q j -unit cooling loads; q jc -unit cooling load discharged using AHU; q jDC -unit cooling load discharged by dry coolers in the recirculation circuit (DCC, RDCU and RCU). In case recirculation is not allowed, the only system acceptable is x � 1 ; if allowed, all systems are possible: x � 1 , x � 2 , x � 3 and x � 4 .
Unit stream of outdoor air V̇j o , depending on the conditions, is within the range corresponding to the percentage of outdoor air αo = 5 ÷ 100%.
Unit air stream as a function of the cleanliness class V̇j s is calculated based on the average air speed from the range (wmin, wmax) required for a specific room cleanliness class according to ASHRAE [39]. Unit air stream for discharging cooling loads using AHU is calculated-taking into consideration the designations in Figure 4-using relation: whereby: with: qj-unit cooling loads; qjc-unit cooling load discharged using AHU; qjDC-unit cooling load discharged by dry coolers in the recirculation circuit (DCC, RDCU and RCU). In a specific case, when q̇j DC = 0 In the first step, requirement V̇j c = min (corresponding to the minimum energy consumption) implies relation: which means that tSC = tSCmin = tDP + δtSC where: In the first step, requirement . V jc = min (corresponding to the minimum energy consumption) implies relation: which means that t SC = t SCmin = t DP + δt SC (5) where: δt SC -realistic tolerance range with temperature t SC in relation to temperature t DP , δt SC = (0 ÷ 1) • C t DP -dew point temperature.
In the physical interpretation, this requirement means that the minimum air flow to dissipate cooling loads . V jc is determined assuming the maximum possible temperature difference ∆t SC between the air in the room and the supply air. In turn, the minimum supply air temperature t SCmin is theoretically equal to the dew point temperature t DP ; in practice, it should be slightly higher (here, the real tolerance range δt SC was adopted).
Then, on the basis of the values of air flows . V js , . V jc and . V jo , which are comparative terms, the algorithm determines the optimal structure of the HVAC system x 1 , x 2 , x 3 or x 4 , and the resulting temperature difference ∆t R and the supply temperature t S are calculated according to the relations: • system x 1 (α 1 = 0, α 2 = 0, α c = 1): t S = t SC (7) • system x 2 (α 1 = 0, α 2 = 0, α c = 1): • system x 4 (α 1 = 0, α 2 = 0, α c = 0): whereby: In the next step, a significant limitation is the relationship resulting from the air distribution system required in the room: indirectly related to relation: t SC ≤ t S (18) and a comparative section: It should be noted that the maximum value of the temperature difference is the result of comfort limitations (air supply system) and, indirectly, of the room cleanliness class. At this stage, it may turn out that the determined temperature difference ∆t SC , which corresponds to the air stream . V jc = min, is greater than the permissible temperature difference ∆t Rmax for comfort or technological reasons. In such a case, the algorithm assumes a decrease in the value of the temperature difference ∆t SC according to the relation: with: δt = (0.5 ÷ 1.0) • C-iterative temperature jump, and the procedure is repeated.
Based on the algorithm (Figure 3), the optimal variants of the HVAC system structure of cleanrooms were determined as a function of the relationship between the streams . V js , . V jc and . V jo ; these variants are summarized in Table 1.

V jo
Air Streams V js
Therefore, further analyses include variants of combinations of key constant parameters of a HVAC system, in which each constant parameter takes values representing the mentioned variability ranges.

Approximating Functions
Optimal structures of the HVAC system for cleanrooms are calculated based on the algorithm in Figure 3 for representative variants of combinations of key constant parameters: cleanliness class C s , unit cooling load q j (q j = q jc ) and percentage of outdoor air α o are shown in Table 2. The analyses were performed with the temperature of t R = +22 • C and relative humidity ϕ R = (50 ± 5)%. The unit air stream . V js as a function of the cleanliness class C s was determined by assuming the average air velocities from the compartments assigned to the ASHRAE cleanliness classes [39].
For cleanliness classes with optimal structures of the HVAC system x 3 or x 4 based on the results in Table 2, limit percentages of the outdoor air α og were calculated (equal to the percentages of air of an AHU for discharging cooling loads). Value α og is calculated using: V js (22) These values represent the selection criterion of the optimal structure of the HVAC system according to relation: For cleanliness classes that include the optimal HVAC structures x 2 , x 3 and x 4 (here, ISO Class 8)-based on the results in Table 2-an additional limit unit cooling load . q jg was calculated using relation: V js ρc p ∆tSC max (25) In the physical interpretation, parameter . q jg is the maximum cooling load that can be discharged by the air flow V js resulting from the room cleanliness class. Values . q jg represent the selection criteria of the optimal structure of the HVAC system according to relation: . q j ≥ . q jg optimal structure x 2 (26) . q j < . q jg optimal structure x 3 or x 4 (27) The parameter calculation results α og and . q jg are shown in Table 3. Table 3. Limit percentages of the outdoor air α og and limit unit cooling load . q j for optimal structures of the HVAC system. q jg , ** / is not calculated, because the optimal structure of the HVAC system is x 2

Cleanliness
Based on the calculation results presented in Tables 2 and 3, the authors calculated the approximating functions in the form of diagrams illustrating zones of optimal structures of the HVAC system for cleanrooms.
These functions, in coordinate system x * n g = f(C S , α o , q j ) for cleanliness classes ISO Class 5, ISO Class 7 and ISO Class 8, are shown in Figure 5. a = ∆q̇j ∆α og (28) ∆q̇j-difference in values of the unit cooling loads in Table 3; ∆αog-difference of the limit value of the percentage of outdoor air in Table 3 assigned to a defined difference ∆q̇j. Based on calculation results (Tables 2 and 3) illustrated by the approximating functions x � n g * = f(CS, αo, qj) in Figure 5, the following conclusions can be made: 1. The dominant optimal structures of HVAC system for cleanrooms with acceptable recirculation are systems with internal recirculation x � 3 and systems with internal and external recirculation x � 4 . 2. Directional coefficients of the limit lines q̇j = aαo dividing zones of optimal structures of the HVAC system HVAC x � 3 and x � 4 are inversely proportional to the cleanliness classes of rooms and equal: • a = 33.3-for ISO Class 5 (M3.5-cl.100); • a = 8.0-for ISO Class 7 (M5.5-cl.10,000); • a = 3.33-for ISO Class 8 (M6.5-cl.100,000), 3. Systems with internal recirculation x � 3 are optimal HVAC system structures for rooms with low cooling loads q̇j and relatively high percentages of outdoor air αo. Directional coefficients of limit lines equations between zones of the optimal structures x 3 and x 4 in Figure 5 were calculated based on the data in Table 3 and relation: ∆ . q j -difference in values of the unit cooling loads in Table 3; ∆α og -difference of the limit value of the percentage of outdoor air in Table 3 assigned to a defined difference ∆ . q j .
Based on calculation results (Tables 2 and 3) illustrated by the approximating functions x * n g = f(C S , α o , q j ) in Figure 5, the following conclusions can be made: 1.
The dominant optimal structures of HVAC system for cleanrooms with acceptable recirculation are systems with internal recirculation x 3 and systems with internal and external recirculation x 4 . 2.
Directional coefficients of the limit lines . q j = aα o dividing zones of optimal structures of the HVAC system HVAC x 3 and x 4 are inversely proportional to the cleanliness classes of rooms and equal:

3.
Systems with internal recirculation x 3 are optimal HVAC system structures for rooms with low cooling loads . q j and relatively high percentages of outdoor air α o .

4.
Systems with internal and external recirculation x 4 are optimal HVAC system structures for rooms with high cooling loads . q j and relatively low percentages of outdoor air α o .

5.
Systems with external recirculation x 2 are optimal HVAC system structures for rooms with high cooling loads . q j and low requirements regarding cleanliness of high cleanli- q jg , the optimal structure of the HVAC system is a system with external recirculation x 2 , while, for . q j < . q jg , optimal structures are systems with internal recirculation x 3 or systems with internal and external recirculation x 4 . The limit of division of optimal zones x 3 and x 4 is line . q j = aα o .

6.
Approximating functions in the form of a graph x * n g = f(C S , α o , q j ) with zones of optimal structures of the HVAC system for cleanrooms in Figure 5 are of great application significance at the stage of selecting and designing energy-efficient HVAC systems of such rooms. Based on cleanliness class C s of unit cooling loads . q j and the percentage of outdoor air α o , they make it possible to unambiguously calculate an energy-optimal structure of a HVAC system for a cleanroom. For "middle" cleanliness classes between ISO5 and ISO7, zones of optimal HVAC structures can be calculated using interpolation.

Objective Function, Simulation Models
For each HVAC system with energy-optimal structure x * n g , where heat recovery occurs as a cumulative variable, it is possible to calculate an objective function defining the quantitative optimization criterion.
Based on this criterion, the energy-optimal type of the heat recovery and energyoptimal control algorithms are determined.
The objective function defines the annual primary energy demand of the HVAC system, which is possible to calculate using relation [37]: or whereby: with: Q H,n (Q Hel,n )-annual heat demand (net) of water heaters (electric heaters), kWh/ym 2 ; Q C,n -annual cold demand (net) of cooler, kWh/ym 2 ; Q B,n -annual heat demand (net) of steam humidifiers, kWh/ym 2 ; Q K,H (Q K,Hel) -annual final energy demand of water heaters (electric heaters)-final heat kWh/ym 2 ; Q K,C -annual final energy demand of coolers-final cold, kWh/ym 2 ; Q K,B -annual final energy demand of steam humidifiers-final heat of humidifiers, kWh/ym 2 ; E el,pom -annual demand for final electrical energy for the drive of auxiliary devices, kWh/ym 2 ; η H,t -seasonal average total efficiency of a heating system with water air heaters, η H,t = η H,g η H,s η H,d η H,e , with η H,t = 0.81 (η H,g = 0.90-generation, η H,s = 1.0-accumulation, η H,d = 0.94-distribution and η H,e = 0.95-regulation and control); η Hel,t -seasonal average total efficiency of a heating system with electric heaters, with η Hel,t = 0.95; η C,t -seasonal average total efficiency of a system with air coolers; η C,t = ESEER η C,s η C,d η C,e , with η C,t = 3.0 (ESEER = 3.5-European Seasonal Energy Efficiency Ratio, η C,s = 0.95-accumulation, η C,d = 0.94-distribution and η C,e = 0.97-regulation and control); η B,t -seasonal average total efficiency of a heating system for supplying steam humidifiers, η B,t = η B,g η B,d η B,e (η B,g -generation, η B,d -distribution and η H,e -regulation and control), with η B,t = 0.95; w i -input coefficient of nonrenewable primary energy for generation and providing the final energy carrier (or energy) (w H -concerns heat, w C -concerns cold, w B -concerns steam, w el -concerns electrical energy) with w H = 1.1-gas/oil boiler, w C = 3.0-chiller with electrical drive and w B = 3.0-electric steam generator).
The energy demand (net) of heaters, coolers and steam humidifiers is calculated using algorithms of energy-optimal thermodynamic air treatment according to the following criterion: where: . m i -mass stream in i-operation; ∆h i -change of the specific enthalpy in i-operation.
Tools for calculating the objective function are simulation models of the operations of HVAC systems throughout the year. Algorithms of these models were presented in papers [37,38], while, for the presented application, the general algorithm of the simulation model is shown in Figure 6.
The starting point of the general algorithm are the output data on the basis of which the family of characteristic boundary isotherms is determined. Then, for each acceptable variant of the HVAC structure, algorithms for optimal air treatment are determined and the annual demand for net energy, auxiliary energy and primary energy corresponding to these algorithms. In conclusion, the optimal variant is determined.

Objective Function, Simulation Models
The objective functions were defined for representative variants of the HVAC system for cleanrooms with energy-optimal structures x * 1 , x * 2 , x * 3 and x * 4 ( Figure 2), respectively; the variants are shown in Table 4.
As decision variables, the optimization algorithm includes: p-the type of heat recovery and q-external climate.  Figure 6. General algorithm of the simulation model for x � n g * of the HVAC system.
The starting point of the general algorithm are the output data on the basis of which the family of characteristic boundary isotherms is determined. Then, for each acceptable variant of the HVAC structure, algorithms for optimal air treatment are determined and the annual demand for net energy, auxiliary energy and primary energy corresponding to these algorithms. In conclusion, the optimal variant is determined.
In calculations based on the simulation models [37], the following assumptions and output data were considered:

2.
It is assumed that the gains in room humidity w j in relation to the air stream . V j are negligible (x S = x R ).

3.
The surface temperature of the cooler was assumed to be equal to t D = t DP − 1K.

4.
For HVAC systems x 13 and x 14 , x 23 and x 24 , x 33 and x 34 and x 43 and x 44 (with a crossflow or countercurrent exchanger), the outdoor air temperature at which frost occurs, equal to t GR0 = 0 • C, was used.
Continuous operation of the HVAC system is assumed-τ = 24/7 with constant air streams. 7.
Final and primary energy demands for forcing through air (fans) are neglected, except for heat recovery exchangers, for which a realistic pressure loss of ∆p HR = 150 Pa and a total efficiency of forcing through η W = 80% are used.
As a result, component E el,pom in Equations (29) and (30) is defined as: with: ∆E R -final energy demand for forcing through by heat recovery exchangers. Considering energy inputs for forcing through air by heat recovery exchangers is necessary for evaluating the energy profitability of applying such exchangers.
Omission of the energy demand for fans as a component of the objective function (29) can be justified as follows: • the objective function (29) is determined for each optimal structure of the HVAC system x * n g in which the location of the fans is specified; the energy demand of these fans does not therefore affect the selection of the optimal structure; • determining the energy demand for fans would require assuming system pressure losses, which is not an objective parameter (such a possibility is provided for a case study); • the purpose of the research at this stage is to determine the optimal type of heat recovery; to achieve this purpose, it is not necessary to determine the energy demand for the fans.

8.
Annual demand for the final energy for the drive of auxiliary devices is neglected. 9.
The following values of physical constants were used: air density ρ = 1.2 kg/m 3 , specific heat of air c p = 1.005 kg/kgK, specific heat of steam c pp = 1.86 kg/kgK, heat of vaporization of water with temperature 0 • C, r o = 2500.8 kJ/kg and atmospheric pressure p a = 105Pa. 10. Thermodynamic parameters of humid air were calculated based on Reference [42].

Algorithms of Energy-Optimal Control
For representative variants of the HVAC system shown in Table 4, the structures of which are shown in Figure 2, algorithms of energy-optimal control were defined in accordance with criterion (35). The algorithms are shown in Figures 7-10.
As a result, component Eel,pom in Equations (29) and (30) with: ∆ER-final energy demand for forcing through by heat recovery exchangers.
Considering energy inputs for forcing through air by heat recovery exchangers is necessary for evaluating the energy profitability of applying such exchangers.
Omission of the energy demand for fans as a component of the objective function (29) can be justified as follows: • the objective function (29) is determined for each optimal structure of the HVAC system x � n g * , in which the location of the fans is specified; the energy demand of these fans does not therefore affect the selection of the optimal structure; • determining the energy demand for fans would require assuming system pressure losses, which is not an objective parameter (such a possibility is provided for a case study); • the purpose of the research at this stage is to determine the optimal type of heat recovery; to achieve this purpose, it is not necessary to determine the energy demand for the fans.
8. Annual demand for the final energy for the drive of auxiliary devices is neglected. 9.
The following values of physical constants were used: air density ρ = 1.2 kg/m 3 , specific heat of air cp = 1.005 kg/kgK, specific heat of steam cpp = 1.86 kg/kgK, heat of vaporization of water with temperature 0 °C, ro = 2500.8 kJ/kg and atmospheric pressure pa = 105Pa. 10. Thermodynamic parameters of humid air were calculated based on Reference [42].

Algorithms of Energy-Optimal Control
For representative variants of the HVAC system shown in Table 4, the structures of which are shown in Figure 2, algorithms of energy-optimal control were defined in accordance with criterion (35). The algorithms are shown in Figures 7-10.
For the identification of zones of optimal thermodynamic treatment of air in Figures 7-10 h-x, the following designations are used: (MR)-maximum heat recovery, (VR)-regulated heat recovery, H 1 -heating (preheater), H 2 -heating (secondary heater), H el -heating (electric heater), C -sensible cooling (without drying), C-cooling with drying, B-steam humidification and R-recirculation.
At the same time, the following designations of the characteristic points are used ( Figure 2): R-air condition in the room, S-condition of air supplied to the room, SC-air condition downstream AHU and D-air condition at the cooler surface. For the identification of zones of optimal thermodynamic treatment of air in Figures  7-10 h-x, the following designations are used: (MR)-maximum heat recovery, (VR)-regulated heat recovery, H1-heating (preheater), H2-heating (secondary heater), Hel-heating (electric heater), C′-sensible cooling (without drying), C-cooling with drying, B-steam humidification and R-recirculation.
At the same time, the following designations of the characteristic points are used ( Figure 2): R-air condition in the room, S-condition of air supplied to the room, SC-air condition downstream AHU and D-air condition at the cooler surface.
Equations of the limit isotherms and limit lines between the zones of optimal thermodynamic treatment of air in Figures 7-10 h-x take the following form: Equations of the limit isotherms and limit lines between the zones of optimal thermodynamic treatment of air in Figures 7-10 h-x take the following form: • limit line (MR)C/(MR)CH 2 -x 11

Calculation Results, Interpretation
Results of the calculations of the annual demands for primary energy for the representative HVAC systems shown in Table 4 are presented in Table 5. A percentage comparison of the unit annual demand for the primary energy of variants of the HVAC system for various external climates and types of heat recovery, compared to variants without heat recovery, are shown in Figures 11-14. The subject of the assessment is the impact of the type of heat recovery and the external climate-as decision variables-for the selection of the energy-optimal variant.  Figure 11. Annual relative demand for the primary energy of the variants of HVAC system ISO8 x � 1pq (without recirculation) for various external climates and types of heat recovery compared to the variants without heat recovery.   Figure 11. Annual relative demand for the primary energy of the variants of HVAC system ISO8 x 1 pq (without recirculation) for various external climates and types of heat recovery compared to the variants without heat recovery.
Energies 2022, 15, x FOR PEER REVIEW 27 of 42 Figure 11. Annual relative demand for the primary energy of the variants of HVAC system ISO8 x � 1pq (without recirculation) for various external climates and types of heat recovery compared to the variants without heat recovery.    Figure 14. Annual relative demand for the primary energy of the variants of HVAC system ISO8 x 4 pq (external and internal recirculation) for various external climates and types of heat recovery compared to the variants without heat recovery.
Based on the analysis of the calculation results, the following can be stated:

1.
For HVAC systems without air recirculation x 1 the optimal device for heat recovery is a rotary sorption regenerator (p = 2) and, then, an energy regenerator (p = 1) and a crossflow exchanger (p = 3 or p = 4). The obtained energy savings are here a function of climate- Figure 11 and Table 5. Using the rotary sorption regenerator in the analyzed HVAC system ISO8 x 1 makes it possible to decrease the annual primary energy demand by 63%, 64% and 24% in relation to the system without heat recovery, respectively, for continental (q = 1), subarctic (q = 2) and subtropical (q = 3) climates.
For the rotary energy regenerator, the values are lower and equal 33%, 35% and 5%, respectively. For the crossflow exchanger, the savings are significantly lower and equal 19 ÷ 27% for the continental climate, 5 ÷ 7% for the subarctic climate and 4% for the subtropical climate. Therefore, in the subtropical climate, the only rational device for heat recovery is the rotary sorption regenerator, and the savings effect is mainly achieved by drying air.
The representative percentages of the annual primary energy demand for thermodynamic air treatment for individual components and optimal variant ISO8 x 12 (with a rotary sorption regenerator) are shown in Figure 15. Based on the analysis of the calculation results, the following can be stated: 1. For HVAC systems without air recirculation x � 1 the optimal device for heat recovery is a rotary sorption regenerator (p = 2) and, then, an energy regenerator (p = 1) and a crossflow exchanger (p = 3 or p = 4). The obtained energy savings are here a function of climate- Figure 11 and Table 5.
Using the rotary sorption regenerator in the analyzed HVAC system ISO8 x � 1 makes it possible to decrease the annual primary energy demand by 63%, 64% and 24% in relation to the system without heat recovery, respectively, for continental (q = 1), subarctic (q = 2) and subtropical (q = 3) climates. For the rotary energy regenerator, the values are lower and equal 33%, 35% and 5%, respectively. For the crossflow exchanger, the savings are significantly lower and equal 19 ÷ 27% for the continental climate, 5 ÷ 7% for the subarctic climate and 4% for the subtropical climate. Therefore, in the subtropical climate, the only rational device for heat recovery is the rotary sorption regenerator, and the savings effect is mainly achieved by drying air.
The representative percentages of the annual primary energy demand for thermodynamic air treatment for individual components and optimal variant ISO8 x � 12 (with a rotary sorption regenerator) are shown in Figure 15. For the continental climate (q = 1) and subarctic climate (q = 2), the dominant is the percentage of the demand for air humidification-56.5% and 62.0%, respectively; then, for heating air-27.5% and 32%, respectively, and cooling-16.0% and 6.0%, respectively. While, for the subtropical climate (q = 3), the dominant is the percentage of cooling-63.8%, then heating at 35.2%, including 35% of reheating after drying and, marginally, humidification-1%. The conclusions resulting from the results of the calculations of representative shares of the annual primary energy demand for thermodynamic air treatment correlate directly with the conclusions concerning the optimal type of heat recovery.
2. For HVAC systems with external recirculation x � 2 (optimal for cleanrooms with high unit cooling loads qj and relatively low requirements of cleanliness class Cs), using additional heat recovery has no energy justification for any of the considered devices and external climates (savings between 1 ÷ 3% for ISO8 x � 2 )- Figure 12 and Table 5. 3. For systems with internal recirculation x � 3 (optimal for cleanrooms with low cooling loads qj and relatively large percentages of outdoor air αo), using devices for heat  For the continental climate (q = 1) and subarctic climate (q = 2), the dominant is the percentage of the demand for air humidification-56.5% and 62.0%, respectively; then, for heating air-27.5% and 32%, respectively, and cooling-16.0% and 6.0%, respectively. While, for the subtropical climate (q = 3), the dominant is the percentage of cooling-63.8%, then heating at 35.2%, including 35% of reheating after drying and, marginally, humidification-1%. The conclusions resulting from the results of the calculations of representative shares of the annual primary energy demand for thermodynamic air treatment correlate directly with the conclusions concerning the optimal type of heat recovery.

2.
For HVAC systems with external recirculation x 2 (optimal for cleanrooms with high unit cooling loads q j and relatively low requirements of cleanliness class C s ), using additional heat recovery has no energy justification for any of the considered devices and external climates (savings between 1 ÷ 3% for ISO8 x 2 )- Figure 12 and Table 5.

3.
For systems with internal recirculation x 3 (optimal for cleanrooms with low cooling loads q j and relatively large percentages of outdoor air α o ), using devices for heat recovery is definitely energetically justified, especially for the continental climate (q = 1) and the subarctic climate (q = 2)- Figure 13 and Table 5. The optimal device for heat recovery is, similar to the system without recirculation, a rotary sorption regenerator and, then, an energy regenerator and a crossflow exchanger. For the considered system ISO5 x 3 energy savings related to a system without heat recovery, primary energy and using the sorption regenerator equal 63%, 66% and 23%, respectively, for the continental, subarctic and subtropical climates- Figure 13. Lower savings are obtained by using an energy regenerator: 33%, 35% and 5% or a crossflow exchanger: 19 ÷ 27%, 5 ÷ 7% and 4%, respectively, for the continental, subarctic and subtropical climates. The percentages of the annual primary energy demand for thermodynamic air treatment for individual components (heaters, cooler and steam humidifier) of optimal variant ISO5 x 32 (with a sorption regenerator) and external climates are practically identical as for HVAC system x 12 (Figure 15).

4.
For HVAC systems with external and internal recirculation x 4 (optimal for cleanrooms with high cooling loads q j and relatively low percentages of outdoor air α o ), additionally using heat recovery is energetically justified only for the subarctic climate and concerns only the rotary sorption regenerator- Figure 14 and Table 5. Savings in the primary energy demand for the analyzed HVAC system ISO7 x 42 (with a sorption regenerator) and the subarctic climate equal 11% related to a system without heat recovery.
It should be noted that, in the other analyzed use cases of devices for heat recovery, especially the crossflow exchanger, the energy effect was opposite to what was expected; the primary energy demand increased 1 ÷ 5%, because the heat or cold recovery was lower than the inputs for forcing through by heat recovery exchangers.

Validation of the Calculation Results
Validation of the calculation results with the existing energy simulation tools is possible under the following conditions: • it must be possible to implement the system structure in the program (in the case under consideration, four variants: x 1 , x 2 , x 3 and x 4 ); • it must be possible to implement various types of heat recovery along with control options: two-position control (maximum efficiency/0) and smooth control (variable energy-optimal efficiency); • it must be possible to implement control algorithms (open code).
In this article, a simulation model was developed for each HVAC system structure. In these models, for each hour of the comparative year TRY (est. Reference Year), the optimal course of thermodynamic air treatment was determined, and on this basis, the energy consumption was obtained-after summing (8760 h), the annual energy consumption. The available energy simulation programs are universal, but also limited, among others: • no possibility to implement any HVAC system structure; • no possibility to implement any control algorithms; • frequently closed program code.
The validation of the calculation results in this article was carried out by taking into account the above-mentioned limitations and the available other tool for energy simulationthe HAP (Hourly Analysis Program) program developed by the CARRIER company. It is a closed-source program.
The possible scope of the simulation included CAV systems (constant air volume) with heat recovery (excluding the option of a recuperator with an electric preheater before the recuperator-x 14 and x 24 ) with or without external recirculation (x 1 and x 2 in the article). The calculation results are presented in Table 6.  Taking into account the above-mentioned conditions and limitations, it can be concluded that the obtained results of the calculations are satisfactory, and the differences in the annual energy demand according to our own calculations and the HAP program, related to the values obtained in our own calculations, are acceptable. These differences range from −9.2% to +8.2% (minimal differences: −0.2% to +0.75%). The mean absolute percentage of the differences in the results of these calculations is 5.1%. Taking into account that the simulation models of the other systems included in the article (x 3 -with internal recirculation and x 4 -with internal and external recirculation) are a modification of the models for the validated systems x 1 and x 2 , it can be assumed that the obtained calculation results are also acceptable.

Conclusions
This article presents the original results of research on the optimization of HVAC systems for cleanrooms. The HVAC systems were described by vectors with coordinates defined by constant parameters and decision variables. Then, the authors defined, based on limitations, a set of acceptable variants covering the following structures of HVAC system: x 1 -without recirculation, x 2 -with external recirculation, x 3 -with internal recirculation and x 4 -with external and internal recirculation.
In the next stage, based on the optimization algorithm, the authors defined a set of energy-optimal structures of the HVAC system for cleanrooms as a function of key constant parameters and wide representative variability ranges of these parameters: cleanliness classes C s -ISO5, ISO7 and ISO8; u nit cooling loads q j = (100 ÷ 500) W/m 2 and percentage of outdoor air α o = (5 ÷ 100)%.
The original achievement of the research, which constitutes a new cognitive quality, is the development of relations approximating x * n g = f(C S , α o , q j ) defining the zones of energyoptimal structures of cleanroom HVAC systems; the equations derived the boundary lines separating these zones.
It was proven that HVAC systems with external recirculation (x 2 ) are optimal structures for rooms with high cooling loads q j and low requirements concerning keeping the cleanliness class, HVAC systems with internal recirculation (x 3 ) are optimal for rooms with low cooling loads q j and relatively high percentages of outdoor air α o , while HVAC systems with external and internal recirculation (x 4 ) are optimal structures for rooms with high cooling loads q j and relatively low percentages of outdoor air α o .
The obtained results, due to the used wide ranges of variability of key constant parameters, are general in nature and have great application value.
An important result of the research was defining energy-optimal control algorithms and the type of heat recovery as an element of optimal structures of the HVAC system. At this stage, the equations of the boundary lines between the zones of optimal thermodynamic air treatment were determined, which is of great application importance.
In the optimization procedure based on simulation models, the objective function was defined as the minimum unit annual primary energy demand for thermodynamic air treatment of the HVAC system (E p (x * n g = min). The algorithms take into account the energy demand for forcing through by heat recovery exchangers.
Summarizing the results of the analyses and calculations concerning the energetic profitability of using heat recovery in optimal structures of HVAC systems for cleanrooms, it can be stated that: • it is energetically profitable to use heat recovery, especially for HVAC systems without recirculation (x 1 ) or with internal recirculation (x 3 ), whereby the biggest energy savings are achieved for the continental climate (Poland) and the subarctic climate (Russia). • in any case, the biggest savings in primary energy demand are the result of using, as heat recovery, a rotary sorption regenerator and, then, an energy regenerator and a crossflow (or countercurrent) exchanger. • quantitatively, using a sorption regenerator in the energy-optimal structures of HVAC system ISO8 x 1 (without recirculation) and ISO5 x 3 (with internal recirculation) resulted in a decrease in the primary energy demand for thermodynamic treatment by 63%, 64 ÷ 66% and 23 ÷ 24%, respectively, for the continental, subarctic and subtropical climates. For an energy regenerator and a crossflow exchanger, these savings were significantly lower and equaled about 33%, 35% and 5%, respectively. • for energy-optimal structures of HVAC systems with external recirculation x 2 or with external and internal recirculation x 4 , using devices for heat recovery is generally energetically not justified and, in all cases, causes an increase in the energy demand (heat or cold recovery is lower than the energy inputs for forcing through by the heat recovery exchanger). The only debatable exception is the application of a sorption regenerator in the HVAC system x 4 for the subarctic climate-primary energy savings for thermodynamic air treatment of 11% in the ISO7 application x 42 .

Conflicts of Interest:
The authors declare no conflict of interest. The matrix of normalized constant parameters is defined as:  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26   lack of a primary heater, with a large power differentiation for summer and winter, prevents the optimal selection of k V output coefficients of control valves for the secondary heater-and as a consequence causes unstable operation of control valves and extends the range of tolerance of the supply air temperature g T19 lack of a primary heater poses a risk of freezing of the water cooler 4 g T11 g T28 steam humidifier with lance in channel does not provide easy operational access to the humidification block for control and disinfection-difficulties in maintenance and decrease in safety steam humidifier with lance in channel does not provide easy operational access to the humidification block for control and disinfection-difficulties in maintenance and decrease in safety * / Designation of restrictions according to [37].
Matrix G j of type (27,27) of elimination of unnecessary decision variables is defined as: The rows of the W matrix are variants (mi or r(i,mi)) of combinations of dec iables for the normalization of successive of the constants parameters included i trix X I* : (i = 1, x1 ≡ tR)-two variants including the CAV (Constant Air Volume) sys AHU with heat recovery (1.51-here cumulative variable), primary heater (optio and secondary heater. (i = 2, x2 ≡ φR)-two variants including AHU with cooler, secondary heater a humidifier in the unit or in the duct (option), (i = 3, x3 ≡ kd)-one variant with the hygienic design of AHU, three stages of at the supply, 3rd stage filter integrated with a supply diffuser, (i = 4, x4 ≡ Cs)-two variants as for (i = 3, x3 ≡ kd) and a steam humidifier in unit or in the duct, (i = 5, x5 ≡ α)-five variants depending on the number of units in the casc two or three) and the recirculation option: x1.57a-internal (room) recirculation, cumulative variable, x1.57b-external recirculation (in front of the AHU), x1.57c-without recirculation, Matrix W is of type (15,27). Matrix with limitations G i for matrix W is of typ and is defined as: The words g r(i,m i )r(i,m i ) = 0 correspond to the eliminated variants in matrix W sult from limitations. Taking into account the notations in the table of restriction the assignment here is as follows: r(i,mi) = 2 − gT6, gT19, r(i,mi) = 4 − gT11, gT28, r(i gT11, gT28. (A6) where: G j -binary matrix of elimination of unnecessary decision variables for matrix (G i × W), Matrix W g -after considering limitations and eliminating unnecessary decision variables is obtained as the product of matrices defined as: After eliminating zero rows and columns-matrix W g is defined as:   1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  3 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  4 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  3 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  4 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1  where: X J -binary matrix of acceptable variants of HVAC system for normalizing parameters, x � n -binary vector defining the n-variant of structure of HVAC system use malizing all constant parameters, x m i g n or x r�i,m i g �n -binary value in the n-variant structures of HVAC system or r(i,m i g )-variant of combinations of decision variables values for normalizing x parameter defined by vector w � m i g or w � r(i, m i g ) in matrix W g , matrix element X J , M i g -number of all possible variants of combinations of decision variables for normalizing xi-constant parameter of HVAC system, after considering limit (A9) where: X J -binary matrix of acceptable variants of HVAC system for normalizing constant parameters, x n -binary vector defining the n-variant of structure of HVAC system used for normalizing all constant parameters,