Appendix A.1
In the present work, OpenFOAM version 8.1 is used with the
buoyantSimpleFoam solver to address steady-state flow problems. Generally, OpenFOAM solvers are organized in folders that separate the initial and boundary conditions for the simulation. Parameters can be adjusted to characterize the flow according to the user’s requirements.
Figure A1 displays the code’s directory structure.
With files located in the “0”, “constant”, and “system” directories, it becomes possible to adjust input parameters, boundary conditions, turbulence models, analysis geometries, mesh configurations and refinements, and simulation intervals. This stage is referred to as “preprocessing”.
In the “0” folder, files related to problem variables, their initial conditions, and boundary conditions are located. According to the directory structure, this folder contains data relevant to the turbulence model (alphat, epsilon, k, and nut), pressure values (P), static pressure minus gauge pressure (“”), temperature (T), and velocity (U).
Figure A1.
Directory structure of buoyantSimpleFoam.
Figure A1.
Directory structure of buoyantSimpleFoam.
The constant directory stores values considered constant for the simulation, such as the gravitational acceleration (g). The turbulence model and its constants are included in momentumTransport. The fluid’s thermophysical properties are adjusted in the thermophysicalProperties file, enabling adaptation of the Prandtl Number and dynamic viscosity for the specific fluid.
Finally, in the “system” folder, the mesh configuration and simulation geometry are specified in the blockMeshDict file. Simulation time and data storage intervals are edited in controlDict. Although the algorithm in the OpenFOAM library has default data, it allows for adjusting values according to the required analysis and adding specific flow characteristics to be simulated.
The choice of interpolation functions is applied in the
fvSchemes section. According to [
20,
21,
22], the purpose of the interpolation function is to provide relationships between nodal points so that it is possible to calculate the value of the function and its derivatives at control volume interfaces. The aim is to propose a function with minimal error, involving the fewest nodal points necessary to generate a matrix.
Figure A2 indicates the interpolation function used for each term of the simulation.
Figure A2.
File of interpolation functions.
Figure A2.
File of interpolation functions.
It is noted that two interpolation methods were used in the simulations: linear and upwind. This choice was based on studying the impact of interpolation functions on OpenFOAM results compared with the literature. Applying the upwind interpolation method to the divergence term for turbulent kinetic energy led to improved results.
In the
fvSolution file, convergence criteria, relaxation factors, and solver applications for the simulation are defined.
Figure A3 presents the adopted values for all simulated cases.
Figure A3.
File for defining solvers, algorithms, tolerances, and relaxation factors.
Figure A3.
File for defining solvers, algorithms, tolerances, and relaxation factors.
In OpenFOAM, the turbulence model is implemented in the
momentumTransport file, where the model is selected, allowing for changes to constants from the default model if necessary (see
Figure A4).
Figure A4.
File for turbulence model.
Figure A4.
File for turbulence model.
Thermophysical properties are adjusted in the
thermophysicalProperties file. Thus, properties like Prandtl Number, dynamic viscosity, and the equation of state are set according to the working fluid, in this case, air. The Boussinesq approximation, applied as the equation of state in the energy balance equation (Equation (
5)), requires values for
, reference temperature, and reference density (see
Figure A5). Values were assigned considering air as an ideal gas at 300 K.
Figure A5.
File for Thermophysical Properties.
Figure A5.
File for Thermophysical Properties.
In the U file, velocity can be assigned for each boundary in the simulation geometry. Boundaries with no-slip conditions are labeled as
noSlip. The boundary where air enters (inlet) has a fixed air velocity value.
Figure A6 shows the velocity configuration file representing the flow simulated of the
Table 1, following [
13].
Figure A6.
File for velocity boundary conditions.
Figure A6.
File for velocity boundary conditions.
In OpenFOAM, the temperature gradient value is set in the
T file for constant heat flux. Thus, the temperature gradient must be calculated based on the heat flux for each room surface except the inlet and outlet, see Equation (
12). The inlet face sets the supply air temperature, while the outlet adopts a zero-gradient temperature boundary condition, which calculates temperature based on air thermal conductivity
, as shown in
Figure A7.
Figure A7.
File for energy boundary conditions.
Figure A7.
File for energy boundary conditions.
The solver used in the OpenFOAM simulation is modified in the
controlDict file. In this command, the
buoyantSimpleFoam solver is specified. The number of iterations and data logging intervals are also modified in this file, as shown in
Figure A8.
The checkMesh command verifies any errors in the generated mesh. The numerical solution is obtained by implementing the buoyantSimpleFoam command, which performs calculations to achieve convergence.
Visual analysis of results is conducted in ParaView software using the paraFoam command in the Linux terminal. These programs were chosen as they are open-source, as is OpenFOAM. This approach allows visualization and extraction of simulation data. Data can also be exported to spreadsheets to create velocity, temperature, or pressure graphs related to the flow.
Figure A8.
ControlDict File.
Figure A8.
ControlDict File.