.Buildings.ThermalZones.Detailed.UsersGuide.CFD

Information

The model Buildings.ThermalZones.Detailed.CFD is a room model in which the room air heat and mass balance is computed using the Computational Fluid Dynamics (CFD).

The model is identical with Buildings.ThermalZones.Detailed.MixedAir, except for the following points:

A description of the model assumptions and the implemention and validation of this room model can be found in Zuo et al. (2016) and in Zuo et al. (2014).

Conventions

The following conventions are made:

The quantities that are exchanged between the programs are defined as follows:

Implementation

This section explains how the data exchange between Modelica and CFD is implemented. The section is only of interest to developers. Users may skip this section.

Interface to Modelica models

Interfacing CFD with the Modelica room air heat and mass balance is done in the model Buildings.ThermalZones.Detailed.BaseClasses.CFDAirHeatMassBalance. To interface variables from Modelica and CFD, the following classes and conventions are used in this model.

Data exchange with CFD

The data exchange with the CFD interface is done through the instance cfd, and implemented in Buildings.ThermalZones.Detailed.BaseClasses.CFDExchange. This block exchanges the following data with the CFD simulation:

During the initialzation, the following data are sent from Modelica to CFD:

During the time integration, and array u is sent from Modelica to CFD, and Modelica receives an array y from CFD. The elements of the array u are as follows:

  1. Either temperature or heat flow rate boundary conditions, in the same order as the array name. The units are [K] or [W]. The array bouCon that is sent during the initialization declares the type of boundary condition. There are nSur elements for surfaces.
  2. If at least one window in the room has a shade, then the next nConExtWin elements are the shading control signals. u=0 means that the shade is not deployed, and u=1 means that the shade is completely deployed (blocking solar radiation). If there is no window in the room, then these elements are not present.
  3. If at least one window in the room has a shade, then the next nConExtWin elements are the radiations in [W] that are absorbed by the respective shades. If there is no window in the room, then these elements are not present.
  4. The convective sensible heat input into the room in [W], which is a scalar. A positive value means that heat is added to the room.
  5. The latent heat input into the room in [W], which is a scalar. A positive value means that moisture is added to the room.
  6. The next element is the room average static pressure in [Pa].
  7. The next nPorts elements are the mass flow rates into the room in [kg/s]. A positive value is used if the air flows into the room, otherwise the value is negative. The first element is connected to ports[1], the second to ports[2] etc.
  8. The next nPorts elements are the air temperatures that the medium has if it were flowing into the room, e.g., the "inflowing medium" computed based on inStream(h_outflow).
  9. The next nPorts*Medium.nXi elements are the species concentration of the inflowing medium. The first Medium.nXi elements are for port 1, then for port 2 etc. The units are in [kg/kg] total mass, and not in [kg/kg] dry air.
  10. The next nPorts*Medium.nC elements are the trace substances of the inflowing medium. The first Medium.nC elements are for port 1, then for port 2 etc.
The elements of the array y that is sent from CFD to Modelica are as follows:
  1. Either temperature or heat flow rate at the surfaces, in the same order as the array name. The array bouCon that is sent during the initialization declares the type of boundary condition. If bouCon[i] = 1, then heat flow rate in [W] is sent from CFD to Modelica. If bouCon[i] = 2, then temperature in [K] is sent from CFD to Modelica. There are nSur elements for surfaces.
  2. The average room air temperature in [K].
  3. If the room has at least one window with a shade, then the next nConExtWin elements are the temperature of the shade in [K].
  4. The next nPorts elements are the air temperatures in [K] of the cells that are connected to the inlet or outlet diffusor of ports[1], ports[2], etc..
  5. The next nPorts*Medium.nXi elements are the species concentration of the cells to which the ports are connected. The first Medium.nXi elements are for port 1, then for port 2 etc. The units are in [kg/kg] total mass, and not in [kg/kg] dry air.
  6. The next nPorts*Medium.nC elements are the trace substances of the cells to which the ports are connected to. The first Medium.nC elements are for port 1, then for port 2 etc.

References

Wangda Zuo, Michael Wetter, Wei Tian, Dan Li, Mingang Jin, Qingyan Chen.
Coupling Indoor Airflow, HVAC, Control and Building Envelope Heat Transfer in the Modelica Buildings Library.
Journal of Building Performance Simulation, 9(4), pp. 366-381, 2016.
http://dx.doi.org/10.1080/19401493.2015.1062557.

Wangda Zuo, Michael Wetter, Dan Li, Mingang Jin, Wei Tian, Qingyan Chen.
Coupled Simulation of Indoor Environment, HVAC and Control System by Using Fast Fluid Dynamics and the Modelica Buildings Library.
Proc. of the 2014 ASHRAE/IBPSA-USA Building Simulation Conference, Atlanta, GA, September 10-12, 2014.


Generated at 2024-03-27T19:15:56Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos