8
Inverse prediction and optimization of ow control conditions for conned spaces using a CFD-based genetic algorithm Yu Xue a , Zhiqiang (John) Zhai a, b, * , Qingyan Chen a, c a School of Environmental Science and Engineering, Tianjin University, Tianjin 300072, China b University of Colorado at Boulder, Boulder, CO 80309, USA c School of Mechanical Engineering, Purdue University, IN 47905, USA article info Article history: Received 4 October 2012 Received in revised form 26 February 2013 Accepted 27 February 2013 Keywords: Inverse modeling Flow control Conned space Computational uid dynamics Genetic algorithm Aircraft cabin abstract Optimizing an indoor ow pattern according to specic design goals requires systematic evaluation and prediction of the inuences of critical ow control conditions such as ow inlet temperature and velocity. In order to identify the best ow control conditions, conventional approach simulates a large number of ow scenarios with different boundary conditions. This paper proposes a method that combines the genetic algorithm (GA) with computational uid dynamics (CFD) technique, which can efciently predict and optimize the ow inlet conditions with various objective functions. A coupled simulation platform based on GenOpt (GA program) and Fluent (CFD program) was developed, in which the GA was improved to reduce the required CFD simulations. A mixing convection case in a conned space was used to evaluate the performance of the developed program. The study shows that the method can predict accurately the inlet boundary conditions, with given controlling variable values in the space, with fewer CFD cases. The results reveal that the accuracy of inverse prediction is inuenced by the error of CFD simulation that need be controlled within 15%. The study further used the Predicted Mean Vote (PMV) as the cost function to optimize the inlet boundary conditions (e.g., supply velocity, temperature, and angle) of the mixing convection case as well as two more realistic aircraft cabin cases. It presents interesting optimal correlations among those controlling parameters. Ó 2013 Elsevier Ltd. All rights reserved. 1. Introduction With rapid developments in uid dynamics, numerical science and computer technologies, computational uid dynamics (CFD) has become an efcient tool for indoor environment study and system design. Optimizing an indoor ow pattern according to specic design goals requires systematic evaluation and prediction of the inuences of critical ow control conditions such as ow inlet temperature, velocity and angle. In order to identify the best ow control conditions, conventional approach simulates a large number of ow scenarios with different boundary conditions. Previous studies reveal advanced search and optimization algo- rithms such as genetic algorithm (GA) can effectively reduce the total number of iterations to reach an (or a group of) optimal so- lution(s) [1]. GA is an optimization algorithm that simulates natural evolution in the search of optimal solutions [2]. It has been applied to a variety of engineering design, parameter identication and system optimization. Efforts of coupling GA with CFD, however, were mostly on the optimization of exterior geometries of various objects. For instance, Obayashi and Takanashi [3] combined GA with CFD to optimize the target pressure distributions of an airfoil. Other examples include the shape design of cars [4], melt blowing slot die [5], and transition piece [6]. Malkawi et al. [7] used the CFD-based GA method to search the optimal room size and ventilation system which can satisfy both thermal and ventilation requirements. The study was for a rela- tively simple case and did not evaluate the inuence of CFD pre- diction error on optimal design. Kato and Lee [8] applied a similar approach to optimizing a hybrid air-conditioning system with natural ventilation. The study aimed at minimizing the energy consumption of the mechanical systems. The study developed a two-step method to reduce the computing effort. Optimal results were acquired rst with a coarse CFD mesh, which were then rened with a ne mesh for detailed analyses. It should be noted that CFD results with coarse meshes may produce incorrect ow eld which can lead to wrong optimal results. Zhou and Haghighat [9,10] employed the articial neural network (ANN) to reduce the * Corresponding author. School of Environmental Science and Engineering, Tianjin University, Tianjin 300072, China. E-mail address: [email protected] (Z. (John) Zhai). Contents lists available at SciVerse ScienceDirect Building and Environment journal homepage: www.elsevier.com/locate/buildenv 0360-1323/$ e see front matter Ó 2013 Elsevier Ltd. All rights reserved. http://dx.doi.org/10.1016/j.buildenv.2013.02.017 Building and Environment 64 (2013) 77e84

Inverse prediction and optimization of flow control conditions for confined spaces using a CFD-based genetic algorithm

  • Upload
    qingyan

  • View
    213

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Inverse prediction and optimization of flow control conditions for confined spaces using a CFD-based genetic algorithm

at SciVerse ScienceDirect

Building and Environment 64 (2013) 77e84

Contents lists available

Building and Environment

journal homepage: www.elsevier .com/locate/bui ldenv

Inverse prediction and optimization of flow control conditions forconfined spaces using a CFD-based genetic algorithm

Yu Xue a, Zhiqiang (John) Zhai a,b,*, Qingyan Chen a,c

a School of Environmental Science and Engineering, Tianjin University, Tianjin 300072, ChinabUniversity of Colorado at Boulder, Boulder, CO 80309, USAc School of Mechanical Engineering, Purdue University, IN 47905, USA

a r t i c l e i n f o

Article history:Received 4 October 2012Received in revised form26 February 2013Accepted 27 February 2013

Keywords:Inverse modelingFlow controlConfined spaceComputational fluid dynamicsGenetic algorithmAircraft cabin

* Corresponding author. School of EnvironmentaTianjin University, Tianjin 300072, China.

E-mail address: [email protected] (Z. (John)

0360-1323/$ e see front matter � 2013 Elsevier Ltd.http://dx.doi.org/10.1016/j.buildenv.2013.02.017

a b s t r a c t

Optimizing an indoor flow pattern according to specific design goals requires systematic evaluation andprediction of the influences of critical flow control conditions such as flow inlet temperature and velocity.In order to identify the best flow control conditions, conventional approach simulates a large number offlow scenarios with different boundary conditions. This paper proposes a method that combines thegenetic algorithm (GA) with computational fluid dynamics (CFD) technique, which can efficiently predictand optimize the flow inlet conditions with various objective functions. A coupled simulation platformbased on GenOpt (GA program) and Fluent (CFD program) was developed, in which the GAwas improvedto reduce the required CFD simulations. A mixing convection case in a confined space was used toevaluate the performance of the developed program. The study shows that the method can predictaccurately the inlet boundary conditions, with given controlling variable values in the space, with fewerCFD cases. The results reveal that the accuracy of inverse prediction is influenced by the error of CFDsimulation that need be controlled within 15%. The study further used the Predicted Mean Vote (PMV) asthe cost function to optimize the inlet boundary conditions (e.g., supply velocity, temperature, and angle)of the mixing convection case as well as two more realistic aircraft cabin cases. It presents interestingoptimal correlations among those controlling parameters.

� 2013 Elsevier Ltd. All rights reserved.

1. Introduction

With rapid developments in fluid dynamics, numerical scienceand computer technologies, computational fluid dynamics (CFD)has become an efficient tool for indoor environment study andsystem design. Optimizing an indoor flow pattern according tospecific design goals requires systematic evaluation and predictionof the influences of critical flow control conditions such as flowinlet temperature, velocity and angle. In order to identify the bestflow control conditions, conventional approach simulates a largenumber of flow scenarios with different boundary conditions.Previous studies reveal advanced search and optimization algo-rithms such as genetic algorithm (GA) can effectively reduce thetotal number of iterations to reach an (or a group of) optimal so-lution(s) [1]. GA is an optimization algorithm that simulates naturalevolution in the search of optimal solutions [2]. It has been applied

l Science and Engineering,

Zhai).

All rights reserved.

to a variety of engineering design, parameter identification andsystem optimization. Efforts of coupling GA with CFD, however,were mostly on the optimization of exterior geometries of variousobjects. For instance, Obayashi and Takanashi [3] combined GAwith CFD to optimize the target pressure distributions of an airfoil.Other examples include the shape design of cars [4], melt blowingslot die [5], and transition piece [6].

Malkawi et al. [7] used the CFD-based GA method to search theoptimal room size and ventilation system which can satisfy boththermal and ventilation requirements. The study was for a rela-tively simple case and did not evaluate the influence of CFD pre-diction error on optimal design. Kato and Lee [8] applied a similarapproach to optimizing a hybrid air-conditioning system withnatural ventilation. The study aimed at minimizing the energyconsumption of the mechanical systems. The study developed atwo-step method to reduce the computing effort. Optimal resultswere acquired first with a coarse CFD mesh, which were thenrefined with a fine mesh for detailed analyses. It should be notedthat CFD results with coarse meshes may produce incorrect flowfield which can lead to wrong optimal results. Zhou and Haghighat[9,10] employed the artificial neural network (ANN) to reduce the

Page 2: Inverse prediction and optimization of flow control conditions for confined spaces using a CFD-based genetic algorithm

Y. Xue et al. / Building and Environment 64 (2013) 77e8478

modeling time; however, training the ANN still requires a greatnumber of CFD cases for individual projects.

This study develops a general simulation tool by integrating GAand CFD programs. The tool can inversely predict control condi-tions based on limited experiment data of indoor flow field. It canalso be used to optimize various control conditions of indoor flowsunder different objective functions (PMV in this paper). The testedcontrol conditions include supply velocity (vector) and tempera-ture of flow inlet, etc. Locally optimal solutions and multiple so-lutions may exist for multi-variable optimization problems, wherethe GA presents the special strength in capturing the globaloptimal results and multiple solutions.

2. Methodologies

2.1. Modified genetic algorithm

There are generally two categories of optimization algorithms:gradient-based method and gradient-free method. Gradient-basedmethods cannot deal with nonlinear problems well [11] and can beeasily trapped in local optimal values [12]. Airflowand heat transferproblems in confined spaces are highly nonlinear and thus requirethe utilization of gradient-freemethods. As one of the gradient-freemethods, genetic algorithm is capable of resolving nonlinear andmulti-solution problems, requiring less computing time to findglobal optimum than other methods [13]. Genetic algorithm usesevolution operations to generate new populations with higheraverage fitness values [14]. The higher fitness value an individualpossesses, the closer it is to the optimal result. A typical GA pro-cedure breaks down as follows:

(1) Generate a random initial population of potential solutions,which contains several individuals;

(2) Evaluate the fitness value of each individual with specified costfunction;

(3) Check whether the population meets the prescribed optimi-zation criterion; if not, apply genetic operations such as se-lection, crossover, and mutation to the population to create anew generation of potential solutions;

(4) Repeat step (2) and (3) until the optimization criterion is met.

The standard GA encounters several challenges when used forindoor environments. In the procedure of coding, a basic genetic

Fig. 1. Flowchart of t

algorithm usually encodes multi-variables into one long binarycode. This requires large computing memory and resource for amulti-variable case. With all of variables coded in one long code, astandard GA crossovers code of each individual at one or severalpoints randomly. This is a totally random procedure that is good forvariation but discourages the convergence approaching opti-mum(s). The standard GA often use the roulette wheel selectionmethod to choose suitable parents for creating next population,implying that the higher fitness value an individual has, the higherprobability it will be chosen as a parent to create the new gener-ation of individuals. This may be suitable for individuals with alarge fitness value difference, but may illustrate the character ofrandom selection and lose the benefits of evolution when the dif-ferences are marginal. Airflow and heat transfer in confined spacesinvolve multi-variables. These variables can have continuouschanges, and may lead to small differences in fitness values amongindividuals. Indeed, most inverse prediction and optimizationproblems for indoor environment may involve subtle fine-tuning ofcritical flow control conditions. Hence, the standard GA need beimproved to ensure a better convergence.

The study improves the coding, selection and crossover proce-dure to accelerate the optimization convergence speed and reducethe computing effort (Fig. 1). For the coding, various variables wereencoded and managed independently. This made it easy to conductGA operations on each of them. For the selection, the roulettewheelselection method was replaced by the tournament-selection-method, which works as follows:

(1) Pick out m individuals randomly from the current population(containing n individuals) to form a subset, where 2 & m < n;

(2) Identify the individual with the highest fitness value from thesubset as one of the parents;

(3) Repeat the step (1) and (2) until n individuals are obtained(allow repeated individuals in the selected n individuals).

The obtained n individuals form the parent population that willbe used to generate a new populationwith crossover andmutation.In this way, individuals with a higher fitness value will be choseneven if there are little differences between any two individuals. Inaddition, at least m�1 individuals with the lowest fitness valueswill be rejected, which makes it possible to balance the optimiza-tion convergence speed and the global search capability of thealgorithm.

he modified GA.

Page 3: Inverse prediction and optimization of flow control conditions for confined spaces using a CFD-based genetic algorithm

Y. Xue et al. / Building and Environment 64 (2013) 77e84 79

For the crossover, a so-called “the only son crossover method”was developed:

(1) Select an individual from the parent population randomly asthe primary parent, then chose another parent randomly;

(2) Crossover at one point randomly for every independent vari-able, so the code of each variable is divided into two parts:high-order part and low-order part. The high-order part of thecode shows the main features of a variable;

(3) Generate a son of the parents with the high-order part of theprimary parent and the low-order part of the other parent. Sothe son will inherit more features from the primary parent;

(4) Repeat the step (1) to (3) until n son individuals are obtained;then after mutation, they form the new generation ofpopulation.

These modifications above will substantially accelerate theconvergence because every step in the procedure contributes tothe creation of a new generation with a higher average fitnessvalue.

Besides excellent capability in the global optimization, GA is alsosuitable for developing regression correlations when applied tomulti-solution problems [15,16]. Regression with curve-fitting re-quires adequate optimal points to demonstrate the curve trend,implying a large amount of computing time. If the expression of acurve is known in prior, the curves can be fitted with few points.This study finds an approach to effectively predicting the form ofcorrelation curves: an independent population is arranged tocollect global optimal individuals, and optimization process stopswhen every individual of this independent population meets therequirement of the regression.

2.2. Integration of GA-CFD

A coupled computational platform based on GenOpt [17] andFluent [18] was developed to implement the integration of GA andCFD. GenOpt is a generic optimization program that can be used tominimize an objective function computed by a simulation tool,using text files for input and output. Fluent is one of the popularcommercial CFD software that can start and input parameters with

Fig. 2. Flowchart of the GA-CFD optimization pr

text files. The study used Gambit (the pre-processing tool of Fluent)to establish computer models of indoor environments. The modi-fied GA was programmed into GenOpt. An interface was developedto transfer files and data among GenOpt, Gambit and Fluent,fundamentally integrating these programs into one simulationplatform.

Fig. 2 illustrates the flowchart of the developed computationalplatform. For predicting and optimizing flow control conditions inconfined spaces, the platform works in the following main steps:

(1) GenOpt generates an initial population of potential solutions.Each individual of the population is composed of different flowinlet parameters, such as temperature, velocity and direction,coded in binary.

(2) GenOpt generates the Gambit input files, for geometry andmesh of the confined space to bemodeled, and the Fluent inputfiles, for necessary CFD simulation parameters, based on thepopulation of potential solutions.

(3) Platform launches the Gambit and Fluent engines and therequired simulation results are extracted from CFD result files.

(4) Step (2) and (3) are repeated until all individuals in the popu-lation are simulated.

(5) GenOpt uses the CFD simulation results to calculate the fitnessvalues according to the prescribed cost/objective function. Ifthe pre-set optimization criterion is met, GenOpt will outputoptimal results. Otherwise, it will apply genetic operations tothe current population to create the next generation of popu-lation. This populationwill undergo the same procedure in step(2)e(5) until the optimization goal is achieved.

All of these procedures are performed automatically in thesimulation platform, although text templates are needed to createinput files for Gambit and Fluent. In such an optimization, theoverall computing time is mostly determined (and thus measured)by the number of CFD cases simulated. To ensure the viability of themethod for real applications, the total number of CFD cases to bemodeled need be reduced to the largest extent. In addition toimproving the GA, during the simulation of GA-CFD, calculatedfitness values of individuals in populations are stored and reused ifthese individuals appear again in other or later populations.

ocedure using the GenOpt-Fluent platform.

Page 4: Inverse prediction and optimization of flow control conditions for confined spaces using a CFD-based genetic algorithm

Y. Xue et al. / Building and Environment 64 (2013) 77e8480

3. Testing with a 2-D mixing convection case

A 2-D mixing convection case [19] was used to evaluate theperformance of the developed simulation platform. The case is awidely-used and representative model of floor heating (naturalconvection) coupled with mechanical ventilation system (forcedconvection) in a confined space. The case has a clear definition ofgeometries and boundary conditions, and thus is ideal for assessingnew methods and models for indoor environments.

Experimental results were obtained from the literature, whichwere measured in a laboratory chamber of 1.04 m� 1.04 m� 0.7 m(x� y� z) equippedwith a 18mmwide inlet slot and a 24mmwideoutlet slot. The experiment produced a fairly good 2-D flow at thecentral plate. The experiment measured the wall temperatures andsupply air conditions, respectively, as Troof ¼ Twalls ¼ 15 �C,Tfloor ¼ 35.5 �C, Tinlet ¼ 15 �C, Vinlet ¼ 0.57 m/s (normal to the inletslot), as well as temperature, x-velocity magnitude and y-velocitymagnitude at the ten points along the middle line on the centralplate (shown in Fig. 3). The turbulent kinetic energy and turbulentdissipation rate of the inlet were controlled to be 0.00125 m2 s�2

and 0. Both inverse prediction and optimization of the inlet con-ditions were carried out using the developed platform.

4. Descriptions of inverse prediction case

The study first predicted the inlet conditions based on simulatedroom flow conditions. In the inverse prediction case, the walltemperatures were provided, and the difference between thesimulated and measured variables at the ten measurement pointswas used as the cost/objective function for the GA to identify theflow inlet conditions including supply air temperature and velocity(both magnitude and direction). GA can only find optimal resultswithin the given range of variables, thus the specified variablerangemust contain the actual inlet parameter. Reasonable variationranges for flow inlet parameters were specified, where Vinlet is 0e1 m/s (the actual value is 0.57 m/s), Tinlet is 0e20 �C (the actualvalue is 15 �C), supply air angle is between 25� and �25� (0� isperpendicular to the inlet surface and counter-clockwise is positive,and the actual value is 0�). The cost function is defined as

F ¼13�

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiP�V ’xi � Vxi

�2P

Vxi2 þ

P�V ’yi � Vyi

�2P

Vyi2 þ

P�T ’i � Ti

�2P

Ti2

vuuut� ði ¼ 1;2;.10Þ

(1)

where F is the cost function value, V 0xi and V 0

yi are the simulatedvelocity at the ten points, T 0i is the simulated temperature at the ten

Inlet

Outlet

Roof(15 )

Floor(35 )

Wall(15 )

x

y

z

Fig. 3. Illustration of the mixing convection case.

points, Vxi, Vyi and Ti are the measured results. Smaller value of Frepresents higher fitness value and the simulation goal is to find thesolution with the minimal F.

5. Results of inverse prediction case

Table 1 presents the inverse predict results of seven cases, basedon the difference between the simulated and measured results. Thetested seven cases examined different combinations of controlvariables (values on the ten points) and inversely predicted inletvariables (values of the inlet), such as:

(1) Predicting inlet velocity based on controlled velocity on the tenpoints;

(2) Predicting inlet velocity based on controlled temperature onthe ten points;

(3) Predicting inlet temperature based on controlled velocity onthe ten points;

(4) Predicting both inlet temperature and velocity based oncontrolled velocity on the ten points, etc.

The results show noticeable differences between the predictedand actual inlet conditions for the following cases (1) predictinginlet velocity based on controlled temperature on the ten points(47.37%); (2) predicting both inlet velocity and temperature basedon controlled velocity on the ten points (mainly for temperature64.3%); (3) predicting both inlet velocity and temperature based oncontrolled temperature on the ten points (mainly for velocity57.89%). This can be understood by analyzing the governing equa-tion (both the momentum and energy equations) of the flow. Thismixing convection case has a stronger forced convection mecha-nism than the natural convection mechanism. Within the specifiedvariation ranges of inlet parameters, the indoor temperature dis-tribution is less sensitive to supply air velocity than to supply airtemperature, while the indoor velocity distribution is more sensi-tive to supply air temperature than to supply air velocity and thedistribution of indoor velocity is more sensitive to supply air ve-locity than to supply air temperature. Hence, predicting inlet ve-locity based on indoor velocity has a better accuracy thanpredicting inlet velocity based on indoor temperature.

The difference between the simulated and measured controlvariables, which leads to the difference between the predicted andactual inlet conditions, are attributed to the errors inherent in bothCFD simulation and experimental measurement. In order to verifythe accuracy of the algorithm itself, these errors were eliminated byusing the CFD simulation results with the actual inlet conditions asthe reference (rather than the measurement) for the inverse pre-diction. Table 2 shows the inverse predict results under this idealcondition that excludes the influence of CFD and experiment un-certainties. The results reveal that the CFD-based GA program canprecisely identify the actual inlet conditions. It is noticed that the

Table 1Inverse-predicted results based on experiment data.

Control variable Inverse predictedinlet variable

Inverse predict result Deviation

Velocity Velocity 0.56 m/s 1.75%Temperature 0.30 m/s 47.37%Velocity Temperature 17.38 �C 15.87%Temperature 16.25 �C 8.31%Velocity Velocity &

temperature0.52 m/s; 5.35 �C 8.77%; 64.3%

Temperature 0.24 m/s; 15.5 �C 57.89%; 3.33%Velocity &

temperature0.56 m/s; 16.32 �C 1.75%; 8.8%

Page 5: Inverse prediction and optimization of flow control conditions for confined spaces using a CFD-based genetic algorithm

Table .2Inverse-predicted results based on simulation data.

Contrl variable Inverse predictedinlet variable

Inverse predict result Deviation

Velocity Velocity 0.57 m/s 0%Temperature 0.57 m/s 0%Velocity Temperature 15 �C 0%Temperature 15 �C 0%Velocity Velocity &

temperature0.57 m/s; 15 �C 0%; 0%

Temperature 0.57 m/s; 15 �C 0%; 0%Velocity &

temperature0.57 m/s; 15 �C 0%; 0%

x

y

z

Inlet

Outlet

Roof(15 )

Floor(35 )

Wall(15 )

1

Fig. 5. Optimization of inlet conditions based on the thermal comfort criterion in zone 1.

Y. Xue et al. / Building and Environment 64 (2013) 77e84 81

modified GA reduces almost half of the computing time than thestandard GA.

To further quantify the influence of CFD prediction accuracy onthe inverse prediction, the study used the CFD results withdifferent meshes to predict inlet parameters, where the grid-independent CFD solution was treated as the reference and thetarget value. Fig. 4 shows a linear relationship between the CFDsimulation uncertainty and the inverse prediction deviation. Ingeneral, this study will suggest keeping the CFD uncertainty at 15%or less so that the inverse prediction deviation can be managed tobe below 10%.

6. Descriptions of inverse optimization case

This study further employed the developed platform to optimizethe inlet parameters that can help achieve a thermally comfortablezone in the space. The parameters to be optimized include: inlet airtemperature (Tinlet: between 10 and 30 �C), inlet air velocity (Vinlet:between 0 and 5 m/s) and supply air direction (angle: between 25�

and�25�). The thermal comfort of the target zone 1 shown in Fig. 5is monitored by the Predicted Mean Vote (PMV) value of the 16points distributed in the zone 1. PMV is a quantitative evaluationindex of thermal comfort widely used for indoor thermal comfortassessment. The PMV equation was developed as below [20]:

PMV ¼�0:303e�0:036M þ 0:028

��nðM �WÞ � 3:05� 10�3

� ½5733� 6:99ðM �WÞ � pa� � 0:42

� ½ðM �WÞ � 58:15� � 1:7� 10�5 �M � ð5867� paÞ� 0:0014�M � ð34� taÞ � 3:96� 10�8fcl

�hðtcl þ 273Þ4 �

�tr þ 273

�4i� fclhcðtcl � taÞ

o(2)

0%5%10%15%20%25%30%35%40%

10% 15% 20% 25% 30% 35%

Imve

rse

Pre

dict

Dev

iati

on

Simulaiton Model Deviation

Fig. 4. Influence of CFD uncertainty on inverse prediction error.

where

tcl ¼ 35:7� 0:028ðM �WÞ � Icln3:96� 10�8 � fcl

�hðtcl þ 273Þ4 �

�tr þ 273

�4iþ fclhcðtcl � taÞ

o(3)

hc ¼(2:38� ðtcl � taÞ0:25 2:38ðtcl � taÞ0:25 > 12:1

ffiffiffiffiV

p

12:10ffiffiffiffiV

p2:38ðtcl � taÞ0:25 < 12:1

ffiffiffiffiV

p (4)

fcl ¼�1:00þ 1:290Icl Icl � 0:078 m2 �C=W1:05þ 0:645Icl Icl > 0:078 m2 �C=W

(5)

M is the metabolic heat production (Wm�2), the value of it is set65 W m�2 which is the general value of slight labor intensity; W isthe external work accomplished (W), the value of it is set 0 W forgeneral; pa is the water vapor pressure of ambient air (kPa), thevalue of it is set 10 kPa considering the situation of aircraft; ta is thetemperature of ambient air (�C); tcl is the temperature of clothing(�C); fcl is the clothing area factor, the value of it is set 1.1 for gen-eral; tr is the mean radiation temperature; hc is the convection heattransfer coefficient (W m�2 K�1) that is related to velocity; V is theair velocity (m s�1); Icl is the thermal resistance of clothing (clo), thevalue of it is set 0.1 clo for general.

This study used the averaged PMV value of the 16 monitoringpoints as the cost function of the GA:

PMV ¼ 116

XjPMVij ði ¼ 1;2;3;.;16Þ (6)

where PMVi is the PMV value at the i-th monitoring point. Thegoal of the optimization is to minimize the value of PMV, and the

Fig. 6. Iso-surface among supply air velocity, temperature and direction that satisfiesthe PMV requirement in zone 1.

Page 6: Inverse prediction and optimization of flow control conditions for confined spaces using a CFD-based genetic algorithm

Fig. 7. Logarithmic relationship between supply air velocity and temperature thatsatisfies the PMV requirement in zone 1.

Fig. 9. The 2-D aircraft cabin model.

Y. Xue et al. / Building and Environment 64 (2013) 77e8482

condition to terminate the optimization simulation is set as PMV� 0:1, which means the average PMV of zone 1 is between �0.1and 0.1.

7. Results of inverse optimization case

The simulation identified a series of possible solutions withdifferent combinations of supply air temperature, velocity magni-tude and direction that can meet the PMV requirement in Zone 1(i.e., the average PMV of zone 1 is between �0.1 and 0.1). Thecombinations of these solutions are plot in Fig. 6, which presents aninteresting iso-surface. The results show that supply air directionhas very little influence on the thermal comfort for this case in thegiven range. The supply air velocity magnitude and temperaturewere thus concentrated and demonstrate a logarithmic relation-ship between the two parameters as seen in Fig. 7.

This study simulated more than a hundred cases to discover thelogarithmic relationship between supply air velocity and temper-ature. In practice, the supply air conditions may be restricted tosmaller ranges due to other considerations (e.g., energy consump-tion and ventilation rate requirement). Hence, a much smallernumber of cases (points) will be needed to identify the logarithmicrelationship. With a smaller range for each variable, i.e., 20e30 �Cfor supply air temperature and 1e2.5 m/s for supply air velocity,only 63 cases were required to determine the mathematicalexpression as shown in Fig. 8. The study verified the finding byselecting an arbitrary point on the curve and conducting a CFDsimulation using the selected boundary conditions that confirmedthe average PMV of 0.04 in zone 1.

Fig. 8. Optimized inlet conditions from a GA-CFD simulation of 63 cases.

8. Demonstration with a realistic aircraft cabin case

8.1. Descriptions of 2-D and 3-D aircraft cabin cases

The study employed the developed platform to optimize thesupply air conditions for thermal comfort in aircraft cabins. Both a2-D and a 3-D aircraft cabin were modeled with actual geometriesand supply and return air locations. The 2-D cabin, shown in Fig. 9,simulated a cabin condition before passengers go aboard theaircraft. The temperature of walls was set to 21 �C. The goal was tofind the optimal combinations of supply air velocity and tempera-ture that achieve acceptable PMV in the zone (the dotted box inFig. 9) to make sure that passengers fell comfortable when they geton board the aircraft. The allowed inlet parameter ranges were: 0e5m/s for Vinlet and 20e30 �C for Tinlet. The similar PMV cost functionas the mixing convection case was used for this, where the opti-mization convergence criterion was set with PMV � 0:1.

The 3-D aircraft cabin contained three rows of seats and wasoccupied by heated dummies of 95 Weach, shown in Fig. 10, whichsimulated the cruise condition. During cruise, environment controlsystem (ECS) of aircraft should maintain a cabin temperature of24 �C with a full passenger load. Temperature uniformity in cabinshould be within 3 �C [21]. In the study, the wall temperature wasset at 21 �C. The allowed inlet parameter ranges were: 0.6e1.1 m/sfor Vinlet (corresponding ventilation rate of 6e11 h�1) and 13e18 �Cfor Tinlet. The simulation goal was to find optimal inlet parametersthat can produce acceptable thermal comfort around the occupants(the dummies). The same cost functionwas used as for the 2-D case.

8.2. Results of 2-D and 3-D aircraft cabin cases

These two cases were utilized to demonstrate the capability ofthe developed algorithm and platform in modeling complex

Fig. 10. The 3-D aircraft cabin model.

Page 7: Inverse prediction and optimization of flow control conditions for confined spaces using a CFD-based genetic algorithm

Fig. 11. Logarithmic regression curve of the 2D aircraft cabin case.

y = 4.6524ln(x) + 16.613R² = 0.9691

14

14.5

15

15.5

16

16.5

17

17.5

0.6 0.7 0.8 0.9 1 1.1

T(

)

V(m/s)

PMV between -0.1 and 0.1

PMV=-0.01

PMV=0.03

Fig. 12. Logarithmic regression curve of the 3D aircraft cabin case.

Y. Xue et al. / Building and Environment 64 (2013) 77e84 83

conditions. The 2-D case with a relatively large variation of inletparameters confirmed that the relationship of velocity and tem-peraturewas logarithmic in terms of thermal comfort, inwhich 135CFD cases were used to generate the logarithmic curve shown inFig. 11. The 3D aircraft cabin model produced the logarithmicregression curve with only 86 CFD cases due to the smaller initialranges of both parameters. The study further verified that all thepoints on the regression curve of Fig. 12 can produce the requiredthermal comfort in the space.

9. Discussions

The study found that, even for the ideal cases, the predictionsmay slightly deviate from the actual values. Further analysis in-dicates this is due to the discrete nature of the binary coding in GA.Data in Table 1 was acquired under a lucky situation where the

y = 4.5797ln(x) + 28.446R² = 0.9823

17

19

21

23

25

27

0 0.2 0.4 0.6 0.8 1 1.2

T

V(m/s)

Fig. 13. Logarithmic relationship between velocity and temperature in the PMVequation.

discrete binary codes contain the actual supply inlet parametervalues, which is almost impossible in practical usage. Theoretically,GA can be coded by either real number or binary number. The realnumber coding may eliminate the discrete errors and achievehigher accuracy [22] but will be constrained in some situations[23], such as some variables are not continues, and too high level ofaccuracy is needless because actual control situation can’t reachthat level. Higher level of accuracy also means larger calculationdemand. In practice, binary coding is still most viable to effectivelyprovide results with adequate accuracy.

In the inverse optimization, velocity and temperature demon-strate a clear logarithmic relationship if based on the PMVrequirement e the cost function for the optimization. Furtheranalysis of the PMV equation shows that, once other parameters arefixed, to acquire a PMV of zero, air velocity (or air change rate forgeneral) and temperature do present an inherent logarithmicrelationship (Fig. 13). This analysis suggests that the inherentmathematic relationships among the parameters in the cost func-tion may influence (even determine) the relationships among theparameters at the boundary boundaries. This finding may helpdetermine the curve format in advance when other cost functionsare employed, such as age of air etc. If the mathematical form of acurve can be determined a priori (which are difficult for most cases,especially for multi-variable cases), a limited number of cases(points) will be needed to identify the coefficients of the curve thatthus can largely reduce the computational time.

10. Conclusions

This study developed a CFD-based GA simulation platform thatcan be used to predict and optimize the inlet flow control in variousconfined spaces. The case studies demonstrate the capability andaccuracy of the developed algorithm. The platform can inverselypredict inlet conditions based on simulated room flow conditionswith high accuracy. The study also presented an efficient way toinversely optimize the supply air conditions for thermal comfort inconfined spaces.

Acknowledgments

This project was supported by the National Basic ResearchProgram of China (The 973 Program of China) through grant No.2012CB720100. The authors are also grateful for the assistancesreceived from Yi Wang, Chen Wu, Sumei Liu and Luyi Xu at TianjinUniversity.

References

[1] Bosworth J, Foo N, Zeigler BP. Comparison of genetic algorithms with conju-gate gradient methods. Washington, D.C: NASA (CR-2093); 1972.

[2] Holland JH. Adaptation in natural and artificial systems. Ann Arbor: Universityof Michigan Press; 1975.

[3] Obayashi S, Takanashi S. Genetic algorithm for aerodynamic inverse optimi-zation problems. In: 1st IEE/IEEE int. conf, GA’s in engineering systems: in-novations and applications; 1995. p. 7e12.

[4] Campos F, Geremia P, Skaperdas E. Automatic optimisation of automotivedesigns using mesh morphing and CFD. In: 2nd ANSA & mETA InternationalCongress; 2007. p. 14e5.

[5] Sun Y, Wang X. Optimization of air flow field of the melt blowing slot die vianumerical simulation and genetic algorithm. J Appl Polym Sci 2010;115(3):1540e5.

[6] Muñoz AG, Ayala-Ramírez V, Alfaro-Ayala JA, Acosta BMT. Optimization of thetransition piece applying genetic algorithms. Appl Therm Eng 2011;31(16):3214e25.

[7] Malkawi AM, Srinivasan RS, Yi YK, Choudhary R. Performance-based designevolution: the use of genetic algorithms and CFD. In: Eighth internationalIBPSA conference; 2003. p. 793e8.

[8] Kato S, Lee JH. Optimization of hybrid air-conditioning system with naturalventilation by GA and CFD. In: 25th AIVC conference, ventilation and retro-fitting; 2004. p. 15e7.

Page 8: Inverse prediction and optimization of flow control conditions for confined spaces using a CFD-based genetic algorithm

Y. Xue et al. / Building and Environment 64 (2013) 77e8484

[9] Zhou L, Haghighat F. Optimization of ventilation system design and operationin office environment, part I: methodology. Build Environ 2009;44(4):651e6.

[10] Zhou L, Haghighat F. Optimization of ventilation systems in office environ-ment, part II: results and discussions. Build Environ 2009;44(4):657e65.

[11] Wetter M, Wright J. Comparison of a generalized pattern search and a geneticalgorithm optimization method. In: Proceedings of the eighth IBPSA confer-ence, vol. III; 2003. p. 1401e8.

[12] Wang SW, Jin XQ. Model-based optimal control of VAV air-conditioning sys-tem using genetic algorithm. Build Environ 2000;35:471e8.

[13] Sakamoto Y, Nagaiwa A, Kobayasi S, Shinozaki T. An optimization method ofdistrict heating and cooling plant operation based on genetic algorithm.ASHRAE Trans 1999;105(2):104e15.

[14] Koza JR. Genetic programming: on the programming of computers by meansof natural selection. Cambridge: Massachusetts Institute of Technology Press;1992.

[15] Karr CL, Stanley DA, Scheiner BJ. Genetic algorithm applied to least squarescurve fitting 1991. U.S. Bureau of Mines Report of Investigations 9339.

[16] Gulsen M, Smith AE, Tate DM. A genetic algorithm approach to curve fitting.Int J Prod Res 1995;33(7):1911e23.

[17] Wetter M. GenOpt� generic optimization program user manual, version 3.1.0.LBNL-94720; 2011.

[18] FLUENT 12.1.2 for the ANSYS release version 12.1 2009.[19] Blay D, Mergui S, Niculae C. Confined turbulent mixed convection in the

presence of a horizontal buoyant wall jet. Fundam Mix Convect 1992;213:65e72.

[20] Fanger PO. Thermal comfort, analysis and. Applications in environmentalengineering. Copenhagen: Danish Technical Press; 1970.

[21] ASHRAE. ASHRAW handbook-HVAC applications(SI). Atlanta GA: AmericanSociety of Heating, Refrigerating and Air Conditioning Engineers; 2011.

[22] Janikow CZ, Michalewicz Z. An experimental comparison of binary andfloating point representations in genetic algorithms. In: Proceedings fourthinternational conference on genetic algorithms; 1991. p. 31e6.

[23] Goldberg DE. Real-coded genetic algorithms, virtual alphabets, and blocking.University of Illinois at Urbana-Champaign; 1990. Technical Report No. 90001.