Model that is used as a container for a single thermal zone that is 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 zone and 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.ThermalZone shows how a simple thermal zone 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
.
This adapter has a vector of fluid ports called ports[nPorts]
which needs to be connected to the air volume of the thermal zone.
At this port, air exchanged between the thermal zone, the HVAC system
and any infiltration flow paths.
This model has input signals fluPor[nPorts]
, which carry
the mass flow rate for each flow that is connected to ports
, 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 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.
The zone air temperature,
the 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.backward
.
These signals are the same as the inflowing fluid stream(s)
at the port theAdaZon.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 nPorts
ports[1:nPorts]
need to be connected as demonstrated in the example
AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone.
Name | Description |
---|---|
Medium | Medium in the component |