*3.1. Physical Model*

The physical graphic of the ancient building is shown in Figure 2. The main area of the ancient building is 26.63 m2, and the height of the hard roof is 2.73 m. Its building envelope structure mainly includes a roof, walls, doors and windows, and indoor floors composed of a variety of building structures and components of different materials. The specific structure and its adjustment effect on the environment are shown in Table 1. Table 2 shows the dimensions of the ancient building envelope.

**Figure 2.** Elevation of a palace-style wooden ancient building in Beijing: (**a**) south elevation and (**b**) west elevation.


**Table 1.** Composition and role of the ancient architecture building envelope.

**Table 2.** Envelope-sized building table.


Note: The thickness of the east–west wall is 505 mm; the thickness of the north–south wall is 624 mm.

In the room, the release of water vapor comes mainly from the ground and walls, and water vapor can be used as a medium between the two. Due to differences in indoor and outdoor pressure and no mechanical equipment, the air is only penetrated by opening the window, and the density of air in and out is small. The wet environment near the window is close to the wet outdoor environment, and the wet air in the room penetrates the outdoors through the window.

After simplifying the physical graphic, the building structure of the physical model is shown in Figure 3.

**Figure 3.** Structure of a palace-style wooden ancient building in Beijing.

#### *3.2. Mathematical Model*

#### 3.2.1. Basic Assumptions

In this study, the ground and wall are set as the wet source, and the effects of ground soil moisture and wall moisture on the relative humidity inside the room are simulated, respectively. To simplify the simulation, the actual physical process is assumed as follows:


#### 3.2.2. Governing Equations

Based on the physical model and basic assumptions, the governing equations in this paper are outlined as follows.

Continuity equation:

$$\operatorname{div}(\mathcal{U}) = 0 \tag{2}$$

Momentum equation:

$$\operatorname{div}(\operatorname{u}\mathcal{U}) = -\frac{1}{\rho} \frac{\partial p}{\partial \mathbf{x}} + \operatorname{div}(\operatorname{v}\mathbf{grad}\mathbf{u}) \tag{3}$$

$$div(v\mathcal{U}) = -\frac{1}{\rho}\frac{\partial p}{\partial y} + div(v\mathcal{g}\mathcal{F}\mathcal{U})\tag{4}$$

$$\operatorname{div}(\omega \iota \mathcal{U}) = -\frac{1}{\rho} \frac{\partial p}{\partial z} + \operatorname{div}(\upsilon \operatorname{grad} \omega) \tag{5}$$

Energy equation:

$$\operatorname{div}(\rho T \mathcal{U}) = \operatorname{div}\left(\frac{\lambda}{c\_P} \mathbf{grad} \mathcal{T}\right) + \mathcal{S}\_T \tag{6}$$

The ideal gas equation of state:

$$
\mathfrak{p} = \mathfrak{p} \mathbb{RT} \tag{7}
$$

where <sup>ρ</sup> is the fluid density, g/cm3; *cp* is the specific heat capacity of fluid, J/(kg·K);

λ is the thermal conductivity; W/(m·K) and **U** are the velocity vectors; T is the thermodynamic temperature; K. *ν* is the kinematic viscosity of the fluid; m2/s and *ST* are the viscous dissipation terms.

Due to the existence of the moat, the ground dissipates moisture. The windows of ancient buildings are made of wooden materials, which have poor sealing performance, resulting in a pressure difference between indoors and outdoors, causing some moisture to dissipate and diffuse from the outside to the inside. Therefore, in the simulation procedure, it is considered that the airflow in the ancient building blows upwards from the ground. The standard model is used for simulation analysis [27]. In the near wall region, the flow state is laminar and has a low Reynolds number, with a ground average Reynolds number of 1.2109, which is processed using the wall function method.

The floor and walls are made of grey bricks. The thermal conductivity of grey brick is 0.265 W/(m·K). The water vapor diffusion coefficient is 2.92 × <sup>10</sup><sup>13</sup> kW·kg/(Pa·m·s). The heat flux of the building envelope and the parameters of the indoor environment are shown in Tables 3 and 4.


**Table 3.** Heat flux values of the building envelope.

**Table 4.** Indoor environmental parameters table.


#### *3.3. Grid Partitioning and Irrelevance Verification*

## 3.3.1. Grid Division

Grid generation is very important in CFD (Computational Fluid Dynamics) simulations, which seriously affects the accuracy of CFD simulations by the quality of the generated grid [17]. In this work, a combination of tetrahedral and hexahedral grid types is used to mesh the building. Due to the high accuracy and quality of structural grids, a combination of tetrahedral and hexahedral grids is chosen as the structural grid. The length (X) of the computational region is 6.816 m, the width (Y) is 5.554 m, and the height (Z) is 5.366 m. The number of grids in the X-direction is 97, the number of grids in the Y-direction is 79, and the number of grids in the Z-direction is 77. The average value of this grid quality is 0.77, the grid cell size is 0.07 m, and the number of grids is 1,085,324. At the same time, boundary conditions and local encryption were used. The grids of the ground and the south corner of the palace-style building were encrypted, and the number of grids after encryption is 3,307,497. The results of local encryption are shown in Figure 4a. The results of grid division are shown in Figure 4b.

**Figure 4.** Grid division of a palace-style ancient building model in Beijing: (**a**) local encrypted grid division and (**b**) overall meshing diagram.

#### 3.3.2. Grid Independence Verification

To ensure the accuracy of the calculation results, the generated grids are verified for independence [26]. The following grids all converge monotonically, which are presented in Table 5. Comparing the data in Table 5, the grid independence verification is performed with the value of the average relative humidity on the ground as the reference variable. Grade 3 is closer to grade 1 than the other grades in terms of average relative humidity. In addition, the calculation time of grade 3 is much less than that of grade 1, which can reduce the calculation time to a certain extent. Therefore, grade 3 is selected for the

simulation study in this work. At this time, the number of grids is about 1.08 million, the grid cell size is 0.07 m, and the grid quality is good, which can meet the requirements of calculation accuracy.


