Model that is used as a container for a multiple thermal zones that are to be exported as an FMU.
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 thatnPorts
.
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.
Name | Description |
---|---|
Medium | Medium in the component |