10 Examples
10 Examples
Volume 10
Examples
Revision history
2017-02 For TRNSYS 18.00.0000
Notice
This report was prepared as an account of work partially sponsored by the United States Government. Neither
the United States or the United States Department of Energy, nor any of their employees, nor any of their
contractors, subcontractors, or employees, including but not limited to the University of Wisconsin Solar Energy
Laboratory, makes any warranty, expressed or implied, or assumes any liability or responsibility for the accuracy,
completeness or usefulness of any information, apparatus, product or process disclosed, or represents that its
use would not infringe privately owned rights.
The software described in this document is furnished under a license agreement. This manual and the software
may be used or copied only under the terms of the license agreement. Except as permitted by any such license,
no part of this manual may be copied or reproduced in any form or by any means without prior written consent
from the Solar Energy Laboratory, University of Wisconsin-Madison or Thermal Energy System Specialists, LLC.
10–2
TRNSYS 18 – Examples
TRNSYS Contributors
Additional contributors who developed components that have been included in the Standard Library are listed in
Volume 4.
Contributors to the building model (Type 56) and its interface (TRNBuild) are listed in Volume 5.
10–3
TRNSYS 18 – Examples
TABLE OF CONTENTS
10. EXAMPLES 10–5
10.1. HVAC System 1: Packaged Terminal Air Conditioners with Hot Water Coils 10–6
10.2. HVAC System 2: Packaged Terminal Heat Pumps 10–11
10.3. HVAC System 3: Packaged Rooftop Air Conditioners with Fossil Fuel Furnaces 10–15
10.4. HVAC System 4: Packaged Rooftop Heat Pumps 10–19
10.5. HVAC System 5: Packaged Rooftop Variable Air Volume (VAV) with Direct Expansion Cooling and Hot
Water Coil Heat/Reheat 10–23
10.6. HVAC System 6: Packaged Rooftop Variable Air Volume (VAV) with Parallel Fan Powered (PFP) Boxes,
Direct Expansion Cooling and Electric Resistance Heat/Reheat 10–28
10.7. HVAC System 7: Packaged Rooftop Variable Air Volume (VAV) with Chilled Water Cooling and Hot Water
Coil Heat/Reheat 10–33
10.8. HVAC System 8: Packaged Rooftop Variable Air Volume (VAV) with Parallel Fan Powered (PFP) Boxes,
Chilled Water Cooling and Electric Resistance Heat/Reheat 10–39
10.9. Solar Domestic Water Heater (SDHW) 10–44
10.10. Wind Diesel PV with Battery Backup 10–46
10.11. Stand Alone Power System 10–49
10.12. Additional TRNSYS Examples 10–54
10–4
TRNSYS 18 – Examples
10. EXAMPLES
This manual documents some of the examples that are provided with TRNSYS. Each example has its own
purpose; some are meant to be instructional while others are set up in the hopes that they can be used as
templates from which users can begin their own system simulations.
10–5
TRNSYS 18 – Examples
A few important notes. First, it is assumed that a simulation has previously been carried out to determine the peak
heating and cooling load for each of the five zones in the building. Second, it is important to note that this example
does not by any means represent the only way that this HVAC system. The system is modeled in such a way as
to allow the user to resize the components and equipment with as little effort as possible.
Location: ..\%TRNSYS18%\Examples\HVACTemplates\System1.tpf
10.1.3.1. Thermostat
Each zone is equipped with a thermostat that monitors the zone air temperature and that turns on a heating
control signal if the room air temperature falls below 21C and a cooling control signal if the room air temperature
rises above 26C.
10.1.3.3. Fan
Each zone has a constant speed fan that is either on or off. An equation in the equation block is used such that
the fan runs continuously during building occupied hours and cycles on and off as controlled by the thermostat
during building unoccupied hours. Note that three of the fan’s parameters (rated volumetric flow rate, rated power,
and motor efficiency) are set by defining variable names in the equation block.
10.1.3.6. Pump
Each unitary HVAC system is equipped with a liquid pump. These pumps are “virtual” in that they consume no
power. They are included as a convenient way to control (turn on and off) the flow of hot water that is served to
the hot water coil in each system. As with the fan and heating coil the pump is sized by equations in the equation
block.
10–7
TRNSYS 18 – Examples
HCap_XXXX This equation sets the heating capacity of the unitary system. The value in parenthesis is
the peak heating load in kW for the zone multiplied by 1.25 to provide a factor of safety. The
3600 multiplier converts from kW to kJ/h, the units desired by other equations. When using
this unitary system as a template users will need to set the value in parenthesis.
CCap_XXXX This equation sets to total cooling capacity of the unitary system. The value in parenthesis is
the peak total cooling load in kW for the zone multiplied by 1.15 to provide a factor of safety.
The 3600 multiplier converts from kW to kJ/h, the units desired by other equations. When
using this unitary system as a template users will need to set the value in parenthesis.
effFan_XXXX This equation sets the fan efficiency. When using this unitary system as a template users
will need to set the value in parenthesis.
HCliqFlow_XXXX This equation sets the rated flow rate for the heating coil. There are two ways in which this
value might be set. First (and preferred) is to find specifications of an actual heating coil
available from manufacturers’ websites and to enter those values. Second is to scale the
default liquid flow rate up or down in proportion to the ratio of the required coil capacity to
the default coil capacity. Note that the actual flow rate of liquid delivered to the heating coil
is determined by the final equation in this block. When using this unitary system as a
template users will need to set the value in parenthesis.
HCAirFlow_XXXX This equation sets the rated air flow rate for the heating coil. Note that this is not necessarily
the actual flow rate for the coil. The actual flow rate of air is determined by another equation
in the block and is given to the heating coil as an input from the fan model. The rated
heating coil air flow rate should be set using the same method as was used to set the liquid
flow rate. When using this unitary system as a template users will need to set the value in
parenthesis.
pCondFan_XXXX This equation computes the power consumed by the PTAC’s condenser fan. Note that
condenser fan power is not included in the fan power allowance that is computed by a later
equation. When using this unitary system as a template users will need to set the value in
parenthesis to the condenser fan power in units of kW.
lps_XXXX This equation automatically calculates the air flow rate that will be maintained by the unitary
HVAC system fan. It assumes that air will be supplied to the zone either 11C higher than the
zone temperature in heating mode or 11C lower than the zone temperature in cooling mode.
The equation takes the greater of the heating and cooling system capacities in order to
determine the air flow that should be maintained. The equation also converts the required
air flow rate to units of L/s. When using this unitary system as a template users need not
modify this equation.
kghAir_XXXX This equation simply converts the result of the lps_XXXX equation from units of L/s to those
of kg/h. When using this unitary system as a template users need not modify this equation.
pTotFan_XXXX This equation computes an estimated fan power based on a recommendation in the
ASHRAE 90.1-2007 standard (section G3.1.2.9). The assumption inherent in the equation is
that fan power is 0.64 W.s/L. According to the standard, the power computed by this
equation is the total power allowance for fans in the unitary system. The fan power should
be split between recirculation and exhaust fans. When using this unitary system as a
template users need not modify this equation.
10–8
TRNSYS 18 – Examples
kghOA_XXXX This equation is a unit conversion. It takes the flow rate of outdoor air (specified for each
zone in L/s in a separate block of equations) and converts that amount to kg/h. When using
this unitary system as a template users need not modify this equation.
pInFan_XXXX This equation computes the power of the indoor (recirculation/supply) fan as the total
allowable fan power. When using this unitary system as a template users need not modify
this equation.
There are two methods by which the data file can be revised.
The recommended method is for the user to find a manufacturer of PTAC units online and to search through the
available product literature to find a PTAC that has a capacity as close as possible without being less than the
peak total cooling load required by the zone that will be conditioned by the PTAC. Note, this is the same number
that was entered in the CCap_XXXX equation. The product literature will often contain performance data tables
that show how the PTAC’s total cooling capacity, sensible cooling capacity, and compressor power consumption
vary with indoor and ambient conditions. The data tables in the literature can be transcribed into the format
required by Type144. Care should be taken to revise the values of parameters 3-6 in Type144 if the performance
data tables do not contain the same number of values of each variable as are provided in the example data file.
The less correct method for revising data files is to take an existing data file and renormalize it to a different rated
capacity. PTACs are rated at a certain combination of outdoor dry bulb temperature, indoor dry and wet bulb
temperature. Locate the performance point in the default data file that corresponds to the rated point. Divide each
of the values of total cooling capacity in the data file by the total cooling capacity at the rated point. Do the same
for the values of sensible cooling capacity and power consumption, dividing each by its respective value at the
rated condition. You now have a normalized data file. At the rated point you should have values of 1 for each of
the total capacity, sensible capacity and power consumption. Next, multiply each total capacity multiplier value
(the values in the first column) in the normalized file by the desired total capacity of the PTAC that you wish to
create. Do the same with the sensible capacity values and the power consumption values. You now have a non-
normalized file that corresponds to a theoretical PTAC whose rated capacity matches the requirements of the
HVAC zone that is to be served by the system.
10.1.4.1. Pump
The flow rate of the pump is set in the div-1 equation block by totaling the flow rate required under peak
conditions by each of the five heating coils served by the hot water loop. The power of the pump is also set by the
same equation block by assuming that the pump draws approximately 302W/Lps. The pump is constant speed
and runs whenever at least one of the heating coils requires flow (i.e. when at least one of the zone thermostats in
the building is calling for heat.)
10–9
TRNSYS 18 – Examples
10.1.4.2. Boiler
Type122 assumes that the boiler it models can adjust its output power to heat liquid up to a set point temperature
(limited by its heater capacity). The model does not include a minimum turndown ratio and so can supply as much
or as little energy as is needed to achieve the set point temperature. Consequently the boiler’s capacity is set to
an arbitrarily high number so that capacity limitation is not an issue.
10.1.5. Output
Three output devices are used in this example. Note that by default the “outputs” layer is hidden in the Simulation
Studio so the output producing Types do not appear. To display the outputs layer, right click in the Studio
Assembly Panel and select Show Layers: Output from the context menu.
First, three Type65 online plotters are used. ZONE PLOT plots the air temperature of each zone in the building as
well as the ambient temperature. BOILER LOOP PLOT shows temperatures and flow rates of liquid within the hot
water loop. SYSTEM PLOT shows the temperatures and flow rates of air in one of the five unitary PTAC systems
that serves the building
Second, the performance of the major pieces of equipment in the system is summarized in the simulation
summary report (*.ssr) file that is automatically produced when the simulation runs.
Finally, a printer/integrator (Types46) is used to write certain output values to a pair of external text files. The
Type46 printer/integrator reports hourly and monthly values of the power consumption of the PTACs, fans (indoor
and condenser), pump, and boiler as well as the power consumption of lights and building plug loads (which are
set by schedules and which are also used as heat gains to the space throughout the simulation).
10–10
TRNSYS 18 – Examples
A few important notes. First, it is assumed that a simulation has previously been carried out to determine the peak
heating and cooling load for each of the five zones in the building. Second, it is important to note that this example
does not by any means represent the only way that this HVAC system. The system is modeled in such a way as
to allow the user to resize the components and equipment with as little effort as possible
Location: ..\%TRNSYS18%\Examples\HVACTemplates\System2.tpf
10–11
TRNSYS 18 – Examples
10.2.3.1. Thermostat
Each zone is equipped with a thermostat that monitors the zone air temperature and that turns on a heating
control signal if the room air temperature falls below 21C and a cooling control signal if the room air temperature
rises above 26C.
HCap_XXXX This equation sets the heating capacity of the unitary system. The value in parenthesis is
the peak heating load in kW for the zone multiplied by 1.25 to provide a factor of safety. The
3600 multiplier converts from kW to kJ/h, the units desired by other equations. When using
this unitary system as a template users will need to set the value in parenthesis.
CCap_XXXX This equation sets to total cooling capacity of the unitary system. The value in parenthesis is
the peak total cooling load in kW for the zone multiplied by 1.15 to provide a factor of safety.
The 3600 multiplier converts from kW to kJ/h, the units desired by other equations. When
using this unitary system as a template users will need to set the value in parenthesis.
effFan_XXXX This equation sets the fan efficiency. When using this unitary system as a template users
will need to set the value in parenthesis.
pCondFan_XXXX This equation computes the power consumed by the PTHP’s outdoor fan. Note that outdoor
fan power is not included in the fan power allowance that is computed by a later equation.
When using this unitary system as a template users will need to set the value in parenthesis
to the outdoor fan power in units of kW.
lps_XXXX This equation automatically calculates the air flow rate that will be maintained by the unitary
HVAC system fan. It assumes that air will be supplied to the zone either 11C higher than the
zone temperature in heating mode or 11C lower than the zone temperature in cooling mode.
The equation takes the greater of the heating and cooling system capacities in order to
determine the air flow that should be maintained. The equation also converts the required
air flow rate to units of L/s. When using this unitary system as a template users need not
modify this equation.
kghAir_XXXX This equation simply converts the result of the lps_XXXX equation from units of L/s to those
of kg/h (which are required by the heat pump model). When using this unitary system as a
template users need not modify this equation.
pTotFan_XXXX This equation computes an estimated fan power based on a recommendation in the
ASHRAE 90.1-2007 standard (section G3.1.2.9). The assumption inherent in the equation is
10–12
TRNSYS 18 – Examples
that fan power is 0.64 W.s/L. According to the standard, the power computed by this
equation is the total power allowance for fans in the unitary system. The fan power should
be split between recirculation and exhaust fans. When using this unitary system as a
template users need not modify this equation.
kghOA_XXXX This equation is a unit conversion. It takes the flow rate of outdoor air (specified for each
zone in L/s in a separate block of equations) and converts that amount to kg/h. When using
this unitary system as a template users need not modify this equation.
pInFan_XXXX This equation computes the power of the indoor (recirculation/supply) fan as the total
allowable fan power. When using this unitary system as a template users need not modify
this equation.
yInFan_XXXX This equation computes a value of 0 or 1 that is used as a control signal for the fan in the
heat pump. The fan in the heat pump is assumed to be on at all times that the building is
occupied (as defined by a schedule) and to cycle with the thermostat when the building is
not occupied. When using this unitary system as a template users need not modify this
equation.
mRetNow_ XXXX This equation computes the amount of supply air that returns to the heat pump (i.e. the
amount of supply air minus the present amount of outdoor air being introduced into the
system. When using this unitary system as a template users need not modify this equation.
mOANow_ XXXX This equation computes the amount of outdoor air being introduced into the system. When
using this unitary system as a template users need not modify this equation.
fOADmpr_ XXXX This equation computes the fraction of air entering the heat pump that is outdoor (fresh) air.
When using this unitary system as a template users need not modify this equation.
There are two methods by which the data files can be revised.
The recommended method is for the user to find a manufacturer of PTHP units online and to search through the
available product literature to find a PTHP that has a capacity as close as possible without being less than the
peak total cooling or heating load required by the zone that will be conditioned by the PTHP. Note, this is the
same number that was entered in the CCap_XXXX and HCap_XXXX equations. The product literature will often
contain performance data tables that show how the PTHP’s total cooling capacity, sensible cooling capacity,
heating capacity and compressor power consumption vary with indoor and ambient conditions. The data tables in
the literature can be transcribed into the format required by Type119. Care should be taken to revise the values of
parameters 4-9 in Type119 if the performance data tables do not contain the same number of values of each
variable as are provided in the example data file.
The less correct method for revising data files is to take an existing data file and renormalize it to a different rated
capacity. PTHPs are rated at a certain combination of outdoor dry bulb temperature, indoor dry and wet bulb
temperature. Locate the performance point in the default data file that corresponds to the rated point. Divide each
of the values of total cooling capacity in the data file by the total cooling capacity at the rated point. Do the same
for the values of sensible cooling capacity and power consumption, dividing each by its respective value at the
rated condition. You now have a normalized data file. At the rated point you should have values of 1 for each of
the total capacity, sensible capacity and power consumption. Next, multiply each total capacity multiplier value
(the values in the first column) in the normalized file by the desired total capacity of the PTHP that you wish to
create. Do the same with the sensible capacity values and the power consumption values. You now have a non-
10–13
TRNSYS 18 – Examples
normalized file that corresponds to a theoretical PTHP whose rated capacity matches the requirements of the
HVAC zone that is to be served by the system. Follow the same procedure for the heating data file.
10.2.4. Output
Three output devices are used in this example. Note that by default the “outputs” layer is hidden in the Simulation
Studio so the output producing Types do not appear. To display the outputs layer, right click in the Studio
Assembly Panel and select Show Layers: Output from the context menu.
First, ZONE PLOT (an instance of Type65) plots the air temperature of each zone in the building as well as the
ambient temperature.
Second, the performance of the major pieces of equipment in the system is summarized in the simulation
summary report (*.ssr) file that is automatically produced when the simulation runs.
Finally, a printer/integrator (Types46) is used to write certain output values to a pair of external text files. The
Type46 printer/integrator reports hourly and monthly values of the power consumption of the PTHPs, fans (indoor
and outdoor) as well as the power consumption of lights and building plug loads (which are set by schedules and
which are also used as heat gains to the space throughout the simulation). Note that the compressor power
consumption of the PTHPs is broken down into compressor power when heating and compressor power when
cooling.
10–14
TRNSYS 18 – Examples
It is assumed that a simulation has previously been carried out to determine the peak heating and cooling load for
each of the five zones in the building. It is important to note that this example does not by any means represent
the only way that this HVAC system. The system is modeled in such a way as to allow the user to resize the
components and equipment with as little effort as possible.
Location: ..\%TRNSYS18%\Examples\HVACTemplates\System3.tpf
10.3.2. Airside
10.3.2.2. Thermostat
Each zone is equipped with a thermostat that monitors the zone air temperature and that turns on a heating
control signal if the room air temperature falls below 21C and a cooling control signal if the room air temperature
rises above 26C.
10–15
TRNSYS 18 – Examples
10.3.2.4. Fan
Each zone has a constant speed fan that is either on or off. An equation in the equation block is used such that
the fan runs continuously during building occupied hours and cycles on and off as controlled by the thermostat
during building unoccupied hours. Note that three of the fan’s parameters (rated volumetric flow rate, rated power,
and motor efficiency) are set by defining variable names in the equation block.
HCap_XXXX This equation sets the heating capacity of the unitary system. The value in parenthesis is
the peak heating load in kW for the zone multiplied by 1.25 to provide a factor of safety. The
3600 multiplier converts from kW to kJ/h, the units desired by other equations. When using
this unitary system as a template users will need to set the value in parenthesis.
CCap_XXXX This equation sets to total cooling capacity of the unitary system. The value in parenthesis is
10–16
TRNSYS 18 – Examples
the peak total cooling load in kW for the zone multiplied by 1.15 to provide a factor of safety.
The 3600 multiplier converts from kW to kJ/h, the units desired by other equations. When
using this unitary system as a template users will need to set the value in parenthesis.
effFan_XXXX This equation sets the fan efficiency. When using this unitary system as a template users
will need to set the value in parenthesis.
effHtr_XXXX This equation sets the efficiency of the hot air furnace. When using this unitary system as a
template users will need to set the value in parenthesis.
pCondFan_XXXX This equation computes the power consumed by the packaged rooftop air conditioner’s
condenser fan. Note that condenser fan power is not included in the fan power allowance
that is computed by a later equation. When using this unitary system as a template users
will need to set the value in parenthesis to the condenser fan power in units of kW.
lps_XXXX This equation automatically calculates the air flow rate that will be maintained by the unitary
HVAC system fan. It assumes that air will be supplied to the zone either 11C higher than the
zone temperature in heating mode or 11C lower than the zone temperature in cooling mode.
The equation takes the greater of the heating and cooling system capacities in order to
determine the air flow that should be maintained. The equation also converts the required
air flow rate to units of L/s. When using this unitary system as a template users need not
modify this equation.
kghAir_XXXX This equation simply converts the result of the lps_XXXX equation from units of L/s to those
of kg/h. When using this unitary system as a template users need not modify this equation.
pTotFan_XXXX This equation computes an estimated fan power based on a recommendation in the
ASHRAE 90.1-2007 standard (section G3.1.2.9). The assumption inherent in the equation is
that fan brake horse power is given by Lps*0.000044. According to the standard, the power
computed by this equation is the total power allowance for fans in the unitary system. The
fan power should be split between recirculation and exhaust fans. When using this unitary
system as a template users need not modify this equation.
kghOA_XXXX This equation is a unit conversion. It takes the flow rate of outdoor air (specified for each
zone in L/s in a separate block of equations) and converts that amount to kg/h. When using
this unitary system as a template users need not modify this equation.
pInFan_XXXX This equation computes the power of the indoor (recirculation/supply) fan as the total
allowable fan power. When using this unitary system as a template users need not modify
this equation.
yInFan_XXXX This equation computes a value of 0 or 1 that is used as a control signal for the fan in the
heat pump. The fan in the heat pump is assumed to be on at all times that the building is
occupied (as defined by a schedule) and to cycle with the thermostat when the building is
not occupied. When using this unitary system as a template users need not modify this
equation.
mRetNow_XXXX This equation computes the amount of supply air that returns to the heat pump (i.e. the
amount of supply air minus the present amount of outdoor air being introduced into the
system. When using this unitary system as a template users need not modify this equation.
mOANow_XXXX This equation computes the amount of outdoor air being introduced into the system. When
using this unitary system as a template users need not modify this equation.
10–17
TRNSYS 18 – Examples
There are two methods by which the data file can be revised.
The recommended method is for the user to find a manufacturer of packaged rooftop air conditioners units online
and to search through the available product literature to find a packaged rooftop air conditioners that has a
capacity as close as possible without being less than the peak total cooling load required by the zone that will be
conditioned by the packaged rooftop air conditioners. Note, this is the same number that was entered in the
CCap_XXXX equation. The product literature will often contain performance data tables that show how the
packaged rooftop air conditioners’s total cooling capacity, sensible cooling capacity, and compressor power
consumption vary with indoor and ambient conditions. The data tables in the literature can be transcribed into the
format required by Type144. Care should be taken to revise the values of parameters 3-6 in Type144 if the
performance data tables do not contain the same number of values of each variable as are provided in the
example data file.
The less correct method for revising data files is to take an existing data file and renormalize it to a different rated
capacity. Packaged rooftop air conditioners s are rated at a certain combination of outdoor dry bulb temperature,
indoor dry and wet bulb temperature. Locate the performance point in the default data file that corresponds to the
rated point. Divide each of the values of total cooling capacity in the data file by the total cooling capacity at the
rated point. Do the same for the values of sensible cooling capacity and power consumption, dividing each by its
respective value at the rated condition. You now have a normalized data file. At the rated point you should have
values of 1 for each of the total capacity, sensible capacity and power consumption. Next, multiply each total
capacity multiplier value (the values in the first column) in the normalized file by the desired total capacity of the
packaged rooftop air conditioners that you wish to create. Do the same with the sensible capacity values and the
power consumption values. You now have a non-normalized file that corresponds to a theoretical packaged
rooftop air conditioners whose rated capacity matches the requirements of the HVAC zone that is to be served by
the system.
10.3.3. Output
Three output devices are used in this example. Note that by default the “outputs” layer is hidden in the Simulation
Studio so the output producing Types do not appear. To display the outputs layer, right click in the Studio
Assembly Panel and select Show Layers: Output from the context menu.
First, two Type65 online plotters are used. ZONE PLOT plots the air temperature of each zone in the building as
well as the ambient temperature. SYSTEM PLOT shows the temperatures and flow rates of air in one of the five
unitary rooftop AC/furnace systems that serves the building
Second, the performance of the major pieces of equipment in the system is summarized in the simulation
summary report (*.ssr) file that is automatically produced when the simulation runs.
Finally, a printer/integrator (Types46) is used to write certain output values to a pair of external text files. The
Type46 printer/integrator reports hourly and monthly values of the power consumption of the packaged rooftop air
conditioner and fans (indoor and condenser), as well as the power consumption of lights and building plug loads
(which are set by schedules and which are also used as heat gains to the space throughout the simulation).
10–18
TRNSYS 18 – Examples
A few important notes. First, it is assumed that a simulation has previously been carried out to determine the peak
heating and cooling load for each of the five zones in the building. Second, it is important to note that this example
does not by any means represent the only way that this HVAC system. The system is modeled in such a way as
to allow the user to resize the components and equipment with as little effort as possible.
Location: ..\%TRNSYS18%\Examples\HVACTemplates\System4.tpf
10–19
TRNSYS 18 – Examples
10.4.3.1. Thermostat
Each zone is equipped with a thermostat that monitors the zone air temperature and that turns on a heating
control signal if the room air temperature falls below 21C and a cooling control signal if the room air temperature
rises above 26C.
HCap_XXXX This equation sets the heating capacity of the unitary system. The value in parenthesis is
the peak heating load in kW for the zone multiplied by 1.25 to provide a factor of safety. The
3600 multiplier converts from kW to kJ/h, the units desired by other equations. When using
this unitary system as a template users will need to set the value in parenthesis.
CCap_XXXX This equation sets to total cooling capacity of the unitary system. The value in parenthesis is
the peak total cooling load in kW for the zone multiplied by 1.15 to provide a factor of safety.
The 3600 multiplier converts from kW to kJ/h, the units desired by other equations. When
using this unitary system as a template users will need to set the value in parenthesis.
effFan_XXXX This equation sets the fan efficiency. When using this unitary system as a template users
will need to set the value in parenthesis.
pCondFan_XXXX This equation computes the power consumed by the PTHP’s outdoor fan. Note that outdoor
fan power is not included in the fan power allowance that is computed by a later equation.
When using this unitary system as a template users will need to set the value in parenthesis
to the outdoor fan power in units of kW.
lps_XXXX This equation automatically calculates the air flow rate that will be maintained by the unitary
HVAC system fan. It assumes that air will be supplied to the zone either 11C higher than the
zone temperature in heating mode or 11C lower than the zone temperature in cooling mode.
The equation takes the greater of the heating and cooling system capacities in order to
determine the air flow that should be maintained. The equation also converts the required
air flow rate to units of L/s. When using this unitary system as a template users need not
modify this equation.
kghAir_XXXX This equation simply converts the result of the lps_XXXX equation from units of L/s to those
of kg/h (which are required by the heat pump model). When using this unitary system as a
template users need not modify this equation.
pTotFan_XXXX This equation computes an estimated fan power based on a recommendation in the
ASHRAE 90.1-2007 standard (section G3.1.2.9). The assumption inherent in the equation is
10–20
TRNSYS 18 – Examples
that fan brake horse power is given by Lps*0.000044. According to the standard, the power
computed by this equation is the total power allowance for fans in the unitary system. The
fan power should be split between recirculation and exhaust fans. When using this unitary
system as a template users need not modify this equation.
kghOA_XXXX This equation is a unit conversion. It takes the flow rate of outdoor air (specified for each
zone in L/s in a separate block of equations) and converts that amount to kg/h. When using
this unitary system as a template users need not modify this equation.
pInFan_XXXX This equation computes the power of the indoor (recirculation/supply) fan as the total
allowable fan power. When using this unitary system as a template users need not modify
this equation.
yInFan_XXXX This equation computes a value of 0 or 1 that is used as a control signal for the fan in the
heat pump. The fan in the heat pump is assumed to be on at all times that the building is
occupied (as defined by a schedule) and to cycle with the thermostat when the building is
not occupied. When using this unitary system as a template users need not modify this
equation.
mRetNow_ XXXX This equation computes the amount of supply air that returns to the heat pump (i.e. the
amount of supply air minus the present amount of outdoor air being introduced into the
system. When using this unitary system as a template users need not modify this equation.
mOANow_ XXXX This equation computes the amount of outdoor air being introduced into the system. When
using this unitary system as a template users need not modify this equation.
fOADmpr_ XXXX This equation computes the fraction of air entering the heat pump that is outdoor (fresh) air.
When using this unitary system as a template users need not modify this equation.
There are two methods by which the data files can be revised.
The recommended method is for the user to find a manufacturer of PRHP units online and to search through the
available product literature to find a PRHP that has a capacity as close as possible without being less than the
peak total cooling or heating load required by the zone that will be conditioned by the PRHP. Note, this is the
same number that was entered in the CCap_XXXX and HCap_XXXX equations. The product literature will often
contain performance data tables that show how the PRHP’s total cooling capacity, sensible cooling capacity,
heating capacity and compressor power consumption vary with indoor and ambient conditions. The data tables in
the literature can be transcribed into the format required by Type119. Care should be taken to revise the values of
parameters 4-9 in Type119 if the performance data tables do not contain the same number of values of each
variable as are provided in the example data file.
The less correct method for revising data files is to take an existing data file and renormalize it to a different rated
capacity. PRHPs are rated at a certain combination of outdoor dry bulb temperature, indoor dry and wet bulb
temperature. Locate the performance point in the default data file that corresponds to the rated point. Divide each
of the values of total cooling capacity in the data file by the total cooling capacity at the rated point. Do the same
for the values of sensible cooling capacity and power consumption, dividing each by its respective value at the
rated condition. You now have a normalized data file. At the rated point you should have values of 1 for each of
the total capacity, sensible capacity and power consumption. Next, multiply each total capacity multiplier value
(the values in the first column) in the normalized file by the desired total capacity of the PRHP that you wish to
create. Do the same with the sensible capacity values and the power consumption values. You now have a non-
10–21
TRNSYS 18 – Examples
normalized file that corresponds to a theoretical PRHP whose rated capacity matches the requirements of the
HVAC zone that is to be served by the system. Follow the same procedure for the heating data file.
10.4.4. Output
Three output devices are used in this example. Note that by default the “outputs” layer is hidden in the Simulation
Studio so the output producing Types do not appear. To display the outputs layer, right click in the Studio
Assembly Panel and select Show Layers: Output from the context menu.
First, ZONE PLOT (an instance of Type65) plots the air temperature of each zone in the building as well as the
ambient temperature.
Second, the performance of the major pieces of equipment in the system is summarized in the simulation
summary report (*.ssr) file that is automatically produced when the simulation runs.
Finally, a printer/integrator (Types46) is used to write certain output values to a pair of external text files. The
Type46 printer/integrator reports hourly and monthly values of the power consumption of the PTHPs, fans (indoor
and outdoor) as well as the power consumption of lights and building plug loads (which are set by schedules and
which are also used as heat gains to the space throughout the simulation). Note that the compressor power
consumption of the PRHPs is broken down into compressor power when heating and compressor power when
cooling.
10–22
TRNSYS 18 – Examples
It is assumed that a simulation has previously been carried out to determine the peak heating and cooling load for
each of the five zones in the building.
Location: ..\%TRNSYS18%\Examples\HVACTemplates\System5.tpf
First, the central air handler model is unlike many other TRNSYS HVAC component models in that it is driven by
loads instead of being driven by inlet conditions and a control signal. It is therefore necessary to put the zones of
the building being conditioned into energy rate control. This means that heating and cooling types are
implemented in TRNBuild and that the sensible energy demands of each zone are set up as Type56 outputs that
are passed to the AHU model.
Second, many central VAV air handlers contain a cooling coil but no heating coil and distribute cold air to all
zones in the building so long as at least one zone is calling for cooling. Zones that are overcooled by the supply
air are heated at the terminal box by use of the reheat coil therein. From a modeling perspective the fact that cold
air is being distributed to the zones adds an additional (heating) load to the zone that must be accounted for at the
zone level.
Parameters 5 and 6 need no modification. These set the logical unit number of an external file containing part
load ratio data for the fan and the number of part load ratio points in the file.
The remaining parameters are the overall AHU rated flow rate, the fan’s rated power, and a minimum and
maximum flow rate for each of the VAV boxes served. Under design circumstances, these flow rates would be
determined by an engineer and would be available from the building’s construction documents. In this case some
other method is needed. While there are many methods available for determining these flow rates, the one
selected for the present example was to run the building with its heating and cooling set points, its lighting,
occupancy, and plug load profiles, and its outdoor air requirement. The run was set up to produce an output file
containing hourly sensible heating, sensible cooling, and latent cooling loads for each of the five zones. It is worth
noting that while Type56 was used to determine the sensible cooling load, a component from the TESS Loads
and Structures Library (Type2280) was used to determine the latent load of each space. For each zone, the peak
hourly sensible heating and total cooling loads were used to determine the maximum airflow rate for each zone
10–23
TRNSYS 18 – Examples
assuming an 11C (20F) temperature difference between room air temperature and supply air temperature. The
minimum airflow rate for each zone was set as 2 Lps/m2 of floor area served, a value given by ASHRAE Standard
90.1-2007 Appendix G. The sum of the maximum air flow rates is set as the AHU’s “design air flow rate”
parameter. The same value is entered in the “OA quantity” equation block as a mass flow rate in order to correctly
calculate the AHU’s outdoor air fraction. The maximum and minimum airflow rates for each zone are also set as
Type151 parameters. The system fan power was set based on an algorithm detailed in the ASHRAE 90.1-2007
Appendix G “Performance Rating Method.”
The reheat coils in each terminal unit are not to be capacity limited in this example; their capacity parameters are
therefore all set to -1 (indicating unlimited)
Inputs 4 and 5 bound supply air temperature for the central unit. In the present example these values are constant
and Type151 will automatically determine the central unit supply air temperature that minimizes the need for
terminal unit heating coil use.
The next input (6) sets the fraction of the total air flow that is fresh outdoor air. A typical value is about 0.2 (20%
outdoor air, 80% return air). In this case, we would like to shut off the outdoor air when the building is not
occupied. An equation is therefore defined in the “OA quantity” equation block to divide the currently required
outdoor air flow rate by the VAV AHU’s rated air flow rate. The way that the equation is set up, when the
occupancy schedule drops to zero, no more outdoor air is required and fOA goes to 0. Otherwise, fOA has a
value that is some fraction of the VAV’s total flow rate. The equation fOA is connected to Type151 input 6.
Inputs 7 and 8 are control signals used to tell Type151 when the preheat coil and when the economizer may be
used. For simplicity sake in this example, both the preheat coil and the economizer may be used at any time; thus
their values are set to be constantly 1.
The next set of 15 inputs consist of the 5 zone temperatures, 5 zone relative humidities, and 5 zone sensible
energy demands. The sensible energy demands expected by Type151 use the same sign convention as the
Type56 default zone load outputs and as such are a direct connection from Type56.
Another set of 5 inputs are available to add energy gains to the return air stream if the user chooses. In some
buildings, the plenum (the space above the suspended ceiling and below the floor above) is used as the return air
duct. Lights and equipment can be installed in the building such that they reject heat into the plenum space
instead of into the conditioned space. The next 5 inputs to Type151 allow those gains to be correctly added to the
return air stream so that they are seen by the AHU but not directly by the occupied space. In this example, the
return air is assumed to be ducted and the plenum space is taken to be part of the conditioned zone volume.
The final set of 5 inputs allows the heating coils in terminal units to be disabled some or all of the time. In the case
of this example, the heating coils are always available so the values of these inputs are set to 1.
In the present example, a series of equations in the “ht cap lims” equation block perform this function. Each
equation computes an estimated capacity for the heating system by using each terminal unit’s full air flow rate, the
current zone temperature, and an assumed heating supply air temperature of 35C. These equation results are
passed to Type56 and are used to limit each zone’s heating type. When you run the example, note that while the
zones return from their nighttime heating setback temperature quickly, they do not do so instantaneously.
It is possible the limit the capacity of the heat/reheat coils in the VAV AHU model. However, doing so will limit the
energy consumed by the reheat coils. The impact of the capacity limitation is a failure to meet the zone load and
simply limiting the reheat coil capacity without passing any information back to the zone model will mean that the
zone is unaffected by the failure.
Capacity limitations are not placed on the cooling side because in this example, the cooling set point temperature
is not increased during the night and therefore the “instantaneous return to set point” problem is of no concern.
qBoilerImpose The total amount of energy that must be supplied by the boiler is the sum of the preheat coil
and reheat coils energy requirement.
mWant_HW This equation computes the flow rate at which liquid must be supplied to the load in order
for the liquid to return to the boiler with a 27.8C temperature drop.
lpsRtd_P1 This equation sets the pump’s rated flow rate. The value was obtained by running a
simulation and taking the maximum value of the mWant_HW equation over the course of
the year.
qRtdBoiler This equation sets the capacity of the boiler. It was obtained by running a simulation with
unlimited boiler capacity and determining the maximum amount of energy that the boiler
was required to provide.
10–25
TRNSYS 18 – Examples
mRtd_P1 This equation converts the units of the pump rated flow rate to kg/h.
pRtd_P1 This equation estimates the pump’s rated power based on the assumption of 0.084W/lps
(19W/gpm)
yP1 This equation provides a control signal for the pump. The pump will run at the desired flow
rate of mWant_HW and will turn off completely if there is no heating or reheat load on the
loop.
vol_HWbuffer This equation automatically sets the volume of a buffer tank in the hot water loop. The tank
is sized to hold 1.5 times as much liquid as the pump in the hot water loop can transfer
during a single time step. The tank is included in the loop for numerical stability of the
simulation.
h_HWbuffer This equation automatically sets the height of the buffer storage tank such that it is twice as
tall as its diameter.
T_BoilerRet This equation is a rearrangement of the mWant_HW equation used here to compute the
load return temperature.
mBoilerRet This equation is included only to facilitate connections within the hot water loop.
The hot water loop is pumped to maintain a 27.8C temperature difference between supply and return. The boiler
is controlled to maintain an 82.2C supply temperature to the load.
Note that the DX coil model can also be used for heating applications. It is not needed for heating in the present
example so its heating data file remains unchanged and its heating control signal input remains set to zero
throughout the simulation.
There are two methods by which the data files can be revised.
The recommended method is for the user to find a manufacturer of DX coils online and to search through the
available product literature to find a coil that has a capacity as close as possible without being less than the peak
total cooling load required by the AHU that contains the coil. The product literature will often contain performance
data tables that show how the coil’s total cooling capacity, sensible cooling capacity, power consumption vary with
indoor and ambient conditions. The data tables in the literature can be transcribed into the format required by
Type136.
10–26
TRNSYS 18 – Examples
Note that if the indoor fan power of the DX coil is included in the values of power consumption given in
manufacturer’s information, it should be removed before transcribing the data for Type136. The indoor fan, in the
case of this example, is modeled in the AHU. Leaving its power also in the DX coil’s data file would double
account for fan power. The DX coil data file should contain only the power consumption of the compressor(s) and
outdoor fan(s)
The less correct method for revising data files is to take an existing data file and renormalize it to a different rated
capacity. DX coils are rated at a certain combination of outdoor dry bulb temperature, indoor dry and wet bulb
temperature. Locate the performance point in the default data file that corresponds to the rated point. Divide each
of the values of total cooling capacity in the data file by the total cooling capacity at the rated point. Do the same
for the values of sensible cooling capacity and power consumption, dividing each by its respective value at the
rated condition. You now have a normalized data file. At the rated point you should have values of 1 for each of
the total capacity, sensible capacity and power consumption. Next, multiply each total capacity multiplier value
(the values in the first column) in the normalized file by the desired total capacity of the DX that you wish to
create. Do the same with the sensible capacity values and the power consumption values. You now have a non-
normalized file that corresponds to a theoretical DX whose rated capacity matches the requirements of the AHU
that is to be served by the coil.
10.5.10. Outputs
Three output devices are used in this example. Note that by default the “outputs” layer is hidden in the Simulation
Studio so the output producing Types do not appear. To display the outputs layer, right click in the Studio
Assembly Panel and select Show Layers: Output from the context menu.
First, ZONE PLOT and BOILER LOOP PLOT (instances of Type65) plots the air temperature of each zone in the
building and ambient temperature as well as the temperatures and mass flow rates around the hot water loop.
Second, the performance of the major pieces of equipment in the system is summarized in the simulation
summary report (*.ssr) file that is automatically produced when the simulation runs.
Finally, a printer/integrator (Types46) is used to write certain output values to a pair of external text files. The
Type46 printer/integrator reports hourly and monthly values of the power consumption of the DX coil, AHU fan,
boiler, and pump as well as the power consumption of lights and building plug loads (which are set by schedules
and which are also used as heat gains to the space throughout the simulation).
10–27
TRNSYS 18 – Examples
It is assumed that a simulation has previously been carried out to determine the peak heating and cooling load for
each of the five zones in the building.
Location: ..\%TRNSYS18%\Examples\HVACTemplates\System6.tpf
First, the central air handler model is unlike many other TRNSYS HVAC component models in that it is driven by
loads instead of being driven by inlet conditions and a control signal. It is therefore necessary to put the zones of
the building being conditioned into energy rate control. This means that idealized heating and cooling types are
implemented in TRNBuild and that the sensible energy demands of each zone are set up as Type56 outputs that
are passed to the AHU model.
Second, many central VAV air handlers contain a cooling coil but no heating coil and distribute cold air to all
zones in the building so long as at least one zone is calling for cooling. Zones that are overcooled by the supply
air are heated at the terminal box by use of the reheat coil therein. From a modeling perspective the fact that cold
air is being distributed to the zones adds an additional (heating) load to the zone that must be accounted for at the
zone level. This load is therefore passed back from the AHU component to the building component.
Third, the VAV modeled in this example has fans both in the central unit and in the terminal boxes.
Parameters 5 and 6 need no modification. These set the logical unit number of an external file containing part
load ratio data for the fan and the number of part load ratio points in the file.
The remaining parameters are the overall AHU rated flow rate, the fan’s rated power, a minimum and maximum
flow rate for each of the VAV boxes served, and the power consumed by the fans in each of the terminal units.
Under design circumstances, the minimum and maximum flow rates would be determined by an engineer and
would be available from the building’s construction documents. In the case of the present example some other
method is needed. While there are many methods available for determining these flow rates, the one selected for
10–28
TRNSYS 18 – Examples
the current purpose was to run the building with its heating and cooling set points, its lighting, occupancy, and
plug load profiles, and its outdoor air requirement. The run was set up to produce an output file containing hourly
sensible heating, sensible cooling, and latent cooling loads for each of the five zones. It is worth noting that while
Type56 was used to determine the sensible cooling load, a component from the TESS Loads and Structures
Library (Type2280) was used to determine the latent load of each space. For each zone, the peak hourly sensible
heating and total cooling loads were used to determine the maximum airflow rate for each zone assuming an 11C
(20F) temperature difference between room air temperature and supply air temperature. The minimum airflow rate
for each zone was set as 2 Lps/m2 of floor area served, a value given by ASHRAE Standard 90.1-2007 Appendix
G. The sum of the maximum air flow rates is set as the AHU’s “design air flow rate” parameter. The same value is
entered in the “OA quantity” equation block as a mass flow rate in order to correctly calculate the AHU’s outdoor
air fraction. The maximum and minimum airflow rates for each zone are also set as Type152 parameters. The
system fan power was set based on an algorithm detailed in the ASHRAE 90.1-2007 Appendix G “Performance
Rating Method.” The algorithm gives a total fan power allowance for the central unit and terminal box units. The
fan power of each terminal box unit was set based on the assumption of 0.136 W/L.s.
The reheat coils in each terminal unit are not to be capacity limited in this example; their capacity parameters are
therefore all set to -1 (indicating unlimited)
Inputs 4 and 5 set limits on the supply air temperature for the central unit. In the present example these values
are constant and Type152 will automatically determine the central unit supply air temperature that minimizes the
need for terminal unit heating coil use.
The next input (6) sets the fraction of the total air flow that is fresh outdoor air. A typical value is about 0.2 (20%
outdoor air, 80% return air). In this example, we would like to shut off the outdoor air when the building is not
occupied. An equation is therefore defined in the “OA quantity” equation block to divide the currently required
outdoor air flow rate by the VAV AHU’s rated air flow rate. The way that the equation is set up, when the
occupancy schedule drops to zero, no more outdoor air is required and fOA goes to 0. Otherwise, fOA has a
value that is some fraction of the VAV’s total flow rate. The equation fOA is connected to Type152 input 6.
Inputs 7 and 8 are control signals used to tell Type152 when the preheat coil and when the economizer may be
used. For simplicity sake in this example, both the preheat coil and the economizer may be used at any time; thus
their values are set to be constantly 1. Often preheat coils are disabled during summer so that they do not turn on
during a cool night.
The next set of 15 inputs consist of the 5 zone temperatures, 5 zone relative humidities, and 5 zone sensible
energy demands. The sensible energy demands expected by Type152 use the same sign convention as the
Type56 default zone load outputs and as such are a direct connection from Type56.
Another set of 5 inputs are available to add energy gains to the return air stream if the user chooses. In some
buildings, the plenum (the space above the suspended ceiling and below the floor above) is used as the return air
duct. Lights and equipment can be installed in the building such that they reject heat into the plenum space
instead of into the conditioned space. The next 5 inputs to Type152 allow those gains to be correctly added to the
return air stream so that they are seen by the AHU but not directly by the occupied space. In this example, the
return air is assumed to be ducted and the plenum space is taken to be part of the conditioned zone volume.
The final set of 5 inputs allows the heating coils in terminal units to be disabled some or all of the time. In the case
of this example, the heating coils are always available so the values of these inputs are set to 1.
10–29
TRNSYS 18 – Examples
In the present example, a series of equations in the “ht cap lims” equation block perform this function. Each
equation computes an estimated capacity for the heating system by using each terminal unit’s full air flow rate, the
current zone temperature, and an assumed heating supply air temperature of 35C. These equation results are
passed to Type56 and are used to limit each zone’s heating type. When you run the example, note that while the
zones return from their nighttime heating setback temperature quickly, they do not do so instantaneously.
It is possible the limit the capacity of the heat/reheat coils in the VAV AHU model. However, doing so will limit the
energy consumed by the reheat coils. The impact of the capacity limitation is a failure to meet the zone load and
simply limiting the reheat coil capacity without passing any information back to the zone model will mean that the
zone is unaffected by the failure.
Capacity limitations are not placed on the cooling side because in this example, the cooling set point temperature
is not increased during the night and therefore the “instantaneous return to set point” problem is of no concern.
10–30
TRNSYS 18 – Examples
Note that the DX coil model can also be used for heating applications. It is not needed for heating in the present
example so its heating data file remains unchanged and its heating control signal input remains set to zero
throughout the simulation.
There are two methods by which the data files can be revised.
The recommended method is for the user to find a manufacturer of DX coils online and to search through the
available product literature to find a coil that has a capacity as close as possible without being less than the peak
total cooling load required by the AHU that contains the coil. The product literature will often contain performance
data tables that show how the coil’s total cooling capacity, sensible cooling capacity, power consumption vary with
indoor and ambient conditions. The data tables in the literature can be transcribed into the format required by
Type136.
Note that if the indoor fan power of the DX coil is included in the values of power consumption given in
manufacturer’s information, it should be removed before transcribing the data for Type136. The indoor fan, in the
case of this example, is modeled in the AHU. Leaving its power also in the DX coil’s data file would double
account for fan power. The DX coil data file should contain only the power consumption of the compressor(s) and
outdoor fan(s)
The less correct method for revising data files is to take an existing data file and renormalize it to a different rated
capacity. DX coils are rated at a certain combination of outdoor dry bulb temperature, indoor dry and wet bulb
temperature. Locate the performance point in the default data file that corresponds to the rated point. Divide each
of the values of total cooling capacity in the data file by the total cooling capacity at the rated point. Do the same
for the values of sensible cooling capacity and power consumption, dividing each by its respective value at the
rated condition. You now have a normalized data file. At the rated point you should have values of 1 for each of
the total capacity, sensible capacity and power consumption. Next, multiply each total capacity multiplier value
(the values in the first column) in the normalized file by the desired total capacity of the DX that you wish to
create. Do the same with the sensible capacity values and the power consumption values. You now have a non-
normalized file that corresponds to a theoretical DX whose rated capacity matches the requirements of the AHU
that is to be served by the coil.
10.6.10. Outputs
Three output devices are used in this example. Note that by default the “outputs” layer is hidden in the Simulation
Studio so the output producing Types do not appear. To display the outputs layer, right click in the Studio
Assembly Panel and select Show Layers: Output from the context menu.
First, ZONE PLOT (an instance of Type65) plots the air temperature of each zone in the building as well as
ambient temperature.
10–31
TRNSYS 18 – Examples
Second, the performance of the major pieces of equipment in the system is summarized in the simulation
summary report (*.ssr) file that is automatically produced when the simulation runs.
Finally, a printer/integrator (Types46) is used to write certain output values to a pair of external text files. The
Type46 printer/integrator reports hourly and monthly values of the power consumption of the DX coil, AHU fan,
terminal unit fans, preheat and reheat coils as well as the power consumption of lights and building plug loads
(which are set by schedules and which are also used as heat gains to the space throughout the simulation).
10–32
TRNSYS 18 – Examples
It is assumed that a simulation has previously been carried out to determine the peak heating and cooling load for
each of the five zones in the building.
Location: ..\%TRNSYS18%\Examples\HVACTemplates\System7.tpf
First, the central air handler model is unlike many other TRNSYS HVAC component models in that it is driven by
loads instead of being driven by inlet conditions and a control signal. It is therefore necessary to put the zones of
the building being conditioned into energy rate control. This means that heating and cooling types are
implemented in TRNBuild and that the sensible energy demands of each zone are set up as Type56 outputs that
are passed to the AHU model.
Second, many central VAV air handlers contain a cooling coil but no heating coil and distribute cold air to all
zones in the building so long as at least one zone is calling for cooling. Zones that are overcooled by the supply
air are heated at the terminal box by use of the reheat coil therein. From a modeling perspective the fact that cold
air is being distributed to the zones adds an additional (heating) load to the zone that must be accounted for at the
zone level.
Parameters 5 and 6 need no modification. These set the logical unit number of an external file containing part
load ratio data for the fan and the number of part load ratio points in the file.
The remaining parameters are the overall AHU rated flow rate, the fan’s rated power, and a minimum and
maximum flow rate for each of the VAV boxes served. Under design circumstances, these flow rates would be
determined by an engineer and would be available from the building’s construction documents. In this case some
other method is needed. While there are many methods available for determining these flow rates, the one
selected for the present example was to run the building with its heating and cooling set points, its lighting,
occupancy, and plug load profiles, and its outdoor air requirement. The run was set up to produce an output file
containing hourly sensible heating, sensible cooling, and latent cooling loads for each of the five zones. It is worth
noting that while Type56 was used to determine the sensible cooling load, a component from the TESS Loads
and Structures Library (Type2280) was used to determine the latent load of each space. For each zone, the peak
10–33
TRNSYS 18 – Examples
hourly sensible heating and total cooling loads were used to determine the maximum airflow rate for each zone
assuming an 11C (20F) temperature difference between room air temperature and supply air temperature. The
minimum airflow rate for each zone was set as 2 Lps/m 2 of floor area served, a value given by ASHRAE Standard
90.1-2007 Appendix G. The sum of the maximum air flow rates is set as the AHU’s “design air flow rate”
parameter. The same value is entered in the “OA quantity” equation block as a mass flow rate in order to correctly
calculate the AHU’s outdoor air fraction. The maximum and minimum airflow rates for each zone are also set as
Type151 parameters. The system fan power was set based on an algorithm detailed in the ASHRAE 90.1-2007
Appendix G “Performance Rating Method.”
The reheat coils in each terminal unit are not to be capacity limited in this example; their capacity parameters are
therefore all set to -1 (indicating unlimited)
Inputs 4 and 5 bound supply air temperature for the central unit. In the present example these values are constant
and Type151 will automatically determine the central unit supply air temperature that minimizes the need for
terminal unit heating coil use.
The next input (6) sets the fraction of the total air flow that is fresh outdoor air. A typical value is about 0.2 (20%
outdoor air, 80% return air). In this case, we would like to shut off the outdoor air when the building is not
occupied. An equation is therefore defined in the “OA quantity” equation block to divide the currently required
outdoor air flow rate by the VAV AHU’s rated air flow rate. The way that the equation is set up, when the
occupancy schedule drops to zero, no more outdoor air is required and fOA goes to 0. Otherwise, fOA has a
value that is some fraction of the VAV’s total flow rate. The equation fOA is connected to Type151 input 6.
Inputs 7 and 8 are control signals used to tell Type151 when the preheat coil and when the economizer may be
used. For simplicity sake in this example, both the preheat coil and the economizer may be used at any time; thus
their values are set to be constantly 1.
The next set of 15 inputs consist of the 5 zone temperatures, 5 zone relative humidities, and 5 zone sensible
energy demands. The sensible energy demands expected by Type151 use the same sign convention as the
Type56 default zone load outputs and as such are a direct connection from Type56.
Another set of 5 inputs are available to add energy gains to the return air stream if the user chooses. In some
buildings, the plenum (the space above the suspended ceiling and below the floor above) is used as the return air
duct. Lights and equipment can be installed in the building such that they reject heat into the plenum space
instead of into the conditioned space. The next 5 inputs to Type151 allow those gains to be correctly added to the
return air stream so that they are seen by the AHU but not directly by the occupied space. In this example, the
return air is assumed to be ducted and the plenum space is taken to be part of the conditioned zone volume.
The final set of 5 inputs allows the heating coils in terminal units to be disabled some or all of the time. In the case
of this example, the heating coils are always available so the values of these inputs are set to 1.
10–34
TRNSYS 18 – Examples
zone from setback instantaneously so it is important to limit the rate at which they can supply energy to the zone
while it returns from setback.
In the present example, a series of equations in the “ht cap lims” equation block perform this function. Each
equation computes an estimated capacity for the heating system by using each terminal unit’s full air flow rate, the
current zone temperature, and an assumed heating supply air temperature of 35C. These equation results are
passed to Type56 and are used to limit each zone’s heating type. When you run the example, note that while the
zones return from their nighttime heating setback temperature quickly, they do not do so instantaneously.
It is possible the limit the capacity of the heat/reheat coils in the VAV AHU model. However, doing so will limit the
energy consumed by the reheat coils. The impact of the capacity limitation is a failure to meet the zone load and
simply limiting the reheat coil capacity without passing any information back to the zone model will mean that the
zone is unaffected by the failure.
Capacity limitations are not placed on the cooling side because in this example, the cooling set point temperature
is not increased during the night and therefore the “instantaneous return to set point” problem is of no concern.
qBoilerImpose The total amount of energy that must be supplied by the boiler is the sum of the preheat coil
and reheat coils energy requirement.
mWant_HW This equation computes the flow rate at which liquid must be supplied to the load in order
for the liquid to return to the boiler with a 27.8C temperature drop.
lpsRtd_P1 This equation sets the pump’s rated flow rate. The value was obtained by running a
simulation and taking the maximum value of the mWant_HW equation over the course of
the year.
10–35
TRNSYS 18 – Examples
qRtdBoiler This equation sets the capacity of the boiler. It was obtained by running a simulation with
unlimited boiler capacity and determining the maximum amount of energy that the boiler
was required to provide.
mRtd_P1 This equation converts the units of the pump rated flow rate to kg/h.
pRtd_P1 This equation estimates the pump’s rated power based on the assumption of 0.084W/lps
(19W/gpm)
yP1 This equation provides a control signal for the pump. The pump will run at the desired flow
rate of mWant_HW and will turn off completely if there is no heating or reheat load on the
loop.
vol_HWbuffer This equation automatically sets the volume of a buffer tank in the hot water loop. The tank
is sized to hold 1.5 times as much liquid as the pump in the hot water loop can transfer
during a single time step. The tank is included in the loop for numerical stability of the
simulation.
h_HWbuffer This equation automatically sets the height of the buffer storage tank such that it is twice as
tall as its diameter.
T_BoilerRet This equation is a rearrangement of the mWant_HW equation used here to compute the
load return temperature.
mBoilerRet This equation is included only to facilitate connections within the hot water loop.
The hot water loop is pumped to maintain a 27.8C temperature difference between supply and return. The boiler
is controlled to maintain an 82.2C supply temperature to the load.
qChillerImpose The total amount of energy that must be supplied by the chiller is the AHU’s cooling coil
energy requirement.
mWant_CHW This equation computes the flow rate at which liquid must be supplied to the load in order
for the liquid to return to the chiller with a 6.7C temperature rise.
lpsRtd_P2 This equation sets the chilled water pump’s rated flow rate. The value was obtained by
running a simulation and taking the maximum value of the mWant_CHW equation over the
course of the year.
mRtd_P2 This equation converts the units of the pump rated flow rate to kg/h.
pRtd_P2 This equation estimates the pump’s rated power based on the assumption of 0.084W/lps
(19W/gpm)
yP2 This equation provides a control signal for the pump. The pump will run at the desired flow
rate of mWant_CHW but will turn off completely if there is no cooling load on the loop.
10–36
TRNSYS 18 – Examples
vol_CHWbuffer This equation automatically sets the volume of a buffer tank in the chilled water loop. The
tank is sized to hold 1.5 times as much liquid as the pump in the loop can transfer during a
single time step. The tank is included in the loop for numerical stability of the simulation.
h_CHWbuffer This equation automatically sets the height of the buffer storage tank such that it is twice as
tall as its diameter.
T_ChillerRet This equation is a rearrangement of the mWant_CHW equation used here to compute the
load return temperature.
mChillerRet This equation is included only to facilitate connections within the chilled water loop.
The chilled water loop is pumped to maintain a 6.7C temperature difference between supply and return. The air
cooled chiller is controlled to maintain a 6.67C supply temperature to the load.
The TRNSYS air cooled chiller model is a performance map meaning that it reads performance metrics (capacity,
and power consumption in this case) from an external data file as a function of inlet conditions. The inlet
conditions, in this case, are the temperature of water returning from the load and the ambient temperature.
There are two methods by which the data files can be revised.
The recommended method is for the user to find a manufacturer of air cooled chillers online and to search
through the available product literature to find a chiller that has a capacity as close as possible without being less
than the peak total cooling load required by the AHU. The product literature will often contain performance data
tables that show how the chiller’s cooling capacity, and power consumption vary with inlet water temperature, set
point temperature and ambient temperature. The data tables in the literature can be transcribed into the format
required by Type118.
The less correct method for revising data files is to take an existing data file and renormalize it to a different rated
capacity. Chillers are rated at a certain combination of outdoor dry bulb temperature, return water temperature
and chiller set point temperature. Locate the performance point in the default data file that corresponds to the
rated point. Divide each of the values of cooling capacity in the data file by the cooling capacity at the rated point.
Do the same for the power consumption, dividing each value by its respective value at the rated condition. You
now have a normalized data file. At the rated point you should have values of 1 for each of the total capacity and
power consumption. Next, multiply each capacity multiplier value (the values in the first column) in the normalized
file by the desired total capacity of the ACC that you wish to create. Do the same with the power consumption
values. You now have a non-normalized file that corresponds to a theoretical ACC whose rated capacity matches
the requirements of the AHU that is to be served by the coil. Use caution with this method as it is quite possible to
make a chiller with unrealistic COP values. Care should be taken to verify the resulting chiller’s COP as a function
of time throughout the simulation.
10.7.10. Outputs
Three output devices are used in this example. Note that by default the “outputs” layer is hidden in the Simulation
Studio so the output producing Types do not appear. To display the outputs layer, right click in the Studio
Assembly Panel and select Show Layers: Output from the context menu.
10–37
TRNSYS 18 – Examples
First, ZONE PLOT, BOILER LOOP PLOT, and CHILLER LOOP PLOT (instances of Type65) plot the air
temperature of each zone in the building, the ambient temperature, the temperatures and mass flow rates around
the hot water loop and the temperatures and mass flow rates around the chilled water loop.
Second, the performance of the major pieces of equipment in the system is summarized in the simulation
summary report (*.ssr) file that is automatically produced when the simulation runs.
Finally, a printer/integrator (Types46) is used to write certain output values to a pair of external text files. The
Type46 printer/integrator reports hourly and monthly values of the power consumption of the ACC, AHU fan,
boiler, and pumps as well as the power consumption of lights and building plug loads (which are set by schedules
and which are also used as heat gains to the space throughout the simulation).
10–38
TRNSYS 18 – Examples
It is assumed that a simulation has previously been carried out to determine the peak heating and cooling load for
each of the five zones in the building.
Location: ..\%TRNSYS18%\Examples\HVACTemplates\System8.tpf
First, the central air handler model is unlike many other TRNSYS HVAC component models in that it is driven by
loads instead of being driven by inlet conditions and a control signal. It is therefore necessary to put the zones of
the building being conditioned into energy rate control. This means that idealized heating and cooling types are
implemented in TRNBuild and that the sensible energy demands of each zone are set up as Type56 outputs that
are passed to the AHU model.
Second, many central VAV air handlers contain a cooling coil but no heating coil and distribute cold air to all
zones in the building so long as at least one zone is calling for cooling. Zones that are overcooled by the supply
air are heated at the terminal box by use of the reheat coil therein. From a modeling perspective the fact that cold
air is being distributed to the zones adds an additional (heating) load to the zone that must be accounted for at the
zone level. This load is therefore passed back from the AHU component to the building component.
Third, the VAV modeled in this example has fans both in the central unit and in the terminal boxes.
Parameters 5 and 6 need no modification. These set the logical unit number of an external file containing part
load ratio data for the fan and the number of part load ratio points in the file.
The remaining parameters are the overall AHU rated flow rate, the fan’s rated power, a minimum and maximum
flow rate for each of the VAV boxes served, and the power consumed by the fans in each of the terminal units.
Under design circumstances, the minimum and maximum flow rates would be determined by an engineer and
would be available from the building’s construction documents. In the case of the present example some other
method is needed. While there are many methods available for determining these flow rates, the one selected for
10–39
TRNSYS 18 – Examples
the current purpose was to run the building with its heating and cooling set points, its lighting, occupancy, and
plug load profiles, and its outdoor air requirement. The run was set up to produce an output file containing hourly
sensible heating, sensible cooling, and latent cooling loads for each of the five zones. It is worth noting that while
Type56 was used to determine the sensible cooling load, a component from the TESS Loads and Structures
Library (Type2280) was used to determine the latent load of each space. For each zone, the peak hourly sensible
heating and total cooling loads were used to determine the maximum airflow rate for each zone assuming an 11C
(20F) temperature difference between room air temperature and supply air temperature. The minimum airflow rate
for each zone was set as 2 Lps/m2 of floor area served, a value given by ASHRAE Standard 90.1-2007 Appendix
G. The sum of the maximum air flow rates is set as the AHU’s “design air flow rate” parameter. The same value is
entered in the “OA quantity” equation block as a mass flow rate in order to correctly calculate the AHU’s outdoor
air fraction. The maximum and minimum airflow rates for each zone are also set as Type152 parameters. The
system fan power was set based on an algorithm detailed in the ASHRAE 90.1-2007 Appendix G “Performance
Rating Method.” The algorithm gives a total fan power allowance for the central unit and terminal box units. The
fan power of each terminal box unit was set based on the assumption of 0.136 W/L.s.
The reheat coils in each terminal unit are not to be capacity limited in this example; their capacity parameters are
therefore all set to -1 (indicating unlimited)
Inputs 4 and 5 set limits on the supply air temperature for the central unit. In the present example these values
are constant and Type152 will automatically determine the central unit supply air temperature that minimizes the
need for terminal unit heating coil use.
The next input (6) sets the fraction of the total air flow that is fresh outdoor air. A typical value is about 0.2 (20%
outdoor air, 80% return air). In this example, we would like to shut off the outdoor air when the building is not
occupied. An equation is therefore defined in the “OA quantity” equation block to divide the currently required
outdoor air flow rate by the VAV AHU’s rated air flow rate. The way that the equation is set up, when the
occupancy schedule drops to zero, no more outdoor air is required and fOA goes to 0. Otherwise, fOA has a
value that is some fraction of the VAV’s total flow rate. The equation fOA is connected to Type152 input 6.
Inputs 7 and 8 are control signals used to tell Type152 when the preheat coil and when the economizer may be
used. For simplicity sake in this example, both the preheat coil and the economizer may be used at any time; thus
their values are set to be constantly 1. Often preheat coils are disabled during summer so that they do not turn on
during a cool night.
The next set of 15 inputs consist of the 5 zone temperatures, 5 zone relative humidities, and 5 zone sensible
energy demands. The sensible energy demands expected by Type152 use the same sign convention as the
Type56 default zone load outputs and as such are a direct connection from Type56.
Another set of 5 inputs are available to add energy gains to the return air stream if the user chooses. In some
buildings, the plenum (the space above the suspended ceiling and below the floor above) is used as the return air
duct. Lights and equipment can be installed in the building such that they reject heat into the plenum space
instead of into the conditioned space. The next 5 inputs to Type152 allow those gains to be correctly added to the
return air stream so that they are seen by the AHU but not directly by the occupied space. In this example, the
return air is assumed to be ducted and the plenum space is taken to be part of the conditioned zone volume.
The final set of 5 inputs allows the heating coils in terminal units to be disabled some or all of the time. In the case
of this example, the heating coils are always available so the values of these inputs are set to 1.
10–40
TRNSYS 18 – Examples
In the present example, a series of equations in the “ht cap lims” equation block perform this function. Each
equation computes an estimated capacity for the heating system by using each terminal unit’s full air flow rate, the
current zone temperature, and an assumed heating supply air temperature of 35C. These equation results are
passed to Type56 and are used to limit each zone’s heating type. When you run the example, note that while the
zones return from their nighttime heating setback temperature quickly, they do not do so instantaneously.
It is possible the limit the capacity of the heat/reheat coils in the VAV AHU model. However, doing so will limit the
energy consumed by the reheat coils. The impact of the capacity limitation is a failure to meet the zone load and
simply limiting the reheat coil capacity without passing any information back to the zone model will mean that the
zone is unaffected by the failure.
Capacity limitations are not placed on the cooling side because in this example, the cooling set point temperature
is not increased during the night and therefore the “instantaneous return to set point” problem is of no concern.
10–41
TRNSYS 18 – Examples
qChillerImpose The total amount of energy that must be supplied by the chiller is the AHU’s cooling coil
energy requirement.
mWant_CHW This equation computes the flow rate at which liquid must be supplied to the load in order
for the liquid to return to the chiller with a 6.7C temperature rise.
lpsRtd_P2 This equation sets the chilled water pump’s rated flow rate. The value was obtained by
running a simulation and taking the maximum value of the mWant_CHW equation over the
course of the year.
mRtd_P2 This equation converts the units of the pump rated flow rate to kg/h.
pRtd_P2 This equation estimates the pump’s rated power based on the assumption of 0.084W/lps
(19W/gpm)
yP2 This equation provides a control signal for the pump. The pump will run at the desired flow
rate of mWant_CHW but will turn off completely if there is no cooling load on the loop.
vol_CHWbuffer This equation automatically sets the volume of a buffer tank in the chilled water loop. The
tank is sized to hold 1.5 times as much liquid as the pump in the loop can transfer during a
single time step. The tank is included in the loop for numerical stability of the simulation.
h_CHWbuffer This equation automatically sets the height of the buffer storage tank such that it is twice as
tall as its diameter.
T_ChillerRet This equation is a rearrangement of the mWant_CHW equation used here to compute the
load return temperature.
mChillerRet This equation is included only to facilitate connections within the chilled water loop.
The chilled water loop is pumped to maintain a 6.7C temperature difference between supply and return. The air
cooled chiller is controlled to maintain a 6.67C supply temperature to the load.
The TRNSYS air cooled chiller model is a performance map meaning that it reads performance metrics (capacity,
and power consumption in this case) from an external data file as a function of inlet conditions. The inlet
conditions, in this case, are the temperature of water returning from the load and the ambient temperature.
There are two methods by which the data files can be revised.
10–42
TRNSYS 18 – Examples
The recommended method is for the user to find a manufacturer of air cooled chillers online and to search
through the available product literature to find a chiller that has a capacity as close as possible without being less
than the peak total cooling load required by the AHU. The product literature will often contain performance data
tables that show how the chiller’s cooling capacity, and power consumption vary with inlet water temperature, set
point temperature and ambient temperature. The data tables in the literature can be transcribed into the format
required by Type118.
The less correct method for revising data files is to take an existing data file and renormalize it to a different rated
capacity. Chillers are rated at a certain combination of outdoor dry bulb temperature, return water temperature
and chiller set point temperature. Locate the performance point in the default data file that corresponds to the
rated point. Divide each of the values of cooling capacity in the data file by the cooling capacity at the rated point.
Do the same for the power consumption, dividing each value by its respective value at the rated condition. You
now have a normalized data file. At the rated point you should have values of 1 for each of the total capacity and
power consumption. Next, multiply each capacity multiplier value (the values in the first column) in the normalized
file by the desired total capacity of the ACC that you wish to create. Do the same with the power consumption
values. You now have a non-normalized file that corresponds to a theoretical ACC whose rated capacity matches
the requirements of the AHU that is to be served by the coil. Use caution with this method as it is quite possible to
make a chiller with unrealistic COP values. Care should be taken to verify the resulting chiller’s COP as a function
of time throughout the simulation.
10.8.10. Outputs
Three output devices are used in this example. Note that by default the “outputs” layer is hidden in the Simulation
Studio so the output producing Types do not appear. To display the outputs layer, right click in the Studio
Assembly Panel and select Show Layers: Output from the context menu.
First, ZONE PLOT and CHILLER LOOP PLOT (instances of Type65) plot the air temperature of each zone in the
building as well as ambient temperature and the temperature and flow rate of water in the chilled water loop
respectively.
Second, the performance of the major pieces of equipment in the system is summarized in the simulation
summary report (*.ssr) file that is automatically produced when the simulation runs.
Finally, a printer/integrator (Types46) is used to write certain output values to a pair of external text files. The
Type46 printer/integrator reports hourly and monthly values of the power consumption of the air cooled chiller,
AHU fan, terminal unit fans, preheat and reheat coils as well as the power consumption of lights and building plug
loads (which are set by schedules and which are also used as heat gains to the space throughout the simulation).
10–43
TRNSYS 18 – Examples
Location: ..\%TRNSYS18%\Examples\SDHW\SDHW.tpf
10.9.1. Load
The load is specified by a daily repeating forcing function using Type14. The value specified for each time period
of the forcing function is the fraction of the total daily water draw that is drawn during that time period. The forcing
function value is then multiplied by a daily total water draw of 200L to arrive at the flow rate (in kg/h) of water that
passes either through the hot water tank or is bypassed around the tank if the tank temperature is above the
desired delivery temperature. The temperature of the inlet water is set to a constant value of 15C in the “Daily
Load” equation block.
10.9.3. Tank
The tank model is that of a constant volume vertical cylinder. The model allows the user to define two pairs of
inlet/outlet ports. Because the tank is constant volume, the amount of flow that the user specifies as entering the
tank must also leave the tank. Furthermore, the ports are paired in such a way that the quantity of flow entering
through inlet port 1 exits through outlet port 1. Similarly, the quantity of flow entering through inlet port 2 exits
through outlet port 2. The user is able to set the height at which the inlet and outlet ports are located by means of
the Type’s parameters.
The tank model accounts for thermal stratification by breaking the tank into a user specified number of isothermal
nodes. The nodes are numbered such that node 1 is at the top of the tank and node n is at the bottom of the tank.
storage tanks. The temperature of the tank node at the user-specified thermostat height is passed to an on/off
controller model where the tank’s set point temperature is defined to be 60C. The control signal is then passed to
an equation that multiplies the control signal by 9000 kJ/h (2.5kW), the heating capacity of the electrical element
in the tank. The result of the equation is then passed back to the tank as an energy input.
Collector Loop
The collector loop consists of three components: the collector array (Type1), a constant speed pump (Type114),
and a differential controller (Type2).
The pump is set up such that when it is on, it delivers 160 kg/h (0.04 L/s) of flow from the bottom of the tank to the
inlet of the collector array. When on, the pump consumes 66W.
The differential temperature controller watches the temperature at the outlet of the solar array and at the bottom
of the tank. When the collector outlet temperature exceeds the tank bottom temperature by 10C (the upper dead
band temperature difference) the controller turns on the pump. When the collector outlet temperature drops to 2C
ABOVE the tank bottom temperature (the lower dead band temperature difference) then the controller turns the
pump off. This controller is somewhat different than a room thermostat in two ways. First, it bases its control
decision on the difference between two temperatures (regardless of their magnitude) instead of by comparing a
watched temperature to a predefined set point. Second, the controller is designed to shut off before the watched
temperature is driven below its dead band. If the user wishes to run the collector pump until the tank bottom
temperature is below the tank bottom temperature, it suffices to set the lower dead band temperature difference to
a negative number.
The collector array is set up with an area of 4m 2. One of the most commonly asked questions in solar water
heating modeling is as to the correct way of increasing the size of the collector array. Let us assume that the 4m 2
is the size of a single collector module. If the user wishes to add a second collector in series they must double the
values of both the first and second parameters. If, instead the user wishes to add a second collector in parallel
then again they must take two steps. First, they must double the value of the second parameter. Second, they
must double the flow rate that is passing through the collector array (typically by increasing the rated flow of the
pump). If the users wishes to go from a single panel (4m 2 array) to an array that has four modules arranged with
two in parallel and two in series then they must perform three steps. First, change the value of the first collector
parameter from 1 to 2. Second, change the collector array area from 4 to 16m 2. Third, they must double the flow
rate passing through the collector array.
10.9.5. Output
Five output devices are used in this example. Note that by default the “outputs” layer is hidden in the Simulation
Studio so the output producing Types do not appear. To display the outputs layer, right click in the Studio
Assembly Panel and select Show Layers: Output from the context menu.
First, “Plotter 1” and “Plotter 2” (instances of Type65) plot the temperatures and flow rates in the collector loop
(source side) and on the tank/tempering valve (load side) of the system. The Type65s are set up in this case to
also write their results to output files whose names are specified in the “External Files” tab of each instance of
Type65. Recall that the *** syntax indicates that the name of the input file should be appended on to the specified
file extension and that regardless of the file extension, TRNSYS produces text output files.
A pair of Type24 integrators and Type25 printers generate output files containing daily and simulation total
results. The “efficiencies” equation block uses daily and simulation total integrated values to compute a daily and
simulation total collector efficiencies as well as daily and simulation total solar energy factors. The solar energy
factor is defined as:
SEF = 1 – (qAux/qDelivered)
Finally, a printer/integrator (Types46) is used to compute a system energy balance on a monthly basis.
10–45
TRNSYS 18 – Examples
10.10.1. Load
The load is defined by a set of Type14 forcing functions and by a Type41 forcing function sequencer. The load is
set somewhat arbitrarily in that its shape and magnitude are somewhat representative of a day peaking load.
Each of the forcing functions set a value between 0 (no electrical load) and 1 (peak electrical load) for each hour
of the day. These fractions of peak load will be set later in an equation. This method makes if far easier to scale
the magnitude of the electrical load without having to reset all of the Type14 parameters. One Type14 is used to
set a weekday schedule. A second is used to set a Saturday schedule and a third is used to set a possible
Sunday schedule. The three forcing functions are combined together into a single weekly forcing function using
Type41.
Once the weekly fractional load profile is set, it is passed into an equation block (pLoad) where it is multiplied by
the peak load (500W) and by a conversion factor of 3.6 to get the load in kJ/h. The {PW1} syntax at the end of the
equation is a code that defines the units of the equation result to be kJ/h.
10.10.2. PV
The PV is modeled using Type103 in MPPT mode 1 meaning that the array is assumed to operate at its
maximum power point. Type103 is appropriate for modeling monocrystalline silicon panels. For the purposes of
this example, the default panel parameters are used except that there are assumed to be 2 panels in series in
each of 2 parallel strings (4 panels total). The inputs to this model are provided by the Type15 weather data
reader/processor. The slope and azimuth of the array are set by defining a surface sloped at 45 degrees and
facing an azimuth of 0 (south) in Type15. The slope and azimuth of the surface are passed as inputs to the PV
array. The methodology of taking slope and azimuth as inputs would allow a user to define an array that tracks
the sun if desired.
10.10.3. WECS
The wind turbine (WECS) is modeled using Type90. The default parameters for the model are modified according
to the site (Madison, WI) which is 226m above sea level. It is assumed that the wind speed data in the weather
data file was collected at a tower height of 10m. The 1kW wind turbine selected for this example can be mounted
on a tower height ranging from 18 to 30m according to the manufacturer. A tower height of 24 was arbitrarily
chosen for the example. The remaining parameter information about the wind turbine comes from an external
data file (file name and location set in the External Files tab). The data file contains two kinds of information. First
there are a number of lines that pertain to the turbine’s rated conditions. It is important to fill in the fields for the
rotor height (Rotor_Ht), the rotor diameter (Rotor_Di), the sensor height (Sensr_Ht), the rated turbine power
output (Pwr_Ratd), the rated wind speed (Spd_Ratd) and the number of data pairs that are provided in the file
10–46
TRNSYS 18 – Examples
(Num_Pair). The other data (Sher_Exp, Turb_Int, and Air_Dens) is of secondary importance and should of course
be set if values are known but can be left at their default values if needed.
Lastly, the data file provides a power curve for the turbine. The curve is provided as a set of Num_Pair pairs of
values; a wind speed in m/s and a power output in kW.
The inputs to the WECS come primarily from the weather data reader/processor (Type15). The control signal is
left unconnected and set to 1 to indicate that when the wind speed is high enough, the WECS should run and
produce power. There should not be times when the WECS is disabled. The air pressure input required by
Type90 is in units of Pa whereas Type15 provides atmospheric pressure in atm. Consequently, an equation
([atm]->[Pa]) converts the air pressure units from Type15 before passing the value to Type90. The shear
exponent input is left unconnected in this case to indicate that it remains constant throughout the simulation. The
“more” button and the Type90 mathematical reference documentation provide additional details on setting the
shear exponent value. For the purpose of this example, it will suffice to know that the shear exponent is a
measure of the height of objects near the turbine that have an impact on the height of wind boundary layer (and
therefore on the windspeed) in the vicinity.
10.10.4. Battery
The simplest available battery model (Type47) is used in the example and the parameters are left at their default
settings since these result in a reasonable amount of battery usage during the course of the simulation without the
battery being over or undercharged unduly. The battery is assumed to start the simulation at 50% charge. This
value is set in the battery model’s “derivatives” tab.
The Type48 parameter for the charge to discharge limit on fractional state of charge (FSOC) offers a way of
preventing the battery from getting stuck at its low state of charge limit. Say that the battery has reached its low
limit when enough renewable energy becomes available to both meet the load and to charge the battery. If the
charge to discharge limit is set above the low FSOC limit then the battery will charge back up to the higher FSOC
before it can begin to discharge. If the charge to discharge limit is set below the low limit FSOC then the battery
will be able to discharge again as soon as it begins to charge. Setting the charge to discharge limit higher than the
low limit will usually result in more backup power usage since charging the battery takes precedence until the
charge to discharge limit is met. In this case the charge to discharge limit is set to 0.3 and the low limit FSOC is
set to 0.1. This means that the battery can be discharged to 10% of its capacity and then will be recharge to 30%
of its capacity before it can be discharged again.
10.10.6. DEGS
Type120 is used in its “generic DEGS” form to model a backup power source that can be brought online when
there is insufficient renewable energy and battery power to meet the current load. The DEGS has a minimum
10–47
TRNSYS 18 – Examples
turndown ratio (the minimum amount of power that it can produce when ON) of about 0.25. This means that the
DEGS can produce at minimum, 25% of its rated power. When the load on the DEGS is less than 25% of its rated
capacity, the excess is used to recharge the battery.
10.10.7. Output
Three types of output are provided in this example. First, various system variables are plotted online as the
simulation progresses. Second, the performance of the battery, WECS, PV, DEGS, charge controller, weather,
and load are all summarized in the *.ssr file that is automatically produced when the simulation runs. Third, a
Type46 is used to obtain daily totals of the major power flows in the simulation. The integrated, recorded power
flows are defined as follows:
pDEGScharge: [kJ] the power produced by the diesel engine generator that is used to charge the battery.
pToBattery: [kJ] the amount of power sent to the battery by the system controller.
pFromBattery: [kJ] the amount of power drawn from the battery by the system controller.
pLoad: [kJ] the electrical power required by the load and provided by the system.
pDumped: [kJ] the power dumped by the system controller because the battery was fully charged and generated
power exceeded the load.
pDEGSload: [kJ] the power produced by the diesel engine generator that is used to meet the system’s load (not
counting the power used to charge the battery.
pInvLoss: [kJ] power lost to heat by the system controller due to its inefficiency.
10–48
TRNSYS 18 – Examples
10.11.3. Load
The load is defined by a pair of Type14 forcing functions, one of which sets a monthly profile (in kW) and the other
of which scales the profile for each month of the year. The two profiles are combined together in an equation
block called “load” and are multiplied by 1000 to obtain the load in W. The {PW2} syntax in the load equation
defines the units of the equation result to be W.
10.11.4. WECS
The wind turbine (WECS) is modeled using Type90. The default parameters for the model are modified according
to the site (Saskatoon, SK) which is 480m above sea level. The parameter information about the 600kW wind
turbine corresponds to information in an external data file the file name and location of which is set in the External
Files tab.
The inputs to the WECS come primarily from the weather data reader/processor (Type15) and the data reader
(Type9). The control signal is left unconnected and set to 1 to indicate that when the wind speed is high enough,
the WECS should run and produce power. Setting this value to zero would disable the WECS and might be done
if the H2 tank is full. Type90 requires that its atmospheric pressure be given in Pa whereas Type15 provides
atmospheric pressure in atm. Consequently, an equation ([atm]->[Pa]) converts the air pressure units from
10–49
TRNSYS 18 – Examples
Type15 before passing the value to Type90. The shear exponent input is left unconnected in this case to indicate
that it remains constant throughout the simulation. The “more” button and the Type90 mathematical reference
documentation provide additional details on setting the shear exponent value. For the purpose of this example, it
will suffice to know that the shear exponent is a measure of the height of objects near the turbine that have an
impact on the height of wind boundary layer (and therefore on the wind speed) in the vicinity.
The controller model has made a determination as to how much power it would like the fuel cell to provide (given
some knowledge of the load, the amount of renewable power available and the state of charge in the hydrogen
tank). Since the controller knows power and the fuel cell wants current, a power converter (Type175) must be
used to compute the amount of current available given the fuel cell’s present operating voltage and the power
required by the load. This situation causes a potential convergence problem in the simulation. The fuel cell
determines its operating voltage. The operating voltage gets sent back to the controller, which computes the
amount of current that it requires at that voltage. It passes the current requirement to the fuel cell, which then
determines a new operating voltage. The new voltage goes back to the controller, which then computes a new
current requirement. In order to break this potentially non convergent iteration, an input delay device is inserted
between the fuel cell and the controller. The controller is now making its calculations based on the fuel cell
voltage from the previous time step so it is incumbent that the simulation be run with a short time step.
10–50
TRNSYS 18 – Examples
10.11.10. DEGS-1
Type120 is used in its “generic DEGS” form to model a backup power source that can be brought online when
there is insufficient renewable energy and hydrogen to meet the current load. The DEGS is controlled by
Type105, which determines not only the set point power for the DEGS but also the number of generators that
should be on at any given point in time. Note: the DEGS only provides backup power to the electrical load, not to
the gas compressor. In reality there is a low on the amount of power that a diesel engine generator can produce
when operating. Typically this value is about 30-50% of rated capacity. For the purposes of this example, the low
limit on power produced by DEGS-1 is set to 0kW meaning that we assume the generator can modulate to
produce any amount of power from 0kW up to its 360kW rated maximum.
10.11.12. PV
The PV is modeled using Type190 in MPPT mode 2 meaning that the array is assumed to operate at its
maximum power point and in inverter mode 1 meaning that the inverter is not modeled as part of Type190 but
externally (in this case by Type47). Type190 is typically used to model PV arrays that are not well characterized
by Type103’s assumptions (i.e. non monocrystalline silicon panels). In this example, there is no particular need to
use Type190 in place of Type103; either model could be used. For the purposes of this example, the default
panel parameters are used except that there are assumed to be 16 panels in series in each of 20 parallel strings
(320 panels). 16 panels in series were selected so that the approximate array voltage (17V/panel x 16 panels =
272V) would be a reasonable voltage for charging the battery bank whose equilibrium voltage is approximately
220V. The 20 strings in series were selected so that the compressor’s power requirements would be met most of
the time by the combination of the PV and battery.
10–51
TRNSYS 18 – Examples
The inputs to the PV model are provided by the Type15 weather data reader/processor and by the measured
wind data file (as read by Type9). The slope and azimuth of the array are set by defining a surface sloped at 45
degrees and facing an azimuth of 0 (south) in Type15. The slope and azimuth of the surface as well as the
quantity of solar radiation are passed as inputs to the PV array.
10.11.13. Battery
An advanced battery model (Type185) is used in this example. It differs from the simple battery model (Type47)
primarily in that it computes gassing current and power. When a battery is charged at too high a current or too
high a voltage then some of the charging power results in the battery offgassing, which is detrimental to the
battery. Default parameters are used except in setting the battery capacity. A 690Ah battery was selected in order
to be able to provide the gas compressor’s power requirements (at 220V) during a 12h period. 12 hours was
chosen to be the approximate time that power requirements could not be directly met by the PV array itself.
The “charge to discharge limit on FSOC” parameter in the charge controller one is set to 0.85. This means that if
the battery starts charging then it must be charged all the way to 85% of its full charge before it can begin to
discharge. When you look at the online plot of the PV subsystem, note that there are times when the backup
power source (DEGS) is meeting the gas compressor’s load even though there is PV energy available and even
though the battery is partially charged enough that it could provide some power. Changing the “charge to
discharge limit” parameter will allow the battery to again discharge in these situations but it will also cause the
system to switch back and forth between charge and discharge mode more frequently.
10.11.15. DEGS-2
Type120 is again used in its “generic DEGS” form to model a backup power source that can be brought online
when there is insufficient renewable energy and battery power to meet the gas compressor’s present electrical
load. In the case of DEGS-2, a minimum turndown ratio of 30% is set. Note in the online plot of the PV subsystem
that there are times when DEGS-2 is providing more power than the gas compressor requires. In this example,
that excess power is assumed to be thrown away; no provision is made for what to do with it.
10.11.16. Output
Various output devices are used in this example. Note that by default the “outputs” layer is hidden in the
Simulation Studio so the output producing Types do not appear. To display the outputs layer, right click in the
Studio Assembly Panel and select Show Layers: Output from the context menu.
First, Type188 (busbar) is used to perform a basic energy balance on the H2 system. The basic power inputs and
demands on the H2 system are sent to the busbar component, which sums them and sends the energy
imbalance to an online plot (PLOT1)
10–52
TRNSYS 18 – Examples
Second, various system variables are plotted online by Type65 as the simulation progresses. PLOT1 shows the
power required by the electrolyzer (pElectrolyzer), the generated by the fuel cell (pFuelCell), and the result of the
Type188 energy balance (pImbalance) as well as the normalized H2 tank pressure (H2TankLevel). PLOT2 shows
the basic power requirements in the PV subsystem. These are: pReqComp (power required by the gas
compressor), pDelComp (power delivered to the gas compressor), pToFromBatt (power used to charge the
battery is positive, power drawn from the battery is negative), pWantDEGS (power required by the compressor
from the backup diesel generator), pGetDEGS (power provided by the diesel generator), pPV (power generated
by the PV array), and pDump (power dumped because the battery was full and the compressor’s requirements
were met). PLOT2 also shows the battery state of charge.
Third, the performance of DEGS, electrolyzer, fuel cell, gas storage, controls, WECS, power converters, PV,
system controllers, and battery are all summarized in the simulation summary report (*.ssr) file that is
automatically produced when the simulation runs.
Finally, Types25 and 28 are used to write certain output values to external text files. The Type25 printers report
hourly values (parameter 1 is set to 1) where the Type28 is used to make monthly summaries (parameter 1 is set
to -1). PRINT1 writes hourly value of power provided by the wind turbine (pWECS) load power (PLOAD), power
provided by the diesel engines (pDEGS) power consumed by the electrolyzer (pEly) power produced by the fuel
cell (pFC), power dumped because the storage was full (pDump), H2 tank state of charge (SOC), the electrolyzer
on/off control signal (yELY), the fuel cell on/off signal (yFC), and the number of diesel generators in operation
(nDEGS). PRINT1 creates an output file whose name is set in its “external files” tab.
PRINT2 writes hourly values of the following variables to a text file. The name of the file is set in PRINT2’s
“external files” tab. The variables written are the power sent to the electrolyzer by the controller (PELYCtrl), the
power actually received by the electrolyzer (PELY), the power demanded of the fuel cell by the controller
(PFCCtrl), the power generated by the fuel cell (PFC), the electrolyzer operating voltage (UELY) and the fuel cell
operating voltage (UFC).
It is worth noting that Type25 prints the value of outputs over the previous time step. The simulation time step in
this example is 1 hour so the Type25s are giving a representation of what happens during every simulation time
step. If the simulation time step is decreased without changing the Type25 printing interval then the Type25
printers will only indicate the state of the system at the time step just before the end of each simulation hour.
The final output file is produced by Type28. Type28 can be used to integrate and print in one component. It also
allows the user to perform basic mathematical operations on the input values (such as combining them together
to make an energy balance). The operations are specified as parameters to Type28; each parameter value is a
code that corresponds to a particular operation (a value of “1” indicates that Type28 should replace the two values
on top of the stack with their product). Operation codes 0 and -4 are used in this example. Operation code 0
indicates that the value of the next input should be placed on top of the operation stack. Operation code -4
indicates that the value on the top of the stack should be set as the next output and that the value should be
removed from the stack. This method of providing operation codes for stack manipulations is not really worth the
effort in this example since inputs are simply being set as outputs. The methodology, however, is general and can
be used to sum inputs together or to perform other calculations if desired.
Examination of the Type28 output file (*.sum) will show that there is an imbalance between the amount of power
produced and the amount of power consumed during the month that the simulation is set to run by default. This is
normal as the output file does not contain entries for the amount of power that is being lost as heat by the various
devices.
10–53
TRNSYS 18 – Examples
The following is a non-exhaustive list of examples. We encourage you to explore the TRNSYS examples in the
Simulation Studio.
3D_building
Example using the Multi-Zone Building model (Type56) as generated by the Trnsys3d Plugin for SketchUp ®.
This example is described in detail in Section 9.3.2 of 09-Tutorials.pdf (Volume 9 of the Trnsys documentation).
Begin
The mathematical formulation of components imposes a causal relation between inputs and outputs. Sometimes,
it is desired to calculate the inputs of a component based on a desired value of an output. By using a feedback
controller, this example calculates the mass flow rate required to achieve a given heat transfer rate across a heat
exchanger.
Calling CONTAM ®
Examples using the link between TRNSYS and CONTAM (Type 97). CONTAM is required to edit the project files
but not to run the example. CONTAM is available for free download.
Calling EES ®
Example using the link between TRNSYS and EES (Type 66). Requires EES professional to be installed.
Calling Excel ®
Example using the link between TRNSYS and Excel (Type 62). Requires Microsoft Excel 97 or above to be
installed.
Calling Matlab ®
Example using the link between TRNSYS and Matlab (Type 155). Requires Matlab R13 or above to be installed.
A second example (‘Calling Matlab-MultipleUnits’) shows how to run a project with multiple instances of Type155.
Controllers
This example shows the basic settings for a thermostat (Type8) and a generic differential controller (Type2).
Cooling Tower
Cosim_ESP-4
Data Files
This folder contains various examples of data files used by some of the TRNSYS components.
This example illustrates how to use a detailed single-zone building model (Type 19) to calculate the hourly cooling
and cooling loads, as well as the maximum and minimum loads.
Diesel Dispatch
This example illustrates the use of Type 120 (Diesel Electricity Generator Set) and Type 102 (DEGS Dispatch
Controller) to adapt the number of running engine to a given electrical load. Both components were formerly part
of the HYDROGEMS library authored by Øystein Ulleberg, IFE
Electrolyzer Controller
This example illustrates the use of Type 100 (Electrolyzer controller) in combination with Type 160 (electrolyzer).
Feedback Control
This directory includes different examples derived from the SDHW and Sunspace examples, as well as projects
that use a simple zone model (Type 88) to demonstrate the use of Type 22 (Iterative Feedback controller) and
Type 23 (PID Controller). Type23 is also used in a pair of examples intended to show how it can be used in
cooling applications and in combined heating and cooling applications.
HVAC-building
This example shows how to simulate an HVAC system that connects to a multizone building, using the ventilation
input for each zone.
HVACTemplates
These examples shows how to simulate various HVAC systems connected to a multizone building using the
ventilation input for each zone.
HVAC System 1 illustrates a unitary packaged terminal air conditioner cooling system with hot water coils for
heating. This example is fully documented in section 10.1
HVAC System 2 illustrates a unitary packaged terminal heat pump system. This example is fully documented in
section 10.2
HVAC System 3 illustrates a unitary packaged rooftop air conditioner cooling system with fossil fuel furnaces for
heating. This example is fully documented in section 10.3
HVAC System 4 illustrates a packaged rooftop heat pump system. This example is fully documented in section
10.4
HVAC System 5 illustrates a packaged variable air volume (VAV) system with direct expansion cooling and boiler
fired hot water coils for heating. This example is fully documented in section 10.5
HVAC System 6 illustrates a packaged variable air volume (VAV) system parallel fan powered boxes having
direct expansion cooling and electric resistance coils for heating. This example is fully documented in section 10.6
HVAC System 7 illustrates a packaged variable air volume (VAV) system with chilled water coils for cooling and
boiler fired hot water coils for heating. This example is fully documented in section 10.7
10–55
TRNSYS 18 – Examples
HVAC System 8 illustrates a packaged variable air volume (VAV) system parallel fan powered boxes having
chilled water coils for cooling and electric resistance coils for heating. This example is fully documented in section
10.8
Microprocessor Controller
Parametric runs
This directory includes a TRNSYS Studio project that is used as a basis to generate a deck file for a parametric
study. To perform the parametric study, Open SDHW-ParametricRuns.dck in TRNEDit and then open the
parametric table (SDHW-ParametricTable.tbl), or refer to Volume 6 for more information on this example.
Photovoltaics
This directory contains examples that show how to represent the IV curve of a photovoltaic panel using a 5-
parameter model, and how to predict the performance of a system with photovoltaic panel and inverter.
PVT
This example shows the use of Type50 and Type38 as well as an implementation of the simple battery and
charge controller components.
This example shows how Type9 interprets the different parameters when it reads external data files. Please go to
Volume 5 –Mathematical Reference for the explanation of this example.
Restaurant
This is the "Restaurant" example described in detail in the TRNBuild and Type 56 manual (Volume 5 of the
TRNSYS documentation).
SDHW
This example models a simple Solar Domestic Hot Water (SDHW) System. It also illustrates the use of line styles
to help understand the information and fluid flows in a simulation. This example is fully documented in section
10.9
Shading
This directory includes two examples of using Type67 (Shading Masks). In ShadingMasks.tpf, Type67 is used to
calculate the shading effect of a faraway mask on a row of solar thermal collector panels. In
Combined67And34.tpf, a Type67 Shading Mask component is used upstream of a Type34 Overhang and
Wingwall Shading component.
Slab on Grade
This example illustrates the implementation of calculating the effects of energy transfer between a multi-zone
building (Type56) model and the earth surrounding underneath the building.
“WindDieselFuelCellElectrolyzerPV” illustrates a system where a Fuel cell (Type 173), an Electrolyzer (Type 160)
and a Hydrogen storage tank (Type 163) are used to store the electricity generated by a wind turbine and to
10–56
TRNSYS 18 – Examples
produce electricity from hydrogen when needed. The components of the hydrogen system were formerly part of
the HYDROGEMS library. This example is fully documented in section 10.11
“WindDiesel.tpf” illustrates the use of Type 120 (Diesel Electricity Generator Set) and Type 102 (DEGS Dispatch
Controller) to adapt the number of running engines to a given electrical load that is partly met by wind turbines
(Type 90). Type 120 and Type 102 were formerly part of the HYDROGEMS library.
“WindDieselPV.tpf” illustrates the use of some components that are represented in the other examples in this
directory. However, it also shows the use of the Type47 battery model and Type48 charge controller models. This
example is fully documented in section 10.5
SunSpace
This example is inspired by BESTEST Case 960. It simulates a shoebox building with a glazed sunspace facing
South and an opaque back zone behind it.
SunSpace-Shading
Calculating shading from overhangs and wing walls, as well as from far away objects requires the combination of
Type34 and Type67. This example modifies the SunSpace example, taking into account shading.
TRNSED
This folder includes examples of inputs files that are used to generate stand-alone applications based on
TRNSYS (TRNSED applications – see volume 06 of the documentation set).
TRNSED-Advanced
This directory includes a more advanced TRNSED example than the one that is described in this Getting Started
guide. Refer to Volume 6 for more information on this example and on TRNSED features.
Weather Data
This folder contains examples that illustrate the use of Weather data files distributed with TRNSYS, including US-
TMY2 files generated from the NSRDB database, worldwide TMY2 files generated using Meteonorm ®
10–57