head_img

Air Flow in a Building

1. Introduction

In this tutorial, we will learn how to simulate a fluid flow driven by heat sources (natural convection) in the semi-closed environment, such as a manufacturing factory.

All the required input files for this test case can be downloaded below.

Input files

A typical computational time of this case is approximately 5 minutes per 1000 time steps with a typical Core i7 PC with the maximum parallelism setting (parallel = 4 in parameter setting).

A movie of the present natural convention simulation (temperature variation in a YZ cross-section).

 

2. Simulation Domain Configuration

In this simulation, we will consider a air flow in a building where there are three heat sources with the same temperature. There are (small) openings both sides (X-direction) of the building, and top of the roof, as shown in the below 3D and schematic figures.

The building design is intended to let the heated air go out from the open slits on the roof, while the outside air come in from two openings on the sides (of course, this design concept needs to be verified with the present simulation!).

The initial (inside and outside of the building) air temperature is taken as 300 K (27 degree C), and the temperature of the heat sources is 350 K (70 degree C). All walls are assumed to be adiabatic.

3D images of the domain setting (left: only floor/ground and side walls of the building are shown; middle: with the heat sources; right: with the roof).
3D images of the domain setting (left: only floor/ground and side walls of the building are shown; middle: with the heat sources; right: with the roof).
A schematic of the domain configuration.
A schematic of the domain configuration.

 

3. Construction of Simulation Domain

General rule of constructing 3D boundary conditions is explained in here.

In this simulation, we will specify:

  1. the building side walls (NON-preset color, magenta)
  2. the floor/ground (NON-preset color, pink)
  3. the heat sources (preset color, red)
  4. the roof (preset color, black).

All of these four parts are constructed by using "(b) Model constructed by third angle projection".

The paint image pixel sizes can be irrelevant to actual physical domain dimensions. However, it is a good habit to use more or less similar aspect ratio between images and domain dimensions. In the present example case, 1m length corresponds to 100 pixels in the paint images.

bcXY0.bmp
bcXY0.bmp
Alignment of bcXY0.bmp.
Direction of bcXY0.bmp.
bcYZ0.bmp
bcYZ0.bmp
Alignment of bcYZ0.bmp.
Direction of bcYZ0.bmp.
bcYZ1.bmp
bcYZ1.bmp
Alignment of bcYZ1.bmp.
Direction of bcYZ1.bmp.
bcZX0.bmp
bcZX0.bmp
Alignment of bcZX0.bmp.
Direction of bcZX0.bmp.

 

4. Simulation Parameters

Several important parameters are explained here. More thorough information about parameters can be found here.

  1. cmode
    cmode is taken as 1 for the 1:Thermo fluid simulation mode (varying temperature ideal-gas flows).
  2. lx The domain length in X-direction is 14m.
  3. ly The domain length in Y-direction is 4m.
  4. lz The domain length in Z-direction is 8m.
  5. nx、ny、nz The number of mesh points needs be determined based on the required spatial resolution. Here, we will use (nx, ny, nz) = (200, 50, 100). The thinnest part of the 3D model (in this case, perhaps wall) should be resolved by few mesh points at least, unless the part is on the computational boundary.
  6. tempW
    Initial air temperature is set to be 300K.
  7. vinW
    Initial Y-direction (vertical) velocity component is taken as -0.1m/s. This is a little trick for a stable simulation: Flowsquare+ determines initial time step size automatically, which depends on initial velocity magnitude, which requires non-zero initial velocity at some region in the domain. Artifact of this procedrue does not influence the solution as long as the simulation is run long enough.
  8. uinR、vinR、winR
    The heat sources are solid, and this red "inflow" boundary should be treated as the solid wall, uinR = vinR = winR = 0 m/s. Since these value is default value for these parameters (see here), these parameters do not need to be specified explicitly in the parameter editor.
  9. tempR
    The temperature of the heat sources is 350K.
  10. tempWallK
    The roof specified by the black color is an adiabatic wall, so tempWallK=0.
  11. tempWall
    The bulding side wall and floor/ground, specified by NON-preset color, are adiabatic too, so tempWall=0.
  12. gfy
    To include the effect of the gravity (thereby natural convection), gfy = -9,8 m/s^2 (minus means downwards).

 

5. Simulation

Using the input files provided in the above link, you can perform the simulation with these steps, and obtain solution similar to the following images!

X-direction (horizontal) velocity component on the XZ cross-section near the floor.
X-direction (horizontal) velocity component on the XZ cross-section near the floor.
Temperature with velocity vectors on XY and YZ cross-sections. Two magenta colored boxes are probes.
Temperature with velocity vectors on XY and YZ cross-sections. Two magenta colored boxes are probes.

You can also measure temporal temperature and air flow evolutions by using probes. The below figure shows temperature evolution measured at the two probes, one near floor and the other near the ceiling shown in the above figure. You can add a ventilation in the configuration for better cooling performance, and check that out with Flowsquare+!

Temperature evolution at the two probe locations.
Temperature evolution at the two probe locations.

 


Top