# Development of Building CFD Model Design Process Based on BIM
## 3 Design Method of Optimized CFD Model Using BIM
### Attribute Data Matching  
To generate the attribute data of the CFD model, the material layer was analyzed by tracking the reference relationships of IFC objects from attribute objects, such as IfcWall. Tuple data types consisting of the material name and thickness were extracted from the material layer and matched to the CFD model. Thermal properties were also extracted from the information in the IfcMaterial entity and entered into the CFD model. However, thermal properties, such as thermal transmittance, are not mandatory, unlike the material names that must be entered in the IfcMaterial entity. Therefore, information, such as the thermal transmittance required for environmental assessment, may be omitted.  
The material database was built to input thermal characteristic values into the CFD model. The material name entered in IFC was searched in the building material database. The thermal transmittance of the most similar material was specified as the thermal characteristic value of that material. The material matching algorithm between two sets of data was implemented based on the similarity between strings through the Levenshtein distance. The Levenshtein distance is the minimum number of single-character edits required  
Figure 2: Example of geometry simplification function.  
to change two strings into the same data. The Levenshtein distance between \(a\) and \(b\) is calculated, as shown in Equation (1). In here, \(1_{(a_{i}\
eq b_{j})}\) is 1 when \(a_{i}=b_{j}\) and 0 when \(a_{i}\
eq b_{j}\).x  
\[\leq\ \mathbf{v_{a,b}}(\mathbf{i,j})=\left\{\begin{array}{ll}\max(i,j)&if\ \min(i,j)=0\\ &\leq v_{a,b}(i-1,j)+1\\ min\left\{\begin{array}{ll}&\leq v_{a,b}(i,j-1)+1\\ &\leq v_{a,b}(i-1,j-1)+1\\ \leq v_{a,b}(i-1,j-1)+1_{(a_{i}\
eq b_{j})}\end{array}\right.&otherwise\end{array}\right. \tag{1}\]  
where, \(\leq\mathbf{v_{a,b}}(\mathbf{i,j})\) is Levenshtein distance between the \(i\)-th letter of \(a\) and the \(j\)-th letter of \(b\).  
The similarity was evaluated by the score that standardizes the Levenshtein distance to the length of the target word. The material with the highest score was determined as the same material as the material in the IFC file. The Levenshtein distance can also vary even in the same material depending on the difference of delimiters, such as spaces in the name string, and the order of the words. Taking this into account, the Token Set ratio function, which evaluates the similarity of individual constituent words, was also used to evaluate similarity. Based on the results of assessing the similarity, the thermal transmittance of the material considered to be the same was returned. The thermal characteristic type of the boundary surface is set by wallHeatTransfer, therefore thermal diffusivity is required as a thermal characteristic value. The thermal transmittance returned by the database was entered after converting it into thermal diffusivity, as shown in Equation (2) below. The specific heat capacity and density of the material required for conversion were used values included in the material database.  
\[\alpha=\frac{\lambda}{\rho c_{p}} \tag{2}\]  
where, \(\alpha\) is thermal diffusivity (m\({}^{2}\)/s), \(\lambda\) is thermal conductivity (W/(m\(\cdot\)K)), \(\rho\) is density (kg/m\({}^{3}\)), and \(c_{p}\) is specific heat capacity (J/(kg\(\cdot\)K)).  
Finally, the thermal diffusivity, material name, and thickness data extracted from IFC were entered as attribute data in the OpenFOAM CFD model.