CFD in buildings. CFD stands for computational fluid dynamics (and heat transfer). As per this technique, the governing differential equations of a flow system or thermal system are known in the form of Navier–Stokes equations, thermal energy equation and species equation with an appropriate equation of state. In the past few years, CFD has been playing an increasingly important role in building design, following its continuing development for over a quarter of a century. The information provided by CFD can be used to analyse the impact of building exhausts to the environment, to predict smoke and fire risks in buildings, to quantify indoor environment quality, and to design natural ventilation systems.

Applications
Recently CFD finds very wide application in different areas of science and engineering; some examples are:
 Aerodynamics of aircraft and vehicles : lift and drag 
 Hydrodynamics of ships 
 Power plant : combustion in internal combustion engines and gas turbines 
 Turbo machinery: Flows inside rotating passages, diffusers etc.
 Electrical and electronics engineering: cooling of equipment including microcircuits.
 Chemical process engineering: mixing and separation and polymer moulding.
 Marine engineering: loads on off-shore structure.
 Environmental engineering: distribution of pollutant and effluents.
 Hydrology and oceanography: flows in rivers, estuaries and oceans.
 Meteorology: weather prediction.
 Biomedical engineering: blood flows through arteries and veins.
 External and internal environment of buildings: wind loading, ventilation analysis and heating/cooling load calculations.

Previously, most building-related issues such as ventilation analysis, wind loading, wind environment etc. were examined using wind tunnel tests, but today all these tests can be done effectively with CFD. CFD can resolve all of the above-mentioned issues in a relatively short time period, and it is more economical as well as being a stronger approach than the older one (experimental). Currently, Computational Fluid Dynamics is used as a sophisticated airflow modeling method and can be used to predict airflow, heat transfer and contaminant transportation in and around buildings. CFD plays an important role in building design, designing a thermally-conformable, healthy and energy-efficient building. CFD can examine the effectiveness and efficiency of various heating ventilation and air conditioning (HVAC) systems by easily changing the type and location of different components, supply air conditions and system control schedules. Furthermore, CFD helps in developing passive heating/cooling/ventilation strategies (e.g. natural ventilation) by modelling and optimizing building site-plans and indoor layouts. Globally, the building sector is the source of approximately 40% of total energy consumption.

In the present era, there is a huge gap in energy consumption and energy production. As the building sector makes up a huge amount of the total consumption, it is essential to investigate the optimum configuration for buildings to reduce the buildings' energy usage. In order to achieve this, CFD can play an important role. Building performance simulation (BPS) and CFD programs are important building design tools which are used for the evaluation of building performance, including thermal comfort, indoor air quality mechanical system efficiency and energy consumption.

CFD in buildings is mainly used for one or more followings purposes:
 Thermal analysis: through walls, roof and floor of buildings
 Ventilation analysis.
 Orientation, site and location selection of buildings based on local geographical and environmental conditions.

Thermal analysis

In buildings, heat transfer takes place in its all modes i.e. conduction, convection and radiation. In order to reduce heat losses from buildings, CFD analysis can be done for the optimum configuration of composite walls, roof and floor. The differential form of the general transport equation is as follows:

The numerical solution of above equation can be obtained by finite difference method (FDM), finite volume method (FVM) and finite element method (FEM). In buildings, for heat transfer analysis, the scalar function ф in equation (1) is replaced by Temperature (T), diffusion coefficient Γ is replaced by thermal conductivity k and the source term  is replaced by heat generation term e or by any heat radiation source  or by both (depending upon the nature of source available) and there are different forms of equations for different cases. For simplicity and easy understanding, only 1-Dimensional cases have been discussed.

In buildings the heat transfer analysis can be done for all parts of buildings (walls, roof and floor) in following two ways
 Steady State Thermal Analysis
 Transient Thermal Analysis

Steady state thermal analysis 
The steady state thermal analysis consist the following type of governing differential equations.

Case-1: General steady state heat conduction equation.

For this case the governing differential equation (GDE) (1) becomes as follows:

Case-2: Steady state heat conduction equation (no heat generation)

For this case the governing differential equation (GDE) (1) becomes as follows:

Case-3: Steady state heat conduction equation (no heat generation and no convection)

For this case the governing differential equation (GDE) (1) becomes as follows:

Transient thermal analysis 
The transient thermal analysis consist the following type of governing differential equations.

Case-1: Transient heat conduction

For this case the governing differential equation (GDE) (1) becomes as follows:

Case- 2: Transient heat conduction (no heat generation)

For this case the governing differential equation (GDE) (1) becomes as follows:

Case-3: Transient heat conduction (no heat generation and no convection)

For this case the governing differential equation (GDE) (1) becomes as follows:

We can solve these above mentioned governing differential equation (GDE) equations using CFD technique.

Ventilation analysis
The ventilation study in buildings is done to find the thermally comfortable environment with acceptable indoor air quality by regulating indoor air parameters (air temperature, relative humidity, air speed, and chemical species concentrations in the air). CFD finds an important role in regulating the indoor air parameters to predict the ventilation performance in buildings. The ventilation performance prediction provides the information regarding indoor air parameters in a room or a building even before the construction of buildings.

These air parameters are crucial for designing a comfortable indoor as well as a good integration of the building in the outdoor environment. This is because the design of appropriate ventilation systems and the development of control strategies need detailed information regarding the following parameters;
Airflow
Contaminant dispersion 
Temperature distribution

The aforesaid information is also useful for an architect to design the building configuration. From the last three decades, the CFD technique is widely used with considerable success in buildings.

Recently ventilation and its related fields has becomes a great part of wind engineering. A ventilation study can be done using wind tunnel investigation (experimentally) or by CFD modeling (theoretically). Natural ventilation system may be preferred over the forced ventilation system in some applications, as it eliminates or reduces the mechanical ventilation system, which may provide both fan energy and first-cost savings. In present era, due to development of a lot of CFD software and other building performance simulation software, it has become easier to assess the possibility of natural/forced ventilation system in a building. CFD analysis is quite useful than the experimental approach because here other related relations among the variables in post-processing could be found. The data obtained either experimental or numerically is useful in two ways: 
 Better comfort of user
 It provides the data which is used as input to the heat balance calculation of the buildings

Orientation, site, and location selection

Earlier, the choice of dwelling location was dependent on the need for water, so most developments started in valley areas. In our present era, due to advancements in science and technology, it has become easier to select the building orientation, site and location based on local geographical and environmental conditions. In the selection of building site and location, wind loading plays an important role. For example, in the case in which two buildings at a location exist side by side with a gap, when a volume of wind blows around the ends of the buildings and through the gap, the sum of flow around each building and then its velocity increases as it travels through the gap, at the expense of pressure loss. As a result, there is a build up of pressure entering the gap, which leads to higher wind loads on the sides of buildings. 

When wind blows over the face of a high rise building, a vortex is created by the downward flow on the front face (as shown in figure-1). The wind speed in the reverse direction near the ground level may have 140% of the reference wind speed, which can cause severe damage (especially to the roof of building). Such damage to buildings can be prevented if the effects of wind loading are considered in the early stage of construction of a building. In early age of construction, wind loading effects were determined by the wind tunnel test but, today, all these tests can be successfully simulated through CFD analysis. 

It is becoming increasingly important to provide pleasant building environments. Architects and wind engineers are often asked to look over the design (orientation, site, location and gaps between the surrounding buildings) in the formative planning stage of construction. By using CFD analysis, it is possible to find the suitable information (local wind velocity, convective coefficients, and solar radiation intensity) for optimal orientation, site and location selection of buildings.

CFD approach for heat transfer analysis in buildings

CFD technique can be used for the analysis of heat transfer in each part of a building. CFD technique finds the solution by following ways:
 Discretization of the governing differential equation using numerical methods (Finite difference method has been discussed).
 Solve the discretized version of equation with high performance computers.

Discretization of the governing differential equations for the steady state heat transfer analysis
Consider a building having a plane wall with thickness L, heat generation e and constant thermal conductivity k.  The wall is subdivided into M equal regions of thickness   = X/T in x-direction, and the divisions between the regions are selected as nodes as shown in figure-2.

The whole domain of wall in x-direction is divided in elements as shown in figure and the size of all interior elements is same while for exterior elements it is half.

Now to obtain the FDM solution for the interior nodes, consider the element represented by the node m which is surrounded by neighboring nodes m-1 and m+1. The FDM technique presumes that temperature varies linearly in walls (shown in figure-3).

FDM solution is (for all interior nodes except to 0 and last node):

Boundary conditions
Above equation is valid only to interior nodes only. To obtain the solution for exterior nodes we have to apply the boundary conditions (as applicable), which are as follows.

1.Specified heat flux boundary condition

When boundary is insulated (q=0)

2. Convective boundary condition

3. Radiation boundary condition

4. Combined convective and radiation boundary condition (shown in figure-4).

or
when radiation and convection heat transfer coefficient are combined, above equation becomes as follows; 

5. Combined convective, radiation and heat flux boundary condition

6.Interface boundary condition : when there is an interface (in composite walls) of different walls having different thermo-physical properties, the two different solid media A and B are assumed to be perfect contact and thus have same temperature at interface at node m (as shown in figure-5).

In above equations q_0 = denotes specified heat flux is in , h =convective coefficient,  = combined convective and radiation heat transfer coefficient, = Temperature of surrounding surface, =Ambient Temperature,  = Temperature of at initial node.
Note: For interior side of wall we can apply the suitable boundary condition from above (as applicable), in that case   will be replaced by  (Room Temperature), = will be replaced by  (Temperature of last node).

Discretization of the governing differential equations for the transient heat transfer analysis
Transient thermal analysis is more important than the steady thermal analysis, as this analysis include the variable ambient condition with time. In transient heat conduction, the temperature changes with time as well as position. The finite difference solution of transient heat conduction requires discretization in time in addition to space, as shown in figure-6.

The nodal points and volume elements for the transient FDM formulation of 1-D conduction in a plane wall exist as shown in the figure-7.

For this case the FDM explicit solution for equation (1) will be as follows,

 
The above equation can be solved explicitly for the temperature  to give

where,

and 

here, represents the cell Fourier no, represents thermal diffusivity,    represents specific heat at constant pressure,  represents time step, represents space step.

Above equation is valid for all interior nodes and to find the relation for first and last node, apply boundary conditions (as applicable) as discussed in steady state heat transfer. For a convective & radiation boundary if solar radiation data  \, in ()  is available and absorptivity-transmissivity constant K is known, the relation for temperature is obtained as follows;
 
Note: the thermal analysis for the roof and floor of a building can be done in same way, as discussed for walls.\\

See also 
Computational fluid dynamics
Natural ventilation
JPMorgan Chase Tower (Houston)
Dynamic insulation
Thermal management of high-power LEDs
Vented balance safety enclosure
Different types of boundary conditions in fluid dynamics
Wind tunnel
Greenhouse

References

Computational fluid dynamics