AixLib.Fluid.FMI.ExportContainers.ThermalZones

# .AixLib.Fluid.FMI.ExportContainers.ThermalZones

Partial block to export a model of multiple thermal zones as an FMU

## Information

Model that is used as a container for a multiple thermal zones that are to be exported as an FMU.

#### Typical use and important parameters

To use this model as a container for an FMU, extend from this model, rather than instantiate it, add your thermal zones. For each thermal zone, add a vector of mass flow rate sensors. By extending from this model, the top-level signal connectors on the left stay at the top-level, and hence will be visible at the FMI interface.

Note that

- A vector of mass flow rate sensors is used to connect one element of the thermal zone adapter with one thermal zone.
- The size of the thermal zone adapter must be the same as the number of vectors of mass flow rate sensors.
- The vector of mass flow rate sensors must have the size `nPorts`.
- All fluid ports of the mass flow rate sensor must be connected.
- If mass flow rate sensors are not used, and your themal zone has fluid ports which are autosized, then a direct connection between an element of the thermal zone adpater `theZonAda` and your thermal zone will be rejected. The reason is because autosized fluid ports can only be connected to vector of ports whose sizes are literal.

The example AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones shows how multiple simple thermal zones can be implemented and exported as an FMU.

The conversion between the fluid ports and signal ports is done in the thermal zone adapter `theZonAda[nZon]`. This adapter has a vector of fluid ports called `ports[nPorts]` which needs to be connected to the air volume of the thermal zones. At this port, air exchanged between the thermal zones, the HVAC system and any infiltration flow paths.

This model has input signals `fluPor[nZon, nPorts]` which carry the mass flow rate for each flow that is connected to `ports[1:nPorts]` for the respective zone, together with its temperature, water vapor mass fraction per total mass of the air (not per kg dry air), and trace substances. These quantities are always as if the flow enters the respective room, even if the flow is zero or negative. If a medium has no moisture, e.g., if `Medium.nXi=0`, or if it has no trace substances, e.g., if `Medium.nC=0`, then the output signal for these properties are removed. Thus, a thermal zone model that uses these signals to compute the heat added by the HVAC system need to implement an equation such as

Qsen = max(0, ṁsup) cp (Tsup - Tair,zon),

where Qsen is the sensible heat flow rate added to the thermal zone, ṁsup is the supply air mass flow rate from the port `fluPor` (which is negative if it is an exhaust), cp is the specific heat capacity at constant pressure, Tsup is the supply air temperature and Tair,zon is the zone air temperature. Note that without the max(·, ·), the energy balance would be wrong. For example, the control volumes in AixLib.Fluid.MixingVolumes implement such a max(·, ·) function.

For each zone, its air temperature, water vapor mass fraction per total mass of the air (unless `Medium.nXi=0`) and trace substances (unless `Medium.nC=0`) can be obtained from the outupt connector `fluPor[1:nZon].backward`. These signals are the same as the inflowing fluid stream(s) at the port `theAdaZon[1:nZon].ports[1:nPorts]`. The fluid connector `ports[nPorts]` has a prescribed mass flow rate, but it does not set any pressure.

This model has a user-defined parameter `nPorts` which sets the number of fluid ports, which in turn is used for the ports `fluPor` and `ports`. All zones must have the same number of fluid ports `nPorts`. All `nPorts` `ports[1:nPorts]` need to be connected as demonstrated in the example AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones.

## Contents

Name | Description
--- | ---
Medium | Medium in the component

## Revisions

- January 18, 2019, by Jianjun Hu:
  Limited the media choice to moist air. See #1050.
- September 20, 2016, by Thierry S. Nouidui:
  Revised documentation to explain the rationale of needing mass flow rate sensors.
- June 29, 2016, by Michael Wetter:
  Revised implementation and documentation.
- April 27, 2016, by Thierry S. Nouidui:
  First implementation.

Generated at 2026-05-09T18:18:56Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos