Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
46 views57 pages

10 Examples

Uploaded by

Oum Solayman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views57 pages

10 Examples

Uploaded by

Oum Solayman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

TRNSYS 18

a TRaNsient SYstem Simulation program

Volume 10

Examples

Solar Energy Laboratory, Univ. of Wisconsin-Madison


http://sel.me.wisc.edu/trnsys

TRANSSOLAR Energietechnik GmbH


http://www.trnsys.de

CSTB – Centre Scientifique et Technique du Bâtiment


http://software.cstb.fr

TESS – Thermal Energy Systems Specialists


http://www.tess-inc.com
TRNSYS 18 – Examples

About This Manual


The information presented in this manual is intended to provide a simple guide to get you started using TRNSYS
18. This manual is not intended to provide detailed reference information about the TRNSYS simulation software
and its utility programs. More details can be found in other parts of the TRNSYS documentation set. The latest
version of this manual is always available for registered users on the TRNSYS website (see here below).

Revision history
 2017-02 For TRNSYS 18.00.0000

Where to find more information


Further information about the program and its availability can be obtained from the TRNSYS website or from the
TRNSYS coordinator at the Solar Energy Lab:

TRNSYS Coordinator Email: [email protected]


Thermal Energy System Specialists, LLC
22 North Carroll Street – suite 370
Madison, WI 53703 – U.S.A.

TRNSYS website: http://sel.me.wisc.edu/trnsys

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.

© 2017 by Thermal Energy System Specialists, LLC.

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

S.A. Klein W.A. Beckman J.W. Mitchell

J.A. Duffie N.A. Duffie T.L. Freeman

J.C. Mitchell J.E. Braun B.L. Evans

J.P. Kummer R.E. Urban A. Fiksel

J.W. Thornton N.J. Blair P.M. Williams

D.E. Bradley T.P. McDowell M. Kummert

D.A. Arias M.J. Duffy A.M. Weiss

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.

Contributors to the TRNSYS Simulation Studio are listed in Volume 2.

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

10.1. HVAC System 1: Packaged Terminal Air


Conditioners with Hot Water Coils
In this example a building is cooled by means of packaged terminal air conditioners (PTACs) and is heated by
means of hot water coils. The system is unitary in that each of the five HVAC zones is served by its own HVAC
system. In each unitary system return and outdoor air are mixed together. The mixed air then passes across the
evaporator coil of the PTAC and then across a hot water coil. Air flow is driven by a constant speed fan that runs
constantly during building occupied hours and as required by the thermostat during unoccupied hours. The
example is set up in such a way that the system can be used as a template in other multizone building projects.
This example’s documentation is limited to a discussion of the HVAC system. Discussion of techniques for
creating a building envelope and internal gain schedules can be found in the documentation of other examples
and tutorials.

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.1. System Description


Packaged Terminal Air Conditioners (PTACs) are unitary devices that are commonly used to heat and cool
comparatively small rooms or groups of rooms. They are often configured in a “through the wall” manner and are
commonly used in hotels and dormitories. Cooling is provided by a standard vapor compression refrigeration
cycle while heating can be accomplished by various means. The simplest heating section consists of an electric
resistance coil. This example provides heat by means of a hydronic hot water coil that is tied in to a central boiler.
The fan in this example is assumed to be constant speed and to run continuously during building occupancy (as
defined by a schedule) and intermittently as required by the thermostat to maintain heating and cooling set points
during building unoccupied hours. Each PTAC unit is assumed to have its own outdoor air damper that is open
during building occupied hours.

10.1.2. Variable Naming


Many of the variable names (especially those in the air side) used in this example are intended to follow a pattern
so that groups of components can be copied, pasted, and easily edited for use in other projects. Variable names
commonly have two parts: an identifier and a zone indicator. The identifier gives an indication of the function of
the variable name being set while the zone indicator identifies the HVAC zone for which the variable is relevant.
For example, the variable name used to set the LOWER1 building zone’s supply fan rated volumetric flow rate
variable name is lps_LWR1. In this name, lps_ is intended to indicate that a flow rate specified in liters per second
is being defined while LWR1 indicates that this is the fan flow rate for the HVAC system that serves the zone
LOWER1. In this documentation the zone indicator portion of the variable names will be replaced by XXXX.

10.1.3. Air Side


The building’s conditioning requirements are met by a unitary system in which each HVAC zone is served by its
own HVAC system. Each unitary HVAC system is comprised of six TRNSYS Types and a block of equations. The
Types are: a thermostat, an air mixing plenum, a single speed fan, a PTAC, a hot water coil, and a pump.
10–6
TRNSYS 18 – Examples

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.2. Air Mixing Plenum


Each zone’s air mixing plenum mixes together return air and outdoor air. The relative quantities of outdoor and
return air are set by equations in the equation block for each zone. Outdoor air is delivered to the zone during the
building’s occupied hours (as defined by the “OA sched” Type14 forcing function). In this example the building’s
occupied hours are between 8am and 5pm Monday through Friday. The air temperature and relative humidity of
the Type56 zone are connected to the first inlet of the mixing plenum. Outdoor air temperature and relative
humidity are connected to the second inlet of the mixing plenum.

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.4. Cooling Section (PTAC)


The packaged terminal air conditioner is modeled using Type144. The blower power draw parameter for this
component is set to zero because the fan in the system is modeled using a Type146 instead of by using the fan
that is built in to Type144. Type144 is a “performance map” component meaning that the performance of the
PTAC is defined in an external data file. The file contains values of total capacity, sensible capacity, and power
consumption as a function of present inlet conditions. It is important to know whether the power consumption
values in the data file include or do not include the power consumption of the fans. Type144 assumes that the
data file includes both fan and compressor power and splits the total power that it read from the data file into
compressor power and fan power. Thus if the data file power consumption does include fan power, then the fan
power must be removed from the data file. In the case of this example the fans are being modeled elsewhere (i.e.
not by this Type). The data files, therefore have been modified so that they include only the compressor power.
Resizing the cooling section of the PTAC requires that the external data file be modified as explained in section
10.1.3.4 below

10.1.3.5. Heating Section (Hot Water Coil)


The heating coil in each unit is modeled using Type140. As with the fan in each system, the capacity of the
heating coil is set using variable names so that the heating coil can be resized by changing a few values in the
equation block. The air conditions (temperature, relative humidity, and flow rate) leaving the heating coil are
connected to a VENTILATION type defined for each zone in TRNBuild for Type56.

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

10.1.3.7. Equation Block


The equation block for each unitary HVAC system in this example is intended to automatically calculate as many
equipment sizes as possible based on as few parameters as possible. For example, the flow rate of air through
the system (i.e. the fan size) is determined automatically based on user entered values of peak heating and
cooling load and an assumption about the difference between supply air and room air. In the equations are listed
below the “zone indicator” part of the equation name has been set to XXXX.

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.

10.1.3.8. Resizing the PTAC Units


If the air side group of components is used as a template for a unitary system in another building then the user will
need to revise the external data files that describe the PTAC units. First, please refer to the section in the 04-
MathematicalReference manual that discusses Type144 to familiarize yourself with the requirements of the
external data file.

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. Water Side


The water side of this HVAC system consists of a set of mixing valves, a pump, a boiler, and a supply valve that is
modeled by an equation in this case. On the return side of the water loop each pair of heating coils mixes their
return water together in a cascaded set of valves until the water returning from all the heating coils is mixed
together into a single flow. This flow then passes through a pump, through a boiler where it is heated to a desired
supply temperature and then to an equation block that determines how much flow should go to each of the
heating coils.

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.4.3. Equation Block


The function of this equation block is to compute the fraction of the total pump flow that should go to each of the
zonal heating coils. In this particular system when the pump is on, it provides a constant flow rate of liquid. Each
heating coil requires a smaller flow of liquid than the pump is providing. The pump flow that is not presently
required by the heating coils is bypassed directly to the return side of the loop. The amount of flow required by
each of the heating coils is set by the virtual pump model in each of the unitary systems. The virtual pump model
has a rated flow rate and a control signal. When the thermostat in that zone determines that heat is needed, the
pump turns on. The flow rate of liquid leaving that pump is used as the input flow rate to the heating coil but is
also used in the div-1 equation block to make sure that the supply valve directs the desired amount of flow to the
appropriate heating coil (by way of the virtual pump).

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

10.2. HVAC System 2: Packaged Terminal Heat


Pumps
In this example a building is heated and cooled by means of packaged terminal heat pumps (PTHPs). The system
is unitary in that each of the five HVAC zones is served by its own HVAC system. In each unitary system return
and outdoor air are mixed together then pass across the indoor coil of the PTHP. Air flow is driven by a constant
speed fan that runs constantly during building occupied hours and as required by the thermostat during
unoccupied hours. The example is set up in such a way that the system can be used as a template in other
multizone building projects. This example’s documentation is limited to a discussion of the HVAC system.
Discussion of techniques for creating a building envelope and internal gain schedules can be found in the
documentation of other examples and tutorials.

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

10.2.1. System Description


Packaged Terminal Heat Pumps (PTHPs) are unitary devices that are commonly used to heat and cool
comparatively small rooms or groups of rooms. They are often configured in a “through the wall” manner and are
commonly used in hotels and dormitories. Cooling and heating are both provided by a standard vapor
compression refrigeration cycle. The fan in this example is assumed to be constant speed and to run continuously
during building occupancy (as defined by a schedule) and intermittently as required by the thermostat to maintain
heating and cooling set points during building unoccupied hours. Each PTHP unit is assumed to have its own
outdoor air damper that is open during building occupied hours.

Location: ..\%TRNSYS18%\Examples\HVACTemplates\System2.tpf

10.2.2. Variable Naming


Many of the variable names used in this example are intended to follow a pattern so that groups of components
can be copied, pasted, and edited for use in other projects. Variable names commonly have two parts: an
identifier and a zone indicator. The identifier gives an indication of the function of the variable name being set
while the zone indicator identifies the HVAC zone for which the variable is relevant. For example, the variable
name used to set the LOWER1 building zone’s supply fan rated volumetric flow rate variable name is lps_LWR1.
In this name, lps_ is intended to indicate that a flow rate specified in liters per second is being defined while
LWR1 indicates that this is the fan flow rate for the HVAC system that serves the zone LOWER1. In this
documentation the zone indicator portion of the variable names will be replaced by XXXX.

10.2.3. Air Side


The building’s conditioning requirements are met by a unitary system in which each HVAC zone is served by its
own HVAC system. Each unitary HVAC system is comprised of two TRNSYS Types and a block of equations.
The Types are: a thermostat and an air to air heat pump. The standard TRNSYS library heat pump model
includes a built-in constant speed fan and has the ability to mix return and outdoor air.

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.

10.2.3.2. Heat Pump


The packaged terminal air conditioner is modeled using Type119. Type119 is a “performance map” component
meaning that the performance of the heat pump is defined in a pair of external data files. The file for cooling
performance contains values of total capacity, sensible capacity, and power consumption as a function of present
inlet conditions. The file for heating performance contains values of capacity and power consumption as a
function of current inlet conditions. Type119 assumes that the data files include both fan and compressor power
and splits the total power that it reads from the data files into compressor power and fan power. Resizing the heat
pump requires that the external data files be modified as explained in section 10.2.3.4 below

10.2.3.3. Equation Block


The equation block for each unitary HVAC system in this example is intended to automatically calculate as many
equipment sizes as possible based on as few parameters as possible. For example, the flow rate of air through
the system (i.e. the fan size) is determined automatically based on user entered values of peak heating and
cooling load and an assumption about the difference between supply air and room air. In the equations are listed
below the “zone indicator” part of the equation name has been set to XXXX.

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.

10.2.3.4. Resizing the PTHP Units


If the thermostat/equation/heat pump component group is used as a template for a unitary system in another
building then the user will need to revise the external data files that describe the PTHP units. Before proceeding,
please refer to the section in the 04-MathematicalReference manual that discusses Type119 to familiarize
yourself with the requirements of the external data file.

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

10.3. HVAC System 3: Packaged Rooftop Air


Conditioners with Fossil Fuel Furnaces
In this example a building is cooled by means of packaged rooftop air conditioners and is heated by means of
zonal hot-air furnaces. The system is unitary in that each of the five HVAC zones is served by its own HVAC
system. In each unitary system return and outdoor air are mixed together. The mixed air then passes across the
evaporator coil of the air conditioner and then through the furnace. Air flow is driven by a constant speed fan that
runs constantly during building occupied hours and as required by the thermostat during unoccupied hours. The
example is set up in such a way that the system can be used as a template in other multizone building projects.
This example’s documentation is limited to a discussion of the HVAC system. Discussion of techniques for
creating a building envelope and internal gain schedules can be found in the documentation of other examples
and tutorials.

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.1. System Description


Packaged Rooftop Air Conditioners are unitary devices that are usually split into two parts. The indoor part
consists of the evaporator coil, compressor, throttling valve and an evaporator coil fan. The outdoor part consists
of the condenser coil and condenser fan. Refrigerant lines run between the two parts. Heating is provided by
means of a gas-fired hot air furnace.

10.3.2. Airside

10.3.2.1. Variable Naming


Many of the variable names (especially those in the air side) used in this example are intended to follow a pattern
so that groups of components can be copied, pasted, and easily edited for use in other projects. Variable names
commonly have two parts: an identifier and a zone indicator. The identifier gives an indication of the function of
the variable name being set while the zone indicator identifies the HVAC zone for which the variable is relevant.
For example, the variable name used to set the LOWER1 building zone’s supply fan rated volumetric flow rate
variable name is lps_LWR1. In this name, lps_ is intended to indicate that a flow rate specified in liters per second
is being defined while LWR1 indicates that this is the fan flow rate for the HVAC system that serves the zone
LOWER1. In this documentation the zone indicator portion of the variable names will be replaced by XXXX.

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.3. Air Mixing Plenum


Each zone’s air mixing plenum mixes together return air and outdoor air. The relative quantities of outdoor and
return air are set by equations in the equation block for each zone. Outdoor air is delivered to the zone during the
building’s occupied hours (as defined by the “OA sched” Type14 forcing function). In this example the building’s
occupied hours are between 8am and 5pm Monday through Friday. The air temperature and relative humidity of
the Type56 zone are connected to the first inlet of the mixing plenum. Outdoor air temperature and relative
humidity are connected to the second inlet of the mixing plenum.

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.

10.3.2.5. Cooling Section (Packaged Rooftop Air Conditioner)


The packaged rooftop air conditioner is modeled using Type144. The blower power draw parameter for this
component is set to zero because the evaporator fan in the system is modeled using a Type146 instead of by
using the fan that is built in to Type144. The condenser fan is also modeled separately. Type144 is a
“performance map” component meaning that the performance of the PTAC is defined in an external data file. The
file contains values of total capacity, sensible capacity, and power consumption as a function of present inlet
conditions. It is important to know whether the power consumption values in the data file include or do not include
the power consumption of the fans. Type144 assumes that the data file includes both fan and compressor power
and splits the total power that it read from the data file into compressor power and fan power. Thus if the data file
power consumption does include fan power, then the fan power must be removed from the data file. In the case of
this example the fans are being modeled elsewhere (i.e. not by this Type). The data files, therefore have been
modified so that they include only the compressor power. Resizing the cooling section of the air conditioners
requires that the external data file be modified as explained in section 10.3.2.8 below.

10.3.2.6. Heating Section (Hot Air Furnace)


Heating by the hot air furnace is modeled using Type139. As with the fan in each system, the capacity of the
furnace is set using variable names so that the furnace can be resized by changing a few values in the equation
block. The air conditions (temperature, relative humidity, and flow rate) leaving the furnace are connected to a
VENTILATION type defined for each zone in TRNBuild for Type56. Type139 includes an internal fan model. The
fan power consumption is set to zero and the fan flow rate is set to the unitary system flow rate (automatically by
means of an equation).

10.3.2.7. Equation Block


The equation block for each unitary HVAC system in this example is intended to automatically calculate as many
equipment sizes as possible based on as few parameters as possible. For example, the flow rate of air through
the system (i.e. the fan size) is determined automatically based on user entered values of peak heating and
cooling load and an assumption about the difference between supply air and room air. In the equations are listed
below the “zone indicator” part of the equation name has been set to XXXX.

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

10.3.2.8. Resizing the Packaged Rooftop Units


If the air side group of components is used as a template for a unitary system in another building then the user will
need to revise the external data files that describe the PTAC units. First, please refer to the section in the 04-
MathematicalReference manual that discusses Type144 to familiarize yourself with the requirements of the
external data file.

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

10.4. HVAC System 4: Packaged Rooftop Heat


Pumps
In this example a building is heated and cooled by means of packaged rooftop heat pumps (PTRPs). The system
is unitary in that each of the five HVAC zones is served by its own HVAC system. In each unitary system return
and outdoor air are mixed together then pass across the indoor coil of the PTRP. Air flow is driven by a constant
speed fan that runs constantly during building occupied hours and as required by the thermostat during
unoccupied hours. The example is set up in such a way that the system can be used as a template in other
multizone building projects. This example’s documentation is limited to a discussion of the HVAC system.
Discussion of techniques for creating a building envelope and internal gain schedules can be found in the
documentation of other examples and tutorials.

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.4.1. System Description


Packaged Rooftop Heat Pumps (PTHPs) are unitary devices that are commonly used to heat and cool groups of
rooms in buildings. They tend to be larger in capacity than their “through the wall” PTAC cousins and tend to be
split into an indoor unit (consisting of the compressor, an indoor coil (heat exchanger), a fan and the expansion
valve) and an outdoor unit (consisting of a fan and the outdoor heat exchanger). Cooling and heating are both
provided by a standard vapor compression refrigeration cycle. The fan in this example is assumed to be constant
speed and to run continuously during building occupancy (as defined by a schedule) and intermittently as required
by the thermostat to maintain heating and cooling set points during building unoccupied hours. Each PTHP unit is
assumed to have its own outdoor air damper that is open during building occupied hours.

10.4.2. Variable Naming


Many of the variable names used in this example are intended to follow a pattern so that groups of components
can be copied, pasted, and edited for use in other projects. Variable names commonly have two parts: an
identifier and a zone indicator. The identifier gives an indication of the function of the variable name being set
while the zone indicator identifies the HVAC zone for which the variable is relevant. For example, the variable
name used to set the LOWER1 building zone’s supply fan rated volumetric flow rate variable name is lps_LWR1.
In this name, lps_ is intended to indicate that a flow rate specified in liters per second is being defined while
LWR1 indicates that this is the fan flow rate for the HVAC system that serves the zone LOWER1. In this
documentation the zone indicator portion of the variable names will be replaced by XXXX.

10.4.3. Air Side


The building’s conditioning requirements are met by a unitary system in which each HVAC zone is served by its
own HVAC system. Each unitary HVAC system is comprised of two TRNSYS Types and a block of equations.
The Types are: a thermostat and an air to air heat pump. The standard TRNSYS library heat pump model
includes a built-in constant speed fan and has the ability to mix return and outdoor air.

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.

10.4.3.2. Heat Pump


The packaged rooftop air conditioner is modeled using Type119. Type119 is a “performance map” component
meaning that the performance of the heat pump is defined in a pair of external data files. The file for cooling
performance contains values of total capacity, sensible capacity, and power consumption as a function of present
inlet conditions. The file for heating performance contains values of capacity and power consumption as a
function of current inlet conditions. Type119 assumes that the data files include both fan and compressor power
and splits the total power that it reads from the data files into compressor power and fan power. Resizing the heat
pump requires that the external data files be modified as explained in section 10.2.3.4 below

10.4.3.3. Equation Block


The equation block for each unitary HVAC system in this example is intended to automatically calculate as many
equipment sizes as possible based on as few parameters as possible. For example, the flow rate of air through
the system (i.e. the fan size) is determined automatically based on user entered values of peak heating and
cooling load and an assumption about the difference between supply air and room air. In the equations are listed
below the “zone indicator” part of the equation name has been set to XXXX.

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.

10.4.3.4. Resizing the PRHP Units


If the thermostat/equation/heat pump component group is used as a template for a unitary system in another
building then the user will need to revise the external data files that describe the PRHP units. Before proceeding,
please refer to the section in the 04-MathematicalReference manual that discusses Type119 to familiarize
yourself with the requirements of the external data file.

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

10.5. HVAC System 5: Packaged Rooftop Variable


Air Volume (VAV) with Direct Expansion
Cooling and Hot Water Coil Heat/Reheat
In this example a building is heated and cooled by means of centrally located packaged rooftop VAV air handler
that contains a variable speed fan, a hot water preheat coil, an economizer, and a direct expansion cooling coil.
Heating is provided by means of hot water coils in the terminal units (VAV boxes) in each of the five building
zones. Return and outdoor air are mixed together at the central unit.

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

10.5.1. The VAV AHU Model


There are two important aspects of the Variable Air Volume air handler model used in this example.

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.

10.5.2. VAV Air Handler Parameters


Parameters 1-3 of Type151 ask the user to specify how many zones the VAV supplies, whether there is an
economizer, and whether there is a preheat coil. For the purposes of the present example, the VAV will have both
an economizer and a preheat coil and will supply all five zones in the building.

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)

10.5.3. VAV Air Handler Inputs


The first three Type151 inputs are for ambient temperature, humidity and pressure. Type151 mixes ambient with
return air according to the fraction set by input 6. If the VAV AHU being modeled does not have an outdoor air
requirement of if you have put fresh air into your zones by some other means, then the first three inputs are
irrelevant and can be ignored.

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.5.4. Capacity Limitations


Care must be exercised when using load based HVAC models such as Type151 and heating setback (or cooling
setup) temperatures. The load on the HVAC system when a zone set point returns from setback (or setup) is
infinite for an instant in time. The manifestation of this in a simulation model is that the zone temperature will be
seen to go from its setback value to its setup value instantaneously. Obviously HVAC systems cannot return a
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.
10–24
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.5.5. Additional Load


As mentioned in the introduction to this example, the central air handler distributes cold air to all zones. If all
zones are calling for heating then the central unit supply air temperature may be as high as 20C in the case of this
example (so long as outdoor air and return air conditions allow) but even so, this will add additional cooling load to
the zones that is not directly (or automatically) handled by Type56. Consequently, the air handler model computes
the quantity of energy that must be passed back to the zone to account for the supply air temperature. These
values are delayed by one time step in order that the system (zone / air handler) might converge on a solution.

10.5.6. What the VAV Air Handler Calculates


In addition to calculating the fan power requirement, Type151 calculates the current airflow rate through the AHU
and amount of energy that must be provided by the preheat coil, cooling coil, and heat/reheat coils. The total
cooling energy requirement must then be imposed on a cooling plant (chilled water or direct expansion, usually)
and the total heating energy requirement must then be imposed on the heating plant (a gas fired heating device, a
hot water stream, a steam heat system, or electric resistance heaters). In the case of the present example,
heating is provided by a gas boiler fired hot water loop while cooling is provided by a direct expansion coil.

10.5.7. Heating Hot Water Loop


The AHU’s heating energy requirement is imposed on a hot water loop. The phrase “imposed on” here means
that the heating energy requirement causes a temperature drop in a liquid stream that is supplied by a boiler.
While there are non-standard TRNSYS components to do so, in the case of this example, a simple equation is
used. The equations in the block are as follows:

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.

10.5.8. Direct Expansion (DX) Cooling


The AHU’s cooling requirements are met by a direct expansion (DX) coil. The TRNSYS DX coil model is a
performance map meaning that it reads performance metrics (total capacity, sensible capacity, and power
consumption in this case) from an external data file as a function of inlet conditions. The inlet condition, in this
case, is the air state (temperature and humidity) leaving the preheat coil. The AHU model outputs these
conditions, which are then passed to the DX coil model.

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.

10.5.9. Resizing the DX Coil


If the direct expansion coil model is used as a template for a system in another building project then the user will
need to revise the external data files that describe the PRHP units. Before proceeding, please refer to the section
in the 04-MathematicalReference manual that discusses Type136 to familiarize yourself with the requirements of
the external data file.

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

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
In this example a building is heated and cooled by means of centrally located packaged rooftop VAV air handler
that contains a variable speed fan, an electric resistance preheat coil, an economizer, and a direct expansion
cooling coil. Heating is provided by means of electric resistance coils in the terminal units (VAV boxes) in each of
the five building zones. Return and outdoor air are mixed together at the central unit. Each terminal unit contains
a circulation fan.

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

10.6.1. The VAV AHU Model


There are three important aspects of the Variable Air Volume air handler model used in this example.

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.

10.6.2. VAV Air Handler Parameters


Parameters 1-3 of Type152 ask the user to specify how many zones the VAV supplies, whether there is an
economizer, and whether there is a preheat coil. For the purposes of the present example, the air handler will
have both an economizer and a preheat coil and will supply all five zones in the building.

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)

10.6.3. VAV Air Handler Inputs


The first three Type152 inputs are for ambient temperature, humidity and pressure. Type152 mixes ambient with
return air according to the fraction set by input 6. If the VAV AHU being modeled does not have an outdoor air
requirement of if you have put fresh air into your zones by some other means, then the first three inputs are
irrelevant and can be ignored.

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

10.6.4. Capacity Limitations


Care must be exercised when using load based HVAC models such as Type152 and heating setback (or cooling
setup) temperatures. The load on the HVAC system when a zone set point returns from setback (or setup) is
infinite for an instant in time. The manifestation of this in a simulation model is that the zone temperature will be
seen to go from its setback value to its setup value instantaneously. Obviously HVAC systems cannot return a
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.

10.6.5. Additional Load


As mentioned in the introduction to this example, the central air handler distributes cold air to all zones. If all
zones are calling for heating then the central unit supply air temperature may be as high as 20C in the case of this
example (so long as outdoor air and return air conditions allow) but even so, this will add additional cooling load to
the zones that is not directly (or automatically) handled by Type56. Consequently, the air handler model computes
the quantity of energy that must be passed back to the zone to account for the supply air temperature. These
values are delayed by one time step in order that the system (zone / air handler) might converge on a solution.
The delay is of minimal consequence because a short simulation timestep (5 minutes) has been selected.

10.6.6. What the VAV Air Handler Calculates


In addition to calculating the fan power requirements, Type152 calculates the current airflow rate through the AHU
and amount of energy that must be provided by the preheat coil, cooling coil, and heat/reheat coils. The total
cooling energy requirement must then be imposed on a cooling plant (chilled water or direct expansion, usually)
and the total heating energy requirement must then be imposed on the heating plant (a gas fired heating device, a
hot water stream, a steam heat system, or electric resistance heaters). In the case of the present example,
heating is provided by electric resistance heaters while cooling is provided by a direct expansion coil.

10.6.7. Electric Resistance Heaters


In this example heating is provided to the preheat coil and to the heat/reheat coils in the terminal units by means
of electric resistance heaters. These devices have a COP of 1. Therefore the amount of energy that they
consume is equal to the amount of energy that they impart to the airstream which is in turn equal to the preheat
coil and reheat coil energy outputs computed by the Type152 air handler component. The preheat and reheat coil
energy demands are therefore simply passed directly to the output reporting components without modification.

10–30
TRNSYS 18 – Examples

10.6.8. Direct Expansion (DX) Cooling


The AHU’s cooling requirements are met by a direct expansion (DX) coil. The TRNSYS DX coil model is a
performance map meaning that it reads performance metrics (total capacity, sensible capacity, and power
consumption in this case) from an external data file as a function of inlet conditions. The inlet condition, in this
case, is the air state (temperature and humidity) leaving the preheat coil. The AHU model outputs these
conditions, which are then passed to the DX coil model.

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.

10.6.9. Resizing the DX Coil


If the direct expansion coil model is used as a template for a system in another building project then the user will
need to revise the external data files that describe the PRHP units. Before proceeding, please refer to the section
in the 04-MathematicalReference manual that discusses Type136 to familiarize yourself with the requirements of
the external data file.

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

10.7. HVAC System 7: Packaged Rooftop Variable


Air Volume (VAV) with Chilled Water Cooling
and Hot Water Coil Heat/Reheat
In this example a building is heated and cooled by means of centrally located packaged rooftop VAV air handler
that contains a variable speed fan, a hot water preheat coil, an economizer, and a chilled water cooling coil.
Heating is provided by means of hot water coils in the terminal units (VAV boxes) in each of the five building
zones. Return and outdoor air are mixed together at the central unit. The chilled water coil is served by an air
cooled chiller (ACC)

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

10.7.1. The VAV AHU Model


There are two important aspects of the Variable Air Volume air handler model used in this example.

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.

10.7.2. VAV Air Handler Parameters


Parameters 1-3 of Type151 ask the user to specify how many zones the VAV supplies, whether there is an
economizer, and whether there is a preheat coil. For the purposes of the present example, the VAV will have both
an economizer and a preheat coil and will supply all five zones in the building.

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)

10.7.3. VAV Air Handler Inputs


The first three Type151 inputs are for ambient temperature, humidity and pressure. Type151 mixes ambient with
return air according to the fraction set by input 6. If the VAV AHU being modeled does not have an outdoor air
requirement of if you have put fresh air into your zones by some other means, then the first three inputs are
irrelevant and can be ignored.

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.7.4. Capacity Limitations


Care must be exercised when using load based HVAC models such as Type151 and heating setback (or cooling
setup) temperatures. The load on the HVAC system when a zone set point returns from setback (or setup) is
infinite for an instant in time. The manifestation of this in a simulation model is that the zone temperature will be
seen to go from its setback value to its setup value instantaneously. Obviously HVAC systems cannot return a

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.

10.7.5. Additional Load


As mentioned in the introduction to this example, the central air handler distributes cold air to all zones. If all
zones are calling for heating then the central unit supply air temperature may be as high as 20C in the case of this
example (so long as outdoor air and return air conditions allow) but even so, this will add additional cooling load to
the zones that is not directly (or automatically) handled by Type56. Consequently, the air handler model computes
the quantity of energy that must be passed back to the zone to account for the supply air temperature. These
values are delayed by one time step in order that the system (zone / air handler) might converge on a solution.

10.7.6. What the VAV Air Handler Calculates


In addition to calculating the fan power requirement, Type151 calculates the current airflow rate through the AHU
and amount of energy that must be provided by the preheat coil, cooling coil, and heat/reheat coils. The total
cooling energy requirement must then be imposed on a cooling plant (chilled water or direct expansion, usually)
and the total heating energy requirement must then be imposed on the heating plant (a gas fired heating device, a
hot water stream, a steam heat system, or electric resistance heaters). In the case of the present example,
heating is provided by a gas boiler fired hot water loop while cooling is provided by a direct expansion coil.

10.7.7. Heating Hot Water Loop


The AHU’s heating energy requirement is imposed on a hot water loop. The phrase “imposed on” here means
that the heating energy requirement causes a temperature drop in a liquid stream that is supplied by a boiler.
While there are non-standard TRNSYS components to do so, in the case of this example, a simple equation is
used. The equations in the block are as follows:

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.

10.7.8. Chilled Water Loop


The AHU’s cooling requirements are met by a chilled water coil that is served by an air cooled chiller. The AHU’s
total cooling energy requirement is imposed on a chilled water loop. The phrase “imposed on” here means that
the cooling energy requirement causes a temperature rise in a liquid stream that is conditioned by an air cooled
chiller. While there are non-standard TRNSYS components to do so, in the case of this example, a simple
equation is used. The equations in the block are as follows:

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.

10.7.9. Resizing the Air Cooled Chiller (ACC)


If the direct expansion coil model is used as a template for a system in another building project then the user will
need to revise the external data files that describe the PRHP units. Before proceeding, please refer to the section
in the 04-MathematicalReference manual that discusses Type118 to familiarize yourself with the requirements of
the external data files.

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

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
In this example a building is heated and cooled by means of centrally located packaged rooftop VAV air handler
that contains a variable speed fan, an electric resistance preheat coil, an economizer, and a chilled water cooling
coil. Heating is provided by means of electric resistance coils in the terminal units (VAV boxes) in each of the five
building zones. Return and outdoor air are mixed together at the central unit. Each terminal unit contains its own
circulation fan. The chilled water coil is served by an air cooled chiller.

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

10.8.1. The VAV AHU Model


There are three important aspects of the Variable Air Volume air handler model used in this example.

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.

10.8.2. VAV Air Handler Parameters


Parameters 1-3 of Type152 ask the user to specify how many zones the VAV supplies, whether there is an
economizer, and whether there is a preheat coil. For the purposes of the present example, the air handler will
have both an economizer and a preheat coil and will supply all five zones in the building.

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)

10.8.3. VAV Air Handler Inputs


The first three Type152 inputs are for ambient temperature, humidity and pressure. Type152 mixes ambient with
return air according to the fraction set by input 6. If the VAV AHU being modeled does not have an outdoor air
requirement of if you have put fresh air into your zones by some other means, then the first three inputs are
irrelevant and can be ignored.

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

10.8.4. Capacity Limitations


Care must be exercised when using load based HVAC models such as Type152 and heating setback (or cooling
setup) temperatures. The load on the HVAC system when a zone set point returns from setback (or setup) is
infinite for an instant in time. The manifestation of this in a simulation model is that the zone temperature will be
seen to go from its setback value to its setup value instantaneously. Obviously HVAC systems cannot return a
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.

10.8.5. Additional Load


As mentioned in the introduction to this example, the central air handler distributes cold air to all zones. If all
zones are calling for heating then the central unit supply air temperature may be as high as 20C in the case of this
example (so long as outdoor air and return air conditions allow) but even so, this will add additional cooling load to
the zones that is not directly (or automatically) handled by Type56. Consequently, the air handler model computes
the quantity of energy that must be passed back to the zone to account for the supply air temperature. These
values are delayed by one time step in order that the system (zone / air handler) might converge on a solution.
The delay is of minimal consequence because a short simulation time step (5 minutes) has been selected.

10.8.6. What the VAV Air Handler Calculates


In addition to calculating the fan power requirements, Type152 calculates the current airflow rate through the AHU
and amount of energy that must be provided by the preheat coil, cooling coil, and heat/reheat coils. The total
cooling energy requirement must then be imposed on a cooling plant (chilled water or direct expansion, usually)
and the total heating energy requirement must then be imposed on the heating plant (a gas fired heating device, a
hot water stream, a steam heat system, or electric resistance heaters). In the case of the present example,
heating is provided by electric resistance heaters while cooling is provided by a chilled water loop.

10.8.7. Electric Resistance Heaters


In this example heating is provided to the preheat coil and to the heat/reheat coils in the terminal units by means
of electric resistance heaters. These devices have a COP of 1. Therefore the amount of energy that they
consume is equal to the amount of energy that they impart to the airstream which is in turn equal to the preheat
coil and reheat coil energy outputs computed by the Type152 air handler component. The preheat and reheat coil
energy demands are therefore simply passed directly to the output reporting components without modification.

10–41
TRNSYS 18 – Examples

10.8.8. Chilled Water Loop


The AHU’s cooling requirements are met by a chilled water coil that is served by an air cooled chiller. The AHU’s
total cooling energy requirement is imposed on a chilled water loop. The phrase “imposed on” here means that
the cooling energy requirement causes a temperature rise in a liquid stream that is conditioned by an air cooled
chiller. While there are non-standard TRNSYS components to do so, in the case of this example, a simple
equation is used. The equations in the block are as follows:

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.

10.8.9. Resizing the Air Cooled Chiller (ACC)


If the direct expansion coil model is used as a template for a system in another building project then the user will
need to revise the external data files that describe the PRHP units. Before proceeding, please refer to the section
in the 04-MathematicalReference manual that discusses Type118 to familiarize yourself with the requirements of
the external data files.

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

10.9. Solar Domestic Water Heater (SDHW)


In this example, a hot water load is met by a single tank solar domestic water heating system. The system has a
tempering valve in it such that if the water tank gets too hot because of solar input it will deliver a maximum of
45C water to the load.

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.2. Tempering Valve


When solar input is high there is a chance that the water storage tank may heat beyond the point maintained by
the internal thermostat and heating element. To prevent scalding (overly hot water being delieverd) at the end use
point a tempering valve is installed. This device diverts some incoming cold water around the heat source (the
tank in this case) and mixes it with tank water so as to achieve a maximum delivery temperature. The tempering
valve in this example is modeled using three components: a tempering valvue controller (Type115), a controlled
flow diverter (Type11) and a flow mixer (Type11). The tempering valve controller watches the temperature of
incoming replacement water and the temperature at the top of the storage tank and determines the fraction of
replacement water that should go to the heat source and the fraction that should bypass the heat source. These
fractions are passed to the flow diverter model, which splits the incoming flow into two parts and sends it to the
appropriate component.

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.

10.9.4. In-Tank Auxiliary Heater


The tank used in this example does not have a built-in heating element that can maintain the tank a set
temperature. Instead, the model is equipped with one or more internal thermostats and allows the user to define
one or more energy inputs. In this manner the tank can be used to model either gas fired or electrically heated
10–44
TRNSYS 18 – Examples

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. Wind Diesel PV with Battery Backup


In this example, an electrical load is met by a system that contains a photovoltaic array, a wind turbine, and a
diesel generator. A controller meets the load with renewable power if possible. Excess renewable energy is used
to charge a battery bank. The battery is discharged when renewable power cannot meet the load. If the battery
state of charge falls too far then a diesel generator is started to meet the load. One assumption inherent in this
example is that all of the devices are equipped with controllers that make their voltages mutually compatible. We
deal only with the power produced and required by the components and do not worry ourselves about voltage,
current, or conversions between DC and AC (except to account generically for the inefficiency of the conversion).

Location: ..\%TRNSYS18%\Examples\Stand-Alone Power Systems\WindDieselPV.tpf

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.

10.10.5. Inverter / Charge Controller


The most important aspect of choosing an inverter/charge controller model and operation mode in this case is that
it matches the battery model. The Type48 charge controller model in mode 0 is designed to interact with the
Type47 battery model in mode 1. The control algorithm implemented in Type48 relies only on the battery’s state
of charge. So long as the battery’s state of charge is between a high limit (set by parameter 4) and a low limit (set
by parameter 5), the algorithm in Type48 will meet the electrical load (an input) using renewable energy. If excess
renewable energy is available it is used to charge the battery. If the battery is fully charged then Type48 reports
that it had to dump excess power. The power is dumped but in this simulation nothing is done with that power. If
renewable energy is insufficient to meet the load then Type48 will draw power from the battery to meet the load
until the battery meets is low limit (parameter 5). At that point Type48 stops discharging the battery and reports
the amount of load that needs to be met by a backup source (output 5). In this example, the required power from
backup is used as the setpoint power input to the DEGS. The [kJ/h]->[W]

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:

pWECS: [kJ] power produced by the wind turbine

pPV: [kJ] power produced by the photovoltaic array

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.

The system energy balance can be obtained by:


pWECS + pPV + pDEGScharge - pToBattery + pFromBattery - pLoad - pDumped + pDEGSload – pInvLoss = 0.

10–48
TRNSYS 18 – Examples

10.11. Stand Alone Power System


This example is meant to show two things; first, an implementation of a mini grid consisting of renewable energy
being used to generate hydrogen that is then consumed to meet an electrical load and second, the use of a more
sophisticated battery model, PV model, and battery charge controller.

Location: ..\%TRNSYS18%\Examples\Stand-Alone Power Systems\WindDieselFuelCellElectrolyzerPV.tpf

10.11.1. The WECS/H2 Minigrid


In this part of the system a wind turbine provides energy to meet a load. When wind energy is greater than the
load it is used to run an electrolyzer that produces hydrogen gas. When wind energy is less than the load a fuel
cell consumes stored hydrogen gas to produce electricity. A diesel engine generator set provides backup power if
the hydrogen tank is low and there is not enough wind energy available to meet the load.

10.11.2. Weather Data


Weather data comes from two sources in this example. Temperature, atmospheric pressure and solar radiation
are assumed to be available only for an average year and so are read using Type15 in its Meteonorm/TMY2
format. Wind speed data is assumed to have been measured as hourly average values and recorded in a data file
that is read by Type9. Type9 parameter 1 indicates that the first line of the data file corresponds to the simulation
start time meaning that this simulation should only be run starting from the first of the year. If the simulation is to
be run starting in the middle of the year the mode of Type9 should be changed to 4. Parameter 9 indicates that
the second output of Type9 (which corresponds to the second column in the data file (i.e. the wind speed) should
be interpolated if the simulation is run at time steps shorter than the data interval. Parameter 12 indicates that the
wind speed data is provided as average values over the data interval (as opposed to being provided as
instantaneous values at the end of each interval).

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.

10.11.5. MiniGrid Controller


There are as many ways to control a minigrid as there are varieties of minigrids. Type105 is an example of one
such way. It has a great many assumptions built into it such as that the minigrid consists of renewable sources,
backup sources, an electrolyzer, and hydrogen storage but no electrical storage. It also assumes a certain
prioritization of what should be done with renewable power and how meeting the load should be prioritized. If the
minigrid being simulated does not conform to these assumptions then likely Type105 will not be an appropriate
controller model to use. Type105 is provided in some ways as a template for how users might write their own
minigrid controller models themselves. In studying this example, the reader is highly encouraged to understand
Type105’s entry in the 04-MathematicalReference manual as it explains the algorithms and assumptions
employed.

10.11.6. Fuel Cell and Power Converter


A fuel cell is a device that converts hydrogen into electricity. Fuel cell modes can be written one of two ways;
either with the H2 consumption rate as an input (and the power production rate as an output) or with the power
requirement as an input (and the hydrogen consumption rate as an output). The fuel cell model in TRNSYS
essentially takes a power input (i.e. the electrical load that must be provided by the fuel cell) and computes the
rate at which the fuel cell consumes hydrogen. In reality the model takes the rate at which electrical current is
provided to the fuel cell and computes the stack (operating) voltage internally.

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.11.7. Electrolyzer and Power Converter


An electrolyzer is a device that uses electricity to split water into hydrogen and oxygen gas. In order to make
“clean” hydrogen gas that can be stored and used by a fuel cell, an electrolyzer either needs to warm up for some
time or be maintained on standby power. The Type105 controller in this example maintains the electrolyzer on
standby power. The TRNSYS electrolyzer model takes available electrical current as an input and computes the
quantity of hydrogen that it produces as a result. As was the case with the fuel cell, the electrolyzer computes its
voltage requirement as an output. Therefore the voltage is passed to a power converter, which takes available
power as an output from the controller model and computes the corresponding amount of current that is available.

10–50
TRNSYS 18 – Examples

10.11.8. Hydrogen Storage


The hydrogen storage tank is assumed to stay at 20C. It takes two important inputs: the quantity of hydrogen
generated by the electrolyzer and the quantity of hydrogen consumed by the fuel cell. Its main function is to keep
track of the quantity of hydrogen available for the controller since the controller will shut off the fuel cell and meet
the electrical load using a diesel engine if the H2 storage level gets below 10% (a parameter set in Type105). The
H2 storage tank also computes the pressure of H2 currently in the tank and passes it to the controls on the gas
compressor

10.11.9. Gas Compressor


Electrolyzers produce hydrogen at a certain outlet pressure. The electrolyzer’s operating pressure is set as an
input to the model and in this example is left at its default pressure of 7bar. If the pressure level in the H2 storage
tank is above 7 bar, however, a gas compressor is required in order to raise the pressure of the incoming H2 gas.
The combination of an equation (“compressor set point”) and Type167 compress the gas to the maximum of 7bar
or the current hydrogen pressure in the tank. The gas compressor model computes the amount of electrical power
required in order to accomplish the compression. This power requirement is passed to a Type47 that controls the
combination of a photovoltaic array and a battery that provide power to the compressor.

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.11. The PV/Battery/Compressor MiniGrid


In this part of the system the H2 gas compressor’s power is provided either directly from a PV array or from a
battery backup. The battery is recharged when excess energy is available from the PV. If there is insufficient
power available from the battery and the PV then a second diesel generator is brought online to meet the gas
compressor’s load.

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.

10.11.14. Inverter / Charge Controller


A more advanced mode of the Type48 inverter/charge controller is used to control the battery and PV array in this
example. In mode 2 not only does the charge controller monitor the battery’s state of charge (SOC) but also its
voltage. Based on the values of inputs 5-10 the charge controller will limit the amount of current that it uses to
charge (and discharge) the battery so that the battery’s voltage does not exceed an allowable limit. This mode of
the charge controller is also able to recharge the battery from the grid but since there is no grid backup in this
example, that feature has effectively been switched off by setting the “Current for grid charging of battery”
parameter to 0 and by setting the start and stop time for grid battery charging inputs both to zero.

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

10.12. Additional TRNSYS Examples


You can learn more about TRNSYS 18 by using the examples included in the distribution. To open an example,
launch the Simulation Studio, select "Open" and browse to %TRNSYS18%\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

Simple example described in the 09-Tutorials manual.

Calculating Inputs from Outputs

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

An example of using the Type51 cooling tower model.

Cosim_ESP-4

An example of cosimulation between TRNSYS and ESP-r.


10–54
TRNSYS 18 – Examples

Data Files

This folder contains various examples of data files used by some of the TRNSYS components.

Detailed Single Zone Building

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

This example illustrates the use of Type40

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.

Reading Data Files

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.

Stand-Alone Power Systems

This folder contains three example projects

“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

You might also like