1. Introduction
Building energy consumption consists of a large share of total global energy use. Major reductions in fossil fuel use urgently challenge architects and engineers to improve overall building energy use and efficiency [
1]. The concept of ‘zero-energy’ buildings is proposed to maximize building energy performance [
2]. In the European Union, the Energy Performance of Buildings Directive (EPBD), a governmental mandate towards improving the energy performance of buildings, requires all new buildings to be nearly zero-energy by the end of 2020 and all new public buildings to be nearly zero-energy by 2018 [
3]. Likewise, in the USA, the Energy Independence and Security Act (EISA) of 2007 creates a nationwide zero-net-energy initiative for all commercial buildings in the United States by 2050 [
2]. Natural ventilation is often used as a passive technology to help achieve its goal of zero-energy use. Natural ventilation inside the house is induced by a combination of the wind and stack effect. Wind driven cross-ventilation is facilitated through manually and automatically operable windows on the facades. Stack ventilation can be formed through a central staircase (
Figure 1a) that channels airflow from the ground level entry to the upper roof skylight windows. Similarly, a solar chimney (
Figure 1b) can be designed to enhance buoyancy driven natural ventilation.
The critical success factor to make natural ventilation function is building control. The controlled variable is the windows’ opening angle. The state-of-the-art controlling parameters are the outdoor air temperature and external wind speeds with indoor CO
2 concentration and air temperature [
4] as feedback parameters. The link between the windows’ opening angle and the controlling parameters is the control algorithm, which is currently rule-based. Each feedback parameter is usually measured in each zone by one sensor positioned near a wall due to the limitation of installation. The local air temperature variation within a zone is not yet considered to identify the ideal set point temperature for the zone. Therefore, the state-of-art rule-based strategy fails to control natural ventilation at multiple spatial scales, e.g., from occupant zone to the whole building, due to the limited number and location of sensors [
5,
6]. Another drawback of the sensor-based control is the neglect of the natural ventilation rate as a feedback parameter. Unlike mechanically ventilated buildings, natural ventilation rate is very difficult to measure [
7]. The current control strategy might be capable of maintaining the indoor CO
2 level, the rooms might still be excessively or insufficiently ventilated, which often occurs in naturally ventilated buildings [
8]. Alternatively, the indoor air speed might replace natural ventilation rate to supplement the feedback parameters. Although the air speed can be monitored in a room, it is often impossible to locate the anemometer in the occupied zone. Unlike air temperature, the air speed usually has a much stronger gradient in naturally ventilated rooms. The air speed measured outside the occupied zone might provide misleading feedback to windows operation. Natural ventilation rate, local air temperature, and velocity distribution at a higher spatial resolution are needed to leverage the state-of-the-art natural ventilation control to implement more complex control algorithms at multiple spatial scales [
5]. The high spatial resolution data includes air temperatures and velocities in the occupied zones. A recognized solution towards achieving high spatial resolution data is to apply computational fluid dynamics (CFD) modeling to buildings [
6,
7,
9]. CFD modeling as a physics-based tool can incorporate sensor data for real-time performance assessment and fault detection [
10,
11]. Moreover, CFD modeling can incorporate predictions using weather forecasts to leverage model predictive and adaptive control [
12].
Much research regarding CFD modeling of the built environment is aimed to assist design [
6,
9], and to evaluate the performance of a ventilation scheme in terms of thermal comfort and air quality [
13]. These design applications focus on use-cases and are often static or offline due to their high cost of computing time [
14]. To extend the application of CFD modeling for control purposes, the numerical models should be dynamic, online or in real-time. In recent years, real-time building modeling emerged for building performance assessment [
10,
11] based on thermal dynamics, where airflow dynamics is usually simplified into an infiltration model. However, this method is not suitable to provide air velocities and temperatures at high spatial resolution. Zuo and Chen [
15] introduced fast fluid dynamics (FFD) to simulate real-time airflow distributions in buildings. The real-time implementation in FFD focuses on speeding up computational time by using coarse-grid and fast governing equation-solving techniques. FFD nowadays usually applies to simple building settings [
16,
17,
18]. Since radiation, and especially solar irradiation, are not yet incorporated into FFD. Consequently, real-time implementation based on FFD proves unsuitable for a complex building, which has many glazed windows and a solar chimney, and where solar irradiation and radiation play an important role in heat transfer.
Due to current research gaps along with the need for control algorithms at multiple spatial scales, this paper seeks to develop a real-time CFD modeling framework. The framework performance is tested through a comprehensive case study applied to a full-scale zero-energy building. The framework aims to generate high resolution data for advanced natural ventilation control algorithms in the future.
2. The Concept of Real-Time CFD
A zero-energy building is usually equipped with a comprehensive sensor and control network built on sensors, actuators and controllers. The sensors, which monitor outdoor weather, wall surface temperature, indoor air temperature and air velocities at discrete points, continuously generate real-time data. The hypothesis of real-time CFD is that the sensor data can provide real-time boundary values to facilitate real-time mathematical simulations. The mathematical model is essentially a set of governing equations for fluid flow and energy transport. In other words, the model is based on CFD. The innovation of the concept of real-time CFD lies in two critical components: the real-time boundary conditions provided by sensors and real-time self-calibration through data assimilation of measured air velocities.
To implement real-time simulations of air flow and temperature, convergent solutions of the governing equations must be achieved within a suitable time period. The CFD calculations need to be fast enough to generate data in time for natural ventilation control. Within this time period, the CFD model is steady and the calculations are based on iterations. From one period to the next, the CFD calculations are advanced by the real-time boundary values provided by sensors. The sensor data for time varying boundary conditions are the wind direction and speed, solar radiation intensity, outdoor air temperature, internal wall surface temperature, ceiling surface temperature, and slab temperature.
The crucial characteristic of a CFD model lies in its accuracy. State of the art accuracy evaluation utilizes validation studies by comparing simulation results with experimental results. However, if the simulated results do not match the experimental results, much research is focused on improving boundary conditions [
19,
20]. For real-time CFD modeling, validation is not an appropriate method for checking and improving model accuracy due to the time period required for each simulation. Instead of improving boundary conditions, the real-time CFD model should be continuously calibrated. The self-calibration can be achieved by incorporating observed air velocities into the model to further tune the simulation. This process is known as data assimilation [
21].
An illustration of the calculation process for real-time CFD modeling is illustrated in
Figure 2. Sensor data and window status information are first collected into a data server and then read by the data pre-processing module. This data is then used to initialize CFD calculation. Once the calculation starts, the indoor air velocity data is read into the CFD model to initiate the self-calibration process. After the calculation is completed, the resulting data and input data are recorded for natural ventilation control. The CFD model subsequently advances to the next hour where the entire process is repeated again.
The controlled variable of the natural ventilation system is the windows’ opening angles. The controlling parameters are the outdoor air temperature, the external wind speed and direction with feedback from the zone air temperature and speed. According to the controlling parameters, predefined windows’ opening angles are chosen to start the real-time CFD calculation for the initial hour. The zone air temperatures and speeds will be output into a SIEMENS Desigo system (Siemens AG, Canton, MA, USA), a real-time building management system. The relation between windows’ opening angles and controlling parameters is defined by control algorithms, which will be developed based on thermal comfort [
22]. For naturally ventilated space, the comfort indoor air temperature has a large range and the air speed should be smaller than 0.3 m/s. The feedback parameters in this hour with the controlling parameters in the next hour determines windows’ opening angles in different zones in the next hour. For example, provided that the average air speed in one particular zone exceeds 0.3 m/s in this hour and the external wind speed in the next hour becomes even larger, the automated windows for this particular zone will be operated to a position with smaller opening angles. In this stage, the main objective is to develop the method toward real-time CFD modeling for natural ventilation. The detailed control algorithms will be developed and implemented in the SIEMENS Desigo system in the next stage.
In order to operate automated windows within a range of opening angles in the CFD model, a range of possible alternative configurations are established and can be activated in the next hour. The motion of window panes can be implemented by dynamic mesh. However, dynamic meshing for 34 automated windows requires a simulation time of longer than one hour, exceeding the time step of the real-time simulation. The modification of the initial mesh could induce high cell skewness, which may cause the calculation to become unstable or to crash. Another way to mimic the automatic operation of windows is to construct a virtual window surface for each window panel angle. If there are too many pre-defined angles, the small angle between the adjacent surfaces makes it impossible to generate mesh with high quality. Because of this, the current geometrical model includes three window angles for automatic windows: fully closed, opened at 25° and 50°. The skylights are either fully closed or opened at 25°. In summary, three and two configurations are considered for automated windows and skylights, respectively. Supposing that windows for a particular zone are opened at 25° in this hour, the predefined virtual window surface at 25° is designated as a wall boundary condition and the other two alternatives as interior. In the next hour, if the windows need to be opened to 50°, the surface at 25° is changed to interior boundary conditions and the alternative configuration at 50° is activated as a wall boundary condition. The procedure to choose the windows’ opening angles are based on the predefined and target natural ventilation rate and indoor air temperature. This procedure is part of the control algorithm built in the SIEMENS Desigo system. For example, if the calculated ventilation rate is higher than the target ventilation rate, the control algorithm will choose a smaller opening angle and send the signal to the real-time CFD model, then the window wall surface at the previous hour will be changed to interior boundary condition in Fluent and the ‘interior’ surface at the angle designated by the control algorithm will be accordingly changed to wall boundary condition in Fluent. This can be done by using text commands and journal files in Fluent.
3. The Real-Time CFD Modeling Framework
The concept of real-time CFD is introduced in
Section 2. This section focuses on the development of the modeling framework, including the geometrical model (
Section 3.1), physical models (
Section 3.2), real-time boundary conditions (
Section 3.3), self-calibration using the data assimilation method (
Section 3.4), and the overall workflow (
Section 3.5).
3.1. Geometry, Domain, and Mesh
The building geometry for the CFD model references the actual built dimensions of a zero-energy building (
Figure 1), located at Harvard campus. Comprised of three office levels over a basement floor, the building encompasses a footprint of approximately 116 m
2 and a building height of about 9.63 m above ground level. The basement level contains a kitchen, two bathrooms, and a large meeting room connected to the solar chimney. A reception area, director’s office, and administration rooms are located on the first floor, while the second floor contains a meeting room, private phone booth, and large open office space for researchers. The third floor accommodates a private office, recreational lounge area, and laboratory space.
The four building facades contain 34 windows (
Figure 1b) with each consisting of two operable panels. The bottom-hinged upper window panels are automatically controlled to maintain acceptable CO
2 concentrations and indoor air temperatures. The windows are also programmed for cross-ventilation and night flushing during the cooling season. The automated upper panels provide the primary openings for ventilating the building. The opening angle of these automated panels can be adjusted from 0° to about 55° through a chain actuator and motor (WindowMaster A/S, Vedbæk, Denmark). The lower panels are tilt and turn windows that can be operated manually. They tilt up to a maximum of 25° from the bottom hinge and can be opened 90° when using the vertical hinge. Seven center-pivot hinged skylights (
Figure 1b) sit on the roof with opening angles ranging from 0° to about 25°. Both window and skylight glazing panels use triple insulated glass with two 18 mm air cavities filled with a gas mixture of 90% argon and 10% air.
Partly below grade and with windows only on one side (south facade), the large meeting room in the basement is expected to have a high cooling load when fully occupied. A solar chimney (
Figure 1b), almost entirely glazed and standing 11 m high (4.5 m above the cornice of the house), was therefore designed to create buoyancy driven air motion to enhance the natural ventilation in the space. The chimney enclosure consists of double pane glazing filled with argon gas and a low-e coating that delivers a U value of 1.3 W·m
−2·k
−1 and a solar transmittance of 0.78. The other two sides of the chimney (north and west) are made from reused bricks that have an absorption factor of 0.86 and that sit below the cornice of the house. A structural steel frame supports the glass and connects to the structure of the house. The structural and glazing material properties are summarized in
Table 1 below.
The simplified geometrical model is shown in
Figure 3a. Existing research [
23] indicates that external shading has significant influence on the estimation of natural ventilation rate. Hence, external shading (
Figure 1b) has been included in the geometrical model. All doors are assumed to be closed. The shape of the computational domain is represented by an octagonal prism (
Figure 3b), which enables shifting the inlets easily depending on the wind direction. The distance between the domain edge and the building is 10 H [
24], where H is the height of the house. The height of the domain is 5 H. The whole domain is discretized into tetrahedral and hexahedral cells using ICEM CFD [
25]. The whole domain is separated into two sub-domains. Subdomain I includes all the indoor spaces and a part of the outdoor spaces near the house. Subdomain II is discretized into hexahedral cells. The mixed mesh (
Figure 3c) is joined by transforming the tetrahedral cells adjacent to the interface into pyramid cells. The whole domain is discretized into 1.07 million cells based on a grid independence study using 0.65, 1.07, and 1.81 million cells. The grid independence for subdomain is assessed by comparison of air velocity profiles at different positions inside the house.
Figure 3d shows one of such comparisons, which clearly shows that the air velocity profile based on 1.07 million cells is very close to those based on finer mesh. A recirculation zone is formed behind the building due to flow separations. The grid independence study for subdomain II is assessed by the recirculation length, shown in
Figure 3e. The relative difference between the fine and coarse mesh is 14.1%, whereas this value is only 4.7% between 1.07 million cells and the fine mesh.
3.2. Mathematical and Physical Models
Wind can be regarded as turbulent and incompressible fluid flow. Within each hour, the external wind condition is assumed to be steady. The buoyancy force is modelled using Boussinesq approximation based on the small temperature variation between the external and internal airflow. Under the above assumptions, the continuity and Reynolds-averaged NS (RANS) equations are solved for each hour.
where
Ui is mean air velocity component in the
xi direction (m·s
−1),
xi is the Cartesian coordinate (m),
ρ is density of air (kg·m
−3),
P is air pressure (Pa),
ν is the kinematic viscosity of air (m
2·s
−1),
T is air temperature (K),
T0 is reference temperature (K),
gi is the gravity component in
xi direction (m·s
−2), and
Si is the other forces or source terms for momentum. The Reynolds stress term is approximated by
where,
μt is the turbulent dynamic viscosity of air (kg·m
−1·s
−1) and
k is the turbulent kinetic energy. In order to solve the above equations, transport equations for
k are needed. In this work, the standard
k-epsilon turbulence model [
26] is chosen to close the RANS equations.
Since the temperature of most wall surfaces are provided by sensors, the transient heat transfer of thermal mass can be neglected. Therefore, the following heat transfer equation is solved for the time step:
where,
α is thermal diffusivity (m
2·s
−1),
cp is specific heat capacity (J·kg
−1·K
−1), and
Se is the source term. The fluctuating term is approximated by
where,
αt is the turbulent diffusivity (m
2·s
−1). The
qr is radiative heat flux. The P-1 radiation model [
27] is used to calculate
qr,
where,
a is the absorption coefficient,
G is the incident radiation,
n is the refractive index of medium, and
σ is the Stefan–Boltzmann constant.
The geometry includes many glazing surfaces including the windows and solar chimney. Solar heat gain through the semi-transparent materials is calculated using the solar heat load model [
25] in Ansys Fluent. At first, the incident solar irradiation is fed into the solar load model. Then the solar ray tracing algorithm is adopted to compute the heat flux through glazed surfaces and opaque surfaces at the solar chimney. The heat flux is coupled to the energy equation via a source term. The heat flux for exterior facades and internal walls is not coupled into the calculation. This is due to the fact that the temperature of these wall surfaces is monitored by sensors and the temperature is already the result of conduction, convection, and radiation heat transfer. The solar heat flux data is updated each hour.
Pressure and velocity are coupled by the SIMPLE algorithm. The second order upwind scheme is used to discretize the advection terms of the NS and temperature equations. The first order upwind scheme is adopted for the advection terms of turbulence equations due to the consideration of computational time.
3.3. Real-Time Boundary Conditions
Different kinds of sensors, including weather station, anemometers, air and wall surface temperature sensors, are designed in the zero-energy building to provide real-time boundary conditions. The hourly wind direction monitored by the weather station provides wind velocities and directions to the flow inlet defined by three adjacent sides (depending on the wind direction) of the octagonal domain. A logarithmic mean wind speed profile [
28] is imposed at the inlet. The reference wind speed is taken from the weather station and updated every hour. The three opposite sides are specified as outflow. The two remaining sides and the top of the domain are specified as symmetry. The ground plane of the computational domain is modelled implicitly as a 0.28 m thick concrete layer and a 0.5 m thick earth layer with a constant temperature of 11 °C. The scalable wall functions [
29] are used to calculate flow and heat transfer near wall boundaries. The choice of the scalable wall functions is a compromise between cells number and computation speed. The wall y+ ranges from 1 to 500 for the wall boundary conditions of the house. Real-time temperature of external facades, roofs, and internal walls are obtained from sensors and updated every hour. In total, 13 external façade, 20 floor slab, 13 internal wall surface, and 2 ceiling temperature sensors provide the real-time boundary conditions. The heat flux into the opaque walls at the solar chimney is calculated from the solar heat load model and updated every hour. Windows, doors, skylights, and solar chimney glazing panels are defined as semi-transparent materials, which allow solar heat transmission into the house. The thermal boundary conditions of these surfaces are of coupled type and the temperature is calculated simultaneously with the temperature equation.
3.4. Data Assimilation
The nudging method [
30] is used for data assimilation and to implement self-calibration. The nature of the nudging method is to add force terms into NS equations or a source term into the temperature equation to nudge the local solution towards the observation. For example, the nudging force term in a NS equation is defined as
where,
Uobs is the observed velocity;
Cnud is the nudging coefficient, which is the reciprocal of a time scale taken as 0.02 based on a sensitivity analysis; and
Wnug is the Cressman type spatial weighting function [
31]. The nudging force term is included at the observation points, which are in general not mesh points. The interpolation of the force term is done by smooth and radial drop-off at a rate of
e−r/R, where
r is the radial distance from the observation point and the choice of
R allows a smooth drop-off in influence over five grid points and avoids overlap in the areas of influence from other observation points. The nudging is applied after the convergence of initial flow and temperature calculations. Then CFD simulations run more iterations to achieve convergence with data assimilation.
3.5. Workflow of the Modeling Framework
A diagrammatic flow chart of the calculation procedure for the real-time CFD modeling is illustrated in
Figure 4. In this research, the real-time CFD modeling framework is carried out by Python and Ansys Fluent. Python performs the data processing and automation processes while Ansys Fluent carries out the calculations on flow and heat transfer. The calculations are run on a DELL PRECISION Tower 7810 (Dell, Nashua, NH, USA) workstation with 40 processor cores. First, sensor data is collected into the SIEMENS Desigo system and then sent to the data pre-processing module. The data is sampled every 20 min and averaged over 20 min [
32]. The mean values are used as boundary conditions for the CFD model. After 20 min, the data pre-processing module averages the sensor data for boundary conditions and for data assimilation over the previous 20 min. The current angles of windows are also read from the SIEMENS Desigo system and into the data processing module. These two groups of data are used to setup the CFD boundary conditions in Fluent as illustrated in
Section 3.3 with the geometrical and physical models introduced in
Section 3.1 and
Section 3.2. Once the calculation begins, the measured indoor air velocity data is read into the CFD model and integrated into the governing equations using user defined functions, as explained in
Section 3.4. The air velocities for data assimilation are sampled every 20 min as well. The mean values over 20 min are assimilated into momentum equations to implement real-time self-calibration. After the calculation is completed, all the resulting and input data are recorded. The CFD calculation is then advanced to the next time step and is repeated over again.
The house geometry is rather complicated in this study due to the large number of wall surfaces and details of windows, which consequently leads to large amounts of meshing cells. The current computational capacity to reach a converged solution is about one hour. For purposes of control, one hour might be acceptable as the windows cannot be closed and opened too frequently. For this stage, one hour is considered an acceptable time period.
4. Proof of Concept
A few elements of the house are still under construction. The solar chimney is yet to be installed. More than 300 sensors, actuators, and controllers have already been installed, however access for full data collection is not available yet. Therefore, the proof of concept can only be demonstrated by using synthetic data [
33]. Synthetic data is widely used in the field of machine learning and generated to test the performance of models when experimental data is not available. This is meaningful for the purpose of preliminary proof of concept by postulating synthetic data as a simulated situation of reality. Once the model proves to be satisfactory, the model can be validated and calibrated by experimental data when it is available.
In this case study, the synthetic data is produced by using ASHRAE [
34] hourly weather data and estimated wall temperatures from thermal dynamics simulations. ASHRAE hourly weather data is used to mimic the weather station above the house. Hourly wind speeds (
Figure 5a), directions (
Figure 5a), dry bulb temperature (
Figure 6), and solar irradiation (
Figure 6) on 10 May are taken as the weather condition inputs. Building thermal simulation with EnergyPlus [
35] are performed to provide facade, floor, and roof temperature to mimic the real-time indoor surface temperature from sensors. The synthetic indoor air velocities (named as ‘observed’ data) are produced by randomly increasing or decreasing the simulated air velocities.
Figure 5a shows the hourly wind speed and direction. Significant changes in wind direction happened at 3:00 a.m. and between 4:00–6:00 p.m.
Figure 5b shows the predicted air exchange rates (ACH) for the large meeting room in the basement and for the director’s office on the first floor. The variation of ACH with time generally follows the variation of wind speeds. During the day time, the ventilation is enhanced by buoyancy force generated in the chimney due to solar irradiation. At 1:00 p.m., the solar chimney increases the ventilation rate by 12% compared to the case with only wind driven ventilation through facade windows. The director’s office is an example of single-zone natural ventilation. The ACH ranges from 5.37 h
−1 to 37.8 h
−1 and the main influence on the ACH in such a single zone is the outdoor wind speed and direction. The first floor waiting area and open office space on the second level are connected by a staircase that allows for multi-zone ventilation to form. The ACH ranges from 12.8 h
−1 to 94.3 h
−1 (
Figure 5c). The high ventilation rates occur at 4:00 p.m. when the wind direction favors the natural ventilation through the windows on the northern facade, although the wind speed is lower than that at 1:00 p.m. This indicates the significant impact of wind directions on natural ventilation rates. The normalized ventilation rate (
Q/
AUref) at 4:00 p.m. is 0.11 for the second floor. The reported value for rooms with similar wall-to-window ratios (~10%) is 0.46 in literature [
36]. The difference might be due to the fact that the authors did not consider the detailed window opening angles in their experiments.
Figure 5d shows the predicted ACH for the rooms on the third floor. For the southern room, ACH is generally influenced by wind speeds. Whereas, the ACH for the northern room is more influenced by wind directions.
Figure 6 shows the variation of indoor air temperature for 24 h. In general, the indoor air temperature is higher during the night and lower in the day compared to the outdoor air temperature. The reason is that thermal mass on the facades and floors absorbs solar heat flux during the day and releases it during the night, which is clearly shown by the temperature variations in the facade, floor, and roof. By absorbing solar heat during the day, the indoor temperature can be maintained to be cooler than the outdoor air. On the other hand, the indoor air temperature is warmed up by the heat rejected from the thermal mass at night.
Figure 6a shows that the air temperature in the basement meeting room is about 2 °C higher than the outdoor air during the night. However, the indoor and outdoor air temperature difference is about 1 °C in the rooms on the first floor (
Figure 6b). The higher temperature differences in the basement might be due to the lower ACH (~15) compared to higher ACH (20~50) in the rooms on the first floor. The indoor and outdoor air temperature difference is smaller than 1 °C on the second and third floors (
Figure 6c,d). This is due to the high ACH of 30 h
−1. During the day, the indoor and outdoor air temperature difference is not significant in the entire house. Although the rooms on the second and third floors have large roof areas, the indoor air temperature is not higher than the other rooms. The reason is that the air circulation along the path from windows through the staircase and up to skylights is able to maintain the indoor air temperature cooler than the outdoor air.
Synthetic air velocities at 12 anemometer positions are assimilated into the real-time CFD calculations.
Figure 7 shows the comparison of observed, simulated and real-time air speeds at two such positions during a 24 h time period. Without data assimilation, the simulated air speeds are either overestimated or underestimated compared to the observed values. By using data assimilation, the simulated air speeds during all hours at all data sensor locations are nudged closely toward the observed values. The nudging method guarantees the implementation of self-calibration of real-time CFD during the running process.
This case study demonstrates the performance of the real-time CFD modeling framework by using synthetic surface temperatures and air velocities. The framework can be advanced by real-time surface temperatures measured from sensors and calibrated by indoor air velocities measured from anemometers. The data assimilation method for self-calibration works very well to nudge the simulated values toward observed values. The real-time CFD modeling framework shows a big potential to provide accurate high spatial resolution data on the indoor micro-climate. Synthetic data are used in this early stage to test the performance of the real-time CFD modeling framework. Once construction of the house is completed and the sensors begin to output data, the real-time CFD modeling framework will be further validated and calibrated by the real-time sensor data.