Abstract

Computational fluid dynamics (CFD) is being used in various research fields on the building environment. Target space of the CFD model is divided into a finite number of grids for numerical analysis. Therefore, an optimal grid design is required to obtain accurate results. The grid independence test is generally performed to design an optimal grid. However, given that there is no standardized procedure for gird independence test, most depend on the researcher’s experience and knowledge. In the conventional method, the subjective judgment of the researcher affected the selection of the grid conditions and the criteria for the optimal grid. It can lead to a decrease in the reliability of the simulation results by poor grid design. This study proposed a grid independence test method that applies the grid resolution to improve the conventional method. The grid resolution was calculated by applying the characteristic length. CV(RMSE) and R2 were applied as the criteria for optimal grid. A case study was conducted to evaluate the adequacy of the proposed method. As the characteristic length increased, the optimal grid resolution increased. In particular, for a characteristic length of 0.7 or more, the optimal grid resolution was evaluated as 24. The grid convergence index (GCI) was calculated to verify the suitability of the proposed method. As a result, all of the optimal grid resolution derived from the proposed method was evaluated as the optimal condition.

1. Introduction

Computational fluid dynamics (CFD) is a fast, economic method used to analyze the flow of fluids based on numerical analysis. As a useful tool for complementing experiment and theoretical methods, CFD has a higher productivity and efficiency than conventional analysis methods and provides more various and more accurate results [1]. Owing to these advantages, CFD is being used in various research fields in the building environment, including ventilation, thermal environment, pollutant dispersion, and wind paths in cities [2, 3]. To predict the actual phenomena using CFD, a grid design that divides the target space into a finite number of grids is needed first [4]. Given that CFD obtains the approximate solution of the Navier–Stokes equation based on the divided grids, the accuracy of the approximate solution depends on the grid quality. Furthermore, this also has a prominent effect on the accuracy of the entire simulation results because it is affected by the approximate solution of each grid [5]. Therefore, the optimal grid design is indispensable in the improvement of the accuracy of the CFD analysis.

Optimal grid designing requires the consideration of the shape type, quality, and number of grids. In particular, the number of grids is a factor that influences the total computational cost and accuracy of simulation analysis results. Coarse grids create a significant spatial discretization error, thereby reducing the accuracy of analysis results. In contrast, too much fine grids may sharply increase the round-off error beyond the truncation error, thereby reducing the accuracy of analysis results [6]. Therefore, it is crucial to select an optimal number of grids [7]. To find the optimal grid number, many CFD studies conducted grid independence test. The grid independence test is a process used to find the optimal grid condition that has the smallest number of grids without generating a difference in the numerical results based on the evaluation of various grid conditions. The grid independence test is being adopted in various studies using CFD; however, there is no standardized test method or procedure for its application [8]. Most studies rely on the subjective judgment of the researcher for the selection of the grid conditions and the criteria for the choice of the optimal grid. As a result, the objectivity of the grid design deteriorates, and it leads to a decrease in the accuracy of the CFD results. To ensure the objectivity of the grid independence test, Roache [9] tried to quantify the numerical analysis error for grids using the grid convergence index (GCI). However, Roache’s method required a more complex calculation process than the conventional grid independence test [10]. Moreover, although there is a guideline for the ratio between the grid conditions for GCI calculation, it has a limitation that requires subjective judgment by the researcher to select the reference grid.

Regarding the optimal grid design, the grid resolution is adopted in the fire dynamics simulator (FDS). Grid resolution is a concept related to the grid density of the simulation model, and its values are determined by dividing the characteristic length for fire spread in an indoor space by the grid size. The guideline NUREG-1824 published by the United States (US) Nuclear Regulatory Commission recommended values in the range of 4–16 as the optimal grid resolution range suitable for FDS [11]. Unlike the grid number, the grid resolution is not dominated by the volume of the building. Hence, the corresponding standard has the advantage of universal applicability regardless of the building size. However, the optimal grid resolution requires an evaluation for the given resolution range. Thus, although there are no criteria for the selection of the specific optimal grid resolution value for the grid resolution, there is a guideline pertaining to the optimal grid resolution range.

This study proposed a grid independence test method that applies the grid resolution for the optimal grid design of the CFD model. Accordingly, an attempt was made (a) to improve the conventional grid independence test method that depends on the researcher’s subjective judgment and (b) to present guidelines for the grid independence test. The suggested grid resolution for the FDS field was transformed to fit the CFD simulation model. An independence test was conducted to assess the optimal grid resolution range derived based on a previous study to exclude possible biases owing to subjective judgment in the selection of grid conditions. Furthermore, an independence test was attempted to derive the optimal grid resolution rather than the optimal number of grid cells. A case study was conducted to evaluate the adequacy of the method proposed in this study. Five target models were selected that considered the characteristic length of the building, and the optimal grid resolution was tested. The suitability of the proposed grid independence test method was evaluated by the coefficient of variation of the root-mean-square error (CV(RMSE)), the coefficient of determination (R2), and the GCI.

2. Literature Review

The grid independence test was conducted as an essential process for the optimal grid design of the CFD model. However, given that the grid independence test process is not standardized, each researcher is performing tests using different methods. The random sampling method was used to select the optimal grid by comparing the CFD results for grid conditions selected randomly for different grids of the target model. It is the most extensively used grid independence test method [12] and compares the flow rate, temperature, and indicators for analysis of different simulation models to select the optimal grid. For the grid conditions, coarse, medium, and fine grids were selected and then tested [1317]. However, this method has a problem in that it selects a large grid size for the coarse grid because the grid spacing between the grid candidate groups is generally large. As a result, the medium grid was derived as the optimal grid in most studies. Furthermore, given that the difference in the number of grid cells between the medium and fine grids is also large, the spacing of the grid conditions needs to be narrowed. Consequently, many researchers are performing random sampling methods that further subdivide the grid conditions [1822]. Meanwhile, the random sampling method has the limitation of depending on the researcher’s knowledge and experience because there are no criteria applicable for the selection of the test target grid conditions. However, this deteriorates the reliability of test results because the researcher’s subjective judgment is involved in the grid independence test.

Some recent studies have proposed the optimal grid based on the grid resolution instead of the number of grids of the CFD model. Durrani et al. [23] recommended that the value of the turbulence characteristic length divided by the grid size should exceed 12 for the selection of the optimal grid of the CFD model based on the application of the large eddy simulation (LES) turbulence model. This has the advantage in that it instantly calculates the adequate grid size for CFD analysis using the aforementioned criterion if the turbulence characteristic length is known. Durrani et al. [23] derived the turbulence characteristic length for the calculation of the resolution based on CFD simulations. However, this has a problem in that it takes considerable time to calculate the grid resolution. In the FDS field, which is similar to CFD, the guideline NUREG-1824 published by the US Nuclear Regulatory Commission suggests an optimal grid density based on the grid resolution concept with respect to indoor spaces. The grid density is a value obtained by dividing the characteristic length for the fire spread of indoor spaces by the minimum grid size. A resolution range of 4–16 is recommended as the optimal resolution [11]. Kim and Lee [24] and Hassanien et al. [25] verified independence even for a grid resolution range of 16 (or higher) and recommended the optimal grid resolution range of 4–25 based on this.

3. Improvement Method for Grid Independence Test

This study proposes an improved grid independence test method using the grid resolution (Figure 1) to secure the objectivity of the conventional grid independence test. The suitable grid resolution range for simulations was 4–25 based on the findings of a previous study [11, 24, 25]. To verify the grid independence of the resolution setting in the given range, the target resolution of the grid independence test was set to be in the range of 4–32. For each resolution setting, the optimal grid resolution was evaluated by designing and simulating the CFD model. The optimal grid resolution was selected by comparing the analyzed results of the CFD model. To compare the tendency and accuracy of the calculated results at each condition, CV(RMSE) and R2 were used as the criteria for judgment in this study. The physical quantity of each coordinate was extracted from the CFD model, and the CV(RMSE) and R2 values were calculated based on the extracted physical quantity outcomes at the finest resolution of 32. The data were extracted in 0.5 m intervals for each target facility, and the test was conducted based on the flow rate data in this study. For the determination of optimal grid resolution, the criteria were applied such that CV(RMSE) was 10% or lower and R2 was 0.95 or higher. The grid resolution that satisfied these criteria was selected as the optimal resolution. If multiple resolutions satisfy the criteria, the smallest resolution at which CFD analysis can be conducted most economically is determined as the optimal condition.

3.1. Improved Grid Independence Test Using Grid Resolution for CFD Model

The conventional grid independence test determined the optimal grid by setting the number of grid as the test objects. However, this process is limited in that the researcher’s subjective judgment is involved in the process of selection of the number of grids. Given that the number of grids is dominated by the size of the analyzed target, the existence of a guideline for the optimal number of grids of CFD simulation is difficult. By contrast, the grid resolution is a dimensionless indicator for the relative density of the grid. NUREG-1824 defines the grid resolution as the ratio of the fine grid size to the characteristic length for fire spread, as shown inwhere R is the grid resolution, is the fire’s characteristic length (m), and is the representative size of the fine grid (m).

The grid resolution in (1) is a concept applied to simulations for fire spread analysis. Therefore, it must be modified to fit the CFD simulation for air flow analyses. Durrani et al. [23] defined the grid resolution of the CFD model to which the LES turbulence model was applied according towhere is the turbulence length scale (m).

The turbulence length scale is a physical quantity that represents the sizes of the eddies with considerable energy in turbulence conditions. It is calculated using the turbulence kinetic energy value and turbulence dissipation rate value derived based on CFD simulations. The LES turbulence model requires the conversion of the turbulence length to analyze the eddy, and Durrani et al. [23] performed a separate simulation for this. However, this requires more than one simulation to calculate the grid resolution, and it is unsuitable for the application of the grid independence test owing to the increased working time. In this study, the grid resolution for air-flow spread was calculated by applying the characteristic length that can be estimated using the shape information of the analysis target instead of the turbulence length scale. Characteristic length is an indicator of the hydrodynamic properties of geometry [26] and is calculated as follows:where is the characteristic length (m), is the volume of the analysis target (m3), and is the surface area of the analysis target (m2).

Characteristic length is used for the calculation of Reynolds number, which represents the flow characteristic of fluids, as expressed inwhere is the Reynolds number, ρ is the density of fluid (kg/m3), μ is the viscosity of fluid (kg/(m·s)), and is the average velocity (m/s).

As an indicator that represents the characteristics of a given flow condition, the Reynolds number is the ratio of inertial forces to viscous forces [27]. The Reynolds number represents both laminar and turbulent flows. A higher Reynolds number indicates a turbulent flow, whereas a lower Reynolds number implies a laminar flow. Because Reynolds number changes with the characteristic length, it can be considered as an influence factor of flow characteristics. Air that is the main medium of CFD is also a fluid, and the characteristic length can be calculated because the indoor space in which the air flows can be defined as a pipe system. Finally, the grid resolution was defined according towhere R is the modified grid resolution.

3.2. Judgment Criteria for Optimal Grid Resolution

The conventional grid independence test compares and analyzes the simulation results for each grid condition to determine the optimal grid. Most studies determine the optimal grid by comparing the mean velocity and temperature in the analysis target or the physical quantities within an important area. In the present study, the CV(RMSE) and R2 values were used to determine the optimal grid. CV(RMSE) measures the variability of the error as an indicator of judging the difference between the real value and the predicted value. CV(RMSE) is suitable for the evaluation of the total prediction accuracy of the model because it reflects the size of the accumulated error in more detail [28]. The CV(RMSE) was calculated withwhere is the real value, is the predicted value, and is the total number of data.

In addition, R2 was compared to analyze the tendency of all the data. R2 is a statistical index generally used to measure the uncertainty of a model and was calculated usingwhere is the mean value of .

The optimal criterion for CV(RMSE) according to Guideline 14 of American Society of Heating, Refrigerating and Air-Conditioning Engineers (ASHRAE), and the M&V Guideline of the Federal Energy Management Program is lower than 15% and 10%, respectively. In addition, the optimal criterion for R2 is suggested to be higher than 0.75 in ASHARE Guideline 14. In this study, to improve the reliability of the CFD analysis result, the grid condition that satisfies the 10% requirement (or lower) for CV(RMSE) and the value of 0.95 (or higher) for R2 were defined as the optimal condition. If multiple resolutions satisfy the criteria of the optimal grid resolution, the lowest resolution was selected as the optimal resolution.

4. Case Study for the Evaluation of an Improved Grid Independence Test

4.1. Target Model

The analyzed targets for the case study were selected as shown in Figure 2. To analyze the effect of the characteristic length on the optimal resolution, the targets for five characteristic lengths were selected. The characteristic length of each object was derived by dividing its volume by the surface area, as expressed in (3). The A type had the smallest characteristic length of 0.3, and the E type had the largest characteristic length of 1.1. Various characteristic lengths from 0.3 to 1.1 were evaluated. The volume of the target facility was the smallest in the A type and the largest in the E type in a manner similar to that for the characteristic length. The details about the floor area, height, volume, and characteristic length of each target are outlined in Table 1. For each target facility in Figure 2, the blue surface indicates the inlet and the red surface indicates the outlet.

4.2. CFD Simulation Model for Case Study

For this case study, the open-source CFD software OpenFOAM (version 1912, OpenCFD Ltd., United Kingdom) was used. In the previous study, the range of 4–25 was defined as the optimal resolution range. To verify the grid independence of the resolutions in this range, it is necessary to evaluate resolutions larger than 25. Correspondingly, independence tests were performed for eight grid resolutions in total (4, 8, 12, 16, 20, 24, 28, and 32) for different analysis targets. The minimum grid size that satisfied the resolution condition for each target model was selected using the characteristic length in Table 1, and the CFD model was designed based on this. Hexahedron grids were applied to configure a high-quality grid system, and the grids were designed using cfMesh. Finally, structured grids were designed for each resolution. To verify the independence test method using grid resolution, all conditions (turbulence model, boundary conditions, and computation conditions) were equally configured, except for grid resolution. Boundary layers were not applied in this study due to their potential impact on the total number of grids and grid resolution.

Air flow analysis for steady state was performed to extract the simulation results for each resolution condition. For the solver for CFD simulation, the turbulence analysis solver for incompressible gas simpleFoam was used. A standard kε model was used as the turbulence model. The boundary conditions for the inlet, outlet, and walls of each target facility were set as the Inlet, Outlet, and Wall, respectively. Air flowed in at a velocity of 1.0 m/s through the inlet, and the same turbulent kinetic energy of 3.75E − 3 m3/m2 was applied based on the consideration of the inflow wind velocity and turbulence intensity. The turbulence dissipation rate was calculated by reflecting the characteristic length of each target facility, and other detailed boundary conditions are listed in Table 2. The optimal grid resolution was analyzed by applying eight resolution conditions to five target facilities in total.

4.3. Comparison with GCI Index for Evaluation of Proposed Grid Independence Test

To determine the suitability of the optimal grid resolution derived through the proposed grid independence test method and the case study, it was verified through the GCI proposed by [9]. The GCI is an indicator used for the determination of the optimal grid by calculating the convergence error of the grid based on Richardson’s extrapolation. As an indicator that quantifies the error of the numerical analysis by grid, it is used to determine the adequacy of the grid. To calculate the GCI, the grid refinement ratio () was calculated usingwhere is the number of grids of the fine grid condition and is the number of grids of the coarse grid condition.

For the grid refinement ratio, a higher value than 1.3 is recommended to distinguish the discrete error from other errors [29]. In this study, the optimal grid resolution derived through the grid independence test was defined as the medium grid. Using this grid as the reference, the coarse and fine grids among the grid resolutions satisfy the grid refinement ratio were defined. The GCI was calculated according to Richardson’s extrapolation withwhere is the safety factor, is the order of convergence, and is the relative error of two grid conditions in the simulation.

The value of 1.25 is used for when comparing three or more grids [25]. is calculated as follows:where , , and are the numerical solutions in the coarse, medium, and fine grid conditions, respectively.

In this case, denotes the error of the numerical solution for each grid condition and is calculated with

The numerical solution error of the GCI was calculated by the mean wind velocity of each CFD model. Based on this, the GCI between the fine and medium grids and between the medium and coarse grids were calculated with (9). A larger GCI value denotes a larger error according to the grid, and this implies that a fine grid design is required. The adequacy of the medium grid was determined by comparing the GCI between the coarse and medium grids and between the medium and fine grids.

5. Evaluation of Improved Grid Independence Test

5.1. Optimal Grid Resolution by Using the Improve Grid Independence Test

A case study was conducted based on the proposed grid independence test, and the results are listed in Tables 3 and 4. In the case of A type with the smallest volume and characteristic length, a grid resolution condition equal to 8 was derived as the optimal grid resolution. As the volume and characteristic length of the target increases, the optimal grid resolution also increases. In the case of B type, the resolution condition of 16 was derived as the optimal resolution. For the C, D, and E types that have larger volumes and characteristic lengths, the grid resolution condition of 24 was determined as the optimal resolution. Furthermore, for targets with large volumes, as the resolution decreased, the value of CV(RMSE) increased. This indicated an inadequate grid design in terms of accuracy. As the volume and characteristic length increased, the space for analyzing the fluid and the flow complexity also increased. Thus, it was analyzed that when the volume and characteristic length were larger, independence was achieved at a finer grid condition.

Figure 3 illustrates the grid models for E type at grid resolutions 4 and 24. Figure 4 shows the velocity distribution at the middle height in the model at the grid resolution conditions of 4, 24, and 32, in the case of E type. At the optimal grid resolution of 24 and the finest grid resolution of 32, similar qualitative velocity distributions were generated, as shown in Figure 4(a). By contrast, at the grid resolution of 4, the grids were not fine, and relatively large grids were formed. This resulted in air flow unlike the fluid flow of the finest grid resolution. In particular, it can be shown that the flow distributions near the outlet showed a distinct difference. Similar flows through the outlet were observed at the resolution conditions of 24 and 32, but at the resolution condition of 4, the flow was closer to the wall on the right side. The velocity vector field in Figure 4(b) also showed a difference. Thus, the resolution of 24 ensured independence based on the derivation of a numerical solution that is similar to that of the finest resolution of 32. However, when the grid resolution was equal to 4, a different flow distribution was obtained from that of the grid resolution condition of 32 that suggested the need for grid improvement. This flow difference caused a difference in the R2 values at different grid conditions as shown in Figure 5. Based on the qualitative flow analysis results, it can be determined that the grid independence test method using grid resolution proposed in this study can derive the optimal grid resolution that is consistent with the real air flow distribution.

The optimal resolutions derived for each analysis target are listed in Table 5. All the optimal grid resolutions derived through case study were included in the optimal resolution range of the previous study (4–25). Therefore, the grid resolution calculation method proposed in this study and the grid independence test method were found to be appropriate. Meanwhile, when the characteristic length was larger than 0.7, the optimal grid resolution of 24 was derived under every condition. Hence, it can be inferred that the optimal grid design is possible with a resolution of 24 when the CFD simulation is performed for facilities with a characteristic length of 0.7 or higher.

5.2. Evaluation of Improved Grid Independence Test by Using GCI

To verify the suitability of the optimal grid resolution evaluated through the proposed grid independence test, GCI was calculated. The medium grid for GCI calculation was specified as the optimal grid resolution derived for each target, and the fine and coarse grids were selected to obtain a grid refinement ratio higher than 1.3. The grid specified for each target and the grid refinement ratio calculated based on this are shown in Table 6. In addition, is the grid refinement ratio between the coarse and the medium grids, whereas is the grid refinement ratio between the medium and the fine grids. These satisfied the criterion as the grid refinement ratio was higher than 1.3 at every condition.

The GCI calculation results for the conditions in Table 6 are listed in Table 7. For all the five types tested herein, the that evaluated the numerical solution error of the fine grid and medium grid was 1% or lower. In particular, almost no error was generated in the cases of the B, C, and D types. This means that (a) the numerical solutions of the fine and medium grids generated almost the same numerical results and (b) the medium grid had sufficient independence. In contrast, the value use for the evaluation of the numerical error between the medium and coarse grids yielded high-error rates (>5%) in the cases of all the five types studied herein. In particular, for the E type with the largest characteristic length, the value was evaluated to be very large at 27.08. This indicated that the analysis that used the coarse grid was inadequate. In every case, large numerical solution errors occurred owing to the poor coarse grid. This indicated that the analysis with a coarse grid was inadequate. Therefore, for all the five types studied herein, the medium grid was evaluated as the optimal grid. This verified the suitability of the method proposed in this study.

6. Conclusions

A modified grid independence test using grid resolution was proposed to improve the disadvantages of the conventional method. The verified optimal range of the grid resolution was defined as the grid conditions for test that excluded subjective judgment that occurred in the existing method. Furthermore, the grid resolution was calculated using the hydrodynamic characteristic length that can be calculated using the shape information of the building. Finally, the optimal grid resolution was evaluated based on the grid independence test instead of the optimal number of grids.

A case study was conducted based on the application of the method proposed in this study. For this case study, five targets of different characteristic lengths were selected, and the independence tests were conducted. As the characteristic length increased, the optimal grid resolution also increased. In particular, the optimal grid resolution was evaluated to be equal to 24 in the cases of types C, D, and E, with a characteristic length of 0.7 or higher. This confirmed that a resolution equal to 24 can be applied as the optimal grid resolution for targets with characteristic lengths of 0.7 or higher. The optimal grid resolution derived from the case study was included in the acceptable resolution range of 4–25 based on the findings of a previous study. This confirmed the suitability of the grid resolution calculation method and the grid independence test process. Furthermore, the GCI was calculated to verify the suitability of the proposed method in comparison with the conventional method.

The objectivity of the grid design is most important in CFD analyses and can be improved using the proposed method in this study. The CFD grid design depended on the researcher’s experience and knowledge; however, this could be improved based on the proposed method. The conventional independence test based on the number of grids could not attain the optimal grid standard that is generally applicable to the CFD model. On the contrary, it will be possible to improve this with the proposed method using the optimal grid resolution. The case study results showed different optimal resolutions according to the characteristic length. Specifically, a resolution of 24 was evaluated as the optimal resolution condition for targets with 0.7 or higher characteristic lengths. It is believed that if sufficient data can be obtained in the future, the optimal grid resolution could be presented based on the characteristic length.

The primary goal of this study was to verify the modified grid independence test method, which is applicable to building a CFD model via simulation. Therefore, field experiment or scaled model experiment was not conducted in this study. Field experiment will be performed in future studies, along with simulations to enhance the accuracy of the proposed method and the reliability of an optimal grid resolution derived thereby. Additionally, the effect of boundary layer mesh will be analyzed to improve the proposed grid independence test method in future studies.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

This work was supported by the Kodrea Agency for Infrastructure Technology Advancement (KAIA) grant funded by the Ministry of Land, Infrastructure and Transport (Grant 20CTAP-C152000-02).