0% found this document useful (0 votes)
41 views705 pages

04 MathematicalReference

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)
41 views705 pages

04 MathematicalReference

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/ 705

TRNSYS 18

a TRaNsient SYstem Simulation program

Volume 4

Mathematical Reference

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 – Mathematical Reference

About This Manual


The information presented in this manual is intended to provide a detailed mathematical reference for the
Standard Component Library in 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
 2004-09 For TRNSYS 16.00.0000  2010-11 For TRNSYS 17.00.0019
 2005-02 For TRNSYS 16.00.0037  2012-03 For TRNSYS 17.01.0000
 2006-03 For TRNSYS 16.01.0000  2014-05 For TRNSYS 17.02.0000
 2007-03 For TRNSYS 16.01.0003  2017-04 For TRNSYS 18.00.0000
 2009-11 For TRNSYS 17.00.0006  2017-10 For TRNSYS 18.00.0015
 2010-04 For TRNSYS 17.00.0013  2018-05 For TRNSYS 18.00.0018
 2010-08 For TRNSYS 17.00.0018  2018-10 For TRNSYS 18.01.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
3 North Pinckney Street – suite 202
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.
© 2018 by the Solar Energy Laboratory, University of Wisconsin-Madison and 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

4–2
TRNSYS 18 – Mathematical Reference

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 their respective section.

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.

4–3
TRNSYS 18 – Mathematical Reference

TABLE OF CONTENTS
4. M ATHEMATICAL REFERENCE 4–8
4.1. Controllers 4–9
4.1.1. Type 2: Differential Controller 4–10
4.1.2. Type 22: Iterative Feedback Controller 4–13
4.1.3. Type 23: PID Controller 4–17
4.1.4. Type 40: Microprocessor Controller 4–23
4.1.5. Type 82: Simple Thermostat 4–29
4.1.6. Type 85: Simple Humidistat 4–31
4.1.7. Type 104: Simple Dehumidistat 4–33
4.1.8. Type 106: Aquastat (Heating Applications) 4–35
4.1.9. Type 108: Five Stage Room Thermostat 4–37
4.1.10. Type 113: Aquastat (Cooling Applications) 4–41
4.1.11. Type 115: Tempering Valve (Prevents Overheating) 4–43
4.1.12. Type 116: Tempering Valve (Prevents Undercooling) 4–45
4.1.13. Type 150: Delayed Inputs 4–47
4.1.14. Type 165: Differential Controller 4–49
4.2. Electrical 4–52
4.2.1. Type 47: Simple Lead Acid Battery 4–53
4.2.2. Type 48: PV Charge Controller/Inverter 4–60
4.2.3. Type 90: Wind Turbine 4–67
4.2.4. Type 102: Internal Combustion Engine / Generator Set Controller 4–84
4.2.5. Type 103: Simple Photovoltaic 4–87
4.2.6. Type 105: MiniGrid Controller 4–96
4.2.7. Type 120: Internal Combustion Engine / Generator 4–100
4.2.8. Type 175: Power Conditioning 4–105
4.2.9. Type 185: Advanced Lead Acid Battery with Gassing Effects 4–109
4.2.10. Type 188: AC Busbar (MiniGrid Energy Balance) 4–116
4.2.11. Type 190: Advanced Photovoltaic 4–119
4.3. HVAC 4–133
4.3.1. Type 42: Generic Conditioning Equipment 4–134
4.3.2. Type 43: Generic PLR Curve 4–138
4.3.3. Type 52: Detailed Cooling Coil 4–141
4.3.4. Type 107: Singe-Effect Hot-Water Fired Absorption Chiller 4–149
4.3.5. Type 117: Air Heater 4–157
4.3.6. Type 118: Air Cooled Chiller 4–160
4.3.7. Type 119: Air-to-Air Heat Pump 4–165
4.3.8. Type 122: Boiler 4–176
4.3.9. Type 123: Chilled Water Coil (Wet or Dry) 4–180
4.3.10. Type 124: Chilled Water Coil (Partially Wet) 4–187

4–4
TRNSYS 18 – Mathematical Reference

4.3.11. Type 126: Basic Cooling Tower (Single Speed, Control Signal) 4–192
4.3.12. Type 128: Cooling Tower (Two Speed, External Control) 4–195
4.3.13. Type 129: Cooling Tower (Two Speed, Internal Controls) 4–198
4.3.14. Type 136: Direct Expansion Coil 4–201
4.3.15. Type 137: Fan Coil 4–207
4.3.16. Type 138: Fluid Heater 4–215
4.3.17. Type 139: Furnace 4–217
4.3.18. Type 140: Hot Water Coil (constant UA) 4–220
4.3.19. Type 141: Hot Water Coil (varying UA) 4–223
4.3.20. Type 142: Water Cooled Chiller 4–227
4.3.21. Type 143: Water-to-Air Heat Pump 4–232
4.3.22. Type 144: Packaged Terminal Air Condition/Split System Air Conditioner 4–240
4.3.23. Type 151: Variable Air Volume (VAV) Air Handler 4–245
4.3.24. Type 152: Variable Air Volume (VAV) Air Handler with Parallel Fan Powered (PFP) Boxes4–257
4.3.25. Type 161: Cooling Tower (Single Speed, Internal Control) 4–269
4.3.26. Type 162: Detailed Cooling Tower (Variable speed, Internal or External Control) 4–272
4.4. Hydrogen 4–281
4.4.1. Type 100: Electrolyzer Controls 4–282
4.4.2. Type 160: Alkaline Electrolyzer 4–285
4.4.3. Type 164: Compressed Gas Storage 4–294
4.4.4. Type 167: Gas Compressor 4–297
4.4.5. Type 170: Proton Exchange Membrane (PEM) Fuel Cell 4–300
4.4.6. Type 173: Alkaline Fuel Cell 4–312
4.5. Hydronics 4–316
4.5.1. Type 5: Heat Exchanger 4–317
4.5.2. Type 11: Tee Piece, Flow Diverter, Flow Mixer, Tempering Valve 4–322
4.5.3. Type 31: Pipe 4–329
4.5.4. Type 91: Effectiveness Heat Exchanger 4–333
4.5.5. Type 110: Variable Speed Pump 4–337
4.5.6. Type 114: Constant Speed Pump 4–341
4.5.7. Type 145: Air Duct 4–345
4.5.8. Type 146: Single-Speed Fan 4–349
4.5.9. Type 147: Variable-Speed Fan 4–352
4.5.10. Type 148: Air Flow Diverter/Mixer 4–356
4.6. Loads and Structures 4–359
4.6.1. Type 19: Detailed Single Zone (Transfer Function) 4–360
4.6.2. Type 34: Overhang and Wingwall Shading 4–372
4.6.3. Type 36: Glazed Trombe (Thermal Storage) Wall 4–379
4.6.4. Type 49: Slab on Grade 4–389
4.6.5. Type 56: Detailed Multizone Building (Transfer Function) 4–401
4.6.6. Type 75: Sherman Grimsrud Simple Infiltration 4–402

4–5
TRNSYS 18 – Mathematical Reference

4.6.7. Type 88: Single Zone (Lumped Capacitance) 4–406


4.6.8. Type 149: National Institute of Standards and Technology (NIST) Simple Infiltration 4–410
4.6.9. Type 168: Simple Natural Ventilation Model 4–412
4.7. Output 4–417
4.7.1. Type 25: Output Printer 4–418
4.7.2. Type 28: Simulation Summary 4–421
4.7.3. Type 46: Printegrator (Combined Integrator and Printer) 4–426
4.7.4. Type 65: Online Plotter 4–429
4.7.5. Type 76: Scopes 4–434
4.7.6. Type 125: Trnsys3D Result Visualizer for SketchUp™ 4–436
4.8. Physical Phenomena 4–441
4.8.1. Type 16: Solar Radiation Processing 4–442
4.8.2. Type 30: Thermal Solar Collector Array Shading 4–446
4.8.3. Type 33: Thermodynamic Properties of Wet Air (Psychrometrics) 4–453
4.8.4. Type 54: Weather Data Generator 4–456
4.8.5. Type 58: Thermodynamic Properties of Refrigerants (including steam) 4–463
4.8.6. Type 59: General Lumped Capacitance 4–466
4.8.7. Type 64: Simple Horizon Shading Mask 4–469
4.8.8. Type 67: Detailed Horizon Shading Mask 4–473
4.8.9. Type 69: Sky Temperature 4–481
4.8.10. Type 77: Simple Ground Temperature Model 4–484
4.8.11. Type 80: Convection Coefficient Calculator 4–488
4.9. Solar (Thermal) 4–492
4.9.1. Type 1: Flat Plate Collector, Quadratic Efficiency Performance Model 4–493
4.9.2. Type 45: Thermosyphon Collector with Integral Collector Storage 4–503
4.9.3. Type 50: Photovoltaic-Thermal Collector 4–515
4.9.4. Type 71: Evacuated Tube Solar Collector 4–525
4.9.5. Type 72: Performance Map Solar Collector 4–533
4.9.6. Type 73: Theoretical Flat-Plate Collector 4–541
4.9.7. Type 74: Compound Parabolic Concentrating Collector 4–546
4.10. Storage (Thermal) 4–555
4.10.1. Type 10: Gravel Bed Thermal Storage 4–556
4.10.2. Type 38: Plug Flow Vertical Cylindrical Storage Tank 4–562
4.10.3. Type 39: Variable Volume Liquid Storage 4–570
4.10.4. Type 153: Gas Water Heater with Integrated Controls 4–575
4.10.5. Type 154: Dual-Element Electric Water Heater with Integrated Controls 4–584
4.10.6. Type 156: Constant Volume Liquid Storage Tank with Immersed Heat Exchanger 4–594
4.10.7. Type 158: Constant Volume Liquid Storage Tank (no Heat Exchanger) 4–607
4.11. Utility 4–615
4.11.1. Type 9: Data Reader (Generic Data Files) 4–616
4.11.2. Type 14: Time Dependent Forcing Functions 4–626

4–6
TRNSYS 18 – Mathematical Reference

4.11.3. Type 21: Time Values 4–628


4.11.4. Type 24: Quantity Integrator 4–629
4.11.5. Type 41: Forcing Function Sequencer 4–631
4.11.6. Type 42: Linear Interpolation 4–634
4.11.7. Type 55: Periodic Integrator and Statistics 4–638
4.11.8. Type 57: Unit Conversion 4–643
4.11.9. Type 62: Calling External Programs: Excel™ 4–649
4.11.10. Type 66: Calling External Programs: Engineering Equation Solver (EES) 4–651
4.11.11. Type 82: Pacemaker (Simulation Speed Control) 4–656
4.11.12. Type 83: Differentiation 4–657
4.11.13. Type 84: Moving Average 4–658
4.11.14. Type 95: Holiday Calculator 4–659
4.11.15. Type 96: Utility Bill Generator 4–663
4.11.16. Type 97: Calling External Programs: CONTAM 4–671
4.11.17. Type 98: Calling External Programs: CONTAM-W 4–674
4.11.18. Type127: Floating Mean Temperature Based On EN 15251:2007 4–675
4.11.19. Type 130: Calling External Programs: ESP-r 4–677
4.11.20. Type 155: Calling External Programs: Matlab™ 4–678
4.11.21. Type 159: Calling External Programs: MATHIS 4–684
4.11.22. Type 163: Calling External Programs: Python – using I/O files 4–685
4.11.23. Type 169: Calling External Programs: Python – direct calling Python 4–687
4.12. Weather 4–689
4.12.1. Type 15: Standard File Format Weather Data Processor 4–690
4.12.2. Type 99: User-Defined File Format Data Reader / Processor 4–699

4–7
TRNSYS 18 – Mathematical Reference

4. MATHEMATICAL REFERENCE
This manual provides a detailed reference on each component model (Type) in TRNSYS. The information
includes the mathematical basis of the model, as well as other elements that the user should take into
consideration when using the model (e.g. data file format, etc.).
This guide is organized in 14 component categories that match the upper level directories in the Simulation
Studio proformas. Those categories are:
Controllers
Electrical
Heat Exchangers
HVAC
Hydrogen Systems
Hydronics
Loads and Structures
Obsolete
Output
Physical Phenomena
Solar Thermal Collectors
Thermal Storage
Utility
Weather Data Reading and Processing
Within the categories, components are organized according to the models implemented in each component.
This is different from the Simulation Studio structure, where components are first organized according to
the function they perform, then according to the operation modes. An example is the mathematical model
known as Type 1 (Solar Collector), which is the first component in the "Solar Thermal collectors" category
in this manual. Type 1 is the underlying model for 5 different proformas listed in the "Solar Thermal
Collectors\Quadratic Efficiency" category in the Simulation Studio. It is very frequent for one Type listed in
this manual to be associated with several proformas which correspond to different modes of operation for
the component.

Users looking for information on which components are included in those categories or which component
to use have two sources of information:
 Each section starts with a short introduction that briefly explains the features of all components in that
category
 Volume 03 of the documentation (Standard Component Library Overview) also has a list of available
components (based on the Studio's organization)

4–8
TRNSYS 18 – Mathematical Reference

4.1. Controllers
Controller Basics
Number of Oscillations permitted and controller stickiness:
When the difference between the setpoint and the monitored temperature nears the dead band in the
normal mode of operation, the control signal may sometimes oscillate between ON and OFF for successive
iterations at a given time step. This happens because the setpoint and the monitored temperature change
slightly at each iteration, alternately satisfying and not satisfying the conditions for switching the controller.
The value of parameter 1 in this model is the number of oscillations of the control signal that are permitted
in the time step before the component “sticks” the output signal at one value so that the calculations at this
time step may be solved. It is recommended that the value of this first parameter be set to an odd number
to avoid biasing short-term results.
Dead band:
Controllers do not typically make the on/off decisions directly at the setpoint. Instead they make them for
a specified difference above and below the setpoint. For instance, a controller will turn heating on when
the temperature gets below the setpoint temperature minus half the dead band temperature difference and
turn of heating once the temperature has risen to the setpoint plus half the dead band temperature. This
prevents the equipment from cycling on and off quickly.

Figure 4.1.1–1: Dead band example for a heating thermostat

4–9
TRNSYS 18 – Mathematical Reference

4.1.1. Type 2: Differential Controller


This controller generates a control function 𝛾0 that can have a value of 0 or 1. The value of𝛾0 is chosen as
a function of the difference between upper and lower temperatures (𝑇𝐻 and 𝑇𝐿 ) compared with two dead
band temperature differences (∆𝑇𝐻 and ∆𝑇𝐿 ). The new value of 𝛾0 is dependent on whether the input control
signal is on or off (𝛾𝑖 = 0 or 1). The controller is normally used with the output control signal (𝛾0 )connected
to to the inlet control signal (𝛾𝑖 ) giving a hysteresis effect. A high limit cut-out is included with the Type 2
controller. Regardless of the dead band conditions, the control function will be set to zero if the high limit
condition is exceeded. Note that this controller is not restricted to sensing temperatures, even though
temperature notation is used throughout the documentation.

4.1.1.2. Parameter/Input/Output Reference


PARAMETERS

1 Number of Oscillations [-] The number of control oscillations allowed in one timestep
before the controller is "stuck" so that the calculations can be
solved. This parameter should be set to an odd number so that
short-term results are not biased. NOTE: Setting the number of
oscillations to 0 to use solver 1 (Powell's method).

2 High Limit Cut-Out [C] The controller will set the controller to the OFF position,
regardless of the dead bands, if the temperature being
monitored exceeds the high limit cut-out. The controller will
remain OFF until the monitored temperature falls below the high
limit cut-out temperature.

INPUTS

1 Upper Input [delta C] The temperature difference that will be compared to the dead
Temperature bands is this input (𝑇𝐻 ) minus input 2 (𝑇𝐿 ).

2 Lower Input [delta C] The temperature difference that will be compared to the dead
Temperature bands is input 1 (𝑇𝐻 ) minus this input (𝑇𝐿 ).

3 Monitoring [C] Temperature to monitor for high-limit cut-out checking. The


Temperature controller signal will be set to OFF if this input exceeds the high
limit cut-out temperature. The controller will remain OFF until
this input falls below the high limit cut-out.

4 Input Control Function [-] The input control function is used to promote controller stability
by the use of hysteresis. The control decision will be based on
the dead band conditions and this input controller state. In most
applications, the output control signal from this component is
hooked up to this input.

5 Upper Dead Band [delta C] The dead band used when the controller is in the ON state.

6 Lower Dead Band [delta C] The dead band used when the controller is in the OFF state.

OUTPUTS

1 Output Control [-] The output control function may be ON (=1) or OFF (=0).
Function

4–10
TRNSYS 18 – Mathematical Reference

4.1.1.3. Simulation Summary Report Contents


TEXT FIELDS

Control [-] States whether the Successive Substitution or Powell’s Method mode is
used.

MINIMUM/MAXIMUM VALUE FIELDS

Upper Input Value [-] The minimum and maximum of input 1

Lower Input Value [-] The minimum and maximum of input 2

Upper Dead Band [-] The minimum and maximum of input 5

Lower Dead Band [-] The minimum and maximum of input 6

4.1.1.4. Hints and Tips


With the default TRNSYS solver (SOLVER 0, successive substitution), when (𝑇𝐻 − 𝑇𝐿 ) nears the upper or
lower dead band, 𝛾0 may sometimes oscillate between 1 and 0 for successive iterations at a given time
step. This happens because 𝑇𝐻 and 𝑇𝐿 change slightly during each iteration, alternately satisfying and not
satisfying the conditions for switching the controller. The value of the first parameter (Number of
Oscillations) is the number of oscillations permitted within a time step before the control function (𝛾0 ) ceases
to change. In general, it is recommended that the number of oscillations be set to an odd number, typically
five, in order to encourage the controller to come to rest at a state different than at the previous time step.
{The Powell’s Method control strategy is more robust in certain situations than successive substitution,
solving the system of equations by not permitting the control variable to change during the iteration process.
Upon convergence, the controller state is compared to the desired controller state at the converged solution
and the calculations repeated if necessary. The use of Powell’s Method requires other changes to the
simulation and the documentation should be read for more information. It is important to note that if you
use the Powell’s Method control strategy, you must also use SOLVER 1 in your system. – NOTE – for
version 18 the Powell’s Method (SOLVER 1) has been deactivated. If you wish to make use of this solver
please contact your TRNSYS distributor.}
For most simulations, use of the two control strategies will yield similar results. However, in short term
simulations with unstable control behavior, the Successive Substitution (SOLVER 0) control strategy with
an odd value of Number of Oscillations may yield quite different results from the Powell’s Method control
strategy.
An example set-up for Type 2: If you have a SDHW system and want to control the collector loop pump to
be on when the temperature of the fluid leaving the collector is 10 degrees C higher than the fluid coming
from the tank to the collector, turn off when the temperature of the fluid leaving the collector is less than 2
degrees C below the fluid coming from the tank to the collector, and turn off if the fluid supplying the hot
water is higher than 90 degrees C; the Upper Dead band should be 10 degrees C, the Lower Dead band
should be 2 degrees C, the upper input temperature should be the collector outlet temperature, the lower
input temperature should be the temperature at the tank outlet connected to the collector, the high-limit
cutoff should be 90 and the monitoring temperature should be the tank outlet connected to the hot water
system.

4.1.1.5. Nomenclature
∆𝑇𝐻 [C] upper dead band temperature difference
∆𝑇𝐿 [C] lower dead band temperature difference

4–11
TRNSYS 18 – Mathematical Reference

𝑇𝐻 [C] upper Input temperature


𝑇𝑖𝑛 [C] temperature for high limit monitoring
𝑇𝐿 [C] lower Input temperature
𝑇𝑚𝑎𝑥 [C] maximum Input temperature
𝛾𝑖 [0..1] input control function
𝛾0 [0..1] output control function

4.1.1.6. Detailed Description


Mathematically, the control function is expressed as follows:
If the controller was previously ON (𝛾𝑖 = 1):

𝑖𝑓 Δ𝑇𝐿 ≤ (𝑇𝐻 − 𝑇𝐿 ) then 𝛾0 = 1 Eq. 4.1.1-1

𝑖𝑓 Δ𝑇𝐿 > (𝑇𝐻 − 𝑇𝐿 ) then 𝛾0 = 0 Eq. 4.1.1-2

If the controller was previously OFF (𝛾𝑖 = 0):

𝑖𝑓 Δ𝑇𝐻 ≤ (𝑇𝐻 − 𝑇𝐿 ) then 𝛾0 = 1 Eq. 4.1.1-3

𝑖𝑓 Δ𝑇𝐻 > (𝑇𝐻 − 𝑇𝐿 ) then 𝛾0 = 0 Eq. 4.1.1-4

However, the control function is set to zero, regardless of the upper and lower dead band conditions, if
𝑇𝑖𝑛 > 𝑇𝑚𝑎𝑥 . This situation is often encountered in domestic hot water systems where the pump is not
allowed to run if the tank temperature is above some prescribed limit.
The controller function is shown graphically as follows.

 =1
i
1

o
 =0
i
0

 (TH - T L ) 
L H
Figure 4.1.1–1: Controller Function

4–12
TRNSYS 18 – Mathematical Reference

4.1.2. Type 22: Iterative Feedback Controller


The iterative feedback controller calculates the control signal (u) required to maintain the controlled variable
(y) at the setpoint (ySet). It uses TRNSYS iterations to provide accurate setpoint tracking. This controller can
be used to model a real feedback controller (e.g. PID) that would adapt its control signal continuously or
using a discrete timestep much shorter than the TRNSYS simulation timestep. The controller has an
ON/OFF signal and bounds can be fixed for the control signal.

4.1.2.1. Parameter/Input/Output Reference


PARAMETERS

1 Mode [-] Controller mode (not used)

2 Number of Oscillations [-] The number of oscillations of the controller state allowed in one
Permitted timestep before the output will be fixed and the solution found.
Set to an odd number to allow the controller to bounce between
two control states for successive timesteps. (See Control Basics
for a more complete discussion of controller oscillations.)

INPUTS

1 Setpoint [-] ySet is the setpoint for the controlled variable. The controller will
calculate the control signal that zeroes (or minimizes) the
tracking error (e = y-ySet).

2 Controlled Variable [-] y is the controlled variable that will track the setpoint (ySet).

3 On/Off Signal [-] The control signal is always zero if the On/Off Signal = 0.

4 Minimum Control [-] Minimum value of the control signal. The controller will minimize
Signal the tracking error for uMin <= u <= uMax. uMin and uMax can be
variable but you should always ensure that some values of u are
acceptable. In other words, do not set uMin > uMax to switch the
controller Off. You can use the On/Off input for that purpose.
uMin and uMax are used in the numerical algorithm and using
realistic values rather than arbitrarily large numbers will improve
the controller stability and speed.

5 Maximum Control [-] Maximum value of the control signal. The controller will minimize
Signal the tracking error for uMin <= u <= uMax. uMin and uMax can be
variable but you should always ensure that some values of u are
acceptable. In other words, do not set uMin > uMax to switch the
controller Off. You can use the On/Off input for that purpose.
uMin and uMax are used in the numerical algorithm and using
realistic values rather than arbitrarily large numbers will improve
the controller stability and speed.

6 Threshold for Non- [-] This is the minimum control signal (absolute value) for which a
Zero Output non-zero output will be set. It is different from uMin. Control
values lower than uThreshold in absolute value will be zeroed.
This can be used for example to model a pump that has a
minimum operating flowrate: in that case uThreshold should be
set to the minimum flowrate and uMin should be set to 0.
Another example is a control signal where uMin = -100, uMax =
100 and uThreshold = 10. This means that values between -100

4–13
TRNSYS 18 – Mathematical Reference

and 100 are acceptable but outputs lower than 10 in absolute


value will be set to zero.

7 Tolerance on Tracking [-] The controller will stick to its current value (i.e. not attempt to
Error further reduce the tracking error) if the tracking error is within this
tolerance. Positive numbers are interpreted as a relative
tolerance on y, negative numbers are interpreted as an absolute
tolerance. 0 is acceptable.

OUTPUTS

1 Control Signal [-] This is the controller output

2 Tracking Error [-] Tracking error (ySet-y).

3 Controller Status [-] Controller status. 0 means the controller is OFF. The following
values are added to status to indicate the controller status: 1 if
the controller is ON, 2 if the control signal is set to 0 because of
the threshold value, 4 if it is constrained by the minimum value,
8 if it is constrained by the maximum value, 16 if it is stuck to its
previous value, 32 if the tracking error is within the tolerance,
and 64 if the slope of the (control signal, tracking error) curve is
too steep and steps are cut in order to promote numerical
convergence. All flags are summed so that the status for "ON, at
the maximum value and within tolerance" is 1+8+32=41.

4 Unsaturated Control [-] Unsaturated control signal: calculated value before taking the
Signal minimum and maximum boundaries into account. This output is
mostly used for debugging purposes, the control signal (u) that
should be connected to the controlled system is output 1.

4.1.2.2. Simulation Summary Report Contents


MINIMUM/MAXIMUM VALUE FIELDS

Controller Setpoint [-] Minimum and maximum of Input 1

Tracking Error [-] Minimum and maximum of Output 2

4.1.2.3. Hints and Tips


Type 22 uses TRNSYS iterations to adjust the control signal. Its performance may be affected by different
factors:
 Time step: Type 22 "solves" the control problem by attempting to zero the tracking error. It has no
knowledge at all about the process dynamics, which may lead to oscillations. Changing the timestep
will have a strong influence on those oscillations. If you notice an "On-Off" behavior with poor setpoint
tracking, you can try to adjust the simulation timestep.
 Order of components in the Input file: it is recommended to start with the controller before the
component(s) it controls and to keep components in a logical order. This will minimize the risk that
TRNSYS "skips" timesteps because the simulation appears to be converging. You can usually facilitate
convergence and minimize simulation time by grouping all the controlled components and place them
just after the controller. Please note that this is not an absolute rule and that we recommend that you
experiment with different component sequences, especially if the controller appears to be
unresponsive.

4–14
TRNSYS 18 – Mathematical Reference

 Simulation tolerances: often, small variations in a control signal have a very small effect on a controlled
system, but users are expecting the controlled variable to follow the setpoint accurately. It is
recommended to use stricter tolerances than the usual default values in simulations that make use of
Type 22. Reducing tolerances usually minimizes the impact of component order.
 TRNSYS solver: when using Solver 0 (successive substitution) with numerical relaxation, the
convergence promotion algorithm may interact with the oscillations caused by Type 22. It is
recommended to use Solver 0 without numerical relaxation (i.e. with a minimum and maximum
relaxation factors equal to 1) with Type 22.
 Equation Solver: EQSolver 1 and above have been designed to speed up simulations by removing
unnecessary calls to equations. If equations are used in an information loop that includes an iterative
controller, those equations should always be called as soon as their Inputs have changed (as normal
components are). This is the solving mode used by EQSolver 0 (the default), and Type 22 should be
used with that equation solver
 The factors discussed here above are the most likely causes of "unresponsive" iterative controllers.

4.1.2.4. Nomenclature
ySet [any] Setpoint for the controlled variable
y [any] Controlled variable that tracks the setpoint
u [any] Control signal (controller's output)
umin [any] Minimum value of the control signal
umax [any] Maximum value of the control signal
uthreshold [any] Threshold value for non-zero output (see text)
tol [any] Tolerance on tracking error
e [any] Tracking error

4.1.2.5. Detailed Description


The iterative feedback controller uses a secant method to calculate the control signal that zeroes (or
minimizes) the tracking error e (e = ySet-y). The principle of operation is as follows:
 At the first 2 iterations in a timestep, the controller outputs a control signal that is selected in order to
provide a suitable starting point for the secant method search. The value used is different from the
value at the previous call in order to prevent TRNSYS from considering that the simulation has
converged, but not too far from that previous value in order to keep the system in a stable state.
 The controller stores the values of u it outputs and records the values of e that are measured when
that control signal is applied. The controller operation can be interpreted in a (u,e) plane, where the
solution is the value of u that zeroes e. Once the two initial points are obtained, the controller uses a
secant method to search for the solution
The secant method is best described by an example (see Figure 4.1.2–1). The system's trajectory in the
(u,e) plane is the gray dotted line. The controller first outputs a control signal u 1. The system is then
simulated using that value, which gives point 1. The controller then outputs signal u2, which is chosen to be
different but not too far apart from u1. The system now outputs an error signal (e) that corresponds to point
2. The controller extrapolates the line between points 1 and 2 and calculates the u value that zeroes e. In
this example, this value is outside the allowed range, so umin is used. This gives point 3. A linear interpolation
between points 2 and 3 gives point 4. Points 5 and 6 are obtained in a similar way and the controller stops
iterating when the tolerance (tol) is reached or when TRNSYS stops iterating because the variation in the
controller's output is within the global tolerances.

4–15
TRNSYS 18 – Mathematical Reference

e 1
2

umin umax
5
6
u3 u6 u5 u4 u2 u1 u

Figure 4.1.2–1: Secant method used in Type 22


The controller will also stop iterating when the number of iterations at a given timestep reaches the
maximum set by the number of oscillations parameter. If you set this parameter to 0, the controller will stick
a few iterations before the maximum number of iterations set in the general simulation parameters, so
TRNSYS gets a chance to converge at the current timestep.

CONSTRAINTS ON THE CONTROL SIGNAL


You can impose different constraints on the control signal:

umin Minimum value (see Figure 4.1.2–1)


umax Maximum value (see Figure 4.1.2–1)
uthreshold Threshold value for non-zero output. This input tells the controller that all calculated
values that are less than uthreshold (in absolute value) should be forced to zero. It is
different from umin. This can be used for example to model a pump that has a minimum
operating flowrate: in that case uthreshold should be set to the minimum flowrate and umin
should be set to 0. Another example is a control signal where u min = -100, umax = 100
and uthreshold = 10. This means that values between -100 and 100 are acceptable but
outputs lower than 10 (in absolute value) will be set to zero.

4–16
TRNSYS 18 – Mathematical Reference

4.1.3. Type 23: PID Controller


Type 23 implements a Proportional, Integral and Derivative (PID) controller. Type 23 calculates the control
signal required to maintain the controlled variable at the setpoint. This control signal is proportional to the
tracking error, as well as to the integral and the derivative of that tracking error. Type 23 implements a state-
of-the-art discrete algorithm with anti-windup.

4.1.3.1. Parameter/Input/Output Reference


PARAMETERS

1 Mode [-] Controller's operation mode. Mode 0 implements a "real-life" (i.e.


non-iterative) controller which performs its calculations after
"measuring" the system's outputs (i.e. after convergence in
TRNSYS) and maintains its outputs at a constant level until the
end of the next timestep. Mode 1 implements an iterative
controller that uses TRNSYS iterations to adjust its outputs.
Mode 1 will usually provide a faster response at the expense of
more iterations and the optimal parameters may be far from real-
world values for a similar system. Mode 0 does not cause more
TRNSYS iterations but it may require that you reduce the time
step in order to obtain a satisfactory closed-loop response. Note
that Type 22 (Iterative feedback controller) offers an alternative
to mode 1 and is easier to configure).

2 Number of Oscillations [-] The number of oscillations of the controller state allowed in one
Permitted timestep before the output will be fixed and the solution found.
Set to an odd number to allow the controller to bounce between
two control states for successive timesteps. (See Control Basics
for a more complete discussion of controller oscillations.)

INPUTS

1 Setpoint [-] ySet is the setpoint for the controlled variable. The controller will
calculate the control signal that zeroes (or minimizes) the
tracking error (e = ySet-y).

2 Controlled Variable [-] y is the controlled variable that will track the setpoint (ySet).

3 On/Off Signal [-] The control signal is always zero if On/Off = 0.

4 Minimum Control [-] The controller saturates the calculated control signal to have
Signal uMin <= u <= uMax.

5 Maximum Control [-] The controller saturates the calculated control signal to have
Signal uMin <= u <= uMax.

6 Threshold for Non- [-] This is the minimum control signal (absolute value) for which a
Zero Output non-zero output will be set. It is different from uMin. Control
values lower than uThreshold in absolute value will be zeroed.
For example, this can be used to model a pump that has a
minimum operating flowrate: in that case uThreshold should be
set to the minimum flowrate and uMin should be set to 0.
Another example is a control signal where uMin = -100, uMax =
100 and uThreshold = 10. This means that values between -100
and 100 are acceptable but values lower than 10 in absolute
value will be set to zero.

4–17
TRNSYS 18 – Mathematical Reference

7 Gain Constant [-] This is the gain of the PID controller (acts on the 3 parts of the
signal: proportional, integral and derivative).

8 Integral Time [h] This is Ti, the integral (or reset) time of the controller. You can
set Ti to 0 to disable integral control.

9 Derivative Time [h] This is Td, the derivative time of the controller. You can set Td to
0 to disable the derivative control.

10 Tracking Time for Anti- [h] The tracking (anti-windup) time constant is used to de-saturate
Windup the integrator in case the control signal is saturated by the
minimum, maximum or threshold values. 0 means no anti-
windup (not recommended) and -1 means "use default value" (Tt
= Ti). It is generally recommended to set Tt to 0.1 .. 1 Ti.

11 Fraction of ySet for [-] b is the fraction of ySet used in the proportional effect: vp = Kc *
Proportional Effect (b*ySet-y). This parameter should be set between 0 and 1. Using
values less than 1 allows for smoother transitions in case of fast
setpoint changes but it will lead to a more sluggish response to
such a setpoint change.

12 Fraction of ySet for [-] g is the fraction of ySet used in the derivative effect, which is
Derivative Effect proportional to the derivative of (g*ySet-y). This parameter
should be set to a value between 0 and 1. Using values less
than 1 allows for smoother transitions in case of fast setpoint
changes but it will lead to a more sluggish response to such a
setpoint change. Often in servo control g is 1 while in process
control g is 0.

13 High-Frequency Limit [-] N is the high-frequency limit of the derivative gain. The derivative
of Derivative effect is basically multiplied by (Td/(Td+N delta_t)). N should be
a positive number. N is usually set in the range [3 ; 20]. The
default value is N=10.

OUTPUTS

1 Control Signal [-] This is the controller output.

2 Tracking Error [-] ySet-y

3 Unsaturated Control [-] Calculated value before taking the minimum, maximum and
Signal threshold values into account. This output is mostly used for
debugging purposes, the control signal (u) that should be
connected to the controlled system is output 1.

4 Proportional Action [-] This is the part of the control signal that is proportional to the
tracking error (before saturation).

5 Integral Action [-] This is the part of the control signal that is proportional to the
integral of the tracking error (before saturation). Note that anti-
windup has not been applied to this value.

6 Derivative Action [-] This is the part of the control signal that is proportional to the
derivative of the tracking error (before saturation).

7 Controller Status [-] 0 means the controller is OFF. The following values are added to
status to indicate the controller status: 1 if the controller is ON, 2
if the control signal is set to 0 because of the threshold value, 4 if

4–18
TRNSYS 18 – Mathematical Reference

it is constrained by the minimum value, 8 if it is constrained by


the maximum value. All flags are summed so that the status for
"ON, at the maximum value" is 1+8=9.

4.1.3.2. Simulation Summary Report Contents


MINIMUM/MAXIMUM VALUE FIELDS

Controller Setpoint [-] Minimum and maximum of Input 1

Tracking Error [-] Minimum and maximum of Output 2

4.1.3.3. Hints and Tips


TYPE 23 MODES
The PID controller can operate in two Modes: Mode 0 implements a "real life" (non-iterative) controller, and
Mode 1 implements an iterative controller.
In Mode 0, Type 23 is only called after other TRNSYS components have converged. It then calculates the
control variable based on the converged outputs, which is applied at the next simulation timestep. This
mimics the behavior of a real-life controller which uses the measured outputs at one point in time and
calculates a control variable that is applied during the next timestep. Mode 0 typically requires short
timesteps (usually less than 1/10th of the dominant time constant in the system, although this is certainly
not an absolute rule).
Mode 1 uses TRNSYS iterations to correct the control signal. It may lead to a faster response without
requiring a short timestep, but it is less stable and will generate more TRNSYS iterations. Please also note
that Type 22 implements a generic feedback controller that is an alternative to Type 23 in Mode 1.

TIMESTEPS AND OTHER SETTINGS THAT MAY AFFECT TYPE 23'S PERFORMANCE
Type 23's performance depends on the simulation timestep. It is generally recommended to keep the
sampling time smaller than 10% of the dominant time constant of the process. Real-world controllers
typically use very short timesteps, which is not always practical in simulation studies. For that reason, it is
not always possible to transfer the optimal parameters of a PID to a real application. Using Type 23 in Mode
1 (iterative) can improve the performance for relatively long timesteps.

CHOOSING THE PID PARAMETERS


A discussion of PID parameters tuning is beyond the scope of this manual. The listed references are good
examples of information sources on that topic.
It should be noted that the usual timesteps used in TRNSYS simulations are typically much larger than the
sampling time of commercial digital controllers (which are usually in the order of 200 ms). It may still be
possible to achieve a satisfactory feedback control with a "typical" TRNSYS timestep, but this might require
some trial and error for parameter tuning. It is also likely that the optimal controller settings will be dependent
on the simulation timestep.
A final note on the transposition of parameter tuning to real-world controllers: even if your simulation uses
a very short timestep and if you use Mode 0, the tuned parameters may be different from the ones you
would need to use in a real controller applied to the simulated system. Optimal parameters depend on the
algorithm used in the PID, for which different implementations are available.

USING TYPE 23 IN HEATING ONLY, COOLING ONLY AND COMBINED HEATING AND COOLING
APPLICATIONS

4–19
TRNSYS 18 – Mathematical Reference

Unlike many of TRNSYS’s controller components, Type 23 may be used in heating, cooling, and combined
heating and cooling applications. Depending on the nature of the controlled variable (energy addition rate,
mass flow rate, fraction), it may be appropriate to set up the controller with a negative proportional gain for
cooling-only or combined heating and cooling applications. The examples here below illustrate a few typical
uses of Type 23 for heating and cooling. The reader is also invited to refer to the corresponding standard
examples (in Examples\Feedback Control).
Heating and/or cooling power (where heating power is positive, cooling power is negative)
When Type 23 is used to control the heating or cooling power that is provided to a room, a storage tank or
any other device, the control signal must have the same sign as the tracking error (difference between the
setpoint and the controlled variable): if the controlled temperature is below the setpoint, a positive power
must be applied and if the temperature is above the setpoint a negative power must be applied. In such
cases, users should select a positive gain constant for the PID controller and set the minimum and
maximum values to -(maximum cooling power) and +(maximum heating power) respectively.
Cooling power only (cooling power is positive)
If cooling only is required, the components or equations using the output of Type 23 might require positive
values for cooling power. In that case the power should increase when the tracking error (difference
between the setpoint and the controlled variable) decreases, i.e. more cooling should be provided when
the temperature rises above the setpoint. Users should then use a negative gain constant and set the
minimum and maximum control values to 0 and +(maximum heating power) respectively.
Heating flow rate
In this application, it is presupposed that a hot source is available and that heating is accomplished by
increasing the flow rate from this hot source. The control signal must increase when the tracking error
(setpoint – controlled temperature) increases, i.e. more heating should be provided when the temperature
is below the setpoint. Users should then use a positive gain constant and set the minimum and maximum
control values to 0 and (maximum flow rate) respectively.
Cooling flow rate
For this cooling application, it is presupposed that a cold source is available and that cooling is
accomplished by increasing the flow rate from this cold source. The control signal must increase when the
tracking error (setpoint – controlled temperature) decreases, i.e. more cooling should be provided when the
temperature is above the setpoint. Users should then use a negative gain constant and set the minimum
and maximum control values to 0 and (maximum flow rate) respectively.

4.1.3.4. Nomenclature
ySet [any] Setpoint for the controlled variable
y [any] Controlled variable (tracks the setpoint)
u [any] Control variable (controller's output)
v [any] Unsaturated control variable (before applying constraints)
umin [any] Minimum value of the control variable
umax [any] Maximum value of the control variable
uthreshold [any] Threshold value for non-zero output (see text)
e [any] Tracking error
K [any] Controller gain
Ti [h] Integral time (also called reset time)
Td [h] Derivative time

4–20
TRNSYS 18 – Mathematical Reference

b [any] Setpoint weighting factor in Proportional action


c [any] Setpoint weighting factor in Derivative action
N [-] High frequency limit for derivative action
Tt [h] Tracking time for integrator desaturation (anti wind-up)
h [h] TRNSYS timestep

4.1.3.5. Detailed Description


This section is a short description of the algorithm implemented in Type 23. The algorithm is presented in
(Aström and Wittenmark, 1990) and (Aström and Hägglund, 1994).
The "textbook" PID algorithm is:
1 𝑡 𝑑𝑒(𝑡)
𝑣(𝑡) = 𝐾 [𝑒(𝑡) + ∫ 𝑒(𝜏)𝑑𝜏 + 𝑇𝑑 ]=𝑃+𝐼+𝐷 Eq. 4.1.3-1
𝑇𝑖 𝑜 𝑑𝑡
There are 3 terms in the equation which can easily be identified as the P-term (proportional to the error),
the I-term (proportional to the integral of the error) and the D-term (proportional to the derivative of the
error). This equatoin is sometimes referred to as the non-interacting PID algorithm, or series PID algorithm.
There are many forms of the PID algorithm, and the optimal settings are different for the
different algorithms. This should be kept in mind when transferring the parameters tuned
in a simulation into a real-life controller. More information on the different algorithms and
conversion factors between their parameters can be found in (Aström and Hägglund, 1994)
Several modifications have been made to the original algorithm in order to improve its performance and
operability:

SETPOINT WEIGHTING
It is sometimes advisable to replace the tracking error (e) with a more general expression in both the P-
Term and the D-term:
1 𝑡 𝑑𝑒𝑑 (𝑡)
𝑣(𝑡) = 𝐾 [𝑒𝑝 (𝑡) + ∫ 𝑒(𝜏)𝑑𝜏 + 𝑇𝑑 ] Eq. 4.1.3-2
𝑇𝑖 𝑜 𝑑𝑡
where
𝑒𝑝 = 𝑏𝑦𝑠𝑒𝑡 − 𝑦 (0 ≤ 𝑏 ≤ 1) Eq. 4.1.3-3

𝑒𝑑 = 𝑐𝑦𝑠𝑒𝑡 − 𝑦 (0 ≤ 𝑐 ≤ 1) Eq. 4.1.3-4

Using b<1 reduces overshoot during fast setpoint changes and, in a similar way, using c<1 will avoid large
transients in the control variable due to sudden changes in the setpoint. In servo control (where the
controller is supposed to respond quickly to changes in setpoint) b and c are usually close or equal to 1. In
regulatory control (where one is more interested in responding to input variations to bring the system back
to a steady state), b and c are usually small (close or equal to 0).

LIMITATION OF THE DERIVATIVE GAIN


The derivative action may result is very large variation in the control variable and it is most often advisable
to limit the high frequency gain of the derivative term. This can be done by replacing the D-term with the
following:
𝑑𝑒𝑑 (𝑡) 𝑇𝑑 𝑑𝐷
𝐷 = 𝐾𝑇𝑑 − Eq. 4.1.3-5
𝑑𝑡 𝑁 𝑑𝑡
This can be interpreted as the ideal derivative term, filtered by a first-order system with the time constant
Td/N. N is usually between 3 and 20, a value of 10 is usually a good compromise.

4–21
TRNSYS 18 – Mathematical Reference

INTEGRATOR WINDUP
Control variables are usually limited by an upper and a lower bound that represent physical actuator limits.
When the control variable reaches one of those limits, the feedback loop is broken because the actuator
will remain at its limit independently of the system's output. A controller with integrating action will continue
to integrate the error. In such a situation, the integral term may become very large (it "winds-up"). It is then
necessary that the tracking error has an opposite sign for a very long time before the controller returns to a
"normal" status.
Integrator wind-up can be prevented by back-calculating the integral value that would give a control variable
exactly at the saturation limit. It is also advantageous to reset the integrator towards that back-calculated
value not instantaneously but with a time constant (T t):
𝑣(𝑡) = 𝑃 + 𝐼 + 𝐷
𝑢(𝑡) = 𝑠𝑎𝑡𝑢𝑟𝑎𝑡𝑒(𝑣(𝑡))
1 𝑡
𝐼 = 𝐼 − ∫ (𝑢(𝜏) − 𝑣(𝜏)) 𝑑𝜏 Eq. 4.1.3-6
𝑇𝑡 0
Where the saturate() function applies minimum and maximum values and other constraints. It is generally
recommended to have Tt  [0.1 Ti ; Ti].

DISCRETIZATION
The Proportional term is straightforward:
𝑃(𝑡𝑘 ) = 𝐾𝑒𝑝 (𝑡𝑘 ) = 𝐾(𝑏𝑦𝑠𝑒𝑡 (𝑡𝑘 ) − 𝑦(𝑡𝑘 )) Eq. 4.1.3-7

The Integral term is calculated using the backward difference approximation, which is consistent with the
TRNSYS definition of variables (any variable reported at time t is the average between
tk-1 and tk):
𝐾ℎ
𝐼(𝑡𝑘 ) = 𝐼(𝑡𝑘−1 ) + 𝑒(𝑡𝑘 ) Eq. 4.1.3-8
𝑇𝑖
The Derivative term is approximated by a backwards difference:
𝑇𝑑 𝐾𝑇𝑑 𝑁
𝐷(𝑡𝑘 ) = 𝐷(𝑡𝑘−1 ) + (𝑒 (𝑡 ) − 𝑒𝑑 (𝑡𝑘−1 )) Eq. 4.1.3-9
𝑇𝑑 + 𝑁ℎ 𝑇𝑑 + 𝑁ℎ 𝑑 𝑘
Finally, anti-windup desaturation is applied after calculating the saturated control variable by correcting the
integral term as follows:

𝐼(𝑡𝑘 ) = 𝐼(𝑡𝑘 ) − (𝑢(𝑡𝑘 ) − 𝑣(𝑡𝑘 )) Eq. 4.1.3-10
𝑇𝑡

4.1.3.6. References
Aström, K.J. and Wittenmark, B. – Computer controlled Systems, 2nd Edition. Prentice Hall, Englewood
Cliffs, NJ – 1990. ISBN 0-13-168600-3
Aström, K.J. and Hägglund, T. – PID Controllers: Theory, Design and Tuning, 2nd Edition. International
Society for Measurement and Control – 1994. ISBN 1-55617-516-7

4–22
TRNSYS 18 – Mathematical Reference

4.1.4. Type 40: Microprocessor Controller


The Microprocessor Controller component combines five differential comparators with a logic array to allow
simulation of certain types of programmed controllers.

4.1.4.1. Parameter/Input/Output Reference


Type 40's flexibility results in a tremendous complexity in the cycles involving parameters.
For that reason, Type 40 is recommended for advanced users only.

PARAMETERS
The parameters used to describe the functions of the four internal parts of the controller are listed
separately. Since this component may use more than 200 parameters, care must be used in constructing
and documenting the parameter list used.
The first set of parameters, designated section A, relate to the number of comparators to be used and their
on and off dead bands. This section may contain from three to eleven parameters. This number is
represented in the following section by NPARS(A).

Parameter No. Description


1 NCOMPS number of comparators (up to 5)
2 TON on dead band, comp. 1 (° C)
3 TOFF off dead band, comp. 1 (° C)
i*2 TON on dead band comp. i (° C)
i * 2+1 TOFF off dead band, comp. i (° C)

The second section of the parameter list, section B, contains parameters which relate to the determination
of the controller mode. This section will contain parameters NC*2+2 through NMODES*NC+2NC+2. The
number of parameters contained in this section is NPARS(B). All parameters in this section with the
exception of the first, NMODES, must be either 0, 1 or -1.

Parameter No. Description


NPARS(A)+1 NMODES, number of controller modes
NPARS(A)+2 Status of comparator 1 when in mode 1
NPARS(A)+3 Status of comparator 2 when in mode 1
NPARS(A)+(k-1)*NCOMPS+i+1 Status of comparator i when in mode k

The third section of the parameter list, designated Section C, relates to the specific output values set by a
particular mode. This section contains NPARS(C) parameters.

Parameter No. Description


NPARS(A)+NPARS(B)+1 NOUTS, number of outputs (1 ≤ NOUTS ≤ 18)
NPARS(A)+NPARS(B)+2 Output 1 of controller when in mode 1
NPARS(A)+NPARS(B)+(k-l)*NOUTS+i+1 Output i of controller when in mode k

4–23
TRNSYS 18 – Mathematical Reference

The final section of the parameter list contains parameters which relate to overall controller operation.
These include the values of NSTICK, HOLD, and MODE PRINT. Note that there must be NMODES HOLD
parameters specified, one for each mode.

Parameter No. Description


NPARS(A)+NPARS(B)+NPARS(C)+1 NSTICK, number of times controller mode may
change in one timestep
NPARS(A)+NPARS(B)+NPARS(C)+2 HOLD1, number of timesteps before next mode
change in mode 1
NPARS(A)+NPARS(B)+NPARS(C)+1+k HOLDk, number of timesteps before next mode
change when in mode k
NPARS(A)+NPARS(B)+NPARS(C) MODE PRINT, number of times in a timestep
+NMODES+k+2 mode may change before mode trace is printed

INPUTS

Input No. Description


1 Comparator 1 high Input
2 Comparator 1 low Input
2*(i-1)+1 Comparator i high Input
2*(i-1)+2 Comparator i low Input

OUTPUTS

Output No. Description


1 Control function output 1

N Control function output N

19 Controller status, 0=free, 1=stuck, 2=hold
20 Current mode

4.1.4.2. Simulation Summary Report Contents


A Simulation Summary Report is not implemented for this component.

4.1.4.3. Hints and Tips


EXAMPLE
The system to be controlled is shown in Error! Reference source not found.. Three comparators are
equired: one to decide whether the pump in the collector-storage loop (I) should be on or off, one to
determine whether useful energy is available in the storage tank, and one to determine whether heating is
required by the house. Note: The example provided in with the TRNSYS Simulation Studio is more detailed
and differs slightly from this figure.

4–24
TRNSYS 18 – Mathematical Reference

T TTOP
COL Auxilar y
TB OTTOM ( III)
T ROOM

Colle c tor Load


Pump (I) Pump (II)
Figure 4.1.4–1: Type 40 – Example system
The three comparators are shown schematically in Error! Reference source not found.. Six INPUTS are
equired: two for each comparator. The first group of 7 PARAMETERS specifies that 3 comparators are to
be used and gives on and off dead bands for each comparator. The very first PARAMETER (Number of
Comparators) is set to 3, which will create six INPUTS (a high and low input for each comparator) and also
a total of six PARAMETERS are displayed for the ON and OFF dead bands for each comparator, which
are set in the example according to Error! Reference source not found.. During the simulation, the
emperature inputs are compared to these dead bands set by the user, and the result is a comparator output
status (γ) of either a 0 or 1 for each comparator.

TCOL TBOTTOM TTOP TROOM TSET TROOM

C o m p a r a to r  T ON = 1 0 C o m p a r a to r  T ON = 2 C o m p a r a to r  T ON = 1
1  T OF F = 1 2  T OF F = 0 3  T OF F = 2

1 2 3

Figure 4.1.4–2: Type 40 – Example comparators


For example: In reference to comparator 1 with on and off dead bands of 10 and 1 degrees respectively,
this means if the collector temperature becomes 10 degrees higher than the bottom of the tank, the
comparator will output γ1 = 1. The comparator will not turn back to γ1 = 0 until the collector temperature
reaches within 1 degree of the bottom of the tank.
Whatever the actual comparator output states are for each comparator are compared to the “Comparator
Output Status” PARAMETERS set by the user, which determines what mode the system is currently
operating in.
Three OUTPUTS are also required: one to control the pump in the collector storage loop (I), one to control
the pump in the storage-load loop (II), and one to control the auxiliary heater (III).
Note: The number of OUTPUTS is not related to the number of comparators, it is merely a coincidence that
the outputs and comparator numbers are the same for this example. They can be different or the same for
any given system.
The values of the OUTPUTS will depend on the values of the comparator output states (γ1, γ2, and γ3)
generated by the 3 comparators.
The table below gives the possible output states of the comparators and the corresponding Type 40
Controller OUTPUTS desired. The left half of the table specifies that 6 possible output states are of interest.

4–25
TRNSYS 18 – Mathematical Reference

The right half of the table indicates how the controller will respond when the system is in each particular
mode determined by the comparator outputs.

Comparator outputs Type 40 outputs


NMODE 1 2 3 I II III

1 0 (0 or 1)1 0 0 0 0
2 0 0 1 0 0 1
3 0 1 1 0 1 0
4 1 (0 or 1) 0 1 0 0
5 1 0 1 1 0 1
6 1 1 1 1 1 0

For example: In mode 2, γ1 = 0 and γ2 = 0, this means the collector cannot contribute any more heat to the
tank, and the tank cannot deliver any useful heat to the zone’s setpoint. However, γ3 = 1, which means the
setpoint is higher than the zone temperature. Since the solar side of the system is useless, the zone will
need auxiliary heat, therefore when looking across to the right half of the table on the same row, only output
(III) is turned on. So the controller will keep the collector and load pump off, but will turn on the auxiliary
pump.
Another example: In mode 4, γ1, = 1. This means the collector can supply energy to the tank so the Type
40 output (I) is turned on. But since γ3 = 0, this means the setpoint temperature has been reached and the
tank and auxiliary heater should remain off. Therefore no matter if the tank can supply energy to the room
or not (it doesn’t matter), outputs (II) and (III) are both turned off. Since it doesn’t matter if the tank can
supply energy or not, γ2 can be (0 or 1). This is simply a shortcut instead of using two separate modes to
create the same Type 40 output. More is explained on this in the next “note”.
As you can see, there is never a time all Type 40 output (II) and (III) are on. This is because the system
always relies on solar energy when it can, so the auxiliary heater should never be supplying energy at the
same time the tank is.
Note: With 3 comparators, there can be a maximum of be 8 modes (8 different binary combinations).
However, in our example there are only 6 modes. This is because there are two instances in which γ2 can
be (0 or 1) and the Type 40 output is the same (meaning the system behaves the same way). Another way
of saying this, is that, (0 or 1) means that comparator output does not matter.
This is essentially a time saver and allows for less parameter entries and also allows for less mode changes
in the simulation. If incorporating this shortcut by using a (0 or 1) as shown in this table, a value of -1 is
used in TRNSYS for the comparator output PARAMETER.
A final group of parameters is used to set NSTK = 3. HOLD-k = 0 (for k = 1 through 6) and MODE PRINT
= 4 (diagnostic printing turned on after four iterations for a given time step).
The following lines would be used in the Type 40 component description.
PARAMETERS 53
3 10 1 2 0 1 2
6 0 -1 0 0 0 1 0 1 1 0 -1 0 1 0 1 1 1 1
3 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0

1
(0 or 1) indicates that the value does not matter.

4–26
TRNSYS 18 – Mathematical Reference

4.1.4.4. Nomenclature
NCOMPS Number of comparators (1 < NCOMPS  5)
Ci  Output of comparator i

Ci-1 Output of comparator i on previous call to component number of controller


modes (1 < NMODE  12)
NMODES Number of controller modes
NOUTS Number of outputs of component (1 < NOUTS  18)
NPARS(A) Number of parameters used to describe comparator functions
(NPARS(A)=NC*2+1)
NPARS(B) Number of parameters used to describe mode array
(NPARS(B)=NMODES*NC+1)
NPARS(C) Number of parameters used to describe output array
(NPARS(C)=NMODES*NOUTPUT+1)
NSTK Number of times mode may change in a time step before it is 'stuck' at its
current value.
HOLD Number of time steps controller will remain in modeK before making next
control decision.
MODE PRINT Number of times in a time step controller mode may change before diagnostic
mode trace is printed

4.1.4.5. Detailed Description


The controller is logically divided into four parts. The first part is concerned with conversion of input
signals into binary logic levels and consists of up to five comparators. Each comparator incorporates
operational hysteresis based on user specified on and off dead bands. The state of comparator i at time t
is described by the following equation:

ON if (INhi-INlow) > Ton and Ci ,t-1 = OFF


Ci ,t = Eq. 4.1.4-1
OFF if (INhi-INlow)  Toff and Ci ,t-1 = ON

The output of this part of the component is a binary word NCOMPS bits long in which each bit corresponds
to a comparator state, 1 for on and 0 for off, with the least significant bit (LSB) corresponding to the first
comparator.
The second part of the controller is the mode array. This array consists of NCOMPS rows by NMODE
columns. Each element of the array may assume a value of 0, 1 or -1. The current operating mode is
determined by comparing the entries in each column with the word output by the comparator section. The
comparison is done on a bit-by-bit basis, with no comparison made if the mode array entry is -1.
The mode array output is a single decimal number indicating the column in the array which matches the
comparator output word. If no match is found, the output mode is set to -1. This is called the default mode
and results in all controller outputs being set to 0. At the end of the simulation a message is printed which
indicates the number of times the default mode occurred in the run.
The third part of the controller is the output array. This array consists of NOUTS rows by NMODES
columns. The number output by the mode array is used to point to a specific column of the output array.
The values contained in this column are transferred to the outputs of the controller, with the first value set
as the first output, the second value set as the second output, etc.

4–27
TRNSYS 18 – Mathematical Reference

The fourth part of this component is the control unit. This unit handles errors detected in other parts of the
component as well as implementing the NSTCK, HOLD, and MODE PRINT options described below.

CONTROLLER OPTIONS NSTCK, HOLD AND MODE PRINT


NSTCK
Since a TRNSYS simulation involves dead bands in time as well as in temperature, it is possible for a
system to experience instabilities that will result in a controller cycling between two or more different modes
continuously. To limit this type of cycling, a TRNSYS control component incorporates 'stickiness'. A sticky
controller is allowed to change state up to NSTK times in a given time step before its outputs are frozen in
the current state. A recommended value for NSTCK is 4 or 5 for most long-term simulations.
HOLD
This option is included to allow the simulation of time delays between control decisions. There are the
NMODES and HOLD parameters in the controller. The value of the HOLD parameter associated with a
particular mode specifies the number of timesteps that the controller will stay in that mode before another
control decision can be made.
MODE PRINT
This option allows the listing of successive controller modes in one time step after a specified number of
iterations have occurred. This is useful in situations where excessive controller cycling occurs. MODE
PRINT must be less than or equal to 40.

4.1.4.6. References
1. L.P. Piessens, "A Microprocessor Control Component for TRNSYS", M.S. Thesis,
University of Wisconsin-Madison, 1980.

4–28
TRNSYS 18 – Mathematical Reference

4.1.5. Type 82: Simple Thermostat


Type 82 models a basic thermostat that is similar to a thermostat that would be used in a residence. It
monitors a single temperature and returns a heating and cooling control signal depending on the monitored
temperature and the setpoints.

4.1.5.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of Oscillations [-] The number of oscillations of the controller state allowed in one
Permitted timestep before the output will be fixed and the solution found. Set
to an odd number to allow the controller to bounce between two
control states for successive timesteps. (See Control Basics for a
more complete discussion of controller oscillations.)

2 Temperature Dead [delta C] The dead band temperature difference of the controller. In this
Band model, hysteresis effects can be modeled by use of this
parameter. The setpoint temperature will be centered in the dead
band. If hysteresis is not desired for this controller, simply set this
parameter to 0.0. (See Control Basics for a more complete
discussion of controller hysteresis and dead bands.)

INPUTS

1 Monitoring [C] The temperature being monitored by the controller. Typically this
Temperature input will be connected to a zone temperature where the
thermostat is located, but it could be any temperature being
sensed to control a heating and cooling system.

2 Heating Setpoint [C] The temperature below which heating is commanded. If a dead
band is specified, the heating signal will turn on when the
monitored temperature has dropped below this setpoint minus half
the dead band and turn off when the monitored temperature has
risen above this setpoint plus half the dead band.

3 Cooling Setpoint [C] The temperature above which cooling is commanded. If a dead
band is specified, the cooling signal will turn on when the
monitored temperature has risen above this setpoint plus half the
dead band and turn off when the monitored temperature has
dropped below this setpoint minus half the dead band.

OUTPUTS

1 Control Signal for [-] The control signal for heating. If heating is required then the
Heating control signal will be 1. If no heating is required then the control
signal will be 0.

2 Control Signal for [-] The control signal for cooling. If cooling is required then the
Cooling control signal will be 1. If no cooling is required then the control
signal will be 0.

4.1.5.2. Simulation Summary Report Contents


VALUE FIELDS

4–29
TRNSYS 18 – Mathematical Reference

Dead band [delta C] Parameter 2

MINIMUM/MAXIMUM VALUE FIELDS

Heating Setpoint [C] Minimum and maximum values of Input 2

Cooling Setpoint [C] Minimum and maximum values of Input 3

4.1.5.3. Hints and Tips


 If you are seeing a high percentage of the simulation time that the controller is “stuck”, you can try
increasing the dead band, decreasing the timestep, or reducing the capacity of the equipment.

4.1.5.4. Detailed Description


Type 82 uses the controller state at the previous timestep, the monitored temperature, the setpoints and
the dead band to determine the controller state at the current timestep.
If the control state was off at the previous timestep:
 If the monitored temperature is less than the heating setpoint minus half the dead band, heating is on
 If the monitored temperature is greater than the cooling setpoint plus half the dead band, cooling is on
 Otherwise everything remains off
If heating was on at the previous timestep:
 If the monitored temperature is greater than the heating setpoint plus half the dead band, heating is off
 If the monitored temperature is greater than the cooling setpoint plus half the dead band, cooling is on
 Otherwise heating remains on
If cooling was on at the previous timestep:
 If the monitored temperature is less than the cooling setpoint minus half the dead band, cooling is off
 If the monitored temperature is less than the heating setpoint minus half the dead band, heating is on
 Otherwise cooling remains on

4–30
TRNSYS 18 – Mathematical Reference

4.1.6. Type 85: Simple Humidistat


Type 85 models a simple humidistat that monitors a relative humidity and a setpoint and determines when
moisture should be added to air stream.

4.1.6.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of Oscillations [-] The number of oscillations of the controller state allowed in one
Permitted timestep before the output will be fixed and the solution found.
Set to an odd number to allow the controller to bounce between
two control states for successive timesteps. (See Control Basics
for a more complete discussion of controller oscillations.)

2 Relative Humidity [delta RH] The dead band relative humidity difference of the controller. In
Dead Band this model, hysteresis effects can be modeled by use of this
parameter. The setpoint relative humidity will be centered in the
dead band. If hysteresis is not desired for this controller, simply
set this parameter to 0.0. (See Control Basics for a more
complete discussion of controller hysteresis and dead bands.)

INPUTS

1 Monitoring Relative [RH] The relative humidity that is monitored by the controller. Typically
Humidity this input will be connected to a zone relative humidity where the
humidistat is located, but it could be any relative humidity being
sensed to control a humidification system.

2 Humidity Setpoint [RH] The relative humidity below which humidification is commanded.
If a dead band is specified, the humidification signal will turn on
when the monitored relative humidity has dropped below this
setpoint minus half the dead band and turn off when the
monitored relative humidity has risen above this setpoint plus
half the dead band.

OUTPUTS

1 Control Signal for [-] The control signal for humidification. If humidification is required
Humidification then the control signal will be 1. If no humidification is required
then the control signal will be 0.

4.1.6.2. Simulation Summary Report Contents


VALUE FIELDS

Dead band [delta RH] Parameter 2

MINIMUM/MAXIMUM VALUE FIELDS

Setpoint [RH] Minimum and maximum values of Input 2

4–31
TRNSYS 18 – Mathematical Reference

4.1.6.3. Hints and Tips


 If you are seeing a high percentage of the simulation time that the controller is “stuck”, you can try
increasing the dead band, decreasing the timestep, or reducing the capacity of the equipment.

4.1.6.4. Detailed Description


Type 85 models a simple humidistat that monitors a relative humidity and a setpoint and determines when
moisture should be added to air stream.
If the control state was off at the previous timestep:
 If the monitored relative humidity is less than the setpoint minus half the dead band, humidification is
on
 Otherwise humidification remains off
If humidification was on at the previous timestep:
 If the monitored relative humidity is greater than the setpoint plus half the dead band, humidification is
off
 Otherwise humidification remains on

4–32
TRNSYS 18 – Mathematical Reference

4.1.7. Type 104: Simple Dehumidistat


Type 104 models a simple dehumidistat that monitors a relative humidity and a setpoint and determines
when moisture should be removed from an air stream.

4.1.7.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of Oscillations [-] The number of oscillations of the controller state allowed in one
Permitted timestep before the output will be fixed and the solution found.
Set to an odd number to allow the controller to bounce between
two control states for successive timesteps. (See Control Basics
for a more complete discussion of controller oscillations.)

2 Relative Humidity [delta RH] The dead band relative humidity difference of the controller. In
Dead Band this model, hysteresis effects can be modeled by use of this
parameter. The setpoint relative humidity will be centered in the
dead band. If hysteresis is not desired for this controller, simply
set this parameter to 0.0. (See Control Basics for a more
complete discussion of controller hysteresis and dead bands.)

INPUTS

1 Monitoring Relative [RH] The relative humidity that is monitored by the controller. Typically
Humidity this input will be connected to a zone relative humidity where the
humidistat is located, but it could be any relative humidity being
sensed to control a humidification system.

2 Humidity Setpoint [RH] The relative humidity above which dehumidification is


commanded. If a dead band is specified, the dehumidification
signal will turn on when the monitored relative humidity has risen
above this setpoint plus half the dead band and turn off when the
monitored relative humidity has dropped below this setpoint
minus half the dead band.

OUTPUTS

1 Control Signal for [-] The control signal for dehumidification. If dehumidification is
Dehumidification required then the control signal will be 1. If no dehumidification
is required then the control signal will be 0.

4.1.7.2. Simulation Summary Report Contents


VALUE FIELDS

Dead band [delta RH] Parameter 2

MINIMUM/MAXIMUM VALUE FIELDS

Setpoint [RH] Minimum and maximum values of Input 2

4–33
TRNSYS 18 – Mathematical Reference

4.1.7.3. Hints and Tips


 If you are seeing a high percentage of the simulation time that the controller is “stuck”, you can try
increasing the dead band, decreasing the timestep, or reducing the capacity of the equipment.

4.1.7.4. Detailed Description


Type 104 uses the controller state at the previous timestep, the monitored relative humidity, the setpoint
and the dead band to determine the controller state at the current timestep.
If the control state was off at the previous timestep:
 If the monitored relative humidity is greater than the setpoint plus half the dead band, dehumidification
is on
 Otherwise dehumidification remains off
If dehumidification was on at the previous timestep:
 If the monitored relative humidity is less than the setpoint minus half the dead band, dehumidification
is off
 Otherwise dehumidification remains on

4–34
TRNSYS 18 – Mathematical Reference

4.1.8. Type 106: Aquastat (Heating Applications)


Type 106 models a simple heating aquastat that monitors a fluid temperature and a setpoint and determines
when heat should be added to the fluid.

4.1.8.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of Oscillations [-] The number of oscillations of the controller state allowed in one
Permitted timestep before the output will be fixed and the solution found. Set
to an odd number to allow the controller to bounce between two
control states for successive timesteps. (See Control Basics for a
more complete discussion of controller oscillations.)

2 Temperature Dead [delta C] The dead band temperature difference of the controller. In this
Band model, hysteresis effects can be modeled by use of this
parameter. The setpoint relative humidity will be centered in the
dead band. If hysteresis is not desired for this controller, simply
set this parameter to 0.0. (See Control Basics for a more
complete discussion of controller hysteresis and dead bands.)

INPUTS

1 Monitoring [C] The temperature being monitored by the controller. Typically this
Temperature input will be connected to a tank nodal temperature where the
thermostat is located, but it could be any temperature being
sensed to control a heating system.

2 Heating Setpoint [C] The temperature below which heating is commanded. If a dead
band is specified, the heating signal will turn on when the
monitored temperature has dropped below this setpoint minus half
the dead band and turn off when the monitored temperature has
risen above this setpoint plus half the dead band.

OUTPUTS

1 Control Signal for [-] The control signal for heating. If heating is required then the
Heating control signal will be 1. If no heating is required then the control
signal will be 0.

4.1.8.2. Simulation Summary Report Contents


VALUE FIELDS

Dead band [delta C] Parameter 2

MINIMUM/MAXIMUM VALUE FIELDS

Setpoint [C] Minimum and maximum values of Input 2

4–35
TRNSYS 18 – Mathematical Reference

4.1.8.3. Hints and Tips


 If you are seeing a high percentage of the simulation time that the controller is “stuck”, you can try
increasing the dead band, decreasing the timestep, or reducing the capacity of the equipment.

4.1.8.4. Detailed Description


Type 106 uses the controller state at the previous timestep, the monitored temperature, the setpoint and
the dead band to determine the controller state at the current timestep.
If heating was off at the previous timestep:
 If the monitored temperature is less than the setpoint minus half the dead band, heating is on
 Otherwise heating remains off
If heating was on at the previous timestep:
 If the monitored temperature is greater than the setpoint plus half the dead band, heating is off
 Otherwise heating remains on

4–36
TRNSYS 18 – Mathematical Reference

4.1.9. Type 108: Five Stage Room Thermostat


This ON/OFF differential device models a five stage room thermostat which outputs five control signals that
can be used to control an HVAC system having a three stage heating source and a two stage cooling
source. The controller contains hysteresis effects and is equipped with a parameter that allows the user to
set the number of controller oscillations permitted within a single timestep before the output values “stick.”

4.1.9.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of Oscillations [-] The number of oscillations of the controller state allowed in one
Permitted timestep before the output will be fixed and the solution found. Set
to an odd number to allow the controller to bounce between two
control states for successive timesteps. (See Control Basics for a
more complete discussion of controller oscillations.)

2 1st Stage Heating in [-] This controller will disable the first-stage heating system when the
2nd Stage? 2nd stage heating system comes on (set this parameter to 0), or
continue to operate the 1st stage heating system while the 2nd
stage heating system is operating (set this parameter to 1).

3 2nd Stage Heating in [-] This controller will disable the 2nd stage heating system when the
3rd Stage? third stage heating system comes on (set this parameter to 0) or
continue to operate the 2nd stage heating system while the third
stage heating system is operating (set this parameter to 1).

4 1st Stage Heating in 3rd [-] This controller will disable the first stage heating system when in
Stage? third stage heating system comes on (set this parameter to 0), or
continue to operate the 1st stage heating system when the third
stage heating system comes on (set this parameter to 1).

5 1st Stage Cooling in 2nd [-] This controller will turn off the first stage cooling system when the
Stage? second stage cooling system comes on (set this parameter to 0)
or will continue to operate the first stage cooling system when the
second stage cooling system comes on (set this parameter to 1).

6 Temperature Dead [delta C] The dead band temperature difference of the controller. In this
Band model, hysteresis effects can be modeled by use of this
parameter. The setpoint temperature will be centered in the dead
band. If hysteresis is not desired for this controller, simply set this
parameter to 0.0. (See Control Basics for a more complete
discussion of controller hysteresis and dead bands.)

INPUTS

1 Monitoring [C] The temperature of the room being monitored by the controller.
Temperature

2 1st Stage Heating [C] The room temperature below which first stage heating is
Setpoint commanded.

3 2nd Stage heating [C] The room temperature below which second stage heating is
Setpoint commanded.

4–37
TRNSYS 18 – Mathematical Reference

4 3rd Stage Heating [C] The room temperature below which third stage heating is
Setpoint commanded.

5 1st Stage Cooling [C] The room temperature above which 1st stage cooling is
Setpoint commanded.

6 2nd Stage Cooling [C] The room temperature above which 2nd stage cooling is
Setpoint commanded.

OUTPUTS

1 Control Signal for 1st [-] The control signal for 1st stage heating (1: 1st stage heating is
Stage Heating required; 0: 1st stage heating is not required).

2 Control Signal for 2nd [-] The control signal for 2nd stage heating (1: 2nd stage heating is
Stage Heating required; 0: 2nd stage heating is not required).

3 Control Signal for 3rd [-] The control signal for 3rd stage heating (1: 3rd stage heating is
Stage Heating required; 0: 3rd stage heating is not required).

4 Control Signal for 1st [-] The control signal for 1st stage cooling (1: 1st stage cooling is
Stage Cooling required; 0: 1st stage cooling is not required).

5 Control Signal for 2nd [-] The control signal for 2nd stage cooling (1: 2nd stage cooling is
Stage Cooling required; 0: 2nd stage cooling is not required).

6 Conditioning Signal [-] If any of the heating or cooling signals are non-zero, this output
will be set to 1. This output can be used to control a pump or fan.

7 1st Stage Conditioning [-] If either the first stage heating or first stage cooling control signal
Signal is non-zero, this output will be set to 1. This output can be used
as the input control signal for the first stage of a two-speed pump
or fan.

8 2nd Stage Conditioning [-] If either the second stage heating or the second stage cooling
Signal control signal is non-zero, this output will be set to 1. This output
can be used to control the second stage of a two-speed fan or
pump.

4.1.9.2. Simulation Summary Report Contents


VALUE FIELDS

Dead band [delta C] Parameter 6

MINIMUM/MAXIMUM VALUE FIELDS

Stage 1 Heating [C] Minimum and maximum values of Input 2


Setpoint

Stage 2 Heating [C] Minimum and maximum values of Input 3


Setpoint

Stage 3 Heating [C] Minimum and maximum values of Input 4


Setpoint

4–38
TRNSYS 18 – Mathematical Reference

Stage 1 Cooling [C] Minimum and maximum values of Input 5


Setpoint

Stage 2 Cooling [C] Minimum and maximum values of Input 6


Setpoint

4.1.9.3. Hints and Tips


 If you do not need all of the stages of heating and cooling control signals, you can still use this
controller. Simply set the setpoint for the stages that are not present to very low (or high) values so
that the temperature does not reach the setpoints.

4.1.9.4. Detailed Description


Type108 is designed to control up to three stages of heating equipment and two stages of cooling
equipment. A stage might consist of a particular power setting on a furnace, or might consist of an entirely
unique piece of equipment. For example, some furnaces are designed with a low and high burner setting.
If the monitored temperature falls to a certain point, the low burner and fan come on. If the temperature
continues to fall past a second setpoint, the furnace will switch over to high burner and fan speed, adding
more energy to the space. Such a furnace would be referred to by this model as a two stage heating device.
The same furnace could be used in such a way that if even the high burner setting was still not sufficient to
bring the zone temperature back up, an electric resistance heater (completely separate from the furnace)
could be brought on as a third stage heating device. Type108 is able to control up to three stages of heating
and two stages of cooling. Thus the user must specify three heating setpoints and two cooling setpoints as
inputs (since they may vary with time). Type108 checks to insure that the setpoint temperature are all
realistic. That is to say that the second stage cooling setpoint much be higher than the first stage cooling
setpoint, which in turn must be higher than the first stage heating setpoint, which must be higher than the
second stage heating setpoint, which must be higher than the third stage heating setpoint temperature. The
relative placement of the various setpoints is shown graphically on a temperature scale in Figure 4.1.9–1.

Figure 4.1.9–1: Setpoint Definition


If the zone temperature goes above the stage two cooling setpoint temperature, it may be desirable for both
the equipment associated with stage two and the equipment associated with stage 1 cooling to be ON
simultaneously. Alternatively, it may be desirable for the stage 1 cooling equipment to shut OFF and for
only the stage two equipment to be running. Similarly for heating it may be desirable for stage 1 heating
equipment to shut off in stage 2 but to come back on in stage 3. To this end, Type108 requires the user to
specify a series of parameter values to indicate exactly when a stage may be enabled and when it should
be disabled. The following table summarizes the parameters, their values and the corresponding equipment
enabling.

4–39
TRNSYS 18 – Mathematical Reference

Table 4.1.9–1: Controller Stage Enabling


PARAMETER PARAMETER INTERPRETATION
NUMBER VALUE
3 0 Stage 1 Heating will be DISABLED when Stage 2 Heating is ON
3 1 Stage 1 Heating will be ENABLED when Stage 2 Heating is ON
4 0 Stage 2 Heating will be DISABLED when Stage 3 Heating is ON
4 1 Stage 2 Heating will be ENABLED when Stage 3 Heating is ON
5 0 Stage 1 Heating will be DISABLED when Stage 3 Heating is ON
5 1 Stage 1 Heating will be ENABLED when Stage 3 Heating is ON
6 0 Stage 1 Cooling will be DISABLED when Stage 2 Cooling is ON
6 1 Stage 1 Cooling will be ENABLED when Stage 2 Cooling is ON

4–40
TRNSYS 18 – Mathematical Reference

4.1.10. Type 113: Aquastat (Cooling Applications)


Type 113 models a simple cooling aquastat that monitors a fluid temperature and a setpoint and determines
when heat should be removed from the fluid.

4.1.10.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of Oscillations [-] The number of oscillations of the controller state allowed in one
Permitted timestep before the output will be fixed and the solution found.
Set to an odd number to allow the controller to bounce between
two control states for successive timesteps. (See Control Basics
for a more complete discussion of controller oscillations.)

2 Temperature Dead [delta C] The dead band temperature difference of the controller. In this
Band model, hysteresis effects can be modeled by use of this
parameter. The setpoint temperature will be centered in the
dead band. If hysteresis is not desired for this controller, simply
set this parameter to 0.0. (See Control Basics for a more
complete discussion of controller hysteresis and dead bands.)

INPUTS

1 Monitoring [C] The temperature being monitored by the controller. Typically this
Temperature input will be connected to a tank nodal temperature where the
thermostat is located, but it could be any temperature being
sensed to control a cooling system.

2 Cooling Setpoint [C] The temperature above which cooling is commanded. If a dead
band is specified, the cooling signal will turn on when the
monitored temperature has risen above this setpoint plus half the
dead band and turn off when the monitored temperature has
dropped below this setpoint minus half the dead band.

OUTPUTS

1 Control Signal for [-] The control signal for cooling. If cooling is required then the
Cooling control signal will be 1. If no cooling is required then the control
signal will be 0.

4.1.10.2. Simulation Summary Report Contents


VALUE FIELDS

Dead band [delta C] Parameter 2

MINIMUM/MAXIMUM VALUE FIELDS

Setpoint [C] Minimum and maximum values of Input 2

4–41
TRNSYS 18 – Mathematical Reference

4.1.10.3. Hints and Tips


 If you are seeing a high percentage of the simulation time that the controller is “stuck”, you can try
increasing the dead band, decreasing the timestep, or reducing the capacity of the equipment.

4.1.10.4. Detailed Description


Type 113 uses the controller state at the previous timestep, the monitored temperature, the setpoint and
the dead band to determine the controller state at the current timestep.
If cooling was off at the previous timestep:
 If the monitored temperature is greater than the setpoint plus half the dead band, cooling is on
 Otherwise cooling remains off
If cooling was on at the previous timestep:
 If the monitored temperature is less than the setpoint minus half the dead band, cooling is off
 Otherwise cooling remains on

4–42
TRNSYS 18 – Mathematical Reference

4.1.11. Type 115: Tempering Valve (Prevents Overheating)


Type 115 models a tempering valve controller operating in heating mode. Type 115 takes the source
temperature, the tempering temperature and a setpoint temperature and determines the fraction of fluid
that should go through the source and the fraction of fluid that should bypass the source and be used to
temper the source outflow.

4.1.11.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of Oscillations [-] The number of oscillations of the controller state allowed in one
Permitted timestep before the output will be fixed and the solution found. Set
to an odd number to allow the controller to bounce between two
control states for successive timesteps. (See Control Basics for a
more complete discussion of controller oscillations.)

INPUTS

1 Setpoint Temperature [C] The desired temperature of the mixed fluid stream (setpoint).

2 Source Temperature [C] The temperature of the fluid leaving the heat source.

3 Tempering Fluid [C] The temperature of the fluid that will be used to temper the source
Temperature fluid in order to keep it below the setpoint. Supply/return loop
system: The temperature of the fluid returning to the heat source.
A fraction of this fluid will pass through the heat source and mix
with the remaining fluid that bypasses the heat source.

OUTPUTS

1 Fraction to Heat [-] The fraction of the return fluid that should be sent to the heat
Source source before mixing in the tempering valve.

2 Fraction to Bypass [-] The fraction of the return fluid that should bypass the heat source
Heat Source before mixing in the tempering valve.

4.1.11.2. Simulation Summary Report Contents


MINIMUM/MAXIMUM VALUE FIELDS

Setpoint [C] Minimum and maximum values of Input 1

Fraction to Source [-] Minimum and maximum values of Output 1

4.1.11.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.1.11.4. Detailed Description


In many situations, fluid is to be stored at one temperature but is to be provided at a temperature that is not
to exceed a different desired setpoint. For example, water may be stored in a water heater at 70C but in

4–43
TRNSYS 18 – Mathematical Reference

order not to cause scalding, may be delivered at a temperature not to exceed 50C. Often the way this
temperature reduction is accomplished is to divert some of the liquid returning to the water heater around
the heating element and then to mix it back in downstream of the heater.
Type 115 takes the tempered fluid setpoint temperature (the temperature that is desired), the source
temperature (the temperature of the untempered hot fluid), and the return temperature (the temperature of
fluid that is used to temper and that replaces fluid drawn out of the source) and determines the fraction of
flow from each stream that is needed to provide the setpoint temperature.
The fraction of fluid that goes to the source is given by:
𝑇𝑟𝑒𝑡𝑢𝑟𝑛 − 𝑇𝑠𝑒𝑡
𝛾𝑠𝑜𝑢𝑟𝑐𝑒 = Eq. 4.1.11-1
𝑇𝑟𝑒𝑡𝑢𝑟𝑛 − 𝑇𝑠𝑜𝑢𝑟𝑐𝑒

4–44
TRNSYS 18 – Mathematical Reference

4.1.12. Type 116: Tempering Valve (Prevents Undercooling)


Type 116 models a tempering valve controller operating in cooling mode. Type 116 takes the source
temperature, the tempering temperature and a setpoint temperature. It determines the fraction of fluid that
should go through the source and the fraction of fluid that should bypass the source and be used to temper
the source outflow.

4.1.12.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of Oscillations [-] The number of oscillations of the controller state allowed in one
Permitted timestep before the output will be fixed and the solution found.
Set to an odd number to allow the controller to bounce between
two control states for successive timesteps. (See Control Basics
for a more complete discussion of controller oscillations.)

INPUTS

1 Setpoint Temperature [C] The desired temperature of the mixed fluid stream (setpoint).

2 Source Temperature [C] The temperature of the fluid leaving the cooling source.

3 Tempering Fluid [C] The temperature of the fluid that will be used to temper the
Temperature source fluid in order to keep it below the setpoint. Supply/return
loop system: The temperature of the fluid returning to the cooling
source. A fraction of this fluid will pass through the cooling
source and mix with the remaining fluid that bypasses the
cooling source.

OUTPUTS

1 Fraction to Cooling [-] The fraction of the return fluid that should be sent to the cooling
Source source before mixing in the tempering valve.

2 Fraction to Bypass [-] The fraction of the return fluid that should bypass the cooling
Cooling Source source before mixing in the tempering valve.

4.1.12.2. Simulation Summary Report Contents


MINIMUM/MAXIMUM VALUE FIELDS

Setpoint [C] Minimum and maximum values of Input 1

Fraction to Source [-] Minimum and maximum values of Output 1

4.1.12.3. Hint and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4–45
TRNSYS 18 – Mathematical Reference

4.1.12.4. Detailed Description


In many situations, fluid is to be stored at one temperature but is to be provided at a temperature that is not
to exceed a different desired setpoint. For example, water may be produced in a chiller at 5C but needs to
be delivered at a temperature not less than 15C. Often the way this temperature change is accomplished
is to divert some of the liquid returning to the chiller around the chiller and then to mix it back in downstream
of the chiller.
Type 116 takes the tempered fluid setpoint temperature (the temperature that is desired), the source
temperature (the temperature of the untempered cold fluid), and the return temperature (the temperature
of fluid that is used to temper and that replaces fluid drawn out of the source) and determines the fraction
of flow from each stream that is needed to provide the setpoint temperature.
The fraction of fluid that goes to the source is given by:
𝑇𝑠𝑒𝑡 − 𝑇𝑟𝑒𝑡𝑢𝑟𝑛
𝛾𝑠𝑜𝑢𝑟𝑐𝑒 = Eq. 4.1.12-1
𝑇𝑠𝑜𝑢𝑟𝑐𝑒 − 𝑇𝑟𝑒𝑡𝑢𝑟𝑛

4–46
TRNSYS 18 – Mathematical Reference

4.1.13. Type 150: Delayed Inputs


This component models a "sticky" controller where the outputs are set to the input values from a user-
defined previous time step. For example, the user could decide to have the outputs to another component
be based on the zone temperatures from the previous hour or even from the previous day.

4.1.13.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of Inputs [-] The number of inputs that will be connected to the controller to
be delayed.

For Each Delayed Input:

2-N Number of Timesteps [-] The number of timesteps that this controller should hold the
to Hold Value input values before releasing them as output values.

3-N Initial Function Value [-] The initial values of the function for the output. The output will
be set to this initial value until the required number of hold
timesteps has elapsed.

INPUTS

1-N Input Value [-] The input value that will be held in storage until the correct
timestep for output is reached.

OUTPUTS

1-N Output Value [-] The output value at the current timestep. This output is the input
value from a user-defined number of previous timesteps ago.

4.1.13.2. Simulation Summary Report Contents


VALUE FIELDS

Number of Inputs [-] Parameter 1


Delayed

For Each Delayed Input:

Number of Timesteps [-] Parameters 2-N


to Hold Input

4.1.13.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.1.13.4. Detailed Description


Physical systems have time delays and non-idealities inherent in them that are often not included in their
simulation model representations. For example, a thermostat does not turn on a furnace immediately upon
sensing a temperature below its setpoint. It has an internal time constant and perhaps even some control

4–47
TRNSYS 18 – Mathematical Reference

logic that causes there to be a few seconds delay before the furnace is activated. As a second example,
there is a time delay between energy being added to a real room and a thermostat sensing the temperature
increase; air convection, relative location of the thermostat and heat source and other factors act to create
the time delay. Since these effects are beyond the input complexity level of most models, whether they are
rooms and thermostats or other system components, the end result in simulation is a less stable system
than in reality. The addition of a sticky controller (delayed input device) can build back these non-idealities
and significantly increase the stability of a control strategy.
As parameters, Type 150 takes the time delay and initial value for as many inputs as are desired. By default
the component is able to store up to 50 inputs, each for as much as 25 time steps. These defaults may be
changed by modifying and recompiling the Fortran source code. The initial value of each input is maintained
until the appropriate timestep for output is reached. At that point, the input value is released. The figure
below graphically shows the input and output for a component that is set up to store a single input value for
5 timesteps.

4–48
TRNSYS 18 – Mathematical Reference

4.1.14. Type 165: Differential Controller


This controller generates a control function 𝛾0 that can have a value of 0 or 1. The value of𝛾0 is chosen as
a function of the difference between upper and lower temperatures (𝑇𝐻 and 𝑇𝐿 ) compared with two dead
band temperature differences (∆𝑇𝐻 and ∆𝑇𝐿 ). The new value of 𝛾0 is dependent on whether the control
signal at the previous timestep was on or off (𝛾𝑖 = 0 or 1). A high limit cut-out is included where regardless
of the dead band conditions, the control function will be set to zero if the high limit condition is exceeded.
Note that this controller is not restricted to sensing temperatures, even though temperature notation is used
throughout the documentation.

4.1.14.2. Parameter/Input/Output Reference


PARAMETERS

1 Number of Oscillations [-] The number of control oscillations allowed in one timestep
before the controller is "stuck" so that the calculations can be
solved. This parameter should be set to an odd number so that
short-term results are not biased.

2 High Limit Cut-Out [C] The controller will set the controller to the OFF position,
regardless of the dead bands, if the temperature being
monitored exceeds the high limit cut-out. The controller will
remain OFF until the monitored temperature falls below the high
limit cut-out temperature.

INPUTS

1 Upper Input [delta C] The temperature difference that will be compared to the dead
Temperature bands is this input (𝑇𝐻 ) minus input 2 (𝑇𝐿 ).

2 Lower Input [delta C] The temperature difference that will be compared to the dead
Temperature bands is input 1 (𝑇𝐻 ) minus this input (𝑇𝐿 ).

3 Monitoring [C] Temperature to monitor for high-limit cut-out checking. The


Temperature controller signal will be set to OFF if this input exceeds the high
limit cut-out temperature. The controller will remain OFF until
this input falls below the high limit cut-out.

4 Upper Dead Band [delta C] The dead band used when the controller is in the ON state.

5 Lower Dead Band [delta C] The dead band used when the controller is in the OFF state.

OUTPUTS

1 Output Control [-] The output control function may be ON (=1) or OFF (=0).
Function

4.1.14.3. Simulation Summary Report Contents


MINIMUM/MAXIMUM VALUE FIELDS

Upper Input Value [-] The minimum and maximum of input 1

4–49
TRNSYS 18 – Mathematical Reference

Lower Input Value [-] The minimum and maximum of input 2

Upper Dead Band [-] The minimum and maximum of input 4

Lower Dead Band [-] The minimum and maximum of input 5

4.1.14.4. Hints and Tips


When (𝑇𝐻 − 𝑇𝐿 ) nears the upper or lower dead band, 𝛾0 may sometimes oscillate between 1 and 0 for
successive iterations at a given time step. This happens because 𝑇𝐻 and 𝑇𝐿 change slightly during each
iteration, alternately satisfying and not satisfying the conditions for switching the controller. The value of the
first parameter (Number of Oscillations) is the number of oscillations permitted within a time step before the
control function (𝛾0 ) ceases to change. In general, it is recommended that the number of oscillations be set
to an odd number, typically five, in order to encourage the controller to come to rest at a state different than
at the previous time step.
An example set-up for Type165: If you have a SDHW system and want to control the collector loop pump
to be on when the temperature of the fluid leaving the collector is 10 degrees C higher than the fluid coming
from the tank to the collector, turn off when the temperature of the fluid leaving the collector is less than 2
degrees C below the fluid coming from the tank to the collector, and turn off if the fluid supplying the hot
water is higher than 90 degrees C; the Upper Dead band should be 10 degrees C, the Lower Dead band
should be 2 degrees C, the upper input temperature should be the collector outlet temperature, the lower
input temperature should be the temperature at the tank outlet connected to the collector, the high-limit
cutoff should be 90 and the monitoring temperature should be the tank outlet connected to the hot water
system.

4.1.14.5. Nomenclature
∆𝑇𝐻 [C] upper dead band temperature difference
∆𝑇𝐿 [C] lower dead band temperature difference
𝑇𝐻 [C] upper Input temperature
𝑇𝑖𝑛 [C] temperature for high limit monitoring
𝑇𝐿 [C] lower Input temperature
𝑇𝑚𝑎𝑥 [C] maximum Input temperature
𝛾𝑖 [0..1] input control function
𝛾0 [0..1] output control function

4.1.14.6. Detailed Description


Mathematically, the control function is expressed as follows:
If the controller was previously ON (𝛾𝑖 = 1):
𝑖𝑓 Δ𝑇𝐿 ≤ (𝑇𝐻 − 𝑇𝐿 ) then 𝛾0 = 1 Eq. 4.1.14-1

𝑖𝑓 Δ𝑇𝐿 > (𝑇𝐻 − 𝑇𝐿 ) then 𝛾0 = 0 Eq. 4.1.14-2

If the controller was previously OFF (𝛾𝑖 = 0):


𝑖𝑓 Δ𝑇𝐻 ≤ (𝑇𝐻 − 𝑇𝐿 ) then 𝛾0 = 1 Eq. 4.1.14-3

𝑖𝑓 Δ𝑇𝐻 > (𝑇𝐻 − 𝑇𝐿 ) then 𝛾0 = 0 Eq. 4.1.14-4

4–50
TRNSYS 18 – Mathematical Reference

However, the control function is set to zero, regardless of the upper and lower dead band conditions, if
𝑇𝑖𝑛 > 𝑇𝑚𝑎𝑥 . This situation is often encountered in domestic hot water systems where the pump is not
allowed to run if the tank temperature is above some prescribed limit.
The controller function is shown graphically as follows.

 =1
i
1

o
 =0
i
0

 (TH - T L ) 
L H
Figure 4.1.14–1: Controller Function

4–51
TRNSYS 18 – Mathematical Reference

4.2. Electrical
This category contains components that generate or store electricity and their accessories: solar
photovoltaic (PV) systems. Wind Energy Conversion Systems (WECS, or wind turbines), Internal
combustion engines (diesel, natural gas, or hydrogen powered), power conversion systems, and batteries.
Type 90 models a Wind Energy Conversion System (WECS). Power versus wind speed data are read in a
file. The impact of air density changes and wind speed increase with height are modeled.
Type103 model PV arrays using the "4-parameter" model. It is best suited to modeling crystalline PV cells
and contains some algorithms that aid in modeling PV arrays that are directly coupled to a load without the
benefit of an inverter/charge controller. Type190 offers a somewhat more flexible PV array that uses the
“5-parameter” model and does better moding amorphous and thin film PVs. Type 48 simulates a power
regulator and inverter that can be used in conjunction with a PV array and a battery.
Type 47 provides a lead-acid battery model. Its different operation modes use different modeling
assumptions, including Hyman and Shepherd equations. Type 185 provides an alternative and also models
gassing effects. Type 185 also reads the battery parameters from a data file, while Type 47 reads them in
the TRNSYS Input file.
Type 120 models Diesel Engine Generator Set(s). Several identical units can be simulated. Type 102
(Diesel Engine Dispatch Controller) can be used adapt the number of DEGS operating and their power to
meet a given electrical load.
Type 175 simulates a power conversion device (AC/DC, DC/DC, etc.)
Type 188 provides a component to interface Renewable Energy Systems with an electric grid.

4–52
TRNSYS 18 – Mathematical Reference

4.2.1. Type 47: Simple Lead Acid Battery


This basic model of a lead-acid storage battery specifies how the battery state of charge varies over time
given the rate of charge or discharge. It implements models that were proposed by Shepherd [1] and Hyman
[2]. In mode 1 the state of charge is based on a simple energy balance on the battery. In mode 2 SOC is
determined using algorithms developed by Shepherd that relate battery voltage and current to state of
charge. Mode 3 implements some modifications to the Shepherd equations proposed by Hyman to better
model behavior at low charge and discharge currents. In both modes 2 and 3, the input to the model is the
charging or discharging power. Modes 4 and 5 match modes 2 and 3 in all respects except that the input is
the charging and discharging current.

4.2.1.1. Parameter/Input/Output Reference


PARAMETERS

1 Mode [-] Mode 1 corresponds to a simple energy balance. Mode 2


corresponds to the Shepherd equations. Mode 3 corresponds to
the Hyman modified Shepherd equations. In modes 2 and 3
power is given as input. Modes 4 and 5 correspond to Modes 2
and 3 respectively except that current is given as an input.

2 Cell energy capacity [Wh] The rated energy capacity of each cell. The battery capacity is
obtained by multiplying the cell capacity by the number of cells
in series and by the number of cells in parallel.

3 Cells in parallel [-] The number of cells connected in parallel in the battery.

4 Cells in series [-] The number of cells in series in the battery. A lead-acid battery
cell has a rated voltage of 2V. A 12V battery includes 6 cells in
series, and a 24V battery includes 12 cells in series.

5 Charging efficiency [0..1] The charging efficiency is typically higher when the battery is at
a low state of charge (<=85%) but can drop below 50% for when
the battery is at a high state of charge (SOC higher than 90%).
This model, however assumes that the charging efficiency is
independent of battery state of charge.

If Mode (parameter 1) = 2, 3, 4, or 5

6 Maximum current per [A] The maximum allowable battery cell charging current. This
cell charging current is typically set to charge the battery in 5 hours ("C5"), i.e.
3.3A if the cell capacity is 16.7 Ah. Specifying too high a value
may lead to erroneous results. Use "C1" (i.e. 16.7 A for a 16.7
Ah cell) at most.

7 Maximum current per [A] The maximum allowable battery cell discharging current. This
cell discharging current is typically set to discharge the battery in 5 hours ("C5"),
i.e. 3.3A if the cell capacity is 16.7 Ah. Specifying too high a
value may lead to erroneous results. Use "C1" (i.e. 16.7 A for a
16.7 Ah cell) at most.

8 Maximum charge [V] The maximum voltage allowed for each cell while charging. Do
voltage per cell not use values greater than 2.8V.

9 Discharge cutoff [V] The discharge cutoff voltage is the cell voltage below which
voltage battery discharge will be automatically shut off. Setting this
parameter to a positive value will disallow battery discharge if

4–53
TRNSYS 18 – Mathematical Reference

the cell voltage drops below this value. Under these


circumstances, the value of the input specifying the power drawn
from the battery will be ignored and that quantity of energy will
be reported as deficit power among the outputs. If the discharge
cutoff voltage is given, it should be larger than 1.5V. If this
parameter is set to -1 then the battery’s discharge cutoff voltage
will be calculated internally.

If Mode (parameter 1) = 3 or 5

10 Tolerance for iterative [A] Ic (charge) and Id (discharge) are calculated through an iterative
calculations process. This parameter gives the absolute tolerance on
convergence check. The equation calculating V from P also
requires iterations and the same value is used for the tolerance.

INPUTS

If Mode (parameter 1) = 1, 2, or 3

1 Power to or from [kJ/hr] The power used to charge the battery has a positive sign while
battery the power drawn from the battery by the load is negative.

If Mode (parameter 1) = 4 or 5

1 Current to or from [A] The current used to charge the battery has a positive sign while
battery the current being drawn from the battery by the load is negative.

DERIVATIVES

1 State of charge [Wh] The initial state of charge of one cell of the battery. This value
should use the same units as parameter 2 [Wh]. The value is
given for one cell. The initial SOC of the battery is obtained by
multiplying this value by the number of cells.

OUTPUTS

1 State of charge [Wh] The State Of Charge is expressed in the same units as the rated
cell capacity (Wh). This value is given for one cell (all cells are
assumed to be identical).

2 Fractional state of [-] This is the ratio between the State Of Charge and the rated
charge energy capacity.

3 Power [kJ/hr] Power to (>0) or from (<0) the battery.

4 Power lost during [kJ/hr] Power loss. This is equal to (1-Efficiency)*Power when charging
charge and 0 at all other times.

If Mode (parameter 1) = 1

5 Excess/Deficit power [kJ/hr] A positive value of this output indicates that power had to be
dumped by the battery in order to keep it at 100% SOC. A
negative value of this output indicates that auxiliary power was
needed in order to keep the battery at 0% SOC. In order for the
simulation to continue running without generating an error, the

4–54
TRNSYS 18 – Mathematical Reference

Type assumes that a power sink/source is available to dump or


provide the required excess.

If Mode (parameter 1) = 2, 3, 4, or 5

5 Total current [A] Total current to (>0) or from the battery (<0). It is equal to the
cell current multiplied by the number of cells in parallel.

6 Total voltage [V] Total voltage of the battery (Cell voltage * Nb of cells in series).

7 Max. Power for charge [kJ/hr] Maximum power for battery charge (i.e. power corresponding to
maximum charge current).

8 Max. Power for [kJ/hr] Maximum power for battery discharge (i.e. power corresponding
discharge to maximum discharge current) - Negative value.

9 Discharge cutoff [V] Discharge cutoff voltage (computed if parameter 9 < 0).
voltage (DCV)

10 Power corresponding [kJ/hr] Power corresponding to discharge cutoff voltage.


to DCV

11 Charge cutoff voltage [V] Charge cutoff voltage.


(CCV)

12 Power corresponding [kJ/hr] Power corresponding to charge cutoff voltage.


to CCV

13 Excess/Deficit power [kJ/hr] A positive value of this output indicates that power had to be
dumped by the battery in order to keep it at 100% SOC. A
negative value of this output indicates that auxiliary power was
needed in order to keep the battery at 0% SOC. In order for the
simulation to continue running without generating an error, the
Type assumes that a power sink/source is available to dump or
provide the required excess.

4.2.1.2. Simulation Summary Report Contents


VALUE FIELDS

Capacity [Ah] The product of the cell capacity, the number of cells in parallel and the
number of cells in series

INTEGRATED VALUE FIELDS

Power In [kWh] Positive values of output 3

Power out [kWh] Negative values of output 3 (reported as a positive value)

MINIMUM/MAXIMUM VALUE FIELDS

State of Charge [%] Output 2

Terminal Voltage [V] Output 6

4–55
TRNSYS 18 – Mathematical Reference

4.2.1.3. Hints and Tips


 This model was originally written in parallel with the Type48 Regulator / Inverter. As a consequence
many of this model’s modes are designed to be paired with specific Type48 modes.
 If the battery reaches 0% state of charge and is asked to continue discharging this model does not
generate an error and stop the simulation but instead assumes that there is some source of auxiliary
power from which it can draw in order to maintain the battery at 0% SOC. An output is provided to tell
the user how much auxiliary power was required. The same idea applies if the battery reaches 100%
SOC and continues to charge. This Type will dump excess power to some theoretical sink so that the
battery is maintained at 100% SOC. The quantity of dumped power is reported as an output.

4.2.1.4. Nomenclature
Q State of Charge (Mode 1 - watt-hrs, Modes 2, 3, 4, 5 - amp hrs)
Qm Rated capacity of cell
Qc,Qd Capacity parameters on charge; discharge
F Fractional state of charge = Q/Qm (l.0 = full charge)
H (1-F)
eff Charging efficiency
I Current
Imax, Imin Maximum I (rate of charge), minimum I (rate of discharge)
P Power
Pmax, Pmin Maximum P, minimum P
V Voltage
Vc Cutoff voltage on charge
Ic, Pc Charging current, power corresponding to Vc
Ic,tol, Vtol Parameters used in iterative calculations
Vd Cutoff voltage on discharge
ed, rd Parameters used in calculating Vd
Vzp Additional voltage term in Hyman model
Izp, Kzp Parameters used in calculating Vzp
Voc Open circuit voltage at full charge
Open circuit voltages at full charge, extrapolated from V vs I curves on
eqc, eqd
charge; discharge
gc, gd Small-valued coefficients of H in voltage-current-state of charge formulas
rqc rqd Internal resistances at full charge when charging; discharging
Cell-type parameters which determine the shapes of the I-V-Q
mc, md
characteristics

4.2.1.5. Detailed Description


Shepherd originally devised his model to describe the discharge of a battery, but it is also applicable to
battery charging, if different parameters are used. On discharge (I < 0), the Shepherd formula is:

4–56
TRNSYS 18 – Mathematical Reference

𝑚𝑑 𝐻
𝑉 = 𝑒𝑞𝑑 − 𝑔𝑑 𝐻 + 𝐼𝑟𝑞𝑑 (1 + ) Eq. 4.2.1-1
𝑄𝑑
−𝐻
𝑄𝑚
and on charge (I > 0) :

𝑚𝑐 𝐻
𝑉 = 𝑒𝑞𝑐 − 𝑔𝑐 𝐻 + 𝐼𝑟𝑞𝑐 (1 + ) Eq. 4.2.1-2
𝑄𝑐
−𝐻
𝑄𝑚
These equations are contained in Type47 modes 2 and 4. The regulator/inverter component that works
with this battery model must never set I = 0. Rather, when conditions on V c, Vd, Fc, or Fd are such that
charge or discharge should not be permitted, the regulator should assign the current some small positive
or negative value depending on what condition (i.e. charging; discharging) would be desired if permitted.
This fixes the system voltage on either the proper charge or discharge curve, rather than at some
intermediate floating open circuit value. Note that Type48 includes this feature and that replacement of
Type48 by another model or by equations should be done with care to include the same.
Zimmerman and Peterson [3] describe a model which takes into account behavior at very low currents.
Hyman recommends adding their expression to the Shepherd formula, thus providing a more realistic model
at very low currents. On discharge, the formula is:

𝑚𝑐 𝐻
𝑉 = 𝑉𝑜𝑐 − 𝑉𝑧𝑝 − 𝑔𝑐 𝐻 + 𝐼𝑟𝑞𝑐 (1 + ) Eq. 4.2.1-3
𝑄𝑐
−𝐻
𝑄𝑚

and on charge, it is:

𝑚𝑐 𝐻
𝑉 = 𝑉𝑜𝑐 + 𝑉𝑧𝑝 − 𝑔𝑐 𝐻 + 𝐼𝑟𝑞𝑐 (1 + ) Eq. 4.2.1-4
𝑄𝑐
−𝐻
𝑄𝑚
where:
1 |𝐼|
𝑉𝑧𝑝 = 𝑙𝑛 ( + 1) Eq. 4.2.1-5
𝑘𝑧𝑝 𝐼𝑧𝑝
and:
1
𝑉𝑜𝑐 = (𝑒𝑞𝑑 + 𝑒𝑞𝑐 ) Eq. 4.2.1-6
2
One may recognize Eq. 4.2.1-5 and the V-I relationship for a semiconductor diode. These equations have
been incorporated into Type47 modes 3 and 5.
Figure 4.2.1–1 and Figure 4.2.1–2 show the characteristics of both the Shepherd and the Shepherd-
modified models for a 250 amp-hr. cell that are simulated by this component. Figure 4.2.1–2 also displays
the I=50 and I= -50 (± Qm/5) curves used in [4].

To prolong battery life, the battery should not be charged to too high a voltage nor discharged to too low a
voltage. The maximum charge voltage limit parameter, VC, is set below the value at which appreciable
gassing of the battery electrolyte commences. If the VCONTR parameter is negative the voltage limit on
discharge, VD is calculated from:
𝑉𝑑 = 𝑒𝑑 − |𝐼|𝑟𝑑 Eq. 4.2.1-7

This last equation and the values of ed and rd used are from Hyman [2], who derived them from data of
Vinal [5]. If the VCONTR parameter is >0, then VD is set to the constant value of VCONTR.

4–57
TRNSYS 18 – Mathematical Reference

PC and PVd are battery powers that correspond to Vc and Vd respectively. They are used in the
regulator/inverter module so that constant voltage charging and discharging can be initiated to ensure V
does not exceed Vc or V does not fall below Vd.
Modes 2, 3, 4 and 5 limit the current (per cell) to between Imax and Imin, which are Input as parameters. They
also calculate the power corresponding to these two values of the current, for possible use in the
regulator/inverter component.
3.6
3.4
3.2
3.0
2.8
F=1.0
2.6
V, VOLTS

2.4 F=0.5
2.2 F=0.0
F=1.0
2.0
1.8
F=0.5
1.6
1.4 F=0.0
1.2
SHEP HERD MODEL
1.0
SHEP HERD MODI FI ED ( HYMAN) MO DEL
0.8
- 70 - 60 - 50 - 40 - 30 - 20 - 10 0 10 20 30 40 50 60 70

I, AM PS
Figure 4.2.1–1: Voltage vs Current for a 250 Amp-Hr Cell
The calculations in every mode are performed on a single cell, but the power (in Modes 1, 2 and 3) or
current (in Modes 4 and 5) Input to the component are for the entire battery. Therefore, P is divided by
(cp)(cs) or I by cp before being used in the Mode calculation. P is divided by 3.6 in the program to convert
from kJ/hr to watts. Upon output, all values of voltage (V, Vc, and Vd) are multiplied by cs, powers (P, Pmax,
Pmin, and Pc) by (cp)(cs)(3.6), and the current by cp.
Finally, each mode specifies how the state of charge changes during charge and discharge. In Mode 1, A
is in terms of energy (watt-hrs), and:

𝑚𝑐 𝐻
𝑉 = 𝑒𝑞𝑐 − 𝑔𝑐 𝐻 + 𝐼𝑟𝑞𝑐 (1 + ) Eq. 4.2.1-8
𝑄𝑐
−𝐻
𝑄𝑚
In the other modes, Q is the charge (amp-hrs) in the battery, so that:
𝑑𝑄 𝐼 𝑖𝑓 𝐼 < 0
= ⟨ Eq. 4.2.1-9
𝑑𝑡 𝐼 ∗ 𝑒𝑓𝑓 𝑖𝑓 𝐼 > 0
The eff factor is the charging efficiency.

4–58
TRNSYS 18 – Mathematical Reference

3.0
SHEP HERD MOD EL
2.8
SHEP HERD MOD IFIED (HYMA N) M ODEL
2.6 GE M ODEL

2.4
I = 50

V, VOLTS
2.2
I= 5
I = 50
2.0
I = -5

1.8 I = -50

1.6

1.4
I = -50
1.2
-1.0 -0.8 -0.6 -0.4 -0.2 0.0

F = -Q/Qm
Figure 4.2.1–2: Voltage vs. State of Charge for a 250 Amp-Hr Cell

4.2.1.6. References
1. Shepherd, C.M., "Design of Primary and Secondary Cells II: An Equation Describing Battery
Discharge;" Journal of Electrochemical Society, 112, 657 (1965).
2. Hyman, E.A., "Phenomenological Cell Modelling: A Tool for Planning and Analyzing Battery
Testing at the BEST Facility," Report RD77-1, Public Service Electric and Gas Company &
PSE&G Research Corporation, Newark, (1977).
3. Zimmerman, H.G. and Peterson, R.G., "An Electrochemical Cell Equivalent Circuit for Storage
Battery/Power System Calculations by Digital Computer," Vol. 1 (1970), Intersociety Energy
Conversion Engineering Conference, Paper 709071, 1970.
4. "Conceptual Design and Systems Analysis of Photovoltaic Systems," Report No. ALO-3686-14,
General Electric Co., Space Division, Philadelphia, (1977).
5. Vinal, George W., Storage Batteries, Fourth Edition, 1955, John Wiley & Sons, Inc.
6. Hyman, E.A., Public Service Electric and Gas Company, Newark, NJ, Private Communication

4–59
TRNSYS 18 – Mathematical Reference

4.2.2. Type 48: PV Charge Controller/Inverter


In DC source power systems (such as photovoltaic arrays), two power conditioning devices are needed.
The first of these is a regulator, which distributes DC power from the source to and from a battery (in
systems with energy storage) and to the second component, the inverter. If the battery is fully charged or
needs only a taper charge, excess power is either dumped or not collected by turning off parts of the source.
The inverter converts the DC power to AC and sends it to the load and/or feeds it back to the utility.
This Type models both the regulator and inverter, and can operate in one of four modes. Modes 0 and 3
are based upon the "no battery/feedback system" and "direct charge system," respectively. Modes 1 and 2
are modifications of the "parallel maximum power tracker system" described in the sections of this manual
that discuss photovoltaic models.

4.2.2.1. Parameter/Input/Output Reference


PARMAETERS

1 Mode [-] 0: Peak-power tracking collector, no battery, and power is fed


back to a utility. 1: Peak-power tracking collector, battery,
monitoring of state of charge. 2: Peak-power tracking collector,
battery, monitoring of battery state of charge and voltage. 3:
Collector voltage equal to battery voltage, current instead of
power distribution, monitoring of battery state of charge and
voltage.

If Mode (parameter 1) = 0

2 Efficiency [-] Regulator / inverter efficiency.

If Mode (parameter 1) = 1, 2, or 3

2 Regulator efficiency [-] Regulator efficiency (e.g. use this for non-perfect max-power
tracker efficiency).

3 Inverter efficiency [-] Inverter efficiency, DC to AC.

4 High limit on fractional [-] High limit on fractional state of charge (FSOC). If FSOC is
state of charge (FSOC) higher than this value, charging is not allowed.

5 Low limit on FSOC [-] Low limit on fractional state of charge (FSOC). If FSOC is lower
than this value, discharging is not allowed.

6 Charge to discharge [-] FB: Charge to discharge limit on fractional state of charge
limit on FSOC (FSOC). If FSOC < FB and the battery has been charging, then
the battery must be on "total charge." On "total charge," first
priority is given to recharging the battery with any array output,
rather than sending the output to the load until FSOC > FB.

7 Inverter output power [kJ/hr] Output power capacity of inverter.


capacity

If Mode (parameter 1) = 2 or 3

8 Inverter efficiency (AC [-] Inverter efficiency, AC to DC.


to DC)

4–60
TRNSYS 18 – Mathematical Reference

9 Current for grid [A] Battery charge current when grid power is used for charging.
charging of battery

10 Upper limit on FSOC [-] High limit on fractional state of charge (FSOC). If FSOC is
for grid charging higher than this value, charging with the grid is not allowed.

INPUTS

1 Input power or current [kJ/hr] or [A] Power (in the case of Modes 0, 1 or 2) or current (in the case of
Mode 3) from source device (e.g. solar PV array).

2 Load power [kJ/hr] Power demanded by load.

If Mode (parameter 1) = 1 or 2

3 Battery fractional state [-] Battery fractional State of Charge (FSOC). 0 means the battery
of charge is fully discharged. 1 means the battery is fully charged.

If Mode (parameter 1) = 2

4 Battery voltage (BV) [V] Battery voltage (BV).

5 Max battery input [kJ/hr] Maximum power for battery charge (i.e. power corresponding to
maximum charge current). If this component is used in
conjunction with the Type47 battery model, this input can be set
by one of Type47’s outputs.

6 Max battery output [kJ/hr] Maximum power for battery discharge (i.e. power corresponding
to maximum discharge current). This should be a negative
value. If this component is used in conjunction with the Type47
battery model, this input can be set by one of Type47’s outputs.

7 Lower limit on battery [V] Lower limit on battery voltage during discharge. If this
voltage component is used in conjunction with the Type47 battery
model, this input can be set by one of Type47’s outputs.

8 Allowable discharge [kJ/hr] When the battery gets to its low voltage limit, discharging power
rate when at low will be limited to this quantity. If this component is used with the
voltage limit Type47 battery model, this input can be set by one of Type47s
outputs.

9 High limit on battery [V] Higher limit on battery voltage during charge. If this component
voltage is used with the Type47 battery model, this input can be set by
one of Type47s outputs.

10 Allowable charge rate [kJ/hr] When the battery gets to its high voltage limit, charging power
when at high voltage will be limited to this quantity. If this component is used with the
limit Type47 battery model, this input can be set by one of Type47s
outputs.

11 Start time for grid [hr] Time of the day at which battery charging with the grid can start
battery charging (this assumes TIME=0 in the simulation is midnight). Set this
parameter equal to the next to allow the grid to charge the
battery at any time.

12 Stop time for grid [hr] Time of the day at which battery charging with the grid should
battery charging stop (this assumes TIME=0 in the simulation is midnight). Set

4–61
TRNSYS 18 – Mathematical Reference

this parameter to a value less than the previous parameter to


allow for night charging (e.g. night charging from 22 to 7)

OUTPUTS

1 Power in [kJ/hr] Power from source device (e.g. solar PV array).

If Mode (parameter 1) = 0

2 Power out [kJ/hr] Power sent to load.

3 Excess power [kJ/hr] Power to or from utility (>0 if purchased, <0 if sell-back).

4 Power loss [kJ/hr] The power lost by the regulator/inverter due to its inefficiency.

If Mode (parameter 1) = 1, 2, or 3

2 Power to or from [kJ/hr] Power to (>0) or from (<0) battery.


battery

3 Power to load [kJ/hr] Power to load.

4 Dumped generated [kJ/hr] PV Array power "dumped" or not collected due to full battery.
power

5 Power from grid [kJ/hr] Power from electricity grid.

If Mode (parameter 1) = 1 or 2

6 Power loss [kJ/hr] The power lost by the regulator/inverter due to its inefficiency.

If Mode (parameter 1) = 3

6 Current in from [A] Current from solar PV array.


generator

7 Current to or from [A] Current to (>0) or from (<0) battery.


battery

8 Current to load [A] Current to load.

9 Dumped generated [A] PV Array Current "dumped" or not collected due to full battery.
current

10 Current from grid [A] Current from electricity grid.

11 Power loss [kJ/hr] Power lost by the regulator/inverter due to its inefficiency.

4.2.2.2. Simulation Summary Report Contents


VALUE FIELDS

If Mode (parameter 1) = 0

Inverter Efficiency [0..1] Parameter 2

4–62
TRNSYS 18 – Mathematical Reference

If Mode (parameter 1) = 1

Inverter Efficiency [0..1] Parameter 2

Regulator Efficiency [0..1] Parameter 3

Maximum Inverter [kW] The peak power that can be delivered by the inverter
Output

If Mode (parameter 1) = 2 or 3

Inverter Efficiency [0..1] Parameter 2

Regulator Efficiency [0..1] Parameter 3

Rectifier Efficiency [0..1] Parameter 8

Maximum Inverter [kW] The peak power that can be delivered by the inverter
Output

TEXT FIELDS

If Mode (parameter 1) = 0

Control Mode n/a System without Battery

If Mode (parameter 1) = 1

Control Mode n/a System with SOC Monitoring of Battery and MPPT

If Mode (parameter 1) = 2 or 3

Control Mode n/a Mode 2: System with SOC and SOV Monitoring of Battery and MPPT or
Mode 3: Direct Connect System

INTEGRATED VALUE FIELDS

If Mode (parameter 1) = 0

Energy from [kWh] Output 1


Generation

Energy to Load [kWh] Output 2

Excess (Dumped) [kWh] Output 3


Energy

Energy Loss [kWh] Output 4


(inefficiency)

If Mode (parameter 1) = 1

Energy from [kWh] Output 1


Generation

4–63
TRNSYS 18 – Mathematical Reference

Energy to Load [kWh] Output 3

Energy to Battery [kWh] Positive Values of Output 2

Energy From Battery [kWh] Negative Values of Output 2 (reported as positive)

Excess (Dumped) [kWh] Output 4


Energy

Energy Required from [kWh] Output 5


Backup

Energy Loss Due to [kWh] Output 6


Inefficiency

If Mode (parameter 1) = 2 or 3

Energy from [kWh] Output 1


Generation

Energy to Load [kWh] Output 3

Energy to Battery [kWh] Positive Values of Output 2

Energy From Battery [kWh] Negative Values of Output 2 (reported as positive)

Excess (Dumped) [kWh] Output 4


Energy

Energy Required from [kWh] Output 5


Backup

Energy Loss Due to [kWh] Mode 2: Output 6 or Mode 3: Output 11


Inefficiency

4.2.2.3. Hints and Tips


 This model was originally written in parallel with the Type47 Battery. As a consequence many of this
model’s modes are designed to be paired with specific Type47 modes. Use of a more complex battery
model may require the implementation of equations or other models that are equivalent to features of
the Type47 battery. For example in mode 2, Type48 is requires input values that limit the charging and
dischanging current to/from the battery. Type47 provides values as outputs that can be used as inputs
to this Type. Use of an alternative battery model would require that the user define some equations to
limit the charge and discharge current to both the battery model and to this component.

4.2.2.4. Nomenclature
PA Power from solar cell array
PD Power demanded by load
(+) Power sent to load from array and battery (-) Power sent to battery from
PL utility
PL,MAX Output capacity of inverter (or if negative, Input current limit)

4–64
TRNSYS 18 – Mathematical Reference

PR Power "dumped" or not collected


PU Power supplied by (PU > 0) or fed back to (PU < 0) utility
PB Power to or from battery (+ charge, - discharge)
PB,MAX Maximum Input (charge)
PB,MIN Minimum output (discharge) of battery
PC Allowed charge rate when battery at high voltage limit VC
PVd Allowed charge rate when battery is at low voltage limit VD
F Fractional state of charge of battery (1.0 = full charge)
FC High limit on F, when battery charging
FD Low limit on F, when battery discharging
FB Limit on F, above which battery can begin to discharge after being charged
FBCH High limit on F, for charging from utility
V Battery voltage (and solar cell array voltage, in mode 3)
VC High limit on V, when battery charging
VD Low limit on V, when battery discharging
eff1,2,3 Power efficiencies of regulator and inverter (DC to AC and AC to DC)
TR Time of day (0 to 24)
T1, T2 Times between which batteries should be charged at rate IBCH

4.2.2.5. Detailed Description


Mode 0 operates without a storage battery component. The power output by the DC source (PA) is simply
multiplied by eff1 and sent to the load (as PL) with any excess power assumed to be fed to a utility or mini
grid (PU < 0). When the load exceeds the array output, the utility or mini grid furnishes the difference (PU <
0). The present version places no limit on inverter size.
Mode 1 works with Mode 1 of Type47 (or with an equivalent mode of another battery model), and monitors
the battery's state of charge, which is Input as F. Type48 performs tests of F against several parameters.
The first of these is with respect to FC. If F < FC, the battery can either discharge (when PD > PA), or do
nothing (when PD < PA). In the latter case, PR = PA - PL. If F < FC, this component determines if F < FB and
the battery has been charging (PB > 0). If these two conditions are met, then the battery must be on "total
charge." On "total charge," first priority is given to recharging the battery with any DC source output, rather
than sending the output to the load until F > FB. "Total charge" can be avoided by setting F B < FD. In this
case the first priority for array output is always to meet the load. If F > F B or the battery has been discharging
(PB < 0), it can discharge (when PD > PA) or be placed on "partial charge" (when PD > PA), i.e., PB + PA - PL.
Finally, a check is made to ensure that F > FD. If F < FD no further discharging is permitted.
Other conditional statements performed in mode 1 are with respect to the parameter the inverter power
output capacity (PL,MAX ). The DC source and/or battery can never send more than this amount to the load,
which means that (PL)(eff2) < PL,MAX where PL,MAX is the output power capacity of the inverter, and PL is
multiplied by eff2 upon passing through the inverter.) The PL,MAX limit may require more power to be drawn
from the utility, since PU = PD – PL (eff2) or it may cause excess source output to be dumped into a resistor,
with PR = PA - PL.

4–65
TRNSYS 18 – Mathematical Reference

Mode 2 monitors the battery's voltage level and charge/discharge rate as well as its state of charge. The
additional limits are the Inputs VD, VC, PB, PB,MAX, and PB,MIN.
In mode 2, inverter output power is limited to a maximum of PL,MAX if PL,MAX > 0. If PL,MAX < 0, the current
Input to the inverter is limited to a maximum of - PL,MAX.
Whenever the "F Tests" call for the mode 2 battery to discharge, the subroutine checks if V < V D. If this is
so, then a taper discharge is called for until F = FD. During taper discharge, power is limited so as to never
exceed PVd. If V remains above FD, then discharge can proceed, as it would in mode 1.
When state of charge considerations imply charging, a test is performed against V C. If V < VC, charging
can proceed. With V > VC, the battery is put on "slow charge." This means that PB = PC, where PC is the
power that can be Input to the battery to keep V at VC. (With the iterative procedure that is performed among
the battery, regulator/inverter, and other components, V is effectively limited to exactly V C.) Thus, the
"finishing" charging of the battery is done at constant voltage.
After all "F Tests" and "V Tests," mode 2 checks the charge or discharge rate of the battery. These steps
limit PB to less than PB,MAX (on charge) and to greater than PB,MIN (on discharge). These correspond to the
current limits IMAX and IMIN in the Type47 battery model. Pairing Type48 with other battery models will require
the use of equations (or battery model inputs and outputs) that limit the charging and discharging current
to both the battery model and to this component. When PA is large enough so that PB would otherwise
exceed PB,MAX, this procedure carries out "constant current" charging of the battery (until V C is reached,
when "constant voltage" charging takes over).
Modes 0, 1 and 2 all operate with a maximum power mode of the various photovoltaic collector models.
They simply accept PA as an Input and parcel it out among PB, PR and PL. Mode 3 involves distributing
current instead of power ("P" means "I" in this case), and the solar array voltage is clamped to that of the
battery. It takes an initial PA and sets PB and the other currents accordingly. The voltage is calculated by
the battery model. In the case of pairing this component with Type47, the voltage is computed from the
battery current in modes 3 or 4 of Type47. Once the battery voltage V is known, it is fed into the photovoltaic
array model. The PV model then calculates a new PA for the regulator. This sequence is repeated until, in
effect, Kirchoff's Law for currents is satisfied, with the battery and array voltages equal to each other. Note
that it may be necessary to choose a PV model that contains algorithms for solving the direct connect
system configuration (such as Type103).
Mode 3 performs the same tests as the lower modes on F, V and PB (now the battery current). It converts
the Inputs PL,MAX, PC, PD, PB,MAX and PB,MIN to currents by dividing by V and the kJ/hr to watt conversion
factor 3.6. Mode 3 outputs PA, PB, PL . eff2, PR and PU as powers and currents, instead of just powers.
Modes 2 and 3 have the additional capability of charging the battery directly from the utility. Intended to
simulate off-peak charging, this feature permits charging at a current IBCH, up to an F limit of FBCH, when the
time of day is between T1 and T2.

4–66
TRNSYS 18 – Mathematical Reference

4.2.3. Type 90: Wind Turbine


Type 90 is a mathematical model for a wind energy conversion system (WECS).The model calculates the
power output of a WECS based on a power versus wind speed characteristic (provided on table form in an
external file). The impact of air density changes and wind speed increases with height is also modeled.

4.2.3.1. Parameter/Input/Output Reference


PARMAETERS

1 Site elevation [m] The height of the site above sea level.

2 Data collection height [m] The height above site ground level at which the wind data was
collected.

3 Hub height [m] Hub height of WECS, as installed on site

4 Turbine power loss [% (base The percentage of turbine output power that is lost due to
100)] ineffiencies and transmission.

5 Number of turbines [-] Number of exactly similar turbines

6 Logical unit of file [-] The integer identifier (logical unit number) associated with the
containing power curve data file containing additional WECS parameters.
data

INPUTS

1 Control signal [-] The control signal for the wind turbine. CTRL = 0: WECS is OFF,
CTRL = 1: WECS is ON and providing power.

2 Wind speed [m/s] The uncorrected wind speed measured at the site at the data
collection height specified as one of the parameters to this
model. Note that "uncorrected" in this case means that the wind
speed being provided to this component should NOT include
any correction for site wind shear. If the wind speed has already
been corrected for site shear effects then the site shear
exponent should be set to 0.

3 Ambient temperature [C] Ambient temperature

4 Site shear exponent [-] Site wind shear exponent is a dimensionless measure of the
wind speed at a particular height above the ground as compared
to the free stream wind speed that was measured at a data
collection site. The shear exponent is the value “a” in the
formula: v / vo = (h / ho)^a Some typical values are: -0.06 =
inverted profile, 0.00 = neutral profile, 0.06 = open water, 0.10 =
short grasses, 0.14 = 1/7-profile-common, 0.18 = low vegetation,
0.22 = forests, 0.26 = obstructed flows, 0.30 = rare

5 Barometric pressure [Pa] Barometric (atmospheric) pressure

OUTPUTS

1 Power output [W] Power output

4–67
TRNSYS 18 – Mathematical Reference

2 Turbine hours [hr] Hours of continuous wind turbine operation

3 Power coefficient [-] A wind turbine’s power coefficient is a dimensionless


measurement of the turbine’s output power as compared to its
theoretical maximum possible power output.

4.2.3.2. Simulation Summary Report Contents


VALUE FIELDS

Rotor height [m] Parameter 3

Rotor diameter [m] Rotor diameter as reported in the WECS data file.

Rated power [kW] WECS rated power as reported in the data file

Rated windspeed [m/s] Windspeed at which the rated power is produced (as reported in the
data file)

TEXT FIELDS

Turbine type n/a WECS type as reported in the data file

INTEGRATED VALUE FIELDS

Energy generated [kWh] Output 1

MINUMUM/MAXIMUM VALUE FIELDS

Power coefficient [0..1] Output 3

4.2.3.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.2.3.4. Nomenclature
U0 Velocity in the free stream
P0 Pressure in the free stream
A1 Area of the c.v. far upstream of the rotor.
UR Velocity through the rotor
PR+ Pressure just upstream of the rotor
PR- Pressure just downstream of the rotor
UW Velocity far downstream in the rotor wake
AW Area far downstream in the rotor wake
Q Mass flux out the sides of the c.v.

4–68
TRNSYS 18 – Mathematical Reference

4.2.3.5. Detailed Description


FUNDAMENTALS OF WIND ENERGY SYSTEMS
Wind turbines transform the kinetic energy of moving air into useful work. In order to understand this
process, a control-volume (c.v.) is constructed as shown in Figure 4.2.3–1 (page 4–69), representing a
three-dimensional streamtube of air. The rotor is represented by an actuator disk interspersed in the flow.
The control volume method applied to wind turbine fluid dynamics is the actuator disk model, which was
originally developed by Rankine (Spera, 1989) to model marine propellers. For wind turbines, the rotor is a
homogeneous disk which removes energy from (rather than furnishing energy to) the moving fluid. Although
insufficient for analysis of rotor geometry, the model is appropriate for analysis of axial mass, momentum,
and energy balances. The following physical assumptions are employed:
 Constant, incompressible, non rotating, flow at constant temperature
 No mass flow across the streamtube boundary
 Point 1 is far upstream; point R is at the rotor, and point 2 is far downstream.
The position of point 2 is at the hypothetical point where the streamtube boundary is parallel to the horizontal
c.v. boundary. At this point downstream the static pressure is constant and equals the free stream static
pressure, Po
The actuator disk approach to the momentum theory analysis of wind turbines does not include turbulent
mixing between the air in the streamtube and the air in the balance of the c.v. Thus, the placement of the
downstream boundary of the c.v. is arbitrary once the streamtube lines become parallel. When the condition
that the streamtube lines are parallel is met, then the mass transfer Q ( and the momentum associated with
Q) leaving the c.v. due to the existence of the rotor is completed.

Figure 4.2.3–1: Streamtube Control Volume with Actuator Disk Wind Turbine Model

MOMENTUM THEORY

4–69
TRNSYS 18 – Mathematical Reference

If it is assumed that the density of the air does not change, then mass continuity through the streamtube
requires:
𝐴1 𝑈0 = 𝐴𝑅 𝑈𝑅 = 𝐴𝑤 𝑈𝑤 Eq. 4.2.3-1

Since U0 > UR > UW then it follows that and the streamtube expands. The mass balance for the c.v. is:
𝐴1 𝑈0 − 𝐴𝑤 𝑈𝑤 − (𝐴1 − 𝐴𝑤 )𝑈0 − 𝑄 = 0 Eq. 4.2.3-2

Rearranging Eq. 4.2.3-2 and solving for Q yields an expression for the mass flow rate out of the control
volume:
𝑄 = 𝐴𝑤 (𝑈0 − 𝑈𝑤 ) Eq. 4.2.3-3

Mass flow rate can be expressed as AU. Conservation of momentum in the horizontal direction results in:
𝜌𝐴1 𝑈0 2 − 𝜌𝐴𝑤 𝑈𝑤 2 − 𝜌(𝐴1 − 𝐴2 )𝑈0 2 − 𝜌𝑈0 𝑄 − 𝐷 = 0 Eq. 4.2.3-4

or, after rearranging:


𝐷 = 𝜌𝐴𝑤 𝑈0 2 − 𝜌𝐴𝑤 𝑈𝑤 2 − 𝜌𝑈0 𝑄 Eq. 4.2.3-5

Substituting for Q by using Eq. 4.2.3-3 results in:


𝐷 = 𝜌𝐴𝑤 𝑈0 2 − 𝜌𝐴𝑤 𝑈𝑤 2 − 𝜌𝑈0 (𝐴𝑤 (𝑈0 − 𝑈𝑤 )) Eq. 4.2.3-6

which, after rearranging, becomes


𝐷 = 𝜌𝐴𝑤 𝑈𝑤 (𝑈0 − 𝑈𝑤 ) Eq. 4.2.3-7

BERNOUILLI'S EQUATION
Figure 4.2.3–2 shows wind speed, plus static, dynamic and total pressure across the rotor.
Bernoulli's equation is next used to describe the pressure difference across the rotor. Upstream of the
rotor:
1 1
𝑝0 + 𝜌𝑈0 2 = 𝑝𝑅 + + 𝜌𝑈𝑅 2 Eq. 4.2.3-8
2 2
and downstream of the rotor:
1 1
𝑝0 + 𝜌𝑈𝑤 2 = 𝑝𝑅 − + 𝜌𝑈𝑅 2 Eq. 4.2.3-9
2 2
The pressure difference across the rotor is then equivalent to the difference between Eq. 4.2.3-8 and Eq.
4.2.3-9, or:
1
𝑝𝑅 + − 𝑝𝑅 − = 𝜌(𝑈0 2 − 𝑈𝑤 2 ) Eq. 4.2.3-10
2
The thrust force, D can be expressed as the pressure difference applied to the rotor area (hence, actuator
disk). The expression in this case is:
𝐷 = 𝐴𝑅 (𝑝𝑅 + − 𝑝𝑅 − ) Eq. 4.2.3-11

It is then possible to combine Eq. 4.2.3-10 and Eq. 4.2.3-11 to create an expression for the thrust:
1
𝐷= 𝜌𝐴 (𝑈 2 − 𝑈𝑤 2 ) Eq. 4.2.3-12
2 𝑅 0

4–70
TRNSYS 18 – Mathematical Reference

Figure 4.2.3–2: Wind speed, P, plus static, dynamic and total pressure across the rotor

WIND VELOCITY AT THE ROTOR AND AXIAL INDUCTION FACTOR


Combining the expression of thrust derived from Bernouilli's equation with the one that was derived from
the momentum theory (Eq. 4.2.3-7), we have:
1
𝜌𝐴𝑤 𝑈𝑤 (𝑈0 − 𝑈𝑤 ) = 𝜌𝐴𝑅 (𝑈0 2 − 𝑈𝑤 2 ) Eq. 4.2.3-13
2
Recall that AwUw = ARUR, so that Eq. 4.2.3-13 becomes
1
𝜌𝐴𝑅 𝑈𝑅 (𝑈0 − 𝑈𝑤 ) = 𝜌𝐴 (𝑈 2 − 𝑈𝑤 2 ) Eq. 4.2.3-14
2 𝑅 𝑜
Canceling out like terms and simplifying, results in
1
𝑈𝑅 (𝑈0 − 𝑈𝑤 ) = (𝑈0 2 − 𝑈𝑤 2 ) Eq. 4.2.3-15
2
Recalling that (𝑈0 2 − 𝑈𝑤 2 ) = (𝑈0 − 𝑈𝑤 )(𝑈0 + 𝑈𝑤 ), then Eq. 4.2.3-15 reduces to an expression for the wind
velocity at the rotor,

4–71
TRNSYS 18 – Mathematical Reference

𝑈0 + 𝑈𝑤
𝑈𝑅 = Eq. 4.2.3-16
2
which means that the wind speed at the rotor is the average of the upstream and downstream wind speeds.
The term a is defined as the axial induction factor (or the retardation factor) and is a measure of the influence
of the rotor on the wind, such that:
𝑈𝑅 = 𝑈0 (1 − 𝑎) Eq. 4.2.3-17

Eq. 4.2.3-16 and Eq. 4.2.3-17 can then be combined to yield an expression for the downstream wind speed
in terms of the free stream wind speed, or:
𝑈𝑤 = 𝑈0 (1 − 2𝑎) Eq. 4.2.3-18

The power output of a wind turbine can then be written as the product of the thrust times velocity:
𝑃 = 𝐷𝑈𝑅 Eq. 4.2.3-19

Eq. 4.2.3-12 can be substituted into Eq. 4.2.3-19 to create an expression for the power output
1
𝑃 = ( 𝜌𝐴𝑅 (𝑈0 2 − 𝑈𝑤 2 )) 𝑈𝑅 Eq. 4.2.3-20
2
Eq. 4.2.3-17 can be used to replace UR, and Eq. 4.2.3-18 can be used to replace Uw in Eq. 4.2.3-20,
resulting in:
2
𝑃 = 𝜌𝐴𝑅 𝑈0 (1 − 𝑎) (𝑈0 2 − (𝑈0 (1 − 2𝑎)) ) Eq. 4.2.3-21

Simplifying Eq. 4.2.3-21 yields


1
𝑃 = 𝜌𝐴𝑅 𝑈0 3 4𝑎(1 − 𝑎)2 Eq. 4.2.3-22
2
The power coefficient for a wind turbine, CP, is defined as the power of the turbine divided by the power in
the wind, where the power in the wind is:
1
𝑃 = 𝜌𝐴𝑅 𝑈0 3 4𝑎(1 − 𝑎)2 Eq. 4.2.3-23
2
Which yields an expression for the power coefficient as a function of the axial induction factor:
𝐶𝑝 = 4𝑎(1 − 𝑎)2 Eq. 4.2.3-24

The maximum power coefficient, CPmax, is found by finding dP/da = 0 and solving for a, where the solutions
are a = 1 and a = 1/3. The solution for a = 1 results in the minimum value of C P, 0, while a = 1/3 results in
the maximum value of CP, where:
1 1 2 16
𝐶𝑃𝑚𝑎𝑥 = 4 (1 − ) = = 59.3% Eq. 4.2.3-25
3 3 27
The value of 59.3% as a maximum power coefficient was first derived by Betz in 1919, and has since been
called Betz's limit.
The value of the coefficient is that, when multiplied by the area of the rotor and power in the wind, it
describes the power output of the wind turbine, or:
𝑃 = 𝐶𝑃 𝜌𝐴𝑅 𝑈0 3 Eq. 4.2.3-26

Figure 4.2.3–3 shows Cp as a function of the axial induction factor. The value of C P for a wind turbine is
determined by its tip-speed-ratio (the ratio of blade tip speed in the plane of the rotor to the free stream
wind speed U0). For variable pitch or variable speed wind turbines, tip-speed-ratio is selected by the turbine
for maximum CP up to the rated power output, then for operation at wind speeds above the rated wind
speed, CP falls in order to maintain constant rated power.

4–72
TRNSYS 18 – Mathematical Reference

Figure 4.2.3–3: CP as a Function of Axial Induction Factor


Figure 4.2.3–4 shows CP as a function of wind speed for a typical stall-regulated wind turbine and power-
regulated turbine. For stall-regulated turbines, rotational speed is fixed, so tip-speed-ratio is a measure of
the ratio of free-stream wind velocity to the fixed rotor speed.

Figure 4.2.3–4: Typical CP vs. wind speed curves for stall regulated and power regulated WECS
The CP values applicable for most wind turbine applications are those associated with axial induction factors
between 0 and 0.5; values less than 0 are associated with propeller operation, and values above 1.0 are
associated with propeller brakes. For wind turbines, values between 0.5 and 1.0 are not encountered in
practice because in this region, stall-regulated turbines have lower tip-speed-ratios and pitch-regulated
wind turbines feather to lower, rather than higher thrust coefficients. Pitching to the lower thrust coefficient
achieves lower structural loads than pitching to the higher thrust coefficient.

THRUST COEFFICIENT

4–73
TRNSYS 18 – Mathematical Reference

The thrust coefficient, CT, for a wind turbine is defined as the ratio of the wind turbine drag force divided by
the force of the wind over an equivalent swept area. Determination of C T is required for turbine wake and
array calculations. The term "thrust" is commonly used instead of "drag" because turbine design shares a
significant amount of its nomenclature and theoretical development with propeller theory. Most
manufacturers do not explicitly publish thrust coefficient data. However, it is possible to derive the thrust
coefficient at a given wind speed if the CP or turbine power output is known, based on momentum theory.
Wilson and Lissaman (1974) developed a method for relating C T to the axial induction factor. Recall from
Eq. 4.2.3-19 that P = DUR. Substituting for P using Eq. 4.2.3-17, and canceling like terms results in the
expression:
1
𝐷= 𝜌𝐴 𝑈 2 (4𝑎(1 − 𝑎)) Eq. 4.2.3-27
2 𝑅 0
The thrust coefficient is the turbine thrust divided by the wind force applied to the rotor swept area, or:
𝐷
𝐶𝑇 = Eq. 4.2.3-28
1
𝜌𝐴 𝑈 2
2 𝑅 0
Eliminating D between the last two equations results in an expression for C T as a function of a:
𝐶𝑃 = 4𝑎(𝑎 − 1) Eq. 4.2.3-29

Recalling from Eq. 4.2.3-24 that CP can also be expressed as a function of the axial induction factor, then
it is possible to relate the thrust coefficient to the power coefficient through the axial induction factor.
Figure 4.2.3–5 shows CT and CP as a function of the axial induction factor in the a = 0 to 0.5 region. Figure
4.2.3–6 shows the curve of CT as a function of CP, for CP between 0 and 0.593 and CT between 0 and 1.0.
The region CT = 0 to 1.0 is appropriate for practical wind turbines because CP cannot exceed Betz's limit
and because commercial turbines, with low rotor solidities, do not commonly exhibit thrust coefficients
greater than 1.0.

Figure 4.2.3–5: CT and CP as a Function of the Axial Induction Factor


Because Eq. 4.2.3-16 is implicit, it is not possible to explicitly characterize CP as a function of the axial
induction factor. However, it is possible to determine a value for CT by using the axial induction factor as a
numeric solution parameter, as shown in Figure 4.2.3–6.

4–74
TRNSYS 18 – Mathematical Reference

Figure 4.2.3–6: CT as a function of CP

4.2.3.6. Factors Influencing Wind System Performance


It has been shown earlier in this section that the energy extracted by a wind turbine results from a change
in momentum of the air moving through the rotor plane. The mass flow rate of air is affected by its density,
which is a function of temperature and pressure, and velocity. Estimated wind velocity at the turbine rotor
is based on information concerning flow obstructions and assumptions made concerning speed-up with
height above ground. In addition, the power conversion efficiency of a wind turbine is influenced by variance
in the wind speed (turbulence), orthogonality to the flow (yaw error) and aerodynamic effects (blade
cleanliness).

AIR DENSITY
The energy extracted by a wind turbine results from the change in momentum of the air moving through the
rotor. The mass flow rate of air is a function of its density; therefore, the change in momentum is a function
of the density of the air passing through the rotor. As described by the ideal gas law, the density of air is a
function of its temperature and pressure. Air density is also dependent on humidity ratio, although Rohatgi
and Nelson (1994) have shown that this influence is negligible for wind energy applications. In the
atmosphere, the air density at a particular altitude is a function of the temperature and pressure of the air
at the time and at that location. Both air pressure and temperature fall as a function of altitude. Hydrostatic
pressure is commonly described as:
𝑑𝑝
= −𝜌𝑔 Eq. 4.2.3-30
𝑑𝑧
so the pressure difference from one altitude to the next is:
2
∆𝑝 = − ∫ 𝜌𝑔𝑑𝑧 Eq. 4.2.3-31
1

Introducing the ideal gas law p = RT, substituting for  in Eq. 4.2.3-30, separating the variables, and
integrating between two points yields:
2
𝑑𝑝 𝑝2 𝑔 2 𝑑𝑧
∫ = ln ( ) = − ∫ Eq. 4.2.3-32
1 𝑃 𝑝1 𝑅 1 𝑇
Assuming constant temperature, integrating Eq. 4.2.3-32 over z yields an expression for the pressure
difference from point 1 to point 2 in elevation:
−𝑔(𝑧2 −𝑧1 )
( ) Eq. 4.2.3-33
𝑝2 = 𝑝1 𝑒 𝑅𝑇

4–75
TRNSYS 18 – Mathematical Reference

For elevations where wind energy applications apply, temperature decreases linearly with altitude. The
temperature "lapse rate" (White, 1994) is:
𝑇(𝑧) ≈ 𝑇0 − 𝐵𝑧 Eq. 4.2.3-34

where B = 6.5 K/km of altitude.


The expression for T(z) can be inserted into Eq. 4.2.3-32 and integrated, resulting in an expression for
pressure decrease with altitude, taking into account the temperature lapse rate
𝑔
𝐵𝑧 𝑅𝐵 Eq. 4.2.3-35
𝑝2 = 𝑝1 (1 − )
𝑇0
where the dimensionless exponent g/RB = 5.26 for air, and T 0 = 288K .
The air density at an elevation is a function of the combined effects of pressure and temperature, according
to the ideal gas law. The air density at a given elevation, in kg/m 3, is therefore:
𝑝𝑒𝑙𝑒𝑣
𝜌𝑒𝑙𝑒𝑣 = Eq. 4.2.3-36
𝑅𝑇
The resulting variation in air density is shown in. The left axis shows the percent of sea-level density, while
the right axis shows the numeric value. At an altitude of 3,000 meters, the density has fallen to
approximately 80 percent of sea-level density.
In most cases, wind turbine power output at a given wind speed is a linear function of air density as shown
in Figure 4.2.3–7. Wind turbines are usually not considered practical at high elevations, despite the stronger
wind speeds. Since temperature and pressure also vary with weather, air density varies as well over time.
Figure 4.2.3–8 shows percent of standard air density for weather conditions that are typical over the course
of a year.

Figure 4.2.3–7: Air Density as a Function of Elevation

4–76
TRNSYS 18 – Mathematical Reference

Figure 4.2.3–8: Percent of standard air density over the course of a year (typical weather conditions)
Wind turbine power output also varies slightly due to variations in air density because the Reynolds number,
upon which airfoil performance depends, also depends on air density. However, the influence on power
output at the variations in density occurring in the atmosphere is small, so that Reynolds effects are not
usually considered in power output modeling.
Different types of turbines respond differently to air density changes depending on the method of power
regulation employed. The output of fixed pitch wind turbines (stall-regulated and Darrieus vertical axis wind
turbines) varies linearly with air density ratio. In this case, the vector addition of free-stream and rotor wind
velocities results in an apparent airfoil angle of attack which moves into the "stalled" region of the airfoil lift-
drag curve. Fixed pitch is problematic for commercial operators of wind turbines because the pitch of the
turbine, as installed, is fixed and therefore based on a mean assumption for site air density. Since air density
varies constantly, the turbine is rarely operating at an optimum. Fortunately, the range of "near-optimum"
is broad. However, it is common practice to set conservative pitch angles on stall-regulated turbines to
avoid overloading the turbine generator at times of high air density and high wind (typically, winter
conditions).
Turbines with variable speed rotors and pitch-controlled blades are of a "power-regulation" class. For these
turbines, output is linearly proportional to air density up to the maximum power rating of the turbine.
Maximum power is achievable, albeit at a higher wind speed in low density conditions. The wind speed at
which the rotor cuts-in and can reach its rated output occurs at a wind power density equivalent to the wind
power density at standard conditions. Wind power density (W/m 2) is a cubic function of wind speed,
therefore
1
𝜌0 3
𝑈𝑟𝑎𝑡𝑒𝑑,𝜌 = 𝑈𝑟𝑎𝑡𝑒𝑑 ( ) Eq. 4.2.3-37
𝜌
Figure 4.2.3–9 shows power curve variations for a power-regulated turbine as a function of air density. Note
that the turbine reaches a fixed maximum, but that the point at which it reaches the maximum depends on
air density.

4–77
TRNSYS 18 – Mathematical Reference

Figure 4.2.3–9: Output of a Power Regulated Wind Turbine as a Function of Air Density

VERTICAL WIND SHEAR


The modeling of vertical wind shear (the change in wind speed per change in height above the ground), is
historically based on boundary layer theory applied to the atmosphere. Two vertical wind shear models are
used in wind energy applications.
The first is the "one-seventh power law" model, based on the theoretical work of Von Karman (Koeppl,
1982):
𝑈1 𝑧1 ∝
( )=( ) Eq. 4.2.3-38
𝑈2 𝑧2
A single parameter, , determines the rate of wind speed increase as a function of height. Under ideal
boundary layer conditions, the value of alpha is taken to be 1/7 (0.14). However, under actual conditions,
the value of alpha constantly varies, and depends on a variety of factors influencing vertical turbulence
intensity, including:
 Local upwind surface roughness, determined by whether the air is moving over water, prairie, bushes
or trees.
 Large scale surface characteristics in the "fetch", or upwind area, such as mountainous far upwind, or
buildings and other structures nearby upwind.
 Atmospheric stability, as defined by the temperature gradient with height.
 Other wind turbines. Turbines increase turbulence due to vortex shedding.
Efforts to include these effects into more detailed, multiple-parameter shear models for wind energy
applications have produced a variety of alternatives. The logarithmic profile
𝑧
ln( 2⁄𝑧0 )
𝑈2 = 𝑈1 𝑧 Eq. 4.2.3-39
ln( 1⁄𝑧0 )
is incorporated in the WaSP computer model used in Europe. The value of is the surface roughness length.
In some circumstances, a value for the surface roughness is not known, or is a source of subjectivity. For
this reason, the power law model continues to be most often used by meteorologists, especially where
multi-height wind data is obtainable from a site. In this case, the shear exponent, alpha, implicitly
incorporates influences due to surface roughness. For this reason, many wind data collection sites monitor
wind velocity at two or more heights, allowing the meteorologist to infer a vertical wind shear exponent

4–78
TRNSYS 18 – Mathematical Reference

between heights. Combined with the capability to disaggregate time series data into directional
components, then it is possible to map the shear exponent by time and direction.
In time series modeling of wind turbine performance, vertical wind shear data is important in two cases. In
the first case, the wind turbine power curve may have been collected at a height which was not the turbine
hub height. For example, wind data may have been collected at ten meters for a wind turbine which was
operating at a 25 meter height above the ground. Though not a common situation, power curve data have
been published with this height mismatch, since it can misleadingly represent a more powerful turbine.
In the second case, it is more common that site wind data has been collected at a different height from the
turbine hub height. In this case, a hierarchy of approaches is appropriate. The most rigorous approach is
to utilize a time series of vertical wind shear values calculated from two wind speed data sets, each from a
different height above ground bracketing the height of the wind turbine. The equation for determining the
alpha value from heights 1 and 2 is obtained by solving the power law equation for :
ln(𝑈2 ) − ln(𝑈1 )
∝= Eq. 4.2.3-40
ln(𝑧2 ) − ln(𝑧1 )
A less rigorous approach is to calculate wind speeds based on wind data where both heights were below
the turbine hub height: in this case the very same model is employed, but for extrapolation, rather than
interpolation. The least rigorous approach is to apply an alpha estimate which does not vary with time.
Unfortunately, this is often the case with typical availability of historic wind data, where annual average
alpha exponents for sites are often provided with average wind speed data and wind roses.
The sensitivity of hub height wind speed on the value of the vertical wind shear exponent is very strong.
Figure 4.2.3–10 was prepared to present an "envelope" of possible variations in wind speed estimates,
based on vertical wind shear assumptions, where the value of 1/7 was used as a baseline. The figure shows
that an error of 10% in wind power output can occur with a five point error in shear exponent. Considering
the fact that wind power is a cubic function of wind speed, the importance of vertical wind shear data is
critical.

4–79
TRNSYS 18 – Mathematical Reference

Figure 4.2.3–10: Example variation in wind turbine power output as a function of Shear exponent.
(lines represent various typical data height and turbine height values across a probable range)

TURBULENCE
Turbulence has a variety of impacts in wind energy applications. As discussed earlier in this chapter,
turbulence is major factor in contributing to the fatigue of turbine components. Turbulence is also important
from an energy perspective. It contributes to errors in the preparation of power curves. Higher turbulence
causes power fluctuations, since pitch controlled blades may not be able to adjust their blade pitch
sufficiently quickly to follow the rapidly varying wind speeds, which can result in potentially unstable power
output events. For stall-regulated wind turbines, turbulence has a similar effect, due to a hysteresis
phenomenon, termed dynamic stall. Data from wind tunnel tests have confirmed the existence of dynamic
stall; if the angle of attack of an airfoil is changed rapidly, stall is delayed. The same effect occurs as angle
of attack is returned from the stall condition; stall is maintained for a brief amount of time before settling
back.
When a turbine airfoil encounters turbulence, the effect is a change in apparent angle of attack. This effect
has been one of the areas NREL (The National Renewable Energy Laboratory, USA) has attempted to
mitigate in its development of airfoils designed specifically for wind turbines.
The U component is downwind, the V component is vertical, and the W component is the crosswind
component of the wind velocity vector. Turbulence is described as the variation in wind velocity, where the
associated turbulence intensities are defined as U', V' and W'. The only component which is actually
measured in most wind energy site assessments is U', based on the variation in the wind speed
measurements from a cup anemometer or propeller anemometer mounted on the front of a wind vane. U'
is important from an energy perspective because of its role in airfoil aerodynamics, such as dynamic stall.

4–80
TRNSYS 18 – Mathematical Reference

W' is important because it influences the horizontal component of the rotor wake structure, and V' influences
vertical wind shear and the vertical component of the rotor wake structure.
The time base for turbulence data is usually over an hour, with measurements stored at 1 Hz. A turbulence
intensity of 10% is equivalent to a standard deviation of 1m/s in an hour with a mean value of 10 m/s.
Connell (1986, 1988) has investigated turbulence in the atmosphere, as it relates to wind power
applications. His research revealed that turbine blades pass through a combination of turbulence
components as a rotation is completed. This mixing effect was simulated by computer re-sampling of
turbulence data from a ring of anemometers, using a rotational approach. Veers (1994) has made important
contributions in the characterization of the turbulent flow field, especially as it applies to fatigue damage, to
the extent of creating algorithms based on Connell's findings for synthesizing turbulent flow fields with
properties similar to observed data.

WAKES
When installed in multiple-unit arrays, wind turbines have the potential to interact with each other when a
downwind turbine is in the wake of an upwind wind turbine. The wake of the upwind turbine can be
visualized as a plume of reduced flow having a generally Gaussian shape and boundary-layer
characteristics in the radial crosswind direction. The extent of the wake interaction is dependent on the
general wind direction (placement), turbulence intensity in the radial crosswind direction (mixing), and
distance between turbines (strength), the number of upwind turbines (superposition), and whether wind
speeds are reduced below the turbines rated speed (sensitivity). Figure 4.2.3–11 shows a typical wake
interaction situation for a hypothetical wind array.
In general, the impact of wake effects on a wind turbine array is a reduction in power output for certain wind
speeds and directions. Knowledge of the wind speed by direction distribution at a site results in a
determination of an efficiency factor associated with the layout of the wind array. Thus, it is possible to
perform scenario analyses of possible array layouts in order to minimize wake effects. In real life projects,
the easiest approach is to increase the distances between turbines. This can increase the cost of a project,
however. The costs per land area are then introduced in the analysis to seek an optimum.

Figure 4.2.3–11: Wake Interactions in a Hypothetical Wind Array


In the case of wind turbines arranged along ridge lines, some wind project operators have shut off wind
turbines along the rows. This has had two effects: the first influences the apparent turbine distances. The

4–81
TRNSYS 18 – Mathematical Reference

second (and most important to the operator) is the reduced in-flow turbulence (and resulting increase in
service-life) experienced by the operating wind turbines.

OTHER FACTORS
A variety of other factors influence wind turbine power output. These can be divided into two categories:
aerodynamic and operational. Aerodynamic impacts are those influences on the aerodynamic performance
of the rotor airfoils. The most important aerodynamic impacts are the sources of increased surface
roughness of the blades, and the prime cause is dead insects built up on the leading edges of the blades.
Also recognized are ultra-violet light degradation of the surfaces of the blades, and air pollution. Installations
near highways have reported that turbine blades had been soiled by aerosols from the exhaust of diesel
engines powering trucks on the highway.
Operational influences are either external- or control-system sources of sub-optimal operation. External
causes include power outages or inadvertent shut-down. Control-system causes include sub-optimal cut-
in of the rotor due to anemometer or software error. A common cause of sub-optimal operation of horizontal
axis turbines is yaw-error: the misalignment of the rotor to the wind which can happen when variation in
wind direction occurs faster than the response rate of the yaw drive. Operational factors are commonly
lumped into a percent-loss factor or efficiency factor.

4.2.3.7. External Data File


Type 90 reads the wind turbine performance data from a data file. Table 4.2.3–1 describes the required
data in the file. An example is available in "Example\Data Files". In Table 4.2.3–1, the text that must appear
literally is printed in bold italics, while the variables that must be provided (mostly numbers) are within
brackets <>.
Table 4.2.3–1: Type 90, External data file

line Data Comments


1 WECS_Typ <WECS Type> String (for information only)
2 WECS_REF <origin of data> String (for information only)
3 Len_Unit m Do not edit
4 Spd_Unit m/s Do not edit
5 Pwr_Unit kW Do not edit
Control mode is ONE CHARACTER, and there must be ONE
6 Ctl_mode <control mode> SPACE between "Ctl_mode" and the character. Valid
choices: S, P, V (S=stall; P=pitch; V=variable speed)
7 Rotor_Ht <rotor height> Rotor center height, meters
8 Rotor_Di <rotor diameter> Rotor diameter, meters
Sensor Height for data pairs given here below, meters (often
9 Sensr_Ht <sensor height>
rotor center height)
10 Sher_Exp <wind shear exponent> Power-law exponent for vertical wind profile
11 Turb_Int <turbulence intensity> Turbulence intensity valid for this curve
12 Air_Dens <air density> Power curve air density, kg/m3
13 Pwr_Ratd <rated power> Rated power of the turbine, kW
14 Spd_Ratd <rated wind speed> Rated wind speed, m/s
15 Num_Pair <NP> Number of (wind speed, power) pairs in the file (Max 100)
1st data pair (wind speed, power) - Free format (space
16 <wind speed 1> <power 1>
separated) – ALWAYS START AT 0.0
… <wind speed> <power> Additional data pairs
15+
<wind speed NP> <power NP> Last data pair. Use maximum 100 points
NP

EXAMPLE
WECS_Typ Bonus 2MW (60) ! Wind Turbine type
WECS_REF www.bonus.dk ! Data source
Len_Unit m ! Length unit, must be m (do NOT edit)
Spd_Unit m/s ! Speed unit, must be m/s (do NOT edit)

4–82
TRNSYS 18 – Mathematical Reference

Pwr_Unit kW ! Power unit, must be m (do NOT edit)


Ctl_mode P ! Control mode (S, P, V)
Rotor_Ht 60.00 ! Rotor center height, meters
Rotor_Di 76.0 ! Rotor diameter, meters
Sensr_Ht 60.00 ! Sensor Height for curve
Sher_Exp 0.16 ! Power-law exp. for wind profile
Turb_Int 0.10 ! Turbulence intensity for this curve
Air_Dens 1.225 ! Power curve air density, kg/m3
Pwr_Ratd 2000.00 ! Rated power of the turbine, kW
Spd_Ratd 15.00 ! Rated wind speed, m/s
Num_Pair 26 ! Number of data pairs in the file
0 0.00 ! First data pair (wind speed, power)
1 0.00 ! Second data pair - Free format
2 0.00 ! Other data pairs
3 9.6

... ... ! Other data pairs (max 100 total)

24 2000
25 2000 ! Last data pair - Free format.

4.2.3.8. References
1. Connel J. 1985. A primer on turbulence at the wind turbine rotor. In proceedings of Wind Power
1985, pp. 57-66. Washington DC. American Wind Energy Association.
2. Connel J. 1988. The wind lumps that bump a rotor. In proceedings of Wind Power 1988, pp. 452-
461. Washington DC. American Wind Energy Association.
3. Koepll G.W. 1982. Putnam's power from the wind: Second Edition. Van Nostrand Reinhold
Company, New-York.
4. Rohatgi J. and Vaughn N. 1974. Wind characteristics: an analysis for the generation of wind power.
Alternative Energy Institute. West Texas A&M university.
5. Spera, D.A. 1986. Overview of the new ASME performance test code for wind turbines.
Proceedings of Joint ASME/IEEE power generation conference, 1986. ASME, New-York
6. Veers P.S. et al. 1994. User's manual for FAROW: Fatigue and reliability of wind turbine
components, Version 1.1. Sandia National Laboratories, Albuquerque, NM, USA.
7. White F. 1994. Fluid Mechanics, Third Edition. Mc Graw Hill, New-York, USA.
8. Wilson R.E. and Lissaman P.B.S. 1994. Applied aerodynamics of wind power machines. National
Science Foundation, Washington DC, USA.

4–83
TRNSYS 18 – Mathematical Reference

4.2.4. Type 102: Internal Combustion Engine / Generator Set


Controller
This Type contains the control functions for one or several diesel engine generator sets (DEGS) operating
in decentralized power mini-grids. It determines the total number of DEGS and the power per DEGS
required to meet a given load. In this model, all of the DEGS are assumed to be identical and the maximum
number of DEGS that can be handled by the controller is limited to 5.

4.2.4.1. Parameter/Input/Output Reference


PARMAETERS

1 Minimum number of [-] Minimum allowable number of DEGS in operation


DEGS in operation

2 Maximum number of [-] Maximum allowable number of DEGS in operation


DEGS in operation

3 DEGS rated power [kW] Rated power of each DEGS

4 Minimum turndown [-] Lower power set point, usually about 40-50% of rated power
(X=P/Prated).

5 Maximum power [-] Upper power set point, usually 80-90% of rated power
(X=P/Prated)

INPUTS

1 Load power [W] Total load to be met by one or several DEGS

OUTPUTS

1 Single DEG power [W] Power set point for a single DEGS

2 Number of DEGS in [-] Total number of DEGS required to meet load.


operation

4.2.4.2. Simulation Summary Report Contents


VALUE FIELDS

Rated Power [kW] Parameter 3

Minimum Turndown [0..1] Parameter 4


Ratio

Maximum Turnup [0..1] Parameter 5


Ratio

INTEGRATED VALUE FIELDS

4–84
TRNSYS 18 – Mathematical Reference

Total Load on all DEGs [kWh] The product of Output 1 and Output 2
(delivered)

Total Load on a single [kWh] Output 1


DEGs (delivered)

Total Load on all DEGs [kWh] Input 1


(demanded)

4.2.4.3. Hints and Tips


 Even though the smallest value of the “minimum number of DEGS in operation” parameter is 1 this
does not mean that one generator will remain on at its minimum turndown ratio at all times. If the
load on the generator set falls to zero then all of the generators will be switched off.
 This controller splits the load equally between all of the generators that are currently on. In other
words it runs the generators that are currently operating up to 100% load then bring another
generator online and splits the load equally between the new set of operating generators.

4.2.4.4. Nomenclature
PLoad [W] Power required by the load
PDEGS,max [W] Rated Power generated by one DEGS (all DEGS are identical)
PDEGS,set [W] Power setpoint for each DEGS
XLow [-] Minimum power ratio (PDEGS / PDEGS,max) for one DEGS
XUp [-] Maximum power ratio (PDEGS / PDEGS,max) for one DEGS
NDEGS [-] Number of operating DEGS
NDEGS,min [-] Minimum number of DEGS operating at any time
NDEGS,max [-] Maximum number of DEGS operating at any time
Pup,i [W] "call up" power level for DEGS i (see text)
Pdown,i [W] "call down" power level for DEGS i (see text)

4.2.4.5. Detailed Description


DEGS are controlled in a master-slave setup. DEGS i can only be switched ON if DEGS (i-1) is ON. For
each DEGS, a "call up" and "call down" power level can be defined (the load power at which the
corresponding DEGS is respectively switched ON or OFF):
𝑃𝑢𝑝,𝑖 = 𝑖𝑃𝐷𝐸𝐺𝑆,𝑚𝑎𝑥 𝑋𝑙𝑜𝑤 Eq. 4.2.4-1

𝑃𝑑𝑜𝑤𝑛,𝑖 = 𝑖𝑃𝐷𝐸𝐺𝑆,𝑚𝑎𝑥 𝑋𝑢𝑝 Eq. 4.2.4-2

The dispatch controller simply loops through the DEGS and compare the power required by the load to Pup,i
and Pdown,i.

NUMBER OF DEGS ON AND OFF


First DEGS:
 If PLoad > 0 then switch ON
Other DEGS (i = 2.. NDEGS,max):

4–85
TRNSYS 18 – Mathematical Reference

 If DEGS i was OFF and PLoad > Pup,i then switch DEGS i ON
 If DEGS i was ON and PLoad < Pdown,i then switch DEGS i OFF
Note that the rules here above are overruled to have the number of operating DEGS between N DEGS,min and
NDEGS,max:
𝑁𝐷𝐸𝐺𝑆,𝑚𝑖𝑛 ≤ 𝑁𝐷𝐸𝐺𝑆 ≤ 𝑁𝐷𝐸𝐺𝑆,𝑚𝑎𝑥 Eq. 4.2.4-3

POWER OF EACH DEGS


The power of each DEGS is simply calculated as:
𝑃𝑙𝑜𝑎𝑑
𝑃𝐷𝐸𝐺𝑆,𝑠𝑒𝑡 = Eq. 4.2.4-4
𝑁𝐷𝐸𝐺𝑆

4–86
TRNSYS 18 – Mathematical Reference

4.2.5. Type 103: Simple Photovoltaic


This component is appropriate for modeling the electrical performance of mono and polycrystalline
photovoltaic (PV) panels. It is not appropriate for modeling the electrical performance of thin film PV arrays.
It may be used in one of two modes depending upon how the first parameter (MPPT mode) is set. When
the MPPT mode parameter is set to 0, the PV array is assumed to be directly connected to a load voltage
and/or to a battery such that the array and the load operating voltages are equal and the operating voltage
will be taken as an input to the PV model. When the MPPT mode parameter is set to 1 then the array is
assumed to be connected to its load through a maximum power point tracker such that the array and the
load will operate at independent voltages. In this case the load voltage is not needed as an input.
The model employs equations for an empirical equivalent circuit model to predict the current-voltage
characteristics of a single module. This circuit consists of a DC current source, diode, and a resistor. The
strength of the current source is dependent on solar radiation and the IV characteristics of the diode are
temperature-dependent. The results for a single module equivalent circuit are extrapolated to predict the
performance of a multi-module array. Type103 determines PV current as a function of load voltage. Other
outputs include current and voltage at either the maximum power point along the IV curve or current and
power at the user-specified load voltage. Open-circuit voltage and short circuit current are also computed.
Type103 employs a “four-parameter” equivalent circuit. The values of these parameters (not to be confused
with the formal TRNSYS component parameters that must be provided to all models by the user) cannot
be obtained directly from manufacturers’ catalogs. However, Type103 will automatically calculate them from
commonly available data.
An alternative equivalent circuit model involving five mathematical parameters is available for
amorphous/thin-film PV modules in Type190. Note that with the release of Trnsys18 Type103 replaced
Type94.

4.2.5.1. Parameter/Input/Output Reference


PARMAETERS

1 MPPT mode [-] When set to 1, this parameter causes the PV to operate at its
maximum power point rather than at a load voltage specified
among the components inputs. When this parameter is set to 0,
the PV array will operate at the load voltage input.

2 Module short-circuit [A] The module's short circuit current reported on the
current at reference manufacturer's spec sheet. Reference conditions are typically
conditions 1000 W/m2 (incident solar radiation) and 25C (module
temperature)

3 Module open-circuit [V] The module's open circuit voltage reported on the
voltage at reference manufacturer's spec sheet. Reference conditions are typically
conditions 1000 W/m2 (incident solar radiation) and 25C (module
temperature)

4 Reference cell [C] The cell temperature at which the manufacturer reports open
temperature circuit voltage and short circuit current. This value is typically
25C

5 Reference insolation [W/m2] The solar radiation level at which the manufacturer reports open
circuit voltage and short circuit current. This value is typically
1000 W/m2.

4–87
TRNSYS 18 – Mathematical Reference

6 Module voltage at max [V] The module's maximum power point voltage reported on the
power point and manufacturer's spec sheet. Reference conditions are typically
reference conditions 1000 W/m2 (incident solar radiation) and 25C (module
temperature).

7 Module current at max [A] The module's maximum power point current reported on the
power point and manufacturer's spec sheet. Reference conditions are typically
reference conditions 1000 W/m2 (incident solar radiation) and 25C (module
temperature).

8 Temperature [A/K] This parameter describes the way in which temperature affects
coefficient of Isc (ref. the module's short circuit current at reference conditions. Short
cond) circuit current typically increases with increasing ambient
temperature. The parameter is expressed in units of A/K.
Manufacturers express this value either in units of A/K or in %/K
(percent of the short circuit current.

9 Temperature [V/K] This parameter describes the way in which temperature affects
coefficient of Voc (ref. the module's open circuit voltage at reference conditions. Open
cond.) circuit voltage typically decreases with increasing ambient
temperature. The parameter is expressed in units of V/K.
Manufacturers express this value either in units of V/K or in %/K
(percent of the open circuit voltage).

10 Number of cells wired [-] The number of individual cells wired together in series within a
in series module. For monocrystalline silicon panels, each cell generates
approximately 0.5V so an 18V panel would typically have 36
cells wired in series.

11 Module temperature at [C] The module's cell temperature at nominal operating cell
NOCT temperature (NOCT) conditions. Typically obtained from the
manufacturer's specification sheet.

12 Module area [m2] The active area of the module.

13 Number of modules in [-] The number of modules wired in series within the PV array.
series Series wiring increases the array's total voltage.

14 Number of modules in [-] The number of modules wired in parallel within the PV array.
parallel Parallel wiring increases the array's total current.

INPUTS

1 Ambient temperature [C] Ambient temperature

2 Beam radiation [kJ/hr.m2}: The amount of beam solar radiation incident on the array.

3 Sky diffuse radiation [kJ/hr.m2] The amount of sky diffuse solar incident on the array.

4 Ground reflected [kJ/hr.m2] The amount of ground reflected diffuse radiation incident on the
diffuse radiation surface of the array.

5 Array slope Direction [degrees]

6 Incidence angle of [degrees] The angle between the normal to the array plane and the line
beam radiation between the sun and the surface of the array.

4–88
TRNSYS 18 – Mathematical Reference

If MPPT mode (parameter 1) = 0

7 Load voltage [V] The voltage of the electrical load imposed on the PV array. This
voltage will determine the PV array’s operating point on its I-V
curve.

8 Flag for convergence [-] Because a PV's I-V curve is so flat near the short circuit current
promotion and so vertical near the open circuit voltage, it can be very
difficult to solve when the load voltage depends on the PV
performance and the PV performance depends on the load
voltage. This Type contains an internal solver to assist in the
solution. Setting this input flag to "1" activates that algorithm.
The algorithm is unnecessary if the PV is assumed to be
attached to a maximum power point tracker.

OUTPUTS

1 Array voltage [V] The voltage at which the array is operating.

2 Array current [A] The current at which the array is operating.

3 Array power [W] The power generated by the array expressed in W

4 Array power [kJ/h] The power generated by the array expressed in kJ/h

5 Fraction of maximum [-] The array power divided by the power that would have been
power delivered under present conditions had the array been operating
at its maximum power point.

6 Open circuit voltage [V] The open circuit voltage of the array (i.e. not of the module) at
present operating conditions (i.e. at the present solar radiation
and ambient temperature instead of at NOCT or reference
conditions)

7 Short circuit current [A] The short circuit current of the array (i.e. not of the module) at
present operating conditions (i.e. at the present solar radiation
and ambient temperature instead of at NOCT or reference
conditions)

8 Array fill factor [-] The fill factor is a measure of how the maximum power point
relates to the "theoretical" maximum power point. The result is
the delivered power divided by the product of the open circuit
voltage and short circuit current. Expressed mathematically, the
fill factor is: ff=(Vmp*Imp)/(Voc*Isc). Note that if the PV is not
operating in its maximum power point tracking mode then the fill
factor output is still defined as the maximum power divided by
the theoretical maximum power and the fraction of maximum
power output should be taken into account.

9 Array temperature [C] The cell temperature at which the array is currently operating.

10 Array efficiency [-] The array efficiency is defined as the power produced by the
array divided by the amount of solar radiation incident on the
array.

4–89
TRNSYS 18 – Mathematical Reference

4.2.5.2. Simulation Summary Report Contents


VALUE FIELDS

Array area [m2] The total array area.

Reference condition [kW] An approximation of the power that the array will deliver when operating
peak power (appx) with a maximum power point tracker at reference conditions.

Reference condition [V] An approximation of the voltage at which the array will operate when
peak voltage (appx) connected to a maximum power point tracker at reference conditions.

TEXT FIELDS

Control mode [n/a] “maximum power point tracking” or “direct connection to load”
depending on the value of parameter 1.

INTEGRATED VALUE FIELDS

Energy generated [kWh] Output 3

MINIMUM/MAXIMUM VALUE FIELDS

Efficiency [0..1] Output 10

Operating voltage [V] Output 1

4.2.5.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.2.5.4. Nomenclature
 Slope of PV array [degrees]
 Empirical PV curve-fitting parameter
g Semiconductor bandgap [eV]
c Module conversion efficiency
Isc Temperature coefficient of short-circuit current [A/K]
Voc Temperature coefficient of open-circuit voltage [V/K]
 Angle of incidence for solar radiation [degrees]
 Module transmittance-absorptance product
normal Module transmittance-absorptance product at normal incidence
FLAG Flag for PV convergence promotion algorithm
GT Total radiation incident on PV array
GT,beam Beam component of incident radiation
GT,diff Diffuse component of incident radiation
GT,gnd Ground-reflected component of incident radiation
GT,NOCT Incident radiation at NOCT conditions
GT,ref Incident radiation at reference conditions
I Current

4–90
TRNSYS 18 – Mathematical Reference

IL Module photocurrent
IL,ref Module photocurrent at reference conditions
Io Diode reverse saturation current
Io,ref Diode reverse saturation current at reference conditions
Isc Short-circuit current
Isc,ref Short-circuit current at reference conditions
Imp Current at maximum power point along IV curve
Imp,ref Current at maximum power point along IV curve, reference conditions
IAM Dimensionless incidence angle modifier
k Boltzmann constant [J/K]
NP Number of modules in parallel in array
NS Number of modules in series in array
Ns Number of individual cells in module
P PV output power
Pmax PV output power at maximum power point along IV curve
q Electron charge constant
Rs Module series resistance []
Rsh Module shunt resistance []
Tc Module temperature [K]
Tc,NOCT Module temperature at NOCT conditions [K]
Tc,ref Module temperature at reference conditions [K]
UL Array thermal loss coefficient
V Voltage
Vmp Voltage at maximum power point along IV curve
Vmp,ref Voltage at maximum power point along IV curve, reference conditions
Voc Open-circuit voltage
Voc,ref Open-circuit voltage at reference conditions [V]

4.2.5.5. Detailed Description


Type103 is a simplified model of a photovoltaic (PV) array. It is appropriate for modeling most mono and
polycrystalline photovoltaic panels. It is not appropriate for modeling amorphous silicon, thin film
photovoltaic panels or photovoltaic panels that exhibit a slope in their current voltage characteristic near
the short circuit current point (y-intercept). Such PVs are more appropriately modeling using Type190.
The four-parameter equivalent circuit model at the heart of Type103 was developed largely by Townsend
[1989] and expanded by Duffie and Beckman [1991]. The model was first incorporated into a TRNSYS
component by Eckstein [1990] as Type94. A five parameter model mode was later added to Type94, then
split off into Type194. With the release of Trnsys18, Type94 was simplified and corrected and its legacy
five parameter mode was removed to make Type103.
The four parameter model assumes that the slope of the current voltage characteristic (IV curve) is zero at
the short-circuit condition:
𝑑𝐼
( ) =0 Eq. 4.2.5-1
𝑑𝑉 𝑣=0
This is a reasonable approximation for crystalline modules. The “four parameters” in the model are IL,ref,
Io,ref, , and Rs. These are empirical values that cannot be determined directly through physical
measurement. Type103 calculates these values from manufacturers’ catalog data; these calculations are
discussed in the following sections. The four-parameter equivalent circuit is shown in Figure 4.2.5–1.

4–91
TRNSYS 18 – Mathematical Reference

IL Rs
V
ID

Figure 4.2.5–1: Equivalent electrical circuit in the 4-parameter model

DETERMINING PERFORMANCE UNDER OPERATING CONDITIONS


The IV characteristics of a PV change with both insolation and temperature. The PV model employs these
environmental conditions along with the four module constants IL,ref, Io,ref, , and Rs to generate an IV curve
at each timestep.
The current-voltage equation of circuit shown in Figure 4.2.5–1 is as follows:
𝑞
𝐼 = 𝐼𝐿 − 𝐼𝑜 [𝑒𝑥𝑝 ( (𝑉 + 𝐼𝑅𝑠 )) − 1] Eq. 4.2.5-2
𝛾𝑘𝑇𝑐

Rs and  are constants. The photocurrent IL depends linearly on incident radiation:


𝐺𝑇
𝐼𝐿 = 𝐼𝐿,𝑟𝑒𝑓 Eq. 4.2.5-3
𝐺𝑇,𝑟𝑒𝑓
The reference insolation Gref is taken from Type103 parameter, which is nearly always defined as 1000
W/m2. The diode reverse saturation current Io is a temperature dependent quantity:
3
𝐼𝑜 𝑇𝑐
=( ) Eq. 4.2.5-4
𝐼𝑜,𝑟𝑒𝑓 𝑇𝑐,𝑟𝑒𝑓
Eq. 4.2.5-2 gives the current implicity as a function of voltage. Once Io and IL are found from Eq. 4.2.5-3
and Eq. 4.2.5-4, Newton’s method is employed to calculate the PV current. In addition, an iterative search
routine finds the current (Imp) and voltage (Vmp) at the point of maximum power along the IV curve.

CALCULATING IL,REF, IO,REF, , AND RS


The Type103 user-provided parameters include several values that must be read from manufacturers’ PV
module catalogs. The manufacturers’ values are used to determine the equivalent circuit characteristics
IL,ref, Io,ref, , and Rs which in turn define an equivalent circuit that is employed to find the PV performance at
each timestep as described in the previous section. This section describes the algebra and calculation
algorithms used to solve for the four equivalent circuit characteristics.
Three of these values, IL,ref, Io,ref, , may be isolated algebraically. The first step is to substitute the current
and voltage into Eq. 4.2.5-2 at the open-circuit, short circuit, and maximum power conditions:
𝑞 𝑉𝑜𝑐,𝑟𝑒𝑓
0 = 𝐼𝐿,𝑟𝑒𝑓 − 𝐼𝑜,𝑟𝑒𝑓 [𝑒𝑥𝑝 ( 𝑉𝑜𝑐,𝑟𝑒𝑓 ) − 1] − Eq. 4.2.5-5
𝛾𝑘𝑇𝑐,𝑟𝑒𝑓 𝑅𝑠ℎ
𝑞𝐼𝑠𝑐,𝑟𝑒𝑓 𝑅𝑠 𝐼𝑠𝑐,𝑟𝑒𝑓 𝑅𝑠
𝐼𝑠𝑐,𝑟𝑒𝑓 = 𝐼𝐿,𝑟𝑒𝑓 − 𝐼𝑜,𝑟𝑒𝑓 [𝑒𝑥𝑝 ( ) − 1] − Eq. 4.2.5-6
𝛾𝑘𝑇𝑐,𝑟𝑒𝑓 𝑅𝑠ℎ

𝑞 𝑉𝑚𝑝,𝑟𝑒𝑓 + 𝐼𝑚𝑝,𝑟𝑒𝑓 𝑅𝑠
𝐼𝑚𝑝,𝑟𝑒𝑓 = 𝐼𝐿,𝑟𝑒𝑓 − 𝐼𝑜,𝑟𝑒𝑓 [𝑒𝑥𝑝 ( (𝑉𝑚𝑝,𝑟𝑒𝑓 + 𝐼𝑚𝑝,𝑟𝑒𝑓 𝑅𝑠 )) − 1] − Eq. 4.2.5-7
𝛾𝑘𝑇𝑐,𝑟𝑒𝑓 𝑅𝑠ℎ

4–92
TRNSYS 18 – Mathematical Reference

In each case the “-1” term is may be dropped to simplify the algebra. This approximation has little influence
on the right side of the equations since because the magnitude of Io is very small, generally on the order of
10-6 A. Rearrangement then yields the following three expressions which isolate IL,ref, Io,ref, :
𝐼𝐿,𝑟𝑒𝑓 ≈ 𝐼𝑠𝑐,𝑟𝑒𝑓 Eq. 4.2.5-8

𝑞(𝑉𝑚𝑝,𝑟𝑒𝑓 − 𝑉𝑜𝑐,𝑟𝑒𝑓 + 𝐼𝑚𝑝,𝑟𝑒𝑓 𝑅𝑠 )


𝛾=
𝐼𝑚𝑝,𝑟𝑒𝑓 Eq. 4.2.5-9
𝑘𝑇𝑐,𝑟𝑒𝑓 ln (1 − )
𝐼𝑠𝑐,𝑟𝑒𝑓
𝐼𝑠𝑐,𝑟𝑒𝑓
𝐼𝑜,𝑟𝑒𝑓 =
𝑞𝑉𝑜𝑐,𝑟𝑒𝑓 Eq. 4.2.5-10
𝑒𝑥𝑝 ( )
𝛾𝑘𝑇𝑐,𝑟𝑒𝑓
At this point an additional equation is needed in order to determine the last unknown parameter. The fourth
equation is derived by taking the analytical derivative of voltage with respect to temperature at the reference
open-circuit condition. This analytical value is matched to the open-circuit temperature coefficient, a catalog
specification:
𝜕𝑉𝑜𝑐 𝛾𝑘 𝐼𝑠𝑐,𝑟𝑒𝑑 𝑇𝑐 𝜇𝑖𝑠𝑐 𝑞𝜀
= 𝜇𝑣𝑜𝑐 = [ln ( )+ − (3 + )]
𝜕𝑇𝑐 𝑞 𝐼𝑜,𝑟𝑒𝑓 𝐼𝑠𝑐,𝑟𝑒𝑓 𝐴𝑘𝑇𝑐,𝑟𝑒𝑓 Eq. 4.2.5-11
𝛾
where 𝐴 =
𝑁𝑠

Type103 uses an iterative search routine in these four equations to calculate the equivalent circuit
characteristics. The first step is to set upper and lower bounds for the series resistance parameter Rs:
physical constraints require the Rs value to lie between 0 and the value such that  = Ns. The initial guess
for Rs is midway between these bounds.  and Io,ref are found from Eq. 4.2.5-9 and Eq. 4.2.5-10, while Eq.
4.2.5-8 gives a trivial solution for IL,ref. Type103 then employs Eq. 4.2.5-11 to compare the analytical and
catalog values for voc. When all other variables are held constant, the analytical value for voc increases
monotonically with series resistance [Townsend, 1989]. A monotonicly increasing function is one that only
increases and never decreases. If the analytical voltage coefficient is less than the catalog value, the lower
bound for Rs is reset to the present guess value. Likewise, the upper bound is set to the present value if
the calculated voc is too large. After resetting the upper or lower bound for Rs, a new guess value is found
by averaging the bounds. This procedure repeats until Rs and  converge. Note that for IL,ref, Io,ref, , and Rs
are assumed to be constant and are calculated only on the first call in the simulation.

MODULE OPERATING TEMPERATURE (THERMAL MODEL)


Type103 uses temperature data from the standard NOCT (Nominal Operating Cell Temperature)
measurements to compute the module temperature Tc at each timestep. The NOCT temperature (Tc,NOCT)
is the operating temperature of the module with a wind speed of 1 m/s, no electrical load, and a certain
specified insolation and ambient temperature [Beckman and Duffie, 1991]. The values for insolation GT,NOCT
and ambient temperature Ta,NOCT are 800 W/m2 and 20º C. The NOCT conditions are hardcoded into
Type103 in order to simplify its data input. The user must specify the module’s cell temperature at NOCT
conditions. Type103 uses the NOCT data to determine the ratio of the module transmittance-reflectance
product to the module loss coefficient:
𝜏𝛼 𝑇𝑐,𝑁𝑂𝐶𝑇 − 𝑇𝑎,𝑁𝑂𝐶𝑇
= Eq. 4.2.5-12
𝑈𝐿 𝐺𝑇,𝑁𝑂𝐶𝑇
Assuming that this ratio is constant, the module temperature at any timestep is:
𝜂
1− 𝑐
𝑇𝑐 = 𝑇𝑎 + 𝜏𝛼
𝐺𝑇 𝜏𝛼 Eq. 4.2.5-13
𝑈𝐿
c is the convesion efficiency of the module, which varies with ambient conditions. The conversion efficiency
is defined as the output power of the PV divided by the solar radiation incident on the PV (with appropriate

4–93
TRNSYS 18 – Mathematical Reference

unit conversions so that the conversion efficiency is dimensionless and varies between 0 and 1). Tc,NOCT is
set as parameter 11 while  is computed from the incidence angle correlation described below.

INCIDENCE ANGLE MODIFIER CORRELATION


Type103 includes an “incidence angle modifier” routine that determines the transmittance-absorptance
product () of the module at each timestep. This calculation is based on the module slope and the angle
of incidence and intensity of each radiation component (direct, diffuse, and ground-reflected).  at normal
incidence is assumed to have a value of 0.95.
The radiation incident on the PV is multiplied by  to account for reflective losses before Eq. 4.2.5-3 is
used to determine the photocurrent. The expression for the incidence angle modifier, taken from King et. al
[1997] is:
𝐼𝐴𝑀 = 1 − 1.098𝑥10−4 𝜃 − 6.267𝑥10−6 𝜃 2 + 6.583𝑥10−7 𝜃 3 − 1.4272𝑥10−8 𝜃 4 Eq. 4.2.5-14

where
𝜏𝛼
𝐼𝐴𝑀 ≡ Eq. 4.2.5-15
𝜏𝛼𝑛𝑜𝑟𝑚𝑎𝑙
Here,  is the angle of incidence in degrees, with = 0 indicating normal incidence. Figure 4.2.5–2 plots
IAM as a function of .

1.1

1
Incidence Angle Modifier

0.9

0.8

0.7

0.6

0.5
0 10 20 30 40 50 60 70 80 90
Angle of Incidence [Degrees]

Figure 4.2.5–2: Incidence Modifier Angle of King et al., [1997]


The angle of incidence for the beam component of the solar radiation is obtained directly as an output from
one of the TRNSYS weather processing component. However, the weather processing components
typically do not calculate effective angles of incidence for the diffuse and ground-reflected radiation
components. Type103 uses two additional correlations to find these effective angles of incidence. These
correlations, developed by Duffie and Beckman [1991], are:
𝜃𝑒𝑓𝑓,𝑑𝑖𝑓𝑓 = 59.567 − 9.123𝑥10−2 𝛽 − 5.424𝑥10−4 𝛽 2 + 3.216𝑥10−5 𝛽 3 − 1.7𝑥10−7 𝛽 4 Eq. 4.2.5-16
−1 −3 2 −5 3 −8 4
𝜃𝑒𝑓𝑓.𝑔𝑛𝑑 = 90.032 − 6.615𝑥10 𝛽 + 4.796𝑥10 𝛽 − 1.543𝑥10 𝛽 + 2.000𝑥10 𝛽 Eq. 4.2.5-17

 is the slope of the PV array in degrees. The total insolation on the array is found by summing the individual
radiation components and multiplying them by their appropriate incidence angle modifiers:
𝐺𝑇,𝑒𝑓𝑓 = 𝜏𝛼𝑛𝑜𝑟𝑚𝑎𝑙 (𝐺𝑇,𝑏𝑒𝑎𝑚 𝐼𝐴𝑀𝑏𝑒𝑎𝑚 + 𝐺𝑇,𝑑𝑖𝑓𝑓 𝐼𝐴𝑀𝑑𝑖𝑓𝑓 + 𝐺𝑇,𝑔𝑛𝑑 𝐼𝐴𝑀𝑔𝑛𝑑 ) Eq. 4.2.5-18

MULTI-MODULE ARRAYS

4–94
TRNSYS 18 – Mathematical Reference

The electrical calculations discussed PV model deal only with a single module. Type103 may be used to
simulate arrays with any number of modules. TRNSYS parameters 13 and 14 define the number of modules
in series (NS) and modules in parallel (NP) for the entire array. The total number of modules in the array is
the product of NS and NP. When simulating a single module only, both NS and NP are set to 1. The single-
module values for all currents and voltages discussed here above are multiplied by NP or NS to find values
for the entire array. This approach neglects module mismatch losses.

CONVERGENCE ISSUES FOR VARIOUS APPLICATIONS


Type103 may be used in direct-coupled systems in which the PV array is connected directly to a load or is
linked to a battery. In both of these applications, system performance at each timestep depends on the
point of intersection between the IV curves of the photovoltaic array and the load or battery.
Eckstein [1990] has shown that in direct coupled systems the normal TRNSYS equation solvers sometimes
fail to converge on the point of intersection between the PV array and load. He developed an alternative
“convergence promoting algorithm,” contained in Type103, for applications in which the PV array is
connected directly to a pump motor or other load. This algorithm uses a bisection search method to find the
point at which the voltages of the PV and load are equal. It differs significantly from the standard “modified
Euler” sequential substitution method TRNSYS employs to solve the system of equations produced by
linking component outputs and inputs. The convergence promoting algorithm is activated by setting
parameter 1 to a value of 0 and by setting the value of input 8 to a value of 1. In this mode, Type103 also
required that the user provide the voltage at which the system of the PV and load will operate.
The alternative convergence promotion algorithm should always be disabled when the PV is charging a
battery or when using a deck employing a TRNSYS ACCELERATE statement (See Volume 07 for more
details on the ACCELERATE statement). In some systems, a controller component may direct the PV array
to charge a battery at some times and to connect directly to a load at others. In this case, it is necessary
for the controller to have an OUTPUT flag which may be connected to Type103 input 8. Such a scheme
will activate and deactivate convergence promotion appropriately.
Many applications employ maximum power point tracking (MPPT) devices which force the PV array to
operate at the point of maximum power along its IV curve. MPPTs are generally included in all grid-
interactive inverters.

4.2.5.6. References
1. Duffie, John A. and William A. Beckman. Solar Engineering of Thermal Processes. Second Edition.
New York: John Wiley & Sons, Inc., 1991.
2. Duffie, John A. and William A. Beckman. Solar Engineering of Thermal Processes. Third Edition.
New York: John Wiley & Sons, Inc., 2006.
3. Eckstein, Jürgen Helmut. Detailed Modeling of Photovoltaic Components. M. S. Thesis – Solar
Energy Laboratory, University of Wisconsin, Madison: 1990.
4. Fry, Bryan. Simulation of Grid-Tied Building Integrated Photovoltaic Systems. M. S. Thesis – Solar
Energy Laboratory, University of Wisconsin, Madison: 1999.
5. King, David L., Jay A. Kratochvil, and William E. Boyson. “Measuring the Solar Spectral and Angle-
of-Incidence Effects on Photovoltaic Modules and Irradiance Sensors.” Proceedings of the 1994
IEEE Photovoltaics Specialists Conference. Sept 30-Oct 3, 1997. pp. 1113-1116.
6. Townsend, Timothy U. A Method for Estimating the Long-Term Performance of Direct-Coupled
Photovoltaic Systems. M. S. Thesis – Solar Energy Laboratory, University of Wisconsin, Madison:
1989.

4–95
TRNSYS 18 – Mathematical Reference

4.2.6. Type 105: MiniGrid Controller


Type 105 is a master level controller for a stand-alone power system that consists of wind turbines (or
another source of renewable power), an electrolyzer, a fuel cell, a Hydrogen storage device and Diesel
Engine Generator Sets (or another auxiliary power source that consists of multiple units).
In the following, WECS is used to refer to the wind turbine(s) and DEGS is used to refer to Diesel Engine
Generator Sets. The reader should keep in mind that both systems can be replaced with other components
that have similar properties as far as the controller is concerned.

4.2.6.1. Parameter/Input/Output Reference


PARAMETERS

1 Minimum number of [-] Minimum allowable number of DEGS in operation


DEGS in operation

2 Maximum number of [-] Maximum allowable number of DEGS in operation


DEGS in operation

3 DEGS rated power [W] Rated power of each DEGS

4 Fuel cell idling power [W] Fuel cell idling power

5 Rated fuel cell power [W] Rated fuel cell power

6 Electrolyzer idling [W] Electrolyzer idling power


power

7 Rated electrolyzer [W] Rated electrolyzer power


power

8 Upper limit on H2 [%] The H2 tank SOC limit at which the electrolyzer will be switched
storage (electrolyzer) to idle mode.

9 Lower limit on H2 [%] Lower SOC limit (H2-storage), i.e., ELY switched ON after
storage (electrolyzer) having been idling

10 Upper limit on H2 [%] Upper SOC limit (H2-storage), i.e., FC switched ON after having
storage (fuel cell) been idling

11 Lower limit on H2 [%] Lower SOC limit (H2-storage), i.e., FC switched OFF (idle)
storage (fuel cell)

INPUTS

1 Load power [W] Power demand (user load)

2 Input power [W] Power from WECS, PV or other source.

3 Hydrogen storage SOC [0..1] State of Charge (H2-storage)

OUTPUTS

1 Electrolyzer power [W] Power that is available to electrolyzer

4–96
TRNSYS 18 – Mathematical Reference

2 Fuel cell power [W] Power that is required from fuel cell

3 Total power from [W] Total power that is required from DEGS
DEGS

4 Power from one DEG [W] Power that is required from one single diesel engine generator

5 Number of DEGS [-] Total number of identical DEGS that are required in to operate in
parallel.

6 Dumped power [W] Power dumped (from the busbar)

7 Electrolyzer control [-] Electrolyzer control state (0=OFF, 1=ON)


signal

8 Fuel cell control signal [-] Fuel Cell control state (0=OFF, 1=ON)

4.2.6.2. Simulation Summary Report Contents


VALUE FIELDS

Minimum number of [-] Parameter 1


DEGs that can operate

Maximum number of [-] Parameter 2


DEGs that can operate

Storage volume at [%] Parameter 8


which the electrolyzer
must turn off

Storage volume at [%] Parameter 9


which the electrolyzer
must turn on

Storage volume at [%] Parameter 10


which the fuel cell can
turn on

Storage volume at [%] Parameter 11


which the fuel cell must
turn off

4.2.6.3. Hints and Tips


 It is assumed DEGS can only operate at PDEGS,max or be switched off.
 It is important to realize that the action from the controller is to calculate a power setpoint for the
controlled components (in addition to the number of DEGS in operation). The power setpoint for
the fuel cell and the electrolyzer should be connected to power conditioning devices (Type 175)
which are connected to the electrolyzer and the fuel cell. The controller also has "switch" outputs
that are used for numerical reasons, but those outputs should not be connected to the electrolyzer
and fuel cell. Please study the example of Stand-Alone Power System to make sure you understand
the operation of Type 105.

4–97
TRNSYS 18 – Mathematical Reference

4.2.6.4. Nomenclature
PWECS [W] Power generated by the WECS
PDEGS,max [W] Rated Power generated by one DEGS
PDEGS,set [W] Power setpoint for each DEGS
NDEGS [-] Number of DEGS operating at fixed power
NDEGS,min [-] Minimum number of DEGS operating at any time
NDEGS,max [-] Maximum number of DEGS operating at any time
PFC,min [W] Minimum (idling) Power of the Fuel Cell
PFC,max [W] Rated Power of the Fuel Cell
PFC,set [W] Power setpoint for the Fuel Cell
PEly,min [W] Minimum (idling) Power of the Electrolyzer
PEly,max [W] Rated Power of the Electrolyzer
PEly,set [W] Power setpoint for the Electrolyzer
PLoad [W] Power to the load
Pdump [W] Dumped Power
Pbusbar [W] Power balance on the mini-grid bus bar
SOC [-] State Of Charge of the energy storage
ELlow [-] State Of Charge for which the Electrolyzer is switched ON
ELup [-] State Of Charge for which the Electrolyzer is switched OFF
FClow [-] State Of Charge for which the Fuel Cell is switched OFF
FCup [-] State Of Charge for which the Fuel Cell is switched ON

4.2.6.5. Detailed Description


The controller makes decisions based on the mini-grid bus bar power balance, assuming that the minimum
number of DEGS is operating and that the Fuel Cell and Electrolyzer are idling:
Pbusbar = PWECS + NDEGS,min PDEGS,max + PFC,min - PLoad – PEly,min Eq. 4.2.6-1

EXCESS POWER (PBUSBAR > 0 IN ERROR! REFERENCE SOURCE NOT FOUND.)


1. Electrolyzer status
 If the electrolyzer is currently OFF (Idling):
 If SOC < ELlow, switch ON:
Operate with Pely,set = PWECS + NDEGS,min PDEGS,max + PFC,min - PLoad
 Else, remain OFF (Idling)
 Else (electrolyzer is currently ON):
 If SOC > ELup, switch OFF (Idling)
 Else, keep operating and Pely,set = PWECS + NDEGS,min PDEGS,max + PFC,min - PLoad
 Constraints on PEly,set: If PEly,set > PEly,max then PEly,set = PEly,max
2. Dump

4–98
TRNSYS 18 – Mathematical Reference

 If PEly,max was reached: Pdump = PWECS + NDEGS,min PDEGS,max + PFC,min - PLoad – PEly,set

POWER DEFICIT (PBUSBAR < 0 IN ERROR! REFERENCE SOURCE NOT FOUND.)


1. Switch off fuel cell if necessary, based on the H2 storage tank level
 Switch Fuel cell to idling mode if the fuel cell is currently ON and SOC < FC low
 Keep idling if the fuel cell is currently OFF and SOC  FCup
2. DEGS, Electrolyzer and Dump
 If the fuel cell is currently OFF (idling):
 Find NDEGS, the minimum number of operating DEGS that generates a power excess, assuming
the electrolyzer is idling. NDEGS is the minimum value for which
( PWECS + N PDEGS,max + PFC,min - PLoad – PEly,min )  0
 Electrolyzer operates at PEly,set = PWECS + N PDEGS,max + PFC,min - PLoad
 No dumped power: PDump = 0
 Else (the fuel cell is currently ON):
 Find NDEGS, the minimum number of operating DEGS that generates a power excess, assuming
the electrolyzer is idling and the fuel cell is at maximum power. NDEGS is the minimum value for
which
( PWECS + N PDEGS,max + PFC,max - PLoad – PEly,min )  0
 Assume electrolyzer is idling
 Set Fuel cell power:
 PFC,set = PLoad + PEly,min - PWECS - N PDEGS,max
 If PFC,set < PFC,min then impose PFC,set = PFC,min
 Set Electrolyzer power to use all power that would be dumped:
 PEly,set = PWECS + N PDEGS,max + PFC,max - PLoad

4–99
TRNSYS 18 – Mathematical Reference

4.2.7. Type 120: Internal Combustion Engine / Generator


Type120 is a mathematical model for a diesel engine generator set (DEGS). The model is based on an
empirical relation (1st order polynomial) for the fuel consumption expressed as a function of the electrical
power output (normalized). Electrical and fuel efficiencies are both calculated. This Type can be run in one
of two modes (generic or specific). The generic model extrapolates from a reference fuel efficiency curve
(average of 5 different DEGS and incorporates a correction factor derived from actual data measurements
on DEGS for 20 remote area power systems (RAPS) with average operating powers in the range 5-186 kW
(Lloyd, 1999). The default fuel is diesel (liquid), but a database with fuel properties (Adler et al., 1986;
McCarthy, 1982) included, making it possible to calculate the equivalent fuel flow rates (liquid or gas) for 5
alternative fuels: liquefied gas (LPG), propane (C 3H8), methane (CH4), natural gas, or hydrogen (H2). The
specific model can be is used to predict the performance of a specific DEGS provided a fuel consumption
curve is supplied.

4.2.7.1. Parameter/Input/Output Reference


PARMAETERS

1 DEGS mode [-] 1 = Generic Model, 2 = Specific DEGS

2 DEGS fuel type [-] 1 = Diesel, 2 = LPG, 3 = Propane, 4 = Methane, 5 = Natural gas,
6 = Hydrogen

3 Maximum DEGS [kW] Maximum allowable power. Usually 20% above rated power.
power

4 Minimum DEGS power [kW] Minimum allowable power. For a single DEGS placed in parallel
with many DEGSs, this value is usually about 40% of rated
power

If DEGS Mode (parameter 1) = 1

5 Rated power [kW] Rated power in kW

If DEGS Mode (parameter 1) = 2

5 DEGS index [-] A value corresponding to the index number of the specific DEGS
being used (see data file for details)

6 Logical unit for data file [-] Logical Unit identifier for external file

INPUTS

1 DEGS on/off switch [-] ON/OFF-switch for the DEGS (1 = ON, 0 = OFF)

2 Power set point [W] Power set point for one single DEGS (signal from DEGS
controller)

3 Number of units [-] Number of identical units in operation.


operating

OUTPUTS

1 Power output [W] Total power output

4–100
TRNSYS 18 – Mathematical Reference

2 Liquid fuel [l/hr] Total liquid fuel consumption rate


consumption rate

3 Gas fuel consumption [Nm3/h}: Total gas fuel consumption rate


rate

4 Fuel efficiency [kWh/L] The power produced per unit volume of fuel consumed.

5 Electrical efficiency [-] Electrical efficiency

6 Waste heat [W] Total waste heat

7 Unmet load [W] If the DEGS was unable to meet its set point power due to
capacity limitations then this output will be set to the amount of
power that the DEGS was unable to provide.

4.2.7.2. Simulation Summary Report Contents


VALUE FIELDS

Rated Power [kW] Rated power specified in the external file.

Minimum Turndown [0..1] Parameter 3 divided by the DEGs rated power


Ratio

Maximum turnup Ratio [0..1] Parmaeter 4 divided by the DEGs rated power

“A” Coefficient Value [L/h] The value of the “A” coefficient that relates normalized power to fuel
consumption as specified in the external file.

“B” Doefficient Value [L/h] The value of the “B” coefficient that relates normalized power to fuel
consumption as specified in the external file.

TEXT FIELDS

DEGs Type n/a “Generic” or “Specific” DEGs as set by Parameter 1

Fuel Type n/a The type of fuel consumed by the DEGs based on the value of
Parameter 2

INTEGRATED VALUE FIELDS

Energy delivered [kWh] Output 1

Thermal Energy Loss [kJ] Output 6

Liquid Fuel Consumed [L] Output 2

Gas Fuel Consumed [Nm3] Output 3

Unmet Load [kWh] Output 7

MINIMUM/MAXIMUM VALUE FIELDS

4–101
TRNSYS 18 – Mathematical Reference

Fuel Efficiency [kWh/L] Output 4

Electrical Efficiency [0..1] Output 5

Number of Units ON [-] Output 3

Power Setpoint [W] Output 2

4.2.7.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.2.7.4. Nomenclature
PDEGS [W] DEGS Rated Electrical Power
PDEGS,rated [W] DEGS Rated Electrical Power
NDEGS [-] Number of identical DEGS units
X [-] Normalized power

V [m³/s] Fuel volumetric flowrate

 [kg/m³] Fuel density


LHV [J/kg] Lower Heating Value of the fuel

4.2.7.5. Detailed Description


Type 120 is a mathematical model for a diesel engine generator set (DEGS). The model is based on an
empirical relation (1st order polynomial) for the fuel consumption expressed as a function of the electrical
power output (normalized). Electrical and fuel efficiencies are both calculated. The model can simulate a
number of identical DEGS units.
Type 120 can be used to predict the performance of a specific DEGS, provided a fuel consumption curve
is supplied. Alternatively, a generic model can be used to predict the performance of any DEGS in the
power range 5-500 kW.
The generic model extrapolates from a reference fuel efficiency curve (average of 5 different DEGS). The
generic model incorporates a correction factor derived from actual data measurements on DEGS for 20
remote area power systems (RAPS) with average operating powers in the range 5-186 kW [1].
The default fuel is diesel (liquid), but a database with fuel properties [2,3] included in Type120 make it
possible to calculate the equivalent fuel flow rates (liquid or gas) for 5 alternative fuels: liquefied gas (LPG),
propane (C3H8), methane (CH4), natural gas, or hydrogen (H2). In the following, "diesel" is used to refer to
the fuel.
Figure 4.2.7–1 shows an example of typical fuel efficiency and fuel consumption curves for Diesel Engine
Generator Sets.

4–102
TRNSYS 18 – Mathematical Reference

45 3.5

Fuel efficiency [kWh/L]


Fuel consumption [L/h]
40
3
35
2.5
30

25 2

20
1.5
15
Fuel Efficiency
Fuel Consumption
1
10

0.2 0.4 0.6 0.8 1

Power/Rated Power
Figure 4.2.7–1: Typical fuel efficiency and fuel consumption curves for DEGS

ELECTRIC MODEL
The normalized power is defined as:
𝑃𝐷𝐸𝐺𝑆
𝑋= Eq. 4.2.7-1
𝑃𝐷𝐸𝐺𝑆,𝑟𝑎𝑡𝑒𝑑
The electrical efficiency is:
𝑃𝐷𝐸𝐺𝑆
𝜂𝑒𝑙 = Eq. 4.2.7-2
̇
𝜌𝑑𝑖𝑒𝑠𝑒𝑙 𝑉𝑑𝑖𝑒𝑠𝑒𝑙 𝐿𝐻𝑉𝑑𝑖𝑒𝑠𝑒𝑙
The total power output is:
𝑃𝑡𝑜𝑡𝑎𝑙 = 𝑁𝐷𝐸𝐺𝑆 𝑃𝐷𝐸𝐺𝑆 Eq. 4.2.7-3

FUEL CONSUMPTION
The fuel consumption is given as a curve fit:
̇
𝑉𝑑𝑖𝑒𝑠𝑒𝑙 = 𝑎 + 𝑏𝑋 Eq. 4.2.7-4

The fuel efficiency is:


𝑃𝐷𝐸𝐺𝑆
𝜂𝑓𝑢𝑒𝑙 = Eq. 4.2.7-5
̇
𝑉𝑑𝑖𝑒𝑠𝑒𝑙
And the total fuel consumption is:
̇
𝑉𝑡𝑜𝑡𝑎𝑙 ̇
= 𝑁𝐷𝐸𝐺𝑆 𝑉𝑑𝑖𝑒𝑠𝑒𝑙 Eq. 4.2.7-6

THERMAL MODEL
Total Thermal losses (wasted energy):
100 − 𝜂𝑒𝑙
𝑄𝑤𝑎𝑠𝑡𝑒 = 𝑁𝐷𝐸𝐺𝑆 𝑃𝐷𝐸𝐺𝑆 Eq. 4.2.7-7
𝜂𝑒𝑙

EXTERNAL DATA FILE


Type120 optionally reads a fuel consumption curve from a data file. An example is provided in
"Examples\Data Files". The data file should have the following information:
<Nb of DEGS>

4–103
TRNSYS 18 – Mathematical Reference

<No of the DEGS>, <Name of DEGS> For each DEGS


<Rated power> <coefficient A [l/h]> <coefficient B [l/h]>

EXAMPLE
3
1,Generic Model Reference Curve (40 kW) (DEGS2.EES)
40.0 2.0780 9.2521
2,Volvo Penta D 100 B Gen Set (72 kW) (Neumann, 1987)
72.0 4.2419 16.4926
3,MAN Diesel-Motor D 0224 ME (32 kW) (Pryor, 2001)
32.0 1.2945 7.4180

4.2.7.6. References
1. Lloyd C. R. (1999) Assessment of diesel use in remote area power supply. Internal report prepared
for the Australian Greenhouse Office, Energy Strategies, Canberra.
2. Adler U., Bauer H., Bazlen W., Dinkler F. and Herwerth M. (Eds) (1986) Automotive Handbook.
2nd edn, Robert Bosch GmbH, Stuttgart.
3. McCarthy R. D. (1982) Mathematical models for the prediction of liquefied-natural-gas densities.
Thermophysical Properties Division, National Bureau of Standards, USA.

4–104
TRNSYS 18 – Mathematical Reference

4.2.8. Type 175: Power Conditioning


Type175 is a mathematical model for a power conditioning unit. The model is based on empirical efficiency
curves for electrical converters (DC/DC) or inverters (DC/AC or AC/DC). The empirical relationship used in
Type 175 was first proposed by [1] and further improved by [2]. The model is in agreement with related
literature [3]. The Type can operate in one of two modes. In mode 1 it is assumed that the available input
power is known. Corresponding output power is calculated. In mode 2 it is assumed that the required output
power is known. Corresponding input power is calculated.

4.2.8.1. Parameter/Input/Output Reference


PARMAETERS

1 Mode [-] In mode 1 available input power is known and specified as input
3. In mode 2 required output power is known and specified as
input 3.

2 Nominal power [W] Nominal power

3 Idling constant [-] The ratio between constant power loss (P0) and nominal power
(Pn).

4 Set point voltage [V] Set point voltage

5 Ohmic constant [V2] Product of internal resistance (Ri) and nominal power (Pn)

6 Number of units in [-] Number of units in parallel


parallel

7 Parasitic power [W] Auxiliary power requirement

INPUTS

1 Input voltage [V] Input voltage

2 Output voltage [V] Output voltage

If Mode (parameter 1) = 1

3 Input power [W] Power available at the input terminals of the power converter.

If Mode (parameter 1) = 2

3 Required power [W] Power required at the output terminals of the power converter.

OUTPUTS

1 Output voltage [V] Voltage output

2 Output current [A] Current output

3 Output power [W] Power output

4 Efficiency [-] Efficiency

4–105
TRNSYS 18 – Mathematical Reference

5 Input voltage [V] Voltage input

6 Input current [A] Current input

7 Input power [W] Power input

8 Power losses [W] Power losses

9 Auxiliary power [W] Auxiliary power

4.2.8.2. Simulation Summary Report Contents


VALUE FIELDS

Nominal power [kW] Parameter 2

Idling constant [-] Parameter 3

Operating output [V] Parameter 4


voltage setpoint

Ohmic constant [V2] Parameter 5

Numboer if units in [-] Parameter 6


parallel

Parasitic power [kW] Parameter 7

TEXT FIELDS

Converter type n/a In mode 1: “known input power” in mode 2 “known output power”

INTEGRATED VALUE FIELDS

Energy delivered [kWh] Output 3

Energy loss [kWh] Output 8

Auxiliary energy [kWh] Output 9


required

MINIMUM/MAXIMUM VALUE FIELDS

Input voltage [V] Output 5

Output voltage [V] Output 1

Efficiency [0..1] Output 4

4.2.8.3. Hints and Tips


Type175 is also described in an EES-based executable program distributed with
TRNSYS: %TRNSYS18%\Documentation\HydrogenSystemsDocumentation.exe

4–106
TRNSYS 18 – Mathematical Reference

4.2.8.4. Nomenclature
Pin [W] Power entering the conditioner
Pout [W] Power leaving the conditioner
Ploss [W] Power losses of the conditioner
P0 [W] Idling power
Pn [W] Nominal (rated) power
Us [V] Setpoint voltage
Uout [V] Output voltage
Ri [] Internal resistance
Ripn [V²] Internal resistance constant = Ri Pn
 [-] Electric efficiency
Iout [A] Output current

4.2.8.5. Detailed Description


The power conditioner can have either output or Input power as Input for the calculations (output if the
system is connected to a load, or Input if the system is connected to an electric power source). MODE=1
indicates that the power source is known, while MODE=2 indicates it is an output.
Power conditioners are devices that can invert DC power to AC power, and/or vice versa, or they function
as DC/DCconverters. In a Stand Alone Power Systems (SAPS) consisting of both DC power producing and
DC power consuming components, DC/DCconverters are sometimes needed to transfer DC power from
one voltage to another. This is particularly true if there is a large mismatch between the I-U characteristics
of the various components.
In a SAPS based on a natural energy source, such as solar or wind energy, the system Input power varies
continuously with time. The output characteristics of a PV array, wind turbine, or hydro turbine (run off river)
have peak power points that depend on solar insolation and cell temperature, wind speeds, and water flow
rates, respectively. Therefore, it may be advantageous to use a maximum power point tracker (MPPT) to
utilize the Input power source to its fullest capability [3].
The power loss (Ploss) for a power conditioner is mainly dependent on the electrical current running through
it. Laukamp, [1], proposed a three-parameter expression to describe the power loss for a power conditioner:
𝑃𝑙𝑜𝑠𝑠 = 𝑃𝑖𝑛 − 𝑃𝑜𝑢𝑡 Eq. 4.2.8-1
𝑈𝑠 𝑅𝑖𝑝𝑛
𝑃𝑖𝑛 − 𝑃𝑜𝑢𝑡 = 𝑃0 + 𝑃𝑜𝑢𝑡 + 𝑃𝑜𝑢𝑡 2 Eq 4.2.8-1
𝑈𝑜𝑢𝑡 𝑈𝑜𝑢𝑡 2
A convenient relationship between the Input power Pin and output power Pout can be derived by normalizing
Eq 4.2.8-1 with respect to the nominal (maximum) power P n of the power conditioner:
𝑃𝑖𝑛 𝑃0 𝑈𝑠 𝑃𝑜𝑢𝑡 𝑅𝑖𝑝𝑛 𝑃𝑜𝑢𝑡 2
= + (1 + ) + 𝑃 ( ) Eq 4.2.8-2
𝑃𝑛𝑜𝑚 𝑃𝑛𝑜𝑚 𝑈𝑜𝑢𝑡 𝑃𝑛𝑜𝑚 𝑈𝑜𝑢𝑡 2 𝑛𝑜𝑚 𝑃𝑛𝑜𝑚
In Type 175, either the Input power Pin or the output power Pout can be specified as Inputs. If Pout is Input,
then Eq 4.2.8-2 is used directly. However, if Pin is Input, then an expression analytically derived from Eqn.3
is used. This makes the model numerically very robust. The efficiency of the power conditioner is simply:
Electric efficiency:

4–107
TRNSYS 18 – Mathematical Reference

𝑃𝑜𝑢𝑡
𝜂= Eq 4.2.8-3
𝑃𝑖𝑛
Current ouput:
𝑃𝑜𝑢𝑡
𝐼𝑜𝑢𝑡 = Eq 4.2.8-4
𝑈𝑜𝑢𝑡

4.2.8.6. References
1. Laukamp H. (1988) Inverter for photovoltaic systems (in German). User-written TRNSYS source
code., FraunhoferInstitute für Solare Energiesysteme, Freiburg im Breisgau, Germany.
2. Ulleberg Ø. (1998) Stand-Alone Power Systems for the Future: Optimal Design, Operation &
Control of Solar-Hydrogen Energy Systems. PhD thesis, Norwegian University of Science and
Technology, Trondheim.
3. Snyman D. B. and Enslin J. H. R. (1993) An experimental evaluation of MPPT converter topologies
for PV installations. Renewable Energy 3 (8), 841-848.

4–108
TRNSYS 18 – Mathematical Reference

4.2.9. Type 185: Advanced Lead Acid Battery with Gassing


Effects
Type185 is a quasi-static mathematical model of lead-acid battery, or Pb-accumulator. The model uses a
simple equivalent circuit that relates the electrical currents, voltages, resistance (related to the
concentration-overvoltage), and capacity. The main features of the model include gassing current losses,
polarization effects (during charging and discharging), and calculation of equilibrium voltage at various
states of charge [1, 2].
This model 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.

4.2.9.1. Parameter/Input/Output Reference


PARMAETERS

1 Nominal battery [Ah] Nominal (rated) capacity of battery


capacity

2 Number of cells in [-] Number of cells in series.


series

If battery data is read from an external file

3 Battery ID [-] Type of battery (identifier number in external file)

4 Logical Unit for data [-] Logical unit for external battery parameter file
file

If battery data is provided as parameters

3 Gassing current [-] The value of g0 in the algorithm that calculates the gassing
constant g0 current. Refer to the Mathematical Reference manual for the
equation.

4 Gassing current [V] The value of g1 in the algorithm that calculates the gassing
constant g1 current. Refer to the Mathematical Reference manual for the
equation.

5 Gassing current [K] The value of g2 in the algorithm that calculates the gassing
constant g2 current. Refer to the Mathematical Reference manual for the
equation.

6 Equilibrium cell voltage [V] The equilibrium cell voltage when the battery's state of charge is
at SOC=0 zero.

7 Equilibrium cell voltage [-] The rate at which the equilibrium cell voltage changes as the
gradient state of charge increases. Units are V/dec (volts per 10%
increase in SOC.)

8 Parameter for [-}: The value Uch in the overvoltage during charging algorithm.
overvoltage during Refer to the Mathematical Reference manual for the equation.
charging

4–109
TRNSYS 18 – Mathematical Reference

9 Parameter for [-] The value Udch in the overvoltage discharging algorithm. Refer
overvoltage during to the Mathematical Reference manual for the equation.
discharging

10 Discharge overvoltage [-] The value bdchg in the overvoltage discharging algorithm. Refer
constant bdch to the Mathematical Reference manual for the equation.

11 Discharge overvoltage [-] The value cdchg in the overvoltage discharging algorithm. Refer
constant cdch to the Mathematical Reference manual for the equation.

12 Parameter g100 for [-] The value g100 in the overvoltage at full state of charge. Refer
overvoltage at to the Mathematical Reference manual for the equation.
SOC=100

13 Parameter k100 for [-] The value k100 in the overvoltage at full state of charge
overvoltage at algorithm. Refer to the Mathematical Reference manual for the
SOC=100 equation.

INPUTS

1 Charging / discharging [A] Total current in/out of battery. Charging = positive (+) current;
current Discharging = negative (-) current

2 Battery temperature [C] Battery temperature. All cells in a battery are assumed to hold
the same temperature.

3 Initial state of charge [%] The battery’s state of charge (0-100%) at the start of the
simulation.

OUTPUTS

1 Terminal voltage [V] Voltage across battery terminals.

2 State of charge [%] State of Charge in percent (%).

3 Battery capacity [Ah] Capacity of battery after charge/discharge

4 Equilibrium cell voltage [V] Equilibrium (resting) cell voltage.

5 Polarization cell [V] Polarization cell voltage.


voltage

6 Cell gassing current [A] Gassing current per cell.

7 Gassing power [W] Power dissipated as a result of gassing.

8 Charging current [A] The battery charging current set equal to positive values of the
input charging current. This output is set to zero if the input
charging current is negative.

9 Charging power [W] The battery charging power is set equal to positive values of the
input charging current times the battery terminal voltage. This
output is set to zero if the input charging current is negative.

4–110
TRNSYS 18 – Mathematical Reference

10 Discharging current [A] The battery charging current set equal to negative values of the
input charging current. This output is set to zero if the input
charging current is positive.

11 Discharging power [W] The battery discharging power is set equal to negative values of
the input charging current multiplied by the battery terminal
voltage. This output is set to zero if the input charging current is
positive.

12 Dumped current [A ]

13 Auxiliary current [A] Auxiliary current required to prevent complete undercharging of


the battery.

4.2.9.2. Simulation Summary Report Contents


VALUE FIELDS

Battery capacity [Ah] Parameter 1

INTEGRATED VALUE FIELDS

Energy into the battery [kWh] Output 9

Energy out of the [kWh] Output 11


battery

Excess (dumped) input [kWh] Output 12*Output 1


energy

Auxiliary energy [kWh] Output 13*Output 1


required

MINIMUM/MAXIMUM VALUE FIELDS

State of charge [%] Output 2

Terminal voltage [V] Output 1

4.2.9.3. Hints and Tips


 Type185 is also described in an EES-based executable program distributed with
TRNSYS: %TRNSYS17%\Documentation\HydrogenSystemsDocumentation.exe

4.2.9.4. Detailed Description


A secondary lead-acid battery, or Pb-accumulator, is an electrochemical device that can transform electrical
energy into stored chemical energy (charge) and by reversing the process, release the energy again
(discharge). In a lead-acid battery this is mainly possible due to the transfer of lead ions to and from the
electrodes.
Figure 4.2.9–1 shows an example of typical current – voltage curves for lead-acid batteries.

4–111
TRNSYS 18 – Mathematical Reference

270
Discharging Charging
260
Ubat [V]
250

240

230

220
SOC = 0 - 100 %

210
-80 -60 -40 -20 0 20 40 60 80

Ibat [A]
Figure 4.2.9–1: Typical current-voltage curves for a lead-acid battery

CHEMICAL REACTIONS
At discharge (the direction of the chemical reactions described below are for discharge, unless stated
otherwise), the total reaction for the lead-acid battery is:
Pb + PbO2 + 2 H2SO4  2 PbSO4 + 2 H2O Eq. 4.2.9-1

In reality, this discharge reaction (Eq. 4.2.9-1) is the sum of the reactions occurring at the negative and
positive electrodes. The basic charge transfer reactions and the complete reactions taking place at the
electrodes during discharging of a lead battery with sulfuric acid (H2SO4) as electrolyte.
Anode: Pb + HSO4-  PbSO4 + 2 e- + H+ Eq. 4.2.9-2

Cathode: PbO2 + HSO4- + 2 e- + 3 H+  PbSO4 + 2 H2O Eq. 4.2.9-3

During discharging, lead ions (Pb2+) are dissolved at the negative electrode, and a corresponding number
of electrons (2e-) are removed from the electrode as negative charge. Due to the limited solubility of Pb 2+
ions in sulfuric acid (H2SO4), the dissolved ions form lead sulfates (PbSO4) on the electrode. This occurs
immediately after the dissolution process.
The discharging process at the positive electrode proceeds in a similar manner. That is, Pb 2+ ions are
formed by Pb4+ ions by adding a negative charge (2e-). These lead ions are dissolved immediately to form
lead sulfate (PbSO4). In addition, water (H2O) is formed at the positive electrode during discharging,
because oxygen ions (O2-) are released from the lead dioxide (PbO 2) and they combine with the protons
(H+) of the sulfuric acid.

VOLTAGE MODEL
In a battery that consists of several cells in series the individual cell U cell voltage is simply the terminal
voltage Ubat = ncells Ucell, where ncells is the number of cells in series. The cell voltage Ucell is found by adding
the equilibrium voltage Uequ and the polarization voltage Upol.
𝑈𝑐𝑒𝑙𝑙 = 𝑈𝑒𝑞 + 𝑈𝑝𝑜𝑙 Eq. 4.2.9-4

4–112
TRNSYS 18 – Mathematical Reference

The equilibrium voltage is defined as the resting voltage (across the terminals) after no current has passed
in/out of the battery for a substantial period of time (several hours). This voltage can be assumed to be a
linear function of the state of charge SOC of the battery:
𝑈𝑒𝑞 = 𝑈𝑒𝑞,0 + 𝑈𝑒𝑞,1 𝑆𝑂𝐶 Eq. 4.2.9-5

The polarization, or overvoltage, depends heavily on whether the battery is being charged or discharged.
These effects can be estimated by non-linear expressions using empirically derived battery parameters.
The polarization during charging (ch) can be expressed as:
−𝐼𝑞,𝑛
𝑈𝑝𝑜𝑙,𝑐ℎ = 𝑈𝑐ℎ 𝑎𝑐ℎ (1 − 𝑒𝑥𝑝 ( ) + 𝑐𝑐ℎ 𝐼𝑞,𝑛 ) Eq. 4.2.9-6
𝑏𝑐ℎ
where Uch is a constant, ach, bch, and cch are coefficients that are dependent on SOC, and Iq,n is described
in Eqn.7. (Note that Eq. 4.2.9-2 and Eq. 4.2.9-3 are both functions of the normalized main reaction current
Iq,n and the SOC). Saupe [1] found a set of empirical expressions for a ch, bch, and cch based on battery
experiments performed on a solar battery.
The polarization, or overvoltage, during discharging (dch), which is dependent on the main current Iq,norm
and the state of charge SOC, can be calculated from:
𝑈𝑝𝑜𝑙,𝑑𝑐ℎ = 𝑈𝑑𝑐ℎ 𝑓𝑑𝑐ℎ 𝑔𝑑𝑐ℎ Eq. 4.2.9-7

Where Udch is a constant, while fdch and gdch are dimensionless coefficients dependent on Iq,n and SOC,
respectively:
−𝐼𝑞,𝑛
𝑓𝑑𝑐ℎ = 1 − 𝑒𝑥𝑝 ( ) + 𝑐𝑑𝑐ℎ 𝐼𝑞,𝑛 Eq. 4.2.9-8
𝑏𝑑𝑐ℎ
𝑆𝑂𝐶−100
𝑔𝑑𝑐ℎ = 1 + (𝑔100 − 1)𝑒𝑥𝑝 ( ) Eq. 4.2.9-9
𝑘100

CURRENT MODEL
The main reaction current Iq is simply the difference between the current at the battery terminal Ibat and the
gassing current Igas. The battery current is an Input and the gassing current can be found by the following
expression proposed by Schöner [3]:
𝑈𝑐𝑒𝑙𝑙 𝑔2
𝐼𝑔𝑎𝑠 = 𝐼10 𝑔0 𝑒𝑥𝑝 ( − ) Eq. 4.2.9-10
𝑔1 𝑇𝑏𝑎𝑡
The main reaction current is then normalized with respect to the 10-hour discharge current of the battery
I10, where I10 = Qbat,nom/10h and Qbat,nom is the nominal battery capacity in Ah. Since the charging current is
positive and the discharge current is negative, the absolute value of the normalized current is used in the
calculations:
𝑄𝑏𝑎𝑡,𝑛𝑜𝑚
𝐼10 = Eq. 4.2.9-11
10
𝐼𝑞
𝐼𝑞,𝑛 =| | Eq. 4.2.9-12
𝐼10
𝐼𝑞 = 𝐼𝑏𝑎𝑡 − 𝐼𝑔𝑎𝑠 Eq. 4.2.9-13
𝐵𝑎𝑡𝑙𝑜𝑎𝑑
𝐼𝑏𝑎𝑡 = Eq. 4.2.9-14
𝑈𝑏𝑎𝑡
Power dissipated as a result of gassing:
𝑃𝑔𝑎𝑠 = 𝐼𝑔𝑎𝑠 𝑈𝑏𝑎𝑡 Eq. 4.2.9-15

Power of charge (+) or discharge (-):


𝑃𝑏𝑎𝑡 = 𝑈𝑏𝑎𝑡 𝐼𝑏𝑎𝑡 Eq. 4.2.9-16

4–113
TRNSYS 18 – Mathematical Reference

BATTERY CAPACITY
The battery capacity Qbat for a given time step, can simply be found from the main current I q and the battery
capacity from the previous time step (Qbat,ini). Alternatively, Qbat,ini can be derived from the state of charge
for the previous time step SOCini and the nominal battery capacity Q bat,nom (given in Ah). That is,
Previous capacity:
𝑄𝑏𝑎𝑡,𝑖𝑛𝑖 = 𝑄𝑏𝑎𝑡,𝑛𝑜𝑚 𝑆𝑂𝐶𝑖𝑛𝑖 Eq. 4.2.9-17

Current capacity
𝑄𝑏𝑎𝑡 = 𝑄𝑏𝑎𝑡,𝑖𝑛𝑖 + 𝐼𝑞 Δ𝑡 Eq. 4.2.9-18

Battery state of charge


𝑄𝑏𝑎𝑡
𝑆𝑂𝐶 = Eq. 4.2.9-19
𝑄𝑏𝑎𝑡,𝑛𝑜𝑚

EXTERNAL DATA FILE


Type185 either reads the battery parameters from the proforma or retrieves them from a data file. The data
file should have the following information:
<Nb of batteries>

<No of the battery>, <Name of battery> For each battery


<g0><g1><g2><Uequ,0><Uequ,1><Uch><Udch><bdch><cdch><g100><k100>

The parameters that must be provided are described here below (see text for an explanation of the
parameters):

No Parameter Units Description


1 g0 - Gassing current constant
2 g1 V Gassing current constant
3 g2 K Gassing current constant
4 Uequ,0 V Equilibrium cell voltage at SOC = 0
5 Uequ,1 V/dec Equilibrium cell voltage gradient
6 Uch - Parameter for overvoltage during charging
7 Udch - Parameter for overvoltage during discharging
8 bdch - Discharge overvoltage constant
9 cdch - Discharge overvoltage constant
10 g100 - Parameter for overvoltage at SOC = 1 (100%)
11 k100 - Parameter for overvoltage at SOC = 1 (100%)

EXAMPLE DATA FILE


4
1,Pb-Accumulator Hagen-CSM Type OCSM (KFA)
1.6E-6 81.2E-3 6000. 1.997 0.1464 52.0E-3 -27.03E-3 0.4085 0.5610 2.36 53.0
2,Solar Battery Tubular plate 50 Ah (Saupe)
2.162E-4 86.5E-3 6273. 2.007 0.098 48.92E-3 -27.03E-3 0.4085 0.5610 2.36 8.7
3,Varta Bloc 428 (Lyklingholmen)
2.162E-4 86.5E-3 6273. 1.968 0.112 75.0E-3 -40.0E-3 0.4085 0.5610 2.36 10.0

4–114
TRNSYS 18 – Mathematical Reference

4,Varta Bloc 428 (Lyklingholmen)


2.162E-4 86.5E-3 6273. 1.85 0.25 75.0E-3 -40.0E-3 0.4085 0.5610 2.36 10.0

4.2.9.5. References
1. Saupe G. (1993) Photovoltaic Power Supply System with Lead-Acid Battery Storage: Analysis of
the Main Problems, System Improvements, Development of a Simulation Model for a Battery (in
German). PhD thesis, University of Stuttgart, Germany.
2. Ulleberg Ø. (1998) Stand-Alone Power Systems for the Future: Optimal Design, Operation &
Control of Solar-Hydrogen Energy Systems. PhD thesis, Norwegian University of Science and
Technology, Trondheim.
3. Schöner H. P. (1988) Evaluation of the Electrical Behavior of Lead-Batteries during Discharging
and Charging (in German). Ph.D. thesis, Technical University of Aachen, Germany.

4–115
TRNSYS 18 – Mathematical Reference

4.2.10. Type 188: AC Busbar (MiniGrid Energy Balance)


Type188 performs the energy balance calculations for a mini-grid for a renewable energy (RE) hydrogen
(H2) storage system, where wind and solar (PV) energy are the primary sources and an electrolyzer and a
fuel cell are the main power components of the H2-storage system. The energy balance is written in a
generic way such that the input power from the PV does not necessarily need to come from a PV array. It
does need to come from a source of power (as opposed to a load on the busbar) since its sign in the energy
balance is assumed. The grid voltage is assumed to be constant.

4.2.10.1. Parameter/Input/Output Reference


PARMAETERS

1 Grid voltage [V] Mini-grid voltage

INPUTS

1 WECS power [W] Power from wind energy conversion system (WECS)

2 PV power [W] Power from photovoltaic (PV) system

3 Fuel cell power [W}: Power from fuel cell (FC) system

4 Renewable power [W] Power from other renewable (RE) sources

5 Other power [W] Power from other sources (e.g., diesel gensets)

6 Electrolyzer power [W] Power to the electrolyzer system

7 Load power [W] Power to the user load

8 Auxiliary power [W] Power to auxiliary equipment (e.g. pumps, compressors, etc.).
Note that the auxiliary power is a load on the busbar not a
source of power that feeds into the busbar.

OUTPUTS

1 Grid power [W] Excess power available on the mini-grid (negative value is deficit
power)

2 Grid voltage [V] Mini-grid voltage

4.2.10.2. Simulation Summary Report Contents


VALUE FIELDS

Grid voltage [V] Parameter 1

INTEGRATED VALUE FIELDS

Wind turbine energy [kWh] Input 1

4–116
TRNSYS 18 – Mathematical Reference

PV energy [kWh] Input 2

Fuel cell energy [kWh] Input 3

Other renewable [kWh] Input 4


energy

Other energy [kWh] Input 5

Electrolyzer energy [kWh] Input 6

Load energy [kWh] Input 7

Auxiliary energy [kWh] Input 8

Surplus or Defecit [kWh] Output 1


energy

4.2.10.3. Hints and Tips


 The surplus/defecit energy reported in the Simulation Summary file (*.ssr) is an integrated value. A
report showing zero for this value indicates that the surplus and defecit energy on the grid were in
balance over the length of the simulation.
 The energy balance is written in a generic way such that the input power from the various sources
(such as PV) does not necessarily need to come from the referenced source (such as a PV array).
It does need to come from a source of power (as opposed to a load on the busbar) since its sign in
the energy balance is assumed.
 Any power units can be substituted for W as long as all values are expressed using the same units
 For power sources (WECS, PV, FC, RE, other), power values are positive from the RE sources to
the grid. For the electrolyzer, the load and the auxiliary power consumption, power values are
positive from the grid (i.e. from the busbar) to the components. Pgrid is positive when power is fed
to the grid

4.2.10.4. Nomenclature
PWECS [W] Power from the Wind Energy Conversion System (wind turbine)
PPV [W] Power from the Photovoltaic (PV) system
PFC [W] Power from the Fuel cell
PRE [W] Power from additional (unspecified) Renewable Energy sources
Pother [W] Power from other sources (e.g. Diesel Generator Sets, etc.)
Pely [W] Power to the electrolyzer (Hydrogen generation)
Pload [W] Power to the (local) load
Paux [W] Power to (local) auxiliary systems (compressors, pumps, etc.)
Pgrid [W] Power to the electric grid
Ugrid [V] Grid voltage

4–117
TRNSYS 18 – Mathematical Reference

4.2.10.5. Detailed Description


The power balance is written as:
Pgrid  PWECS  PPV  PFC  PRE  Pother  Pely  Pload  Paux Eq. 4.2.10-1

The grid voltage is given as a parameter and is assumed to be constant.

4–118
TRNSYS 18 – Mathematical Reference

4.2.11. Type 190: Advanced Photovoltaic


This component is appropriate for modeling the electrical performance of monocrystalline, polycrystalline
and thin film photovoltaic (PV) panels. Like it simpler counterpart (Type103) it may be used in one of two
modes depending upon how the first parameter (MPPT mode) is set. When the MPPT mode parameter is
set to 0, the PV array is assumed to be directly connected to a load voltage and/or to a battery such that
the array and the load operating voltages are equal and the operating voltage will be taken as an input to
the PV model. When the MPPT mode parameter is set to 1 then the array is assumed to be connected to
its load through a maximum power point tracker such that the array and the load will operate at independent
voltages. In this case the load voltage is not needed as an input.
The model employs equations for an empirical equivalent circuit model to predict the current-voltage
characteristics of a single module as proposed by DeSoto et al [1]. This circuit consists of a DC current
source, diode, and two resistors, one in series and one in parallel with the current source. The strength of
the current source is dependent on solar radiation and the IV characteristics of the diode are temperature-
dependent. The results for a single module equivalent circuit are extrapolated to predict the performance
of a multi-module array. Type190 determines PV current as a function of load voltage. Other outputs include
current and voltage at either the maximum power point along the IV curve or current and power at the user-
specified load voltage. Open-circuit voltage and short circuit current are also computed.
Type190 employs a “five-parameter” equivalent circuit. The values of these parameters (not to be confused
with the formal TRNSYS component parameters that must be provided to all models by the user) cannot
be obtained directly from manufacturers’ catalogs. However, a stand alone software utility for generating
them from commonly available data is provided: %TRNSYS18%\Tools\PV_refParams.exe.
Type190 also differs from Type103 in that it includes a section that computes the performance of the inverter
that is often connected to a photovoltaic array. This coupling allows the limitations of the inverter (minimum
and maximum allowable input voltage and maximum allowable input power) to affect the performance of
the PV array directly.

4.2.11.1. Parameter/Input/Output Reference


PARMAETERS

1 Inverter mode [-] When set to 1, only the performance of the photovoltaic array
will be considered. When set to 2 the photovoltaic array and an
inverter will be considered.

2 MPPT mode [-] When set to 1, this parameter causes the PV to operate at its
maximum power point rather than at a load voltage specified
among the components inputs. When this parameter is set to 0,
the PV array will operate at the load voltage input.

3 Module short-circuit [A] The module's short circuit current reported on the
current at reference manufacturer's spec sheet. Reference conditions are typically
conditions 1000 W/m2 (incident solar radiation) and 25C (module
temperature)

4 Module open-circuit [V] The module's open circuit voltage reported on the
voltage at reference manufacturer's spec sheet. Reference conditions are typically
conditions 1000 W/m2 (incident solar radiation) and 25C (module
temperature)

5 Reference cell [K] The cell temperature at which the manufacturer reports open
temperature circuit voltage and short circuit current.

4–119
TRNSYS 18 – Mathematical Reference

6 Reference insolation [W/m2] The solar radiation level at which the manufacturer reports open
circuit voltage and short circuit current. This value is typically
1000 W/m2.

7 Module voltage at max [V] The module's maximum power point voltage reported on the
power point and manufacturer's spec sheet. Reference conditions are typically
reference conditions 1000 W/m2 (incident solar radiation) and 25C (module
temperature).

8 Module current at max [A] The module's maximum power point current reported on the
power point and manufacturer's spec sheet. Reference conditions are typically
reference conditions 1000 W/m2 (incident solar radiation) and 25C (module
temperature).

9 Temperature [A/K] This parameter describes the way in which temperature affects
coefficient of Isc (ref. the module's short circuit current at reference conditions. Short
cond) circuit current typically increases with increasing ambient
temperature. The parameter is expressed in units of A/K.
Manufacturers express this value either in units of A/K or in %/K
(percent of the short circuit current.

10 Temperature [V/K] This parameter describes the way in which temperature affects
coefficient of Voc (ref. the module's open circuit voltage at reference conditions. Open
cond.) circuit voltage typically decreases with increasing ambient
temperature. The parameter is expressed in units of V/K.
Manufacturers express this value either in units of V/K or in %/K
(percent of the open circuit voltage).

11 Number of cells wired [-] The number of individual cells wired together in series within a
in series module. For monocrystalline silicon panels, each cell generates
approximately 0.5V so an 18V panel would typically have 36
cells wired in series.

12 Number of modules in [-] The number of modules wired in series within the PV array.
series Series wiring increases the array's total voltage.

13 Number of modules in [-] The number of modules wired in parallel within the PV array.
parallel Parallel wiring increases the array's total current.

14 Module temperature at [K] The module's cell temperature at nominal operating cell
NOCT temperature (NOCT) conditions. Typically obtained from the
manufacturer's specification sheet.

15 Ambient temperature [K] The ambient temperature at NOCT conditions (expressed in K).
at NOCT This value is almost always 293K.

16 Insolation at NOCT [W/m2] The solar radiation at NOCT conditions (expressed in W/m2).
This value is almost always 800W/m2.

17 Module area [m2] The active area of the module.

18 Tau-alpha product at [-] The product of the module cover's transmittance and the
normal incidence substrate's absorptance for solar radiation normal to the plane of
the module.

19 Semiconductor [eV] For silicon panels, the material bandgap is 1.12 eV. For gallium
bandgap arsenide, it is 1.35 eV. From Wikipedia: In graphs of the
electronic band structure of solids, the band gap generally refers
to the energy difference (in electron volts) between the top of the

4–120
TRNSYS 18 – Mathematical Reference

valence band and the bottom of the conduction band in


insulators and semiconductors. This is equivalent to the energy
required to free an outer shell electron from its orbit about the
nucleus to become a mobile charge carrier, able to move freely
within the solid material.

20 Value of parameter "a" [-] This Type is based on an equivalent circuit model that requires
at reference conditions five parameters. This parameter is typically generated using the
PV_refParams.exe app located in
the ..\%Trnsys18%\Tools\ directory. Refer to the Mathematical
Reference manual for a more complete definition of this
parameter.

21 Value of parameter [A] This Type is based on an equivalent circuit model that requires
"I_L" at reference five parameters. This parameter is typically generated using the
conditions PV_refParams.exe app located in
the ..\%Trnsys18%\Tools\ directory. Refer to the Mathematical
Reference manual for a more complete definition of this
parameter.

22 Value of parameter [A] This Type is based on an equivalent circuit model that requires
"I_0" at reference five parameters. This parameter is typically generated using the
conditions PV_refParams.exe app located in
the ..\%Trnsys18%\Tools\ directory. Refer to the Mathematical
Reference manual for a more complete definition of this
parameter.

23 Module series [] This Type is based on an equivalent circuit model that requires
resistance at reference five parameters. This parameter is typically generated using the
conditions PV_refParams.exe app located in
the ..\%Trnsys18%\Tools\ directory. Refer to the Mathematical
Reference manual for a more complete definition of this
parameter.

24 Shunt resistance at [] This Type is based on an equivalent circuit model that requires
reference conditions five parameters. This parameter is typically generated using the
PV_refParams.exe app located in
the ..\%Trnsys18%\Tools\ directory. Refer to the Mathematical
Reference manual for a more complete definition of this
parameter.

25 Extinction coefficient- [-] The extinction coefficient is a measure of how much solar
thickness product of spectrum radiation is absorbed as it passes through a
cover transparent material. It has the units of 1/m. Typical values are
between 4 and 32 [1/m]. This value is then multiplied by the
thickness of the material in order to obtain the extinction
coefficient-thickness product of the cover. The resulting value is
dimensionless.

If Inverter Mode (parameter 1) = 2

26 Maximum inverter [W] The input power beyond which the inverter will be capacity
power limited.

27 Maximum inverter [V] The maximum input voltage to the inverter. If the array voltage
voltage goes over this point, it will be internally limited and the inverter
efficiency will be determined for the maximum allowable input
voltage.

4–121
TRNSYS 18 – Mathematical Reference

28 Minimum inverter [V] The minimum input voltage to the inverter. If the array max
voltage power voltage is below this minimum, the inverter will operate at
reduced efficiency as long as the array's open circuit voltage is
above the minimum. If the open circuit voltage and the maximum
power point voltage are both below this minimum, the inverter
will not produce any power.

29 Night tare [W] The inverter consumes power at this rate during the night (when
there is no solar incident on the array).

30 Logical unit number of [-] The inverter data file is two dimensional. It provides values of
inverter performance inverter efficiency (0..1) for combinations of input power and
data file input voltage.

INPUTS

1 Total radiation [kJ/hr.m2] The amount of radiation (beam + sky diffuse + ground reflected
diffuse radiation incident on the surface of the array

2 Ambient temperature [C] Ambient temperature

If MPPT mode (parameter 2) = 0

3 Load voltage [V] The voltage of the electrical load imposed on the PV array. This
voltage will determine the PV array’s operating point on its I-V
curve.

4 Array slope Direction [degrees]

5 Beam radiation [kJ/hr.m2] The amount of beam solar radiation incident on the array.

6 Sky diffuse radiation [kJ/hr.m2] The amount of sky diffuse solar incident on the array.

7 Ground reflected [kJ/hr.m2] The amount of ground reflected diffuse radiation incident on the
diffuse radiation surface of the array.

8 Incidence angle of [degrees] The angle between the normal to the array plane and the line
beam radiation between the sun and the surface of the array.

9 Solar zenith angle [degrees] The angle between the line formed by beam solar radiation and
the vertical.

10 Wind speed [m/s] The speed of the wind in the vicinity of the PV array.

If MPPT mode (parameter 2) = 1

3 Array slope Direction [degrees]

4 Beam radiation [kJ/hr.m2] The amount of beam solar radiation incident on the array.

5 Sky diffuse radiation [kJ/hr.m2] The amount of sky diffuse solar incident on the array.

6 Ground reflected [kJ/hr.m2] The amount of ground reflected diffuse radiation incident on the
diffuse radiation surface of the array.

4–122
TRNSYS 18 – Mathematical Reference

7 Incidence angle of [degrees] The angle between the normal to the array plane and the line
beam radiation between the sun and the surface of the array.

8 Solar zenith angle [degrees] The angle between the line formed by beam solar radiation and
the vertical.

9 Wind speed [m/s] The speed of the wind in the vicinity of the PV array.

OUTPUTS

If Inverter Mode (parameter 1) = 1

1 Array voltage [V] The voltage at which the array is operating.

2 Array current [A] The current at which the array is operating.

3 Array power [W] The power generated by the array.

4 Array power [kJ/h] The power generated by the array. Expressed in kJ/h

5 Open circuit voltage [V] The open circuit voltage of the array (i.e. not of the module) at
present operating conditions (i.e. at the present solar radiation
and ambient temperature instead of at NOCT or reference
conditions)

6 Short circuit current [A] The short circuit current of the array (i.e. not of the module) at
present operating conditions (i.e. at the present solar radiation
and ambient temperature instead of at NOCT or reference
conditions)

7 Array fill factor [-] The fill factor is a measure of how the maximum power point
relates to the "theoretical" maximum power point. The result is
the delivered power divided by the product of the open circuit
voltage and short circuit current. Expressed mathematically, the
fill factor is: ff=(Vmp*Imp)/(Voc*Isc). Note that if the PV is not
operating in its maximum power point tracking mode then the fill
factor output is still defined as the maximum power divided by
the theoretical maximum power and the fraction of maximum
power output should be taken into account.

8 Array temperature [C] The cell temperature at which the array is currently operating.

9 Array efficiency [-] The array efficiency is defined as the power produced by the
array divided by the amount of solar radiation incident on the
array.

If Inverter Mode (parameter 1) = 2

1 Operating voltage [V] The voltage produced by the array at the operating point
(defined either by the user-supplied load voltage or by the MPPT
depending on the value of the MPPT mode parameter) (includes
inverter effects)

2 Operating current [A] The current produced by the array at the operating point
(defined either by the user-supplied load voltage or by the MPPT
depending on the value of the MPPT mode parameter) (includes
inverter effects)

4–123
TRNSYS 18 – Mathematical Reference

3 Operating power [W] The power produced by the array at the operating point (defined
either by the user-supplied load voltage or by the MPPT
depending on the value of the MPPT mode parameter) (includes
inverter effects)

4 Operating power [kJ/h] The power produced by the array at the operating point (defined
either by the user-supplied load voltage or by the MPPT
depending on the value of the MPPT mode parameter) (includes
inverter effects)

5 Open circuit voltage [V] The open circuit voltage of the array (i.e. not of the module) at
present operating conditions (i.e. at the present solar radiation
and ambient temperature instead of at NOCT or reference
conditions)

6 Short circuit current [A] The short circuit current of the array (i.e. not of the module) at
present operating conditions (i.e. at the present solar radiation
and ambient temperature instead of at NOCT or reference
conditions)

7 Array fill factor [-] The fill factor is a measure of how the maximum power point
relates to the "theoretical" maximum power point. The result is
the delivered power divided by the product of the open circuit
voltage and short circuit current. Expressed mathematically, the
fill factor is: ff=(Vmp*Imp)/(Voc*Isc). Note that if the PV is not
operating in its maximum power point tracking mode then the fill
factor output is still defined as the maximum power divided by
the theoretical maximum power and the fraction of maximum
power output should be taken into account.

8 Array temperature [C] The cell temperature at which the array is currently operating.

9 Array efficiency [-] The array efficiency is defined as the power produced by the
array divided by the amount of solar radiation incident on the
array.

10 Array voltage [V] The voltage produced by the array at the operating point
(defined either by the user-supplied load voltage or by the MPPT
depending on the value of the MPPT mode parameter) (does
NOT include inverter effects)

11 Array current [A] The current produced by the array at the operating point
(defined either by the user-supplied load voltage or by the MPPT
depending on the value of the MPPT mode parameter) (does
NOT include inverter effects)

12 Array power [W] The power produced by the array at the operating point (defined
either by the user-supplied load voltage or by the MPPT
depending on the value of the MPPT mode parameter) (does
NOT include inverter effects)

13 Array power [kJ/h] The power produced by the array at the operating point (defined
either by the user-supplied load voltage or by the MPPT
depending on the value of the MPPT mode parameter) (does
NOT include inverter effects)

14 Inverter efficiency [-] The inverter output power divided by its input power.

4–124
TRNSYS 18 – Mathematical Reference

4.2.11.2. Simulation Summary Report Contents


VALUE FIELDS

Array area [m2] The total array area.

Reference condition [kW] An approximation of the power that the array will deliver when operating
peak power (appx) with a maximum power point tracker at reference conditions.

Reference condition [V] An approximation of the voltage at which the array will operate when
peak voltage (appx) connected to a maximum power point tracker at reference conditions.

If Inverter Mode (parameter 1) = 2

Inverter capacity [kW] Parameter 26

Inverter maximum [V] Parameter 27


input voltage

Inverter minimum input [V] Parameter 28


voltage

Inverter night tare [kW] Parameter 29

TEXT FIELDS

Inverter mode [n/a] “yes” or “no” depending on the value of parameter 1.

Control mode [n/a] “maximum power point tracking” or “direct connection to load”
depending on the value of parameter 2.

INTEGRATED VALUE FIELDS

Energy generated [kWh] Output 3

MINIMUM/MAXIMUM VALUE FIELDS

Array efficiency [0..1] Output 10

Operating voltage [V] Output 1

If Inverter Mode (parameter 1) = 2

Inverter efficiency [0..1] Output 14

4.2.11.3. Hints and Tips


 Users will note that changing the value Voc does not have an impact on the simulation results. During
the simulation Voc is only used to find a starting point for the iteration that finds the maximum power
point. However, Voc is also used in determining the values of the other parameters (a_ref, Io_ref, etc.)
so it is not correct to change the value of the Voc parameter without going back and recomputing all
the values of those other parameters.

4–125
TRNSYS 18 – Mathematical Reference

 An app is available for generating the parameter values for this model. Please
launch ..\%TRNSYS18%\Tools\ PV_REF_PARAMS.exe to run the app. If the app is found to have
expired a new version may be downloaded from: http://www.fchart.com/ees/distributables.php

4.2.11.4. Nomenclature
 [degrees] Slope of PV array
g [eV] Semiconductor bandgap
c [0..1] Module conversion efficiency
Isc [A/K] Temperature coefficient of short-circuit current
Voc [V/K] Temperature coefficient of open-circuit voltage
 [degrees] Angle of incidence for solar radiation
 [-] Module transmittance-absorptance product
n [-] Module transmittance-absorptance product at normal incidence
a Parameter in the model defined in equation Eq. 4.2.11-2
GT [kJ/h.m2] Total radiation incident on PV array
GT,beam [kJ/h.m2] Beam component of incident radiation
GT,diff [kJ/h.m2] Diffuse component of incident radiation
GT,gnd [kJ/h.m2] Ground-reflected component of incident radiation
GT,NOCT [kJ/h.m2] Incident radiation at NOCT conditions
GT,ref [kJ/h.m2] Incident radiation at reference conditions
I [A] Current
IL [A] Module photocurrent
IL,ref [A] Module photocurrent at reference conditions
Io [A] Diode reverse saturation current
Io,ref [A] Diode reverse saturation current at reference conditions
Isc [A] Short-circuit current
Isc,ref [A] Short-circuit current at reference conditions
Imp [A] Current at maximum power point along IV curve
Imp,ref [A] Current at maximum power point along IV curve, reference conditions
IAM [0..1] Dimensionless incidence angle modifier
k [J/K] Boltzmann constant
KL [-] Product of extinction coefficient and thickness for cover
nI Diode ideality factor
NP [-] Number of modules in parallel in array
NS [-] Number of modules in series in array
Ns [-] Number of individual cells in series within a module
P [kJ/h] PV output power
Pmax [kJ/h] PV output power at maximum power point along IV curve
q Electron charge constant
Rs [] Module series resistance
Rsh [] Module shunt resistance
Tc [K] Module temperature
Tc,NOCT [K] Module temperature at NOCT conditions
Tc,ref [K] Module temperature at reference conditions
UL [kJ/h.m2.K] Array thermal loss coefficient
V [V] Voltage
Vmp [V] Voltage at maximum power point along IV curve

4–126
TRNSYS 18 – Mathematical Reference

Vmp,ref [V] Voltage at maximum power point along IV curve, reference conditions
Voc [V] Open-circuit voltage
Voc,ref [V] Open-circuit voltage at reference conditions

4.2.11.5. Detailed Description


The model used in Type 190 is based on the five-parameter equivalent circuit model that is presented in
Duffie and Beckman [2]. However, the method for determining the parameters differs from what is
presented by Duffie and Beckman. The main thrust of this model is to reliably extrapolate performance
information provided by the manufacturer at standard rating conditions (1,000 W/m 2, 25°C) to other
operating conditions. The model, as described by Desoto et al, [1] is based on the equivalent circuit diagram
shown in Figure 4.2.11–1.

Figure 4.2.11–1: Equivalent Electrical Circuit


The current-voltage (I-V) characteristics of a PV array change with both insolation and array temperature.
The PV model determines the current-voltage curve as a function of these environmental conditions using
five array that are deduced from rating information provided by the manufacturer. The current-voltage
equation for the circuit shown in Figure 4.2.11–1 is as follows:
𝑉+𝐼𝑅𝑠 𝑉 + 𝐼𝑅𝑠
𝐼 = 𝐼𝐿 − 𝐼𝑜 (𝑒 𝑎 − 1) − Eq. 4.2.11-1
𝑅𝑠ℎ
where
𝑁𝑠 𝑛𝐼 𝑘𝑇𝑐
𝑎≡ Eq. 4.2.11-2
𝑞
Five parameters must be known in order to determine the current and voltage, and thus the power delivered
to the load. These are: the light current IL, the diode reverse saturation current Io, the series resistance Rs,
the shunt resistance Rsh, and the modified ideality factor a defined in Eq. 4.2.11-2.
To evaluate the five parameters in Eq. 4.2.11-1, five independent pieces of information are needed. In
general, these five parameters are functions of the solar radiation incident on the array and array
temperature. Reference values of these parameters are determined for a standard rating condition (SRC)
which is almost always 1,000 W/m 2 and 25°C. Three current-voltage pairs are normally available from the
manufacturer at SRC: the short circuit current, the open circuit voltage and the current and voltage at the
maximum power point. A fourth piece of information results from recognizing that the derivative of the power
at the maximum power point is zero. Although both the temperature coefficient of the open circuit voltage
(Voc) and the temperature coefficient of the short circuit current (Isc) are known, only Voc is used to find
the five reference parameters. Isc is used when the cell is operating at conditions other than reference
conditions.

THE REFERENCE PARAMETERS


The five parameters appearing in Eq. 4.2.11-1 corresponding to operation at SRC are designated: aref, Io,ref,
IL,ref, Rs,ref, and Rsh,ref. To determine the values of these parameters, the 3 known I-V pairs at SRC are
substituted into Eq. 4.2.11-1resulting in Eq. 4.2.11-3 through Eq. 4.2.11-5

4–127
TRNSYS 18 – Mathematical Reference

For short circuit current: I=Isc,ref, V=0


𝐼𝑠𝑐,𝑟𝑒𝑓 𝑅𝑠,𝑟𝑒𝑓
𝑎𝑟𝑒𝑓
𝐼𝑠𝑐,𝑟𝑒𝑓 𝑅𝑠,𝑟𝑒𝑓
𝐼𝑠𝑐,𝑟𝑒𝑓 = 𝐼𝐿,𝑟𝑒𝑓 − 𝐼𝑜,𝑟𝑒𝑓 (𝑒 − 1) − Eq. 4.2.11-3
𝑅𝑠ℎ,𝑟𝑒𝑓
For open circuit voltage: I=0, V=Voc,ref
𝑉𝑜𝑐,𝑟𝑒𝑓
𝑎𝑟𝑒𝑓
𝑉𝑜𝑐,𝑟𝑒𝑓
0 = 𝐼𝐿,𝑟𝑒𝑓 − 𝐼𝑜,𝑟𝑒𝑓 (𝑒 − 1) − Eq. 4.2.11-4
𝑅𝑠ℎ,𝑟𝑒𝑓
At the maximum power point: I=Imp,ref, V=Vmp,ref
𝑉𝑚𝑝,𝑟𝑒𝑓 +𝐼𝑚𝑝,𝑟𝑒𝑓 𝑅𝑠,𝑟𝑒𝑓
𝑎𝑟𝑒𝑓
𝑉𝑚𝑝,𝑟𝑒𝑓 + 𝐼𝑚𝑝,𝑟𝑒𝑓 𝑅𝑠,𝑟𝑒𝑓
𝐼𝑚𝑝,𝑟𝑒𝑓 = 𝐼𝐿,𝑟𝑒𝑓 − 𝐼𝑜,𝑟𝑒𝑓 (𝑒 − 1) − Eq. 4.2.11-5
𝑅𝑠ℎ,𝑟𝑒𝑓
The derivative with respect to power at the maximum power point is zero.
𝑑(𝐼𝑉) 𝑑𝐼
| = 𝐼𝑚𝑝 − 𝑉𝑚𝑝 | Eq. 4.2.11-6
𝑑𝑉 𝑚𝑝 𝑑𝑉 𝑚𝑝

where dI / dV is given by:


mp

−𝐼𝑜 𝑉𝑚𝑝+𝐼𝑎𝑚𝑝𝑅𝑠 1
𝑑𝐼 𝑒 −
𝑎 𝑅𝑠ℎ
| = Eq. 4.2.11-7
𝑑𝑉 𝑚𝑝 𝐼 𝑅 𝑉𝑚𝑝+𝐼𝑎𝑚𝑝𝑅𝑠 𝑅𝑠
1+ 𝑜 𝑠𝑒 +
𝑎 𝑅𝑠ℎ
The temperature coefficient of open circuit voltage is given by:
𝜕𝑉 𝑉𝑜𝑐,𝑟𝑒𝑓 − 𝑉𝑜𝑐,𝑇𝑐
𝑉𝑜𝑐 = | ≈ Eq. 4.2.11-8
𝜕𝑇 𝐼=0 𝑇𝑟𝑒𝑓 − 𝑇𝑐

To evaluate Voc numerically, it is necessary to know Voc ,Tc , the open circuit voltage at some cell
temperature near the reference temperature. The cell temperature used for this purpose is not critical since
values of Tc ranging from 1 to 10 K above or below Tref provide essentially the same result. Voc ,Tc can be
found from Eq. 4.2.11-4 if the temperature dependencies for parameters Io, IL, and a, are known. The shunt
resistance, Rsh was assumed to be independent of temperature. Therefore, in order to apply Eq. 4.2.11-7,
it is necessary to obtain expressions for the temperature dependence of the three parameters a, Io and, IL.
The dependence of all of the parameters in the model on the operating conditions is considered next.

DEPENDENCE OF THE PARAMETERS ON OPERATING CONDITIONS


From the definition of a, the modified ideality factor is a linear function of cell temperature (assuming nI is
independent of temperature) so that:
𝑎 𝑇𝑐
= Eq. 4.2.11-9
𝑎𝑟𝑒𝑓 𝑇𝑐,𝑟𝑒𝑓
where Tc,ref and aref are the cell temperature and modified ideality factor for reference conditions, while Tc
and a are the cell temperature and modified ideality factor parameter for the new operating conditions.
The diode reverse saturation current, Io is related to temperature and reference conditions with the following
relation,
3
𝐼𝑜 𝑇𝑐 1 𝐸𝑔 𝐸𝑔
=( ) 𝑒𝑥𝑝 [ ( | − | )] Eq. 4.2.11-10
𝐼𝑜,𝑟𝑒𝑓 𝑇𝑐,𝑟𝑒𝑓 𝑘 𝑇 𝑇𝑟𝑒𝑓 𝑇 𝑇𝑐

4–128
TRNSYS 18 – Mathematical Reference

where k is Boltzmann's constant and Eg is the material band gap. Eg exhibits a small temperature
dependence (Van Zeghbroeck, 2004) which, for silicon, can be represented as indicated in Eq. 4.2.11-11
where Eg ,Tref =1.121 eV for silicon cells.

𝐸𝑔
= 1 − 0.0002677(𝑇 − 𝑇𝑟𝑒𝑓 ) Eq. 4.2.11-11
𝐸𝑔,𝑇𝑟𝑒𝑓

The light current, (IL), is assumed to be a linear function of incident solar radiation. The light current (IL) is
observed to depend on the absorbed solar irradiance (S), the cell temperature (Tc), the short circuit current
temperature coefficient (Isc), and the air mass modifier (M). The light current IL for any operating conditions
is related to the light current at reference conditions by:
𝑆 𝑀
𝐼𝐿 = (𝐼 + 𝛼𝐼𝑠𝑐 (𝑇𝑐 − 𝑇𝑐,𝑟𝑒𝑓 )) Eq. 4.2.11-12
𝑆𝑟𝑒𝑓 𝑀𝑟𝑒𝑓 𝐿,𝑟𝑒𝑓
where Sref, Mref, IL,ref, Tc,ref are the parameters at reference conditions, while S, M, IL, and Tc are the values
for specified operating conditions. When using Eq. 4.2.11-12 to find the reference parameters, S = Sref and
M = Mref. The air mass modifier is assumed to be a function of the local zenith angle and is discussed
below. Rs is assumed constant at its reference value, Rs,ref.
The shunt resistance (Rsh) controls the slope of the I-V curve at the short circuit condition; large shunt
resistances result in a horizontal slope. Desoto et al [1] empirically propose Eq. 4.2.11-13 to describe the
observed effect of solar radiation on the shunt resistance.
𝑅𝑠ℎ 𝑆𝑟𝑒𝑓
= Eq. 4.2.11-13
𝑅𝑠ℎ,𝑟𝑒𝑓 𝑆

THE INCIDENCE ANGLE MODIFIER, KΤΑ


The incidence angle, θ, is directly involved in the determination of the radiation incident on the surface of
the PV device. In addition, the incidence angle affects the amount of solar radiation transmitted through the
protective cover and converted to electricity by the cell. As the incidence angle increases, the amount of
radiation reflected from the cover increases. Significant effects of inclination occur at incidence angles
greater than 65°. The effect of reflection and absorption as a function of incidence angle is expressed in
terms of the incidence angle modifier, Kτα(θ), defined as the ratio of the radiation absorbed by the cell at
some incidence angle θ divided by the radiation absorbed by the cell at normal incidence.
The incidence angle modifier for a PV panel differs somewhat from that of a flat-plate solar collector in that
the glazing is bonded to the cell surface, thereby eliminating one air-glazing interface and the glazing
surface may be treated so as to reduce reflection losses. Equations Eq. 4.2.11-14 and Eq. 4.2.11-15, based
on Snell’s and Bougher’s laws as reported in Duffie and Beckman (1991), are used to calculate the
incidence angle modifier for one glass-air interface. The angle of refraction (θr) is determined from Snell’s
law
𝜃𝑟 = sin−1 (𝑛 sin 𝜃) Eq. 4.2.11-14

where θ is the incidence angle and n is an effective index of refraction of the cell cover. A good
approximation of the transmittance of the cover system considering both reflective losses at the interface
and absorption within the glazing is:

𝐾𝐿 1 sin2 (𝜃𝑟 − 𝜃) tan2 (𝜃𝑟 − 𝜃)
𝜏(𝜃) = 𝑒 cos 𝜃𝑟 [1 − ( 2 + )] Eq. 4.2.11-15
2 sin (𝜃𝑟 + 𝜃) tan2 (𝜃𝑟 + 𝜃)
where K is the glazing extinction coefficient and L is the glazing thickness. The product of K and L is a
parameter for the model. To obtain the incidence angle modifier (Kτα), Eq. 4.2.11-15 needs be evaluated
for incidence angles of 0° and θ. The ratio of these two transmittances yields the incidence angle modifier:
𝜏(𝜃)
𝐾𝜏𝛼 (𝜃) = Eq. 4.2.11-16
𝜏(0)
Separate incidence angle modifiers are needed for beam, diffuse, and ground-reflected radiation.

4–129
TRNSYS 18 – Mathematical Reference

AIR MASS MODIFIER


Air mass is the ratio of the mass of air that the beam radiation has to traverse at any given time and location
to the mass of air that the beam radiation would traverse if the sun were directly overhead. Selective
absorption by species in the atmosphere causes the spectral content of irradiance to change, altering the
spectral distribution of the radiation incident on the PV panel. Following King et al. [3], an empirical relation
is used to account for air mass effects:
4
𝑀
= ∑ 𝑎𝑖 (𝐴𝑀)𝑖 Eq. 4.2.11-17
𝑀𝑟𝑒𝑓
0

where
1
𝐴𝑀 = Eq. 4.2.11-18
cos 𝜃𝑧 + 0.5057(96.080 − 𝜃𝑧 )−1.634
a0=0.918093 a1=0.086257 a2=-0.024459 a3=0.002816 a4=-0.000126 Eq. 4.2.11-19

MODULE OPERATING TEMPERATURE (THERMAL MODEL)


Type190 uses temperature data from the standard NOCT (Nominal Operating Cell Temperature)
measurements to compute the module temperature Tc at each timestep. The NOCT temperature (Tc,NOCT)
is the operating temperature of the module with a wind speed of 1 m/s, no electrical load, and a certain
specified insolation and ambient temperature [2]. The values for insolation GT,NOCT and ambient
temperature Ta,NOCT are usually 800 W/m2 and 20º C. Type190 uses the NOCT data to determine the ratio
of the module transmittance-reflectance product to the module loss coefficient:
𝜏𝛼 𝑇𝑐,𝑁𝑂𝐶𝑇 − 𝑇𝑎,𝑁𝑂𝐶𝑇
= Eq. 4.2.11-20
𝑈𝐿 𝐺𝑇,𝑁𝑂𝐶𝑇
Assuming that this ratio is constant, the module temperature at any timestep is:
𝜂𝑟𝑒𝑓
1−
𝑇𝑐 = 𝑇𝑎 + 𝜏𝛼
Eq. 4.2.11-21
𝐺𝑇 𝜏𝛼
𝑈𝐿
c is the electrical efficiency of the module at reference conditions and is defined as the output power of the
PV divided by the solar radiation incident on the PV (with appropriate unit conversions so that the
conversion efficiency is dimensionless and varies between 0 and 1). Tc,NOCT, Ta,NOCT, and GT,NOCT are set
by TRNSYS parameters.  may be either a constant or the a value calculated from an incidence angle
correlation, as described here below.

MULTI-ARRAY MODULES
The electrical calculations discussed for five-parameter PV model deal only with a single module. Type 190
may be used to simulate arrays with any number of modules. TRNSYS parameters define the number of
modules in series (NS) and modules in parallel (NP) for the entire array. The total number of modules in
the array is the product of NS and NP. When simulating a single module only, both NS and NP are set to
1. Note that the voltage supplied to Type 190 by means of an input (when not operating in MPPT mode) is
the voltage for the entire array and not just for a single module. Module mismatch losses are not considered
in this model.

PHOTOVOLTAIC ARRAY WITH INVERTER


Cell output can be maximized by operating near or at the maximum power point. Maximum power trackers
are devices that keep the impedance of the circit of the cells at levels corresponding to best operation and
also convert the resulting power from the PV array so that its voltage is that required by the load. If AC
power is needed, DC/AC inverters are required.

4–130
TRNSYS 18 – Mathematical Reference

The effect of the inverter on the performance of the system can be characterized by an additional efficiency
that reduces the power provided by the PV array. A data file is used for providing the efficienty of the
inverter as function of array power and voltage. The data file follows the specifications of the subroutine
InterpolateData. The following is an example of a data file with efficiency values for 7 values of array power
(in Watts) and 3 values of voltage.

0.000E+00 0.350E+03 0.700E+03 0.105E+04 0.175E+04 0.245E+04 0.350E+04


0.104E+03 0.135E+03 0.164E+03
0.797 !Efficiency at Power = 0.000E+00 and Voltage = 0.104E+03
0.780 !Efficiency at Power = 0.000E+00 and Voltage = 0.135E+03
0.748 !Efficiency at Power = 0.000E+00 and Voltage = 0.164E+03
0.797 !Efficiency at Power = 0.350E+03 and Voltage = 0.104E+03
0.780 !Efficiency at Power = 0.350E+03 and Voltage = 0.135E+03
0.748 !Efficiency at Power = 0.350E+03 and Voltage = 0.164E+03
0.862 !Efficiency at Power = 0.700E+03 and Voltage = 0.104E+03
0.843 !Efficiency at Power = 0.700E+03 and Voltage = 0.135E+03
0.827 !Efficiency at Power = 0.700E+03 and Voltage = 0.164E+03
0.885 !Efficiency at Power = 0.105E+04 and Voltage = 0.104E+03
0.867 !Efficiency at Power = 0.105E+04 and Voltage = 0.135E+03
0.860 !Efficiency at Power = 0.105E+04 and Voltage = 0.164E+03
0.929 !Efficiency at Power = 0.175E+04 and Voltage = 0.104E+03
0.920 !Efficiency at Power = 0.175E+04 and Voltage = 0.135E+03
0.916 !Efficiency at Power = 0.175E+04 and Voltage = 0.164E+03
0.922 !Efficiency at Power = 0.245E+04 and Voltage = 0.104E+03
0.921 !Efficiency at Power = 0.245E+04 and Voltage = 0.135E+03
0.919 !Efficiency at Power = 0.245E+04 and Voltage = 0.164E+03
0.918 !Efficiency at Power = 0.350E+04 and Voltage = 0.104E+03
0.919 !Efficiency at Power = 0.350E+04 and Voltage = 0.135E+03
0.915 !Efficiency at Power = 0.350E+04 and Voltage = 0.164E+03

The inverter has to be operated between a minimum and maximum input voltage. Type190 checks for a
number of special cases.
Case 1: The ideal case in the one in which the inverter input voltage (normally the array’s voltage at the
maximum power point given the current environmental conditions) is greater than the inverter minimum
voltage and less than the inverter maximum voltage (case 1 in Figure 4.2.11–2 below). In this case, the
operating point is the maximum power point.
Case 2: If the input voltage is below the inverter minimum voltage but the array open circuit voltage is still
above the inverter minimum voltage then the system will run at the inverter minimum voltage, the power
out of the inverter will be limited to that same voltage and inverter efficiency will be determined accordingly.
The operating point is again indicated by a red point.
Case 3: If both the input voltage and the array open circuit voltage are below the inverter minimum voltage
then the system cannot operate and will generate zero power. This is usually an indication that the array
and inverter sizes do not match each other well.
Case 4: If the present input voltage is above the inverter maximum voltage, the system will operate at the
inverter maximum voltage.

4–131
TRNSYS 18 – Mathematical Reference

Case 1 Case 2

Case 3 Case 4

Figure 4.2.11–2: Inverter Voltage Limiting Cases


Lastly, the inverter consumes power at night at a rate of the “night tare” parameter. This is a user-set value;
the inverter power output will be set to the negative of the night tare value whenever there is zero solar
incident on the array, indicating that the inverter is consuming instead of producing power. The tare value
is NOT subtracted from the inverter output power when solar is incident on the array.

4.2.11.6. References
1. DeSoto, W., Klein, S.A. and Beckman, W.A., “Improvement and Validation of a Model for PV Array
Performance,” accepted for publication in Solar Energy Journal, (in press 2005)
2. Duffie, John A. and William A. Beckman. Solar Engineering of Thermal Processes. New York: John
Wiley & Sons, Inc., 1991.
3. King, D.L., Kratochvil, J.A., Boyson, W.E., Bower, W.I., 1998. Field Experience with a New
Performance Characterization Procedure for Photovoltaic Arrays presented at the 2nd World
Conference and Exhibition on Photovoltaic Solar energy Conversion, Vienna, Austria, July 6-10.

4–132
TRNSYS 18 – Mathematical Reference

4.3. HVAC

4–133
TRNSYS 18 – Mathematical Reference

4.3.1. Type 42: Generic Conditioning Equipment


This component models any piece of equipment whose performance can be characterized in terms of three
independent variables and between 1 and 5 dependent performance variables. Examples include a
chemical heat pump whose performance is characterized in terms of generator, evaporator, and condenser
conditions. Equipment performance is determined from user-supplied, steady-state data. Reduced
performance associated with frequent cycling or other means of controlling capacity are not considered.
These effects can be accounted for through the use of the Type43 Part Load Performance component.
The equipment is controlled by a single control input, Y. The values of the dependent variables output by
this component are just the product of each performance variable evaluated at the current conditions and
the control function. If Y is 0, then all outputs are 0. If Y is 1, then the outputs are the interpolated values
from the user supplied data. The equipment performance data is read and interpolated using the standard
TRNSYS data reading routine.

4.3.1.1. Parameter/Input/Output Reference


PARMAETERS

1 Logical unit [-] The logical unit number of the file containing performance data.
Every external file that TRNSYS reads to or writes from must be
assigned a unique integer (logical unit number) in the TRNSYS
input file. Simulation Studio assigns this number automatically

2 Number of [-] The number of independent variables on which the equipment


independent variables performance is dependent.

3 Number of dependent [-] The number of dependent performance variables to be read


variables from the external performance data file.

4 Number of values of [-] The number of values of the first independent variable for which
the 1st independent peformance data is supplied in the external performance file.
variable NOTE: These values should be entered in the 3rd line of the
data file.

The next parameter is only needed if the data file contains values for more than one independent variable. In other
words if the performance of the equipment depends on two or more variables.

5 Number of values of [-] The number of values of the second independent variable for
the 2nd independent which peformance data is supplied in the external performance
variable file. NOTE: These values should be entered in the 2nd line of
the data file.

The next parameter is only needed if the data file contains values for more than two independent variables. In
other words if the performance of the equipment depends on three variables.

6 Number of values of [-] The number of values of the third independent variable for which
the 3rd independent peformance data is supplied in the external performance file.
variable NOTE: These values should be entered in the 1st line of the
data file.

INPUTS

1 Control function [0/1] The control function for the equipment operation. The outputs
from this component are simply the interpolated values from the
data file multiplied by this control function.

4–134
TRNSYS 18 – Mathematical Reference

2 First independent [any] The value of the first independent variable on which the
variable value equipment performance depends. This is the independent
variable whose values are located in the 3rd line of the external
data file.

3 Second independent [any] The value of the second independent variable on which the
variable value equipment performance depends. This is the independent
variable whose values are located in the 2nd line of the external
data file.

4 Third independent [any] The value of the third independent variable on which the
variable value equipment performance depends. This is the independent
variable whose values are located in the 1st line of the external
data file.

OUTPUTS

The outputs are cycled based on the value of parameter 3

1 Independent variable [any] The value of the specified dependent equipment performance
value variable.

4.3.1.2. Simulation Summary Report Contents


VALUE FIELDS

Number of [-] The value of parameter 2


independent variables

Number of dependent [-] The value of parameter 3


variables

INTEGRATED VALUE FIELDS

One integrated value will be reported for each dependent variable in the data file.

Dependent variable [-] The integrated value of each dependent variable over the course of the
value simulation

MINIMUM/MAXIMUM VALUE FIELDS

One min/max value will be reported for each dependent variable in the data file.

Dependent variable [0..1] The minimum and maximum value of each dependent variable over the
value course of the simulation

One min/max value will be reported for each independent variable in the data file.

Independent variable [V] The minimum and maximum value of each independent variable over
value the course of the simulation

4.3.1.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4–135
TRNSYS 18 – Mathematical Reference

4.3.1.4. Detailed Description


The equipment performance data is read and interpolated using subroutine InterpolateData. It should be
provided in a file accessed through a Fortran logical unit. A logical unit is simply an integer that is assigned
to a file and that is later used as a reference to that file for reading and writing purposes. Data values for
each dependent performance variable are required for each combination of independent variable values
specified. Examples using Type42 for one, two, and three independent variables follow:
Residential Heat Pump
The performance of an ambient source heat pump is primarily a function of the outdoor air temperature.
Suppose one wished to use Type42 to determine heating capacity, energy absorbed by the evaporator,
and COP as a function of ambient temperature. In this case, there is a single independent variable (ambient
temperature) and three dependent variables (capacity, absorbed energy, and COP). The first NX1 numbers
in the data file must be values of ambient temperature in increasing order. Next are the values of capacity,
energy absorbed, and COP at the lowest ambient temperature, followed by their values at the next air
temperature, and so on. The first input is the control signal and the second input is the current ambient
temperature. The first three outputs will be values of capacity, energy absorbed, and COP at the current
ambient temperature multiplied by the control signal. The data file might look like the following. Please note
that the data below is NOT realistic but is meant simply to give the user an idea of the format of the required
data file.
10 15 20 30 ! [C] values of ambient temperature
10000 8000 3.0 ! values of capacity [kJ/h] energy absorbed [kJ/h] and COP [-] at 10C
12000 9000 3.0 ! values of capacity [kJ/h] energy absorbed [kJ/h] and COP [-] at 15C
14000 10000 3.0 ! values of capacity [kJ/h] energy absorbed [kJ/h] and COP [-] at 20C
16000 11000 3.0 ! values of capacity [kJ/h] energy absorbed [kJ/h] and COP [-] at 30C
Air Conditioner
This example describes the use of the Type42 to determine cooling capacity and COP of an air conditioner
in terms of ambient temperature and relative humidity. Both the numbers of independent and dependent
variables are two. Consider ambient temperature to be the primary independent variable. It is necessary to
supply capacity and COP versus ambient temperature data for different values of relative humidity. The
first NX2 numbers in the data file are the increasing values of relative humidity for which capacity and COP
versus temperature data is provided. The next NX1 values are increasing ambient temperatures at which
capacity and COP data are evaluated. Values of capacity and COP at the corresponding temperatures at
the lowest value of relative humidity are next, followed by capacity and COP values at these same
temperatures, at the next relative humidity and so on. The first input is the control signal and the second
and third inputs should be the current values of the ambient temperature and relative humidity. The first two
outputs are the values of capacity and COP at the current conditions multiplied by the control function. The
data file format in this case might look like the following (again, the values are NOT realistic)
25 50 75 ! [%] values of ambient relative humidity
10 15 20 30 ! [C] values of ambient temperature
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 25% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 25% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 25% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 25% RH and 30C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 50% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 50% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 50% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 50% RH and 30C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 75% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 75% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 75% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 75% RH and 30C
Chemical (Absorption) Heat Pump

4–136
TRNSYS 18 – Mathematical Reference

The steady-state capacity and COP of an absorption heat pump may be characterized in terms of the
energy input rate to the generator, the evaporator fluid inlet temperature, and the condenser fluid inlet
temperature. In this case, there are three independent and two dependent variables. Consider the generator
energy as the primary independent variable and the evaporator and condenser inlet temperatures as the
secondary and tertiary independent variables, respectively. It is necessary to provide N X3 X NX2 sets of
capacity and COP data versus generator input energy. The first NX3 numbers in the data file are increasing
values of condenser inlet temperature. These are followed by N X2 values of increasing evaporator
temperature and NX1 values of increasing generator input energy. Values of capacity and COP for each
value of generator input at the lowest evaporator and condenser temperatures are next.
A set of these performance numbers is required for each evaporator temperature, still at the lowest
condenser temperature. This sequence of data entry is repeated for each value of condenser temperature.
The first input is the control signal and the current energy input to the generator, evaporator inlet
temperature, and condenser inlet temperature are the second, third, and fourth inputs to this component.
The first two outputs are the products of the control function and the capacity and COP. The data file format
in this case might look like the following (again, the values are NOT realistic)
500 1000 ! [kg/h] values of air flow rate
25 50 75 ! [%] values of ambient relative humidity
10 15 20 30 ! [C] values of ambient temperature
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 25% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 25% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 25% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 25% RH and 30C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 50% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 50% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 50% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 50% RH and 30C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 75% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 75% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 75% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 75% RH and 30C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 25% RH and 10C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 25% RH and 15C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 25% RH and 20C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 25% RH and 30C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 50% RH and 10C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 50% RH and 15C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 50% RH and 20C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 50% RH and 30C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 75% RH and 10C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 75% RH and 15C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 75% RH and 20C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 75% RH and 30C

4–137
TRNSYS 18 – Mathematical Reference

4.3.2. Type 43: Generic PLR Curve


This component determines purchased energy requirements and average operating efficiency (or COP) for
heating or cooling equipment that is operating at less than full capacity. This condition generally results
from the capacity of a machine being modulated in some manner to match the energy requirement or load
of some process. The full-load capacity and efficiency, along with the load (or part-load capacity) are inputs
to this component. Energy loads for buildings may be calculated using energy rate control as outlined in
the Building Loads and Structures Section of the TRNSYS documentation set. The user must also provide
a relationship between the part-load factor (PLF) and the reciprocal of the duty cycle. This relationship can
be assumed to be linear with a user specified slope, or it can be provided in an external data file that will
be read by the standard TRNSYS Data Reading routine.

4.3.2.1. Parameter/Input/Output Reference


PARAMETERS

If using a data file:

1 Logical Unit [-] The logical unit through which the part load performance data will
be read. Every external file that TRNSYS reads to or writes from
must be assigned a unique logical unit number in the TRNSYS
input file. (Simulation Studio will automatically assign this number.)

2 Number of Data Points [-] The number of part load performance data points contained in the
external data file.

If using a linear relationship:

1 Slope of PLR Function [-] The slope (rise over run) of the linear part load factor versus 1/duty
cycle relationship. The Y-intercept of the line is assumed to be 1.0

INPUTS

1 Energy to Meet the [kJ/h] The rate that energy must be supplied to meet the load.
Load

2 Full Load Capacity [kJ/h] The full load capacity of the heating or cooling equipment at the
current operating conditions.

3 Full Load Efficiency [-] The full load efficiency or COP of the heating or cooling equipment
at the current operating conditions.

OUTPUTS

1 Energy Removal Rate [kJ/h] The rate at which energy is removed or delivered by the heating or
cooling equipment.

2 Purchased Energy rate [kJ/h] The rate at which energy is purchased to operate the heating or
cooling equipment.

3 Part Load Factor [-] The part load factor for the heating or cooling equipment. The part
load factor is defined as the ratio of the part load to full load
efficiencies.

4–138
TRNSYS 18 – Mathematical Reference

4 Operating Efficiency [-] The average operating efficiency (or COP) of the heating or cooling
equipment.

4.3.2.2. Simulation Summary Report Contents


TEXT FIELDS

Load curve format n/a Either “linear with load” or “from external file”

INTEGRATED VALUE FIELDS

Energy removal rate [kJ/h] Output 1

Purchased energy rate [kJ/h] Output 2

MINIMUM/MAXIMUM VALUE FIELDS

Part load factor [0..1] Output 3

Operating efficiency [0..1] Output 4

4.3.2.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.2.4. Nomenclature
Duty Cycle ratio of part-load to full-load capacities
PLF part-load factor; ratio of part-load to full-load efficiencies
Q eq actual capacity; minimum of Q load and Q max
Q load energy rate required to meet the load (part-load capacity)
Q max full-load capacity
Q pur purchased energy required to operate equipment
ηmax full-load efficiency
ηop part-load efficiency

4.3.2.5. Detailed Description


The average operating efficiency of any equipment operating at part-load is given in terms of the full-load
efficiency and part-load factor as
𝜂𝑜𝑝 = 𝑃𝐿𝐹 ∙ 𝜂𝑚𝑎𝑥 Eq. 4.3.2-1

The part-load factor, PLF, is conveniently represented as a unique function of the reciprocal of the duty
cycle as illustrated in the Figure. The duty cycle is defined as the ratio of the load (or part-load capacity) to
the full-load capacity.
𝑄𝑙𝑜𝑎𝑑
𝐷𝑢𝑡𝑦 𝐶𝑦𝑐𝑙𝑒 = Eq. 4.3.2-2
𝑄𝑚𝑎𝑥

4–139
TRNSYS 18 – Mathematical Reference

PLF

0
1 1
Duty Cyc le

Figure: Part-Load Factor Definition


The user has the option of entering the slope of a linear relationship between PLF and 1/Duty Cycle.
Otherwise, PLF vs. l/Duty Cycle data may be supplied in a user-provided. In this case, the first Ndata numbers
in the file are values of l/Duty Cycle in increasing order. These are followed by the corresponding PLF data
points.
The actual delivery or removal energy rate of the heating or cooling equipment is
𝑄𝑒𝑞 = min(𝑄𝑚𝑎𝑥 , 𝑄𝑙𝑜𝑎𝑑 ) Eq. 4.3.2-3

The purchased energy is then


𝑄𝑒𝑞
𝑄𝑝𝑢𝑟 = Eq. 4.3.2-4
𝜂𝑜𝑝

4–140
TRNSYS 18 – Mathematical Reference

4.3.3. Type 52: Detailed Cooling Coil


This component models the performance of a dehumidifying cooling coil, shown in Figure 4.3.3.4–1, using
the effectiveness model outlined by Braun (1). The user must specify the geometry of the cooling coil and
air duct. Either annular fins or continuous flat plate fins may be specified. The model does not account for
ice formation on the coils during icing conditions.
The user may choose either a simple or detailed level of analysis. The level of detail determines the method
used in modeling a coil operating under partially wet and dry conditions. In the detailed analysis a separate
analysis is used for each of the dry and wet portions of the coil. In the simple level of analysis, the partially
dry and wet coil is assumed to be either all dry or all wet. The simple analysis provides a faster calculation
of coil performance with normally only a small decrease in accuracy.

4.3.3.1. Parameter/Input/Output Reference


PARAMETERS

1 Calculation Mode [-] The detailed cooling coil component may operate in one of two
modes. In mode 1, the coil is assumed to be either completely wet
or completely dry. This mode tends to underpredict the total heat
transfer. In mode 2, the percentage of dry coil is determined using a
detailed approach.

2 Number of Rows [-] The number of heat exchanger rows (passes). Four or more rows
are recommended.

3 Number of Tubes [-] The number of parallel tubes in each row of tubes.

4 Duct Height [m] The height of the duct parallel to the tubes (used as the tube
length).

5 Duct Width [m] The width of the cooling coil duct (perpendicular to tubes).

6 Outside Tube [m] The outside diameter of the tubes containing the water stream.
Diameter

7 Inside Tube Diameter [m] The inside diameter of one of the identical tubes carrying the chilled
water.

8 Tube Thermal [kJ/h m K] The thermal conductivity of the tube material.


Conductivity

9 Fin Thickness [m] The thickness of an individual fin.

10 Fin Spacing [m] The distance between individual fins.

11 Number of Fins [-] The number of fins on one tube and one pass.

12 Fin Thermal [kJ/h m K] The thermal conductivity of the fin material.


Conductivity

13 Fin Mode [-] This parameter indicates if rectangular (=1) or annular (=2) fins are
to be used.

For Rectangular Fins

4–141
TRNSYS 18 – Mathematical Reference

14 Center to Center [m] The center to center distance between rows of tubes (perpendicular
Distance to air flow).

15 Tube Spacing [m] The distance between center lines of tube rows (parallel to air flow).

For Annular Fins

14 Diameter at Fin Tip [m] The diameter of the fin at the tip.

15 Tube Spacing [m] The distance between center lines of tube rows (parallel to air flow).

INPUTS

1 Inlet Dry-Blub [C] The dry bulb temperature of the air entering the cooling coil.
Temperature

2 Air Inlet Humidity Ratio [-] The humidity ratio of the air entering the cooling coil.

3 Flow Rate of Air [kg/h] The flow rate of air entering the cooling coil.

4 Inlet Water [C] The temperature of the chilled water entering the cooling coil.
Temperature

5 Flow Rate of Water [kg/h] The flow rate of chilled water entering the cooling coil.

OUTPUTS

1 Outlet Air Temperature [C] The dry bulb temperature of the air exiting the cooling coil.

2 Outlet Air Humidity [-] The absolute humidity ratio (kg's of H2O / kg of dry air) of the air
Ratio exiting the cooling coil.

3 Air Flow Rate [kg/h] The flow rate of air exiting the cooling coil.

4 Outlet Water [C] The temperature of the chilled water exiting the cooling coil.
Temperature

5 Water Flow Rate [kg/h] The flow rate of chilled water exiting the cooling coil.

6 Total Cooling Rate [kJ/h] The rate at which energy is transferred from the air stream in the
cooling coil.

7 Sensible Cooling Rate [kJ/h] The rate at which sensible energy is removed from the air stream in
the cooling coil.

8 Latent Cooling Rate [kJ/h] The rate at which latent energy is removed from the moist air flow
stream in the cooling coil.

9 Dry Coil Fraction [-] The fraction of the coil surface area that is dry. (0.0 = Completely
wet, 1.0 = Completely dry, -1.0 = If simple analysis calculation
mode is used (either wet or dry)).

4.3.3.2. Simulation Summary Report Contents


VALUE FIELDS

4–142
TRNSYS 18 – Mathematical Reference

Fin Ratio [-] Ratio of fin area to outside coil surface area
Flow Cross Sectional
[m2] The area of air flow
Area
Tube Heat Transfer
[kJ/h m2 K] The heat transfer area of the tubes based on the inside area
Area

TEXT FIELDS

All Dry or All Wet (calculation mode = 1) or Partially Wet Calculations


Calculation Mode [-]
(calculation mode = 2)

Fin Type [-] Rectangular (fin mode = 1) or Angular (fin mode = 2)

INTEGRATED VALUE FIELDS

Total Cooling [kJ] Output 6

Sensible Cooling [kJ] Output 7

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Air Temperature [C] Minimum and maximum of Output 1

Air Flowrate [kg/h] Minimum and maximum of Output 3

Outlet Fluid [C] Minimum and maximum of Output 4


Temperature

Fluid Flowrate [kg/h] Minimum and maximum of Output 5

4.3.3.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.3.4. Nomenclature
Cpm constant pressure specific heat of moist air
Cpw constant pressure specific heat of liquid water
Cs average slope of saturation air enthalpy versus temperature
C* ratio of air to water capacitance rate for dry analysis ( m aCpm/ m wCpw)
ha enthalpy of moist air per mass of dry air
hs enthalpy of saturated air per mass of dry air
ma mass flow rate of dry air
mw mass flow rate of water
m* ratio of air to water effective capacitance rate for wet analysis ( m aCs/ m
wCpw)
Ntu overall number of transfer units
Q overall heat transfer rate
Ta air temperature
Tdp air dewpoint temperature
Ts surface temperature
Tw water temperature
UA overall heat conductance
a air humidity ratio

4–143
TRNSYS 18 – Mathematical Reference

s humidity of saturated air


SUBSCRIPTS
a air stream conditions
dry dry surface
e effective
i inlet or inside conditions
o outlet or outside conditions
s surface conditions
w water stream conditions
wet wet surface
x point on coil where condensation begins

4.3.3.5. Detailed Description


The limiting exit state for air that is cooled and dehumidified through a coiling coil would be if the air were
saturated at a temperature equal to that of the incoming water stream. This corresponds to the minimum
possible enthalpy of the exit air. The air-side heat transfer effectiveness is defined as the ratio of the air
enthalpy difference to the maximum possible air enthalpy difference if the exit air were at the minimum
possible enthalpy. Assuming that the Lewis number equals one, Braun (1) has shown that the air
effectiveness can be determined using the relationships for sensible heat exchangers with modified
definitions for the number of transfer units and the capacitance rate ratios. This component models the
performance of cooling coils utilizing this effectiveness model for counterflow geometries. The performance
of multi-pass crossflow heat exchangers approach that of counterflow devices when the number of rows is
greater than about four.
Fin efficiencies are required in order to calculate heat transfer coefficients between the air stream and coil.
Threlkeld (2) notes that the performance of rectangular-plate fins of uniform thickness can be approximated
by defining equivalent annular fins. Efficiencies are calculated for annular fins of uniform thickness ignoring
end effects (3). Polynomial approximations are used to evaluate the Bessel functions used in calculating
the efficiencies. In the following figure, w is the width of the coil, L is the height of the coil. The dimension
labeled “a” is the distance between the water tubes in the direction perpendicular to air flow while the
dimension labeled “c” is the distance between tube rows parallel to the air flow direction.

N =6
r ows

Nt ube s = 4
Air Flow
N =7
f ins

a
Air
Flow
L

c w
Wat er
Flow
Figure 4.3.3.4–1: Schematic And Cross-Sectional Views Of A Cooling Coil.
Dry Coil Effectiveness
If the coil surface temperature at the air outlet is greater than the dewpoint of the incoming air, then the coil
is completely dry throughout and standard heat exchanger effectiveness relationships apply.

4–144
TRNSYS 18 – Mathematical Reference

In terms of the air-side heat transfer effectiveness, the dry coil heat transfer is
𝑄𝑑𝑟𝑦 = 𝜀𝑑𝑟𝑦 𝑚𝑎 𝐶𝑝𝑚 (𝑇𝑎,𝑖 − 𝑇𝑤,𝑖 ) Eq. 4.3.3-1

where

1 − 𝑒𝑥𝑝 (−𝑁𝑇𝑈𝑑𝑟𝑦 (1 − 𝐶 ∗ ))
𝜀𝑑𝑟𝑦 = Eq. 4.3.3-2
1 − 𝐶 ∗ 𝑒𝑥𝑝 (−𝑁𝑇𝑈𝑑𝑟𝑦 (1 − 𝐶 ∗ ))
𝑚𝑎 𝐶𝑝𝑚
𝐶∗ = Eq. 4.3.3-3
𝑚𝑤 𝐶𝑝𝑤
𝑈𝐴𝑑𝑟𝑦
𝑁𝑇𝑈𝑑𝑟𝑦 = Eq. 4.3.3-4
𝑚𝑎 𝐶𝑝𝑚
The overall heat transfer conductance for dry heat exchangers is computed in terms of the heat transfer
coefficients and fin efficiency as outlined in Threlkeld (2). For air flow over finned coil surfaces, correlations
developed by Elmahdy (4) are utilized for determining the air-side heat transfer coefficient. The water-side
heat transfer coefficient is determined using standard turbulent flow relations.
The exit air humidity ratio is equal to the inlet value, while the exit air and water temperatures are determined
from energy balances on the flow streams as
𝑇𝑎,𝑜 = 𝑇𝑎,𝑖 − 𝜀𝑑𝑟𝑦 (𝑇𝑎,𝑖 − 𝑇𝑤,𝑖 ) Eq. 4.3.3-5

𝑇𝑤,𝑜 = 𝑇𝑤,𝑖 − 𝐶 ∗ (𝑇𝑎,𝑖 − 𝑇𝑎,𝑜 ) Eq. 4.3.3-6

The coil surface temperature at the air outlet is determined by equating the rate equation for heat transfer
between the water and air streams with that between the water and the outside surface.
𝑈𝐴𝑑𝑟𝑦
𝑇𝑠,𝑜 = 𝑇𝑤,𝑖 + 𝐶 ∗ ( ) (𝑇𝑎,𝑜 − 𝑇𝑤,𝑖 ) Eq. 4.3.3-7
𝑈𝐴𝐼
If the surface temperature evaluated with the above equation is less than the inlet air dewpoint, then at
least a portion of the coil is wet and the analysis in the following section must be applied.
Wet Coil Effectiveness
If the coil surface temperature at the air inlet is less than the dewpoint of the incoming air, then the coil is
completely wet and dehumidification occurs throughout the coil.
For a completely wet coil, the heat transfer is
𝑄𝑤𝑒𝑡 = 𝜀𝑤𝑒𝑡 𝑚𝑎 (ℎ𝑎,𝑖 − ℎ𝑠,𝑤,𝑖 ) Eq. 4.3.3-8

where
1 − 𝑒𝑥𝑝(−𝑁𝑇𝑈𝑤𝑒𝑡 (1 − 𝑚∗ ))
𝜀𝑤𝑒𝑡 = Eq. 4.3.3-9
1 − 𝑚∗ 𝑒𝑥𝑝(−𝑁𝑇𝑈𝑤𝑒𝑡 (1 − 𝑚∗ ))
𝑚𝑎 𝐶𝑠
𝑚∗ = Eq. 4.3.3-10
𝑚𝑤,𝑖 𝐶𝑝𝑤
𝑈𝐴𝑤𝑒𝑡
𝑁𝑇𝑈𝑤𝑒𝑡 = Eq. 4.3.3-11
𝑚𝑎
UA's are normally given in terms of a temperature difference, but in this case UAwet is the heat conductance
in terms of an enthalpy difference. Threlkeld (2) gives the relation for the overall wet surface enthalpy
conductance for finned surfaces that is utilized in this model.
The saturation specific heat, Cs, is defined as the average slope of the saturation enthalpy curve with
respect to temperature. It is determined with the water inlet and outlet conditions and psychometric data
as:

4–145
TRNSYS 18 – Mathematical Reference

ℎ𝑠,𝑤,𝑜 − ℎ𝑠,𝑤,𝑖
𝐶𝑠 = Eq. 4.3.3-12
𝑇𝑤,𝑜 − 𝑇𝑤,𝑖
Analogous to the dry analysis, the exit air enthalpy and water temperature are
ℎ𝑎,𝑜 = ℎ𝑎,𝑖 + 𝜀𝑤𝑒𝑡 (ℎ𝑎,𝑖 − ℎ𝑠,𝑤,𝑖 ) Eq. 4.3.3-13
𝑚𝑎
𝑇𝑤,𝑜 = 𝑇𝑤,𝑖 − (ℎ − ℎ𝑎,𝑜 ) Eq. 4.3.3-14
𝑚𝑤 𝐶𝑝𝑤 𝑎,𝑖
The average saturation specific heat, Cs, depends on the outlet water temperature and therefore an iterative
method is required to find the outlet water temperature.
The exit air temperature is determined as described in the ASHRAE Equipment Guide (5).
−𝑈𝐴𝑜
𝑇𝑎,𝑜 = 𝑇𝑠,𝑒 + (𝑇𝑎,𝑖 − 𝑇𝑠,𝑒 )𝑒𝑥𝑝 ( ) Eq. 4.3.3-15
𝑚𝑎 𝐶𝑝𝑚
where, the effective surface temperature is determined from its corresponding saturation enthalpy:
ℎ𝑎,𝑜 − ℎ𝑎,𝑖
ℎ𝑠,𝑠,𝑒 = ℎ𝑎,𝑖 +
−𝑈𝐴𝑜 Eq. 4.3.3-16
1 − 𝑒𝑥𝑝 ( )
𝑚𝑎 𝐶𝑝𝑚
From the rate equations, the surface temperature at the air inlet is computed as
𝑚𝑎 𝑈𝐴𝑤𝑒𝑡
𝑇𝑠,𝑖 = 𝑇𝑤,𝑜 + ( ) (ℎ𝑎,𝑖 − ℎ𝑠,𝑤,𝑜 ) Eq. 4.3.3-17
𝑚𝑤 𝐶𝑝𝑤 𝑈𝐴𝑖
If the surface temperature evaluated with the above equation is greater than the inlet air dewpoint, then a
portion of the coil beginning at the air inlet is dry, while the remainder is wet.
Combined Wet and Dry Analysis
Depending upon the entering conditions and flow rates, only part of the coil may be wet. A detailed analysis
involves determining the point in the coil at which the surface temperature equals the dewpoint of the
entering air. A simpler approach is to assume that the coil is either completely wet or dry. The user specifies
whether the simple or detailed analysis is to be used. The simpler approach requires less computational
effort and should be used if its accuracy is acceptable.
Simple Analysis
The simple approach assumes that the coil is either completely wet of dry. Either assumed condition will
tend to underpredict the actual heat transfer. With the completely dry assumption, the latent heat transfer
is neglected and the predicted heat transfer is low. With the assumption of a completely wet coil, the model
predicts that the air is humidified during the portion of the coil in which the dewpoint of the air is less than
the surface temperature. The latent heat transfer to the air associated with this "artificial" mass transfer
reduces the overall calculated cooling capacity as compared with the actual situation. Since both the
completely dry and wet analyses under predict the heat transfer, a simple approach is to utilize the results
of the analysis that gives the largest heat transfer. The error associated with this method is generally less
than 5 percent.
The steps for determining the heat transfer and outlet conditions using the simple analysis are summarized
as follows:
Determine the coil heat transfer assuming that the coil is completely dry.
If the surface temperature at the air outlet determined with the dry analysis is less than the dewpoint of the
entering air, then assume that the coil is completely wet and determine the heat transfer.
If the surface temperature at the air inlet determined with the wet analysis is greater the entering dewpoint
temperature, then a portion of the coil is dry. The results of steps 1 or 2 that yield the largest heat transfer
are utilized.

4–146
TRNSYS 18 – Mathematical Reference

Detailed Analysis
Water will begin to condense on the surface of a cooling coil at the point where the surface temperature
equals the dewpoint of the entering air. In order to calculate the heat transfer through the cooling coil, the
relative areas associated with the wet and dry portions of the coil must be determined. Braun (1) presents
the following method for calculating the heat transfer in a partially wet coil. The fraction of the coil surface
area that is dry is

−1 (𝑇𝑑𝑝 − 𝑇𝑤,𝑜 ) + 𝐶 ∗ (𝑇𝑎,𝑖 − 𝑇𝑑𝑝 )


𝑓𝑑𝑟𝑦 = 𝑙𝑛 [ ] Eq. 4.3.3-18
𝐾 𝐾
(1 − ) (𝑇𝑎,𝑖 − 𝑇𝑤,𝑜 )
𝑁𝑇𝑈𝑜
where,
𝐾 = 𝑁𝑇𝑈𝑑𝑟𝑦 (1 − 𝐶 ∗ ) Eq. 4.3.3-19

The effectiveness for the wet and dry portions of the coil are

1 − 𝑒𝑥𝑝 (−(1 − 𝑓𝑑𝑟𝑦 )𝑁𝑇𝑈𝑤𝑒𝑡 (1 − 𝑚∗ ))


𝜀𝑤𝑒𝑡 = Eq. 4.3.3-20
1 − 𝑚∗ 𝑒𝑥𝑝 (−(1 − 𝑓𝑑𝑟𝑦 )𝑁𝑇𝑈𝑤𝑒𝑡 (1 − 𝑚∗ ))

1 − 𝑒𝑥𝑝 (−𝑓𝑑𝑟𝑦 𝑁𝑇𝑈𝑑𝑟𝑦 (1 − 𝐶 ∗ ))


𝜀𝑑𝑟𝑦 = Eq. 4.3.3-21
1 − 𝐶 ∗ 𝑒𝑥𝑝 (−𝑓𝑑𝑟𝑦 𝑁𝑇𝑈𝑑𝑟𝑦 (1 − 𝐶 ∗ ))

The water temperature at the point where condensation begins is


𝐶 ∗ 𝜀𝑤𝑒𝑡 (ℎ𝑎,𝑖 − ℎ𝑠,𝑤,𝑖 )
𝑇𝑤,𝑖 + − 𝐶 ∗ 𝜀𝑤𝑒𝑡 𝜀𝑑𝑟𝑦 𝑇𝑎,𝑖
𝐶𝑝𝑚 Eq. 4.3.3-22
𝑇𝑤,𝑥 =
1 − 𝐶 ∗ 𝜀𝑤𝑒𝑡 𝜀𝑑𝑟𝑦
and the exit water temperature is
𝑇𝑤,𝑜 = 𝐶 ∗ 𝜀𝑑𝑟𝑦 𝑇𝑎,𝑖 + (1 − 𝐶 ∗ 𝜀𝑑𝑟𝑦 )𝑇𝑤,𝑥 Eq. 4.3.3-23

Since the fraction of the coil that is dry is dependent on the exit water temperature, an iterative method is
required to find the exit water temperature.
The outlet air state from the coil is determined from
𝑇𝑎,𝑜 = 𝑇𝑠,𝑒 + (𝑇𝑎,𝑥 − 𝑇𝑠,𝑒 )𝑒𝑥𝑝(−(1 − 𝑓𝑑𝑟𝑦 )𝑁𝑇𝑈𝑜 ) Eq. 4.3.3-24

where Ts,e is the effective surface temperature in the wet coil section and is determined from the saturation
condition associated with
ℎ𝑎,𝑜 − ℎ𝑎,𝑥
ℎ𝑠,𝑠,𝑒 = ℎ𝑎,𝑥 + Eq. 4.3.3-25
1 − 𝑒𝑥𝑝(−(1 − 𝑓𝑑𝑟𝑦 )𝑁𝑇𝑈𝑜 )
The air temperature and enthalpy at the point where condensation occurs are
𝑇𝑎,𝑥 = 𝑇𝑎,𝑖 − 𝜀𝑑𝑟𝑦 (𝑇𝑎,𝑖 − 𝑇𝑤,𝑥 ) Eq. 4.3.3-26

ℎ𝑎,𝑥 = ℎ𝑎,𝑖 − 𝜀𝑑𝑟𝑦 𝐶𝑝𝑚 (𝑇𝑎,𝑖 − 𝑇𝑤,𝑥 ) Eq. 4.3.3-27

Coil Performance
Three heat transfer rates are calculated from energy balances on the water and air streams. The total
energy transferred across the coil is
𝑄𝑐𝑜𝑖𝑙 = 𝑚𝑤 𝐶𝑝𝑤 (𝑇𝑤,𝑜 − 𝑇𝑤,𝑖 ) Eq. 4.3.3-28

The heat transfer attributed to condensing the moisture in the air is calculated as

4–147
TRNSYS 18 – Mathematical Reference

𝑄𝑙𝑎𝑡 = 𝑚𝑎 (𝜔𝑎,𝑖 − 𝜔𝑎,𝑜 )ℎ𝑓𝑔 Eq. 4.3.3-29

where hfg is the heat of vaporization for water and assumed constant at the value for standard conditions
(2452 kJ/kg). The heat transfer attributed to sensible heat transfer is simply
𝑄𝑠𝑒𝑛𝑠 = 𝑄𝑐𝑜𝑖𝑙 − 𝑄𝑙𝑎𝑡 Eq. 4.3.3-30

4.3.3.6. References
1. Braun, J.E., "Methodologies for the Design and Control of Chilled Water Systems," Ph. D. Thesis,
University of Wisconsin - Madison, 1988.
2. Threlkeld J.L., Thermal Environmental Engineering, Prentice-Hall,New York, Second Edition, 1970.
3. Chapman, A.J., Heat Transfer, Macmillan Publishing Company, New York, N.Y., Fourth Edition, 1984.
4. Elmahdy, A.H. and Biggs, R.C., "Finned Tube Heat Exchanger: Correlation of Dry Surface Heat Transfer
Data," ASHRAE Transactions, Vol. 85, Part 2, pp. 262-273, 1979.
5. ASHRAE Equipment Guide, American Society of Heating, Refrigerating, and Air Conditioning Engineers,
Atlanta, 1983.

4–148
TRNSYS 18 – Mathematical Reference

4.3.4. Type 107: Singe-Effect Hot-Water Fired Absorption


Chiller
Type 107 uses a normalized catalog data lookup approach to model a single-effect hot-water fired
absorption chiller. “Hot Water-Fired” indicates that the energy supplied to the machine’s generator comes
from a hot water stream. Because the data files are normalized, the user may model any size chiller using
a given set of data files. Example files are provided.

4.3.4.1. Parameter/Input/Output Reference


PARAMETERS

1 Rated Capacity [kJ/h] The capacity of the machine at its rated condition (typically 30C (85
F) inlet cooling water temperature and 7C (44 F) chilled water
setpoint temperature). The data files associated with this model
should be consistent with the rating conditions.

2 Rated COP [-] The COP of the chiller at its rated conditions (typically 30 C (85 F)
inlet cooling water temperature and 7C (44 F) chilled water setpoint
temperature). The data files associated with this model should be
consistent with the rating conditions.

3 Logical Unit for Data [-] The logical unit for the user-supplied data file containing the fraction
File of nominal capacity and fraction of design energy input data as a
function of the inlet hot water temperature, the inlet cooling water
temperature, the chilled water setpoint temperature, and the fraction
of design load. (Simulation Studio will automatically assign this
parameter.)

4 Number of HW [-] The number of hot water inlet temperatures for which catalog data is
Temperatures in Data supplied in the data file.
File

5 Number of CW Steps [-] The number of cooling water temperature steps contained in the
in Data File required catalog data file.

6 Number of CHW [-] The number of chilled water setpoints for which catalog data is
Setpoints in Data File provided in the required data file.

7 Number of Load [-] The number of fractions of design load for which catalog data is
Fractions in Data File provided in the required data file.

8 HW Fluid Specific Heat [kJ/kg K] The specific heat of the fluid (typically hot water) which will be used
by the absorption chiller as the energy source for chiller operation.

9 CHW Fluid Specific [kJ/kg K] The specific heat of the chilled water stream flowing through the
Heat chiller.

10 CW Fluid Specific Heat [kJ/kg K] The specific heat of the cooling water flow stream.

11 Auxiliary Electrical [kJ/h] The auxiliary electrical power required by the absorption chiller while
Power its operating (solution pumps, refrigerant pumps, etc).

INPUTS

4–149
TRNSYS 18 – Mathematical Reference

1 Chilled Water Inlet [C] The temperature of the chilled water stream entering the chiller.
Temperature

2 Chiller Water Flow [kg/h] The mass flow rate at which chilled water enters the chiller.
Rate

3 Cooling Water Inlet [C] The temperature at which the cooling water flow stream enters the
Temperature chiller.

4 Cooling Water Flow [kg/h] The mass flow rate at which the cooling fluid (typically water) enters
Rate the chiller.

5 Hot Water Inlet [C] The temperature of the inlet stream (typically hot water) which will
Temperature be used as the energy source for chiller operation.

6 Hot Water Flow Rate [kg/h] The flow rate of fluid (typically hot water) used as the energy source
for chiller operation.

7 CHW Setpoint [C] The setpoint temperature for the chilled water stream. If the chiller
has the capacity to meet the current load, the chiller will modulate
to meet the load and chilled water stream will leave at this
temperature.

8 Chiller Control Signal [-] The control signal for the operation of the chiller (CTRL < 0.5:
chiller is OFF, CTRL >= 0.5: chiller is ON).

OUTPUTS

1 Chilled Water [C] The temperature of the chilled water stream exiting the chiller.
Temperature

2 Chilled Water Flow [kg/h] The flow rate of the chilled water stream exiting the chiller.
Rate

3 Cooling Water [C] The temperature of the cooling flow stream exiting the chiller.
Temperature

4 Cooling Water Flow [kg/h] The mass flow rate at which the cooling stream exits the chiller.
Rate

5 Hot Water Outlet [C] The temperature of the hot water stream exiting the absorption
Temperature chiller.

6 Hot Water Flow Rate [kg/h] The flow rate of fluid (typically hot water) exiting the chiller and used
by the chiller for an energy source for chiller operation.

7 Chilled Water Energy [kJ/h] The rate at which energy was removed from the chilled water flow
stream during the timestep.

8 Cooling Water Energy [kJ/h] The rate at which energy is rejected to the cooling water flow
stream by the chiller.

9 Hot Water Energy [kJ/h] The rate at which energy was removed from the hot water flow in
order to operate the absorption chiller.

10 Electrical Energy [kJ/h] The rate at which electrical energy was required in order to operate
Required the absorption chiller (solution pumps, refrigerant pumps, etc).

4–150
TRNSYS 18 – Mathematical Reference

11 Fraction of Nominal [-] The fraction of nominal capacity available to the chiller at the
Capacity current timestep. The fraction of nominal capacity is interpolated
from the required data file for this component as a function of the
entering cooling water temperature, the chilled water set-point
temperature, the hot water inlet temperature, and the fraction of
design load.

12 Fraction of Design [-] The fraction of design energy input required by the chiller at the
Energy Input current timestep. The fraction of the energy input as compared to
design conditions is interpolated from the required data file for this
component as a function of the entering cooling water temperature,
the fraction of design load to be met by the chiller at the current
timestep, the entering hot water temperature, and the chilled water
setpoint temperature.

13 COP [-] The coefficient of performane (COP) of the chiller at current


conditions. The COP for this model is defined as the energy
transferred from the chilled water stream divided by the sum of the
electrical energy required by the chiller and the energy provided to
the chiller by the inlet hot water flow stream.

4.3.4.2. Simulation Summary Report Contents


VALUE FIELDS

Rated Capacity [C] Parameter 1

Rated COP [C] Parameter 2

Auxiliary Electrical [kW] Parameter 11


Power

INTEGRATED VALUE FIELDS

Power Consumption [kWh] Output 10

Energy Removed from [kJ] Output 7


the Chilled Water
Stream

Energy Rejected to the [kJ] Output 8


Cooling Water Stream

Energy Removed from [kJ] Output 9


the Hot Water Stream

MINIMUM/MAXIMUM VALUE FIELDS

Chiller COP [-] Minimum and maximum of Output 13

Fraction of Design [-] Minimum and maximum of Output 12


Energy Input

Chilled Water Setpoint [C] Minimum and maximum of Input 7

4–151
TRNSYS 18 – Mathematical Reference

Chilled Water Inlet [C] Minimum and maximum of Input 1


Temperature

Cooling Water Inlet [C] Minimum and maximum of Input 3


Temperature

Hot Water Inlet [C] Minimum and maximum of Input 5


Temperature

4.3.4.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.4.4. Nomenclature
Capacity [kJ/hr] The amount of cooling that can be provided by the device.
Fraction of the device’s full load capacity during operation under
fFullLoadCapacity [0..1]
current conditions.
Fraction of the device’s nominal capacity during operation under
fNominalCapacity [0..1]
current conditions.
Capacityrated [kJ/hr] Rated cooling capacity of the device
 Amount of energy that must be removed from the chilled water
Q remove [kJ/hr]
stream in order to reach the setpoint temperature
Tchw,set [ºC] “Chilled water” stream setpoint.
Fraction of design capacity at which the machine is currently
fdesign [0..1]
operating.
COPrated [-] Machine’s rated Coefficient of Performance.
fDesignEnergyInput [0..1] Fraction of design energy input currently required by the machine.
Thw,out [ºC] Temperature of fluid exiting the “hot water” stream
Thw,in [ºC] Temperature of fluid entering the “hot water” stream

Q [kJ/hr] Energy removed from the “hot water” stream
hw

 hw
m [kg/hr] Mass flow rate of the “hot water” stream fluid
Cphw [kJ/kg.K] Specific heat of the “hot water” stream fluid.
Tchw,out [ºC] Temperature of fluid exiting the “chilled water” stream
Tchw,in [ºC] Temperature of fluid entering the “chilled water” stream

Q [kJ/hr] Energy removed from the “chilled water” stream
chw

 chw
m [kg/hr] Mass flow rate of the “chilled water” stream fluid
Cpchw [kJ/kg.K] Specific heat of the “chilled water” stream fluid.
Tcw,out [ºC] Temperature of fluid exiting the “cooling water” stream
Tcw,out [ºC] Temperature of fluid entering the “cooling water” stream

Q [kJ/hr] Energy added to the “cooling water” stream
cw

 cw
m [kg/hr] Mass flow rate of the “cooling water” stream fluid
Cpcw [kJ/kg.K] Specific heat of the “cooling water” stream fluid.

Q [kJ/hr] Energy draw of parasitics (solutions pumps, controls, etc.)
aux

4–152
TRNSYS 18 – Mathematical Reference

COP [-] Coefficient of Performance for the device.

4.3.4.5. Detailed Description


In a “conventional” refrigeration cycle, refrigerant returns as low pressure vapor (ideally near the saturated
vapor point) from the evaporator. This vapor then passes through an electrically driven compressor in which
it is turned into a higher pressure gas before being passed to the condenser. Both the work of pressurizing
the vapor and the work of pumping the refrigerant around the loop is done by an electrically driven
compressor. In a “single effect” absorption machine, the refrigerant vapor (typically water) returning from
the evaporator is absorbed in a medium (often aqueous ammonia or lithium bromide) and is cooled to a
liquid state, rejecting its heat to a cooling fluid stream. This liquid is then pumped into a device called a
generator, where heat is added from a hot water stream to desorb the refrigerant from its solution. Once
the refrigerant is revaporized, it enters the condenser and follows a standard refrigerant cycle (condenser,
expansion valve, evaporator). A single effect absorption cycle is shown schematically in Figure 4.3.4.4–1.

Figure 4.3.4.4–1: Single-Effect Absorption Chiller Device Schematic


The benefit of an absorption refrigerant cycles is that the energy required to pump the liquid refrigerant from
a low pressure in the absorber to a higher pressure in the generator is comparatively small and the
remainder of the work (liquefying and vaporizing the refrigerant) can be accomplished with heat instead of
electricity. This fact makes absorption chillers especially valuable in cogeneration systems where waste
heat from steam and other processes is abundant.
Type107 uses a catalog data lookup approach to predict the performance of a single effect, hot water fired
absorption chiller. In this design, the heat required to desorb the refrigerant is provided by a stream of hot
water. The energy of the refrigerant absorption process is rejected to a cooling water stream and the
machine is designed to chill a third fluid stream to a user designated setpoint temperature. Because of the
catalog data lookup approach, Type107 is not applicable over every range of inlet conditions. As with other
components that rely on catalog data, the performance of the machine can be predicted and interpolated
within the range of available data but cannot be extrapolated beyond the range. One beneficial feature to
this model is that the data, taken directly from manufacturer’s catalogs available online is normalized so
that once a data file has been created, it may be used to model absorption machines other than the specific
size for which the data was intended. In creating example data files for distribution with this component, the
developers noted that there was very little variability between data files once they were normalized. Using
normalized data and the model’s first two parameters (design coefficient of performance and design

4–153
TRNSYS 18 – Mathematical Reference

capacity) the user can adjust the size of the machine being modeled to whatever is appropriate to the
system being simulated.
Type107 requires a single data file, which is to be specified in the standard TRNSYS data format.
The file contains values of normalized fraction of full load capacity and fraction of design energy input for
various values of fraction of design load (-) chilled water setpoint temperature (ºC) entering cooling water
temperature (ºC) and entering hot water temperature (ºC).
Upon determining that the absorption chiller is ON based on the value of the control signal, Type107 first
determines the fraction of design load at which it must operate first by calculating the amount of energy that
must be removed from the chilled water stream in order to bring it from its entering temperature to the
setpoint temperature:
𝑄̇𝑟𝑒𝑚𝑜𝑣𝑒 = 𝑚̇𝑐ℎ𝑤 𝐶𝑝𝑐ℎ𝑤 (𝑇𝑐ℎ𝑤,𝑖𝑛 − 𝑇𝑐ℎ𝑤,𝑠𝑒𝑡 ) Eq. 4.3.4-1

The required energy removal is then divided by the machine’s capacity (parameter 1) to determine the
fraction of design load at which the machine is required to operate.
𝑄̇𝑟𝑒𝑚𝑜𝑣𝑒𝑑
𝑓𝐷𝑒𝑠𝑖𝑔𝑛𝐿𝑜𝑎𝑑 = Eq. 4.3.4-2
𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦𝑅𝑎𝑡𝑒𝑑
Type107 then calls the TRNSYS Interpolate Data subroutine with the user specified hot water inlet
temperature, cooling water inlet temperature, chilled water setpoint temperature, and fraction of design
load. Interpolate Data reads the user specified data file and returns values of the fraction of the machine’s
rated capacity that is available given the hot water entering temperature. This reduced capacity is called
the nominal capacity as opposed to the rated capacity. The capacity of the machine at any given time,
therefore is given by
𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 = 𝑓𝐹𝑢𝑙𝑙𝐿𝑜𝑎𝑑𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑓𝑁𝑜𝑚𝑖𝑛𝑎𝑙𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦𝑅𝑎𝑡𝑒𝑑 Eq. 4.3.4-3

Interpolate Data also returns the machine’s fraction of design energy input for the current conditions. When
operating at rated capacity, the design energy input must be provided to the chiller in order for it to operate.
When the chiller is running at part load, only a fraction of the design energy input is required. With this value
returned by Interpolate Data, the energy delivered to the chiller by the hot water stream can be calculated
using
𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦𝑅𝑎𝑡𝑒𝑑
𝑄̇ℎ𝑤 = 𝑓𝐷𝑒𝑠𝑖𝑔𝑛𝐸𝑛𝑒𝑟𝑔𝑦𝐼𝑛𝑝𝑢𝑡 Eq. 4.3.4-4
𝐶𝑂𝑃𝑅𝑎𝑡𝑒𝑑
The hot water stream outlet temperature is then
𝑄̇ℎ𝑤
𝑇ℎ𝑤,𝑜𝑢𝑡 = 𝑇ℎ𝑤,𝑖𝑛 − Eq. 4.3.4-5
𝑚̇ℎ𝑤 𝐶𝑝ℎ𝑤
The chilled water outlet temperature, which should be the setpoint temperature but may be greater if the
machine is capacity limited, is then calculated as:
𝑀𝐼𝑁(𝑄̇𝑟𝑒𝑚𝑜𝑣𝑒 , 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦)
𝑇𝑐ℎ𝑤,𝑜𝑢𝑡 = 𝑇𝑐ℎ𝑤,𝑖𝑛 − Eq. 4.3.4-6
𝑚̇𝑐ℎ𝑤 𝐶𝑝𝑐ℎ𝑤
In order for energy to balance in the device, the energy rejection to the cooling water stream is given by
𝑄̇𝑐𝑤 = 𝑄̇𝑐ℎ𝑤 + 𝑄̇ℎ𝑤 + 𝑄̇𝑎𝑢𝑥 Eq. 4.3.4-7

The term Qaux accounts for the energy consumed by the various parasitics in the system such as solution
pumps, fluid stream pumps, controls. The auxiliary energy requirement of the device is specified among
the model’s parameters. Type107 assumes that the entire auxiliary energy requirement is used whenever
the device is in operation, regardless of whether or not it is operating at full capacity.
Lastly, the temperature of the exiting cooling water stream can be calculated using

4–154
TRNSYS 18 – Mathematical Reference

𝑄̇𝑐𝑤
𝑇𝑐𝑤,𝑜𝑢𝑡 = 𝑇𝑐𝑤,𝑖𝑛 + Eq. 4.3.4-8
𝑚̇𝑐𝑤 𝐶𝑝𝑐𝑤
The device COP is defined as shown in
𝑄̇𝑐ℎ𝑤
𝐶𝑂𝑃 = Eq. 4.3.4-9
𝑄̇𝑎𝑢𝑥 + 𝑄̇ℎ𝑤

EXTERNAL DATA FILE


Type 107 reads the cooling machine performance data from a data file. An example is provided in
"Examples\Data Files". The data file format is as follows:
<Fraction of design load 1> <Fract. Of design load 2> etc. NF values [0;1]
<Chilled water setpoint 1> <Chilled water setpoint 2> etc. NS values [°C]
<Entering Chilled Water Temperature 1> < ECWT 2> etc. NE values [°C]
<Inlet Hot Water Temperature 1> <IHWT 2> etc. NI values [°C]
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,1,1,1}
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,1,1,2}
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,1,1,3}
... (loop on IHWT values for Frac. Of design load 1, CWSet 1, ECWT 1)
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,1,1,NI}
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,1,2,1}
... (loop on IHWT values for Frac. Of design load 1, CWSet 1, ECWT 2)
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,1,2,NI}
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,1,3,1}
... (loop on IHWT values for Frac. Of design load 1, CWSet 1, ECWT 3)
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,1,3,NI}
... (loop on ECWT values for Frac. Of design load 1, CWSet 1 – all IHWT val.)
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,1,NE,NI}
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,2,1,1}
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,2,1,2}
... (loop on CWSet values for Frac. Of design load 1 – all ECWT and IHWT val.)
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {1,NS,NE,NI}
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {2,1,1,1}
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {2,1,1,2}
... (loop on Frac. Of design load values – all CWSet, ECWT and IHWT val.)
<Fraction of rated capacity> <Fract. Of Design Energy Input> for {NF,NS,NE,NI}

Where {i,j,k,l} means that the fraction of rated capacity and the fraction of design energy input are given for:
 ith value of the Fraction of design load
 jth value of the Chilled water setpoint
 kth value of the Entering chilled water temperature
 lth value of the Inlet hot water temperature
The principle of the data file is that the first 4 lines give the values of the 4 independent variables that will
be used in the performance map. Then the 2 dependent variables are given for all combinations of the
independent variables. The values of the last independent variables are first cycled through, then the 3 rd
independent variable, etc.

EXAMPLE
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 !Fraction of Design Load
5.56 6.11 6.67 7.22 7.78 8.89 10.0 !Chilled Water Setpoint (C)
26.7 29.4 32.2 !Entering Cooling Water Temperature (C)
108.9 111.7 113.9 115.0 116.1 !Inlet Hot Water Temperature (C)
0.9878 0.0000 !Capacity and Design Energy Input Fract. at 0.0 5.56 26.7 108.9
1.0367 0.0000 !Capacity and Design Energy Input Fract. at 0.0 5.56 26.7 111.7

... etc. (see the example file in "Examples\Data Files" for more details)

4–155
TRNSYS 18 – Mathematical Reference

1.0469 0.9800 !Capacity and Design Energy Input Fract. at 1.0 10.0 32.2 116.1

4–156
TRNSYS 18 – Mathematical Reference

4.3.5. Type 117: Air Heater


Type 117 models a simple air heater where a specified amount of heat is added to an air stream. The
maximum amount of heat that can be added to the air stream is set as a parameter to the model. There is
an option of entering a setpoint for the air heater that will limit the outlet temperature from the air heater.

4.3.5.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] This parameter indicates whether the inlet absolute humidity ratio
(mode = 1) or the percent relative humidity input (mode = 0) will be
used to calculate the inlet moist air state to this device.

2 Maximum Heating [kJ/h] The maximum amount of energy that can be added to the air
Rate stream.

3 Heater Efficiency [-] The efficiency of the device adding heat to the air stream. Typical
values are 1.0 for electric heaters and 0.8 for gas heaters.

INPUTS

1 Inlet Air Temperature [C] The dry-bulb temperature of the air entering the auxiliary heater.

2 Inlet Air Humidity Ratio [-] The absolute humidity ratio of the air entering the auxiliary heater
device.

3 Inlet Air Percent [%] The percent relative humidity of the air entering the auxiliary heater
Relative Humidity device.

4 Air Flow Rate [kg/h] The flow rate of dry air entering the auxiliary heater.

5 Inlet Air Pressure [atm] The absolute pressure of the air entering the device.

6 Control Function [0/1] The control function for the heater (0 = off, 1 = on).

7 Air-side Pressure Drop [atm] The pressure drop of the air across the heater.

8 Setpoint Temperature [C] The maximum outlet temperature of the air exiting the device.

OUTPUTS

1 Outlet Air Temperature [C] The temperature (dry-bulb) of the air exiting the device.

2 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the device.
Ratio

3 Outlet Air Percent [%] The percent relative humidity of the air exiting the device.
Relative Humidity

4 Outlet Air Flow Rate [kg/h] The flow rate of dry air exiting the device.

5 Outlet Air Pressure [atm] The absolute pressure of the air exiting the device.

4–157
TRNSYS 18 – Mathematical Reference

6 Required Heating [kJ/h] The rate at which energy must be supplied to the device in order to
heat the air to its outlet temperature; including conversion
inefficiencies.

7 Fluid Energy [kJ/h] The rate at which energy is added to the air stream as it passes
through the device.

4.3.5.2. Simulation Summary Report Contents


VALUE FIELDS

Maximum Heating [kJ/h] Parameter 2


Rate

Efficiency [-] Parameter 3

INTEGRATED VALUE FIELDS

Energy Input [kJ] Output 6

Energy to Fluid [kJ] Output 7

MINIMUM/MAXIMUM VALUE FIELDS

Setpoint [C] Minimum and maximum of Input 8

Outlet Temperature [C] Minimum and maximum of Output 1

4.3.5.3. Hints and Tips


 Make sure that the humidity properties connected match the humidity mode parameter.
 The air heater is either on (control signal = 1) or off (control signal = 0). There is not a part load
operation control signal.

4.3.5.4. Nomenclature
𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦 Efficiency of the heater
ℎ𝑖𝑛 Enthalpy of the air entering the heater
ℎ𝑜𝑢𝑡 Enthalpy of the air exiting the heater
ℎ𝑜𝑢𝑡,𝑚𝑎𝑥 The maximum possible enthalpy of air exiting the heater
𝑚̇ Mass flow rate of air through the heater
𝑄𝑓𝑙𝑢𝑖𝑑 The energy transferred to the air
𝑄𝑖𝑛𝑝𝑢𝑡 The energy required to be input to the heater
𝑄𝑚𝑎𝑥 The maximum heating rate of the device

4–158
TRNSYS 18 – Mathematical Reference

4.3.5.5. Detailed Description


The first step is to check if there is any fluid flow through the air heater. If there is no flow, then the outlet
conditions are set to the inlet conditions and no other calculations are performed. If there is flow through
the heater, Type 117 determines the maximum heat that could be added to the air stream by multiplying
the maximum heating rate by the input control signal. With the maximum heat addition, the maximum
leaving enthalpy is calculated from
𝑄𝑚𝑎𝑥
ℎ𝑜𝑢𝑡,𝑚𝑎𝑥 = ℎ𝑖𝑛 + Eq. 4.3.5-1
𝑚̇
Since the heating of air is a completely sensible process, the outlet humidity ratio equals the inlet humidity
ratio and the maximum outlet temperature is calculated from the maximum outlet enthalpy and the inlet
humidity ratio.
The maximum outlet temperature is then checked against the input setpoint temperature. If the maximum
outlet temperature is less than the setpoint then the outlet temperature equals the maximum outlet
temperature. If the maximum outlet temperature is greater than the setpoint, the outlet temperature equals
the setpoint temperature. If the inlet temperature is higher than the setpoint, then the outlet temperature
equals the inlet temperature. With the outlet temperature determined, the air properties at the outlet of the
air heater are calculated based on the outlet temperature and the inlet humidity ratio. The energy
transferred to the air and the energy required to be input to the air heater are then calculated from
𝑄𝑓𝑙𝑢𝑖𝑑 = 𝑚̇ (ℎ𝑜𝑢𝑡 − ℎ𝑖𝑛 ) Eq. 4.3.5-2

𝑄𝑓𝑙𝑢𝑖𝑑
𝑄𝑖𝑛𝑝𝑢𝑡 = Eq. 4.3.5-3
𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦

4–159
TRNSYS 18 – Mathematical Reference

4.3.6. Type 118: Air Cooled Chiller


Type 118 relies on a catalog data lookup method to predict the performance of a vapor compression style
air cooled chiller. These devices are in essence, air conditioners that cool a fluid stream on the evaporator
side while rejecting heat to an air stream on the condenser side. Because of the data lookup approach, this
component may be equally well used to model single and multi-stage chillers. To set up the model, the user
must provide two text based data files in the standard TRNSYS data file format. The first of these files
provides the chiller’s capacity (kJ/h) and the COP for varying values of chilled water setpoint temperature
(ºC), and for varying outdoor ambient temperatures (ºC). The second data file provides values of the chiller’s
fraction of full load power for varying values of part load ratio.

4.3.6.1. Parameter/Input/Output Reference


PARAMETERS

1 Logical Unit for [-] The logical unit assigned to the data file containing the capacity and
Performance Data COP ratios as a function of ambient and chilled water setpoint
temperatures. (Simulation Studio automatically assigns a number
for this parameter.)

2 Logical Unit for PLR [-] The logical unit assigned to the data file which contains the fraction
Data File of full-load power data as a function of the chiller part load ratio.
(Simulation Studio automatically assigns a number for this
parameter.)

3 Fluid Specific Heat [kJ/kg K] The specific heat of the fluid flowing through the chiller. Typically
the fluid being cooled by the chiller will be water, but by changing
the specific heat of the fluid to that of any other fluid, the model can
simulate the cooling of a different fluid.

4 Number of Ambient [-] The number of ambient temperatures for which capacity and COP
Temperatures ratios are provided in the performance data file.

5 Number of CHW [-] The number of chilled water setpoint temperature data points for
Setpoints which the capacity and COP ratios are provided in the performance
data file.

6 Number of Part Load [-] The number of part-load ratio data points for which fraction of full-
Ratios load power data is supplied in the part load performance data file

INPUTS

1 Chilled Water Inlet [C] The temperature of the fluid (chilled water) stream entering the
Temperature chiller.

2 Chilled Water Flowrate [kg/h] The mass flowrate at which fluid (chilled water) enters the chiller.

3 Setpoint Temperature [C] The setpoint temperature for the chilled water stream. If the chiller
has the capacity to meet the current load, the chiller will modulate
to meet the load and the chilled water stream will leave at this
temperature.

4 Ambient Temperature [C] The dry bulb temperature of the ambient air (or the temperature of
the air used as the heat sink for the heat rejection from this chiller).

4–160
TRNSYS 18 – Mathematical Reference

5 Chiller Control Signal [-] The control signal for the operation of the chiller. If the control
signal is greater than 0.5 then the chiller is on, otherwise the chiller
is off. Typically this input will be connected to a controller
component that determines when the chiller should operate.

OUTPUTS

1 Outlet Fluid [C] The temperature of the chilled fluid stream exiting the chiller.
Temperature

2 Fluid Flow Rate [kg/h] The flow rate of the chilled fluid stream exiting the chiller.

3 Chiller Power [kJ/h] The power required to operate the chiller given the current inlet
conditions.

4 Chiller Capacity [kJ/h] The capacity of the chiller given the current ambient temperature
and chilled water setpoint temperature.

5 COP [-] The coefficient of performance (capacity divided by power) of the


chiller.

6 Chiller Load [kJ/h] The load that the chiller must attempt to meet at the current
timestep. This load is simply the chilled fluid mass flow rate
multiplied by the fluid specific heat multiplied by the temperature
difference between the chilled fluid inlet temperature and chilled
fluid setpoint. The machine may or may not be able to meet this
load, depending upon its current capacity.

7 Chiller Load Met [kJ/h] The load that the chiller was able to meet at the current timestep. If
the chiller was unable to meet the entire required load, the
temperature of the exiting flow stream will be higher than the chilled
water setpoint temperature.

8 Chiller Part Load Ratio [-] The chiller part load ratio at the current conditions. The part load
ratio is defined as the load met by the chiller divided by the capacity
of the chiller at the given conditions.

9 Fraction of Full-Load [-] The fraction of full-load power for the chiller. The fraction of full-load
Power power is a ratio of the chiller power at the current part-load
conditions to the chiller power at the current conditions if the chiller
was operating at full-load.

10 Heat of Rejection [kJ/h] The rate at which heat is rejected to the cooling air stream by the
chiller.

4.3.6.2. Simulation Summary Report Contents


VALUE FIELDS

Rated Capacity [kJ/h] The capacity of the chiller at 6.67 C leaving water temperature and 35 C
ambient temperature. This is calculated from the data file.

Rated COP [-] The COP of the chiller at 6.67 C leaving water temperature and 35 C
ambient temperature. This is calculated from the data file.

INTEGRATED VALUE FIELDS

4–161
TRNSYS 18 – Mathematical Reference

Power Input [kJ] Output 3

Capacity [kJ] Output 4

Load Met [kJ] Output 7

MINIMUM/MAXIMUM VALUE FIELDS

LWT Setpoint [C] Minimum and maximum of Input 3

Chiller Outlet [C] Minimum and maximum of Output 1


Temperature

Water Flowrate [kg/h] Minimum and maximum of Output 2

COP [-] Minimum and maximum of Output 5

4.3.6.3. Hints and Tips


 Make sure that the parameters that denote the number of points in the data files match the data in the
files. If the parameters do not match, there may be errors in the simulation or the results may not show
the performance of the chiller.

4.3.6.4. Nomenclature
COPnom Chiller nominal Coefficient of Performance at current conditions.

COPrated Chiller rated Coefficient of Performance at current conditions.

COPratio Chiller COP at current conditions divided by the rated COP.

Capacity Chiller capacity at current conditions.

Capacityrated Chiller rated capacity.

Capacityratio Chiller capacity at current conditions divided by the rated capacity.

Q load
Current load on the chiller.

Q met Load met by the chiller.

Q rejected Energy rejected by the chiller to the ambient.

m Flow rate of fluid entering the chilled fluid stream.

Cp Specific heat of fluid entering the chilled fluid stream.

Tchw,set Desired outlet temperature of fluid in the chilled fluid stream.

Tchw,in Temperature of fluid entering the chilled fluid stream.

Tchw,out Temperature of fluid exiting the chilled fluid stream.

PLR Chiller Part Load Ratio (the ratio of the current load to the rated load).

P Power drawn by the chiller at current conditions.

4–162
TRNSYS 18 – Mathematical Reference

FFLP Fraction of full load power.

4.3.6.5. Detailed Description


Type 118 first performs a call to the TRNSYS InterpolateData routine with the current ambient temperature
and the chilled water setpoint temperature, obtaining in return the nominal COP and capacity. The implicit
assumption at this first call is that the chiller is running at full load.
The chiller load is calculated by
𝑄̇𝑙𝑜𝑎𝑑 = 𝑚̇𝐶𝑝(𝑇𝑐ℎ𝑤,𝑖𝑛 − 𝑇𝑐ℎ𝑤,𝑠𝑒𝑡 ) Eq. 4.3.6-1

The PLR (part load ratio) is therefore:


𝑄̇𝑙𝑜𝑎𝑑
𝑃𝐿𝑅 = Eq. 4.3.6-2
𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦
If the calculated PLR is greater than unity, Type 118 automatically limits the load met by the chiller to the
capacity of the machine. With a valid PLR calculated (between 0 and 1), the InterpolateData routine is
called again, this time specifying the second data file. The resulting value is the fraction of full load capacity
for the current conditions. The chiller’s power draw is given by
𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦
𝑃= 𝐹𝐹𝐿𝑃 Eq. 4.3.6-3
𝐶𝑂𝑃𝑛𝑜𝑚
A corrected COP is then calculated as
𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦
𝐶𝑂𝑃 = Eq. 4.3.6-4
𝑃
The energy rejected to the air stream by the device is therfore
𝑄̇𝑟𝑒𝑗𝑒𝑐𝑡𝑒𝑑 = 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 + 𝑃 Eq. 4.3.6-5

and the outlet temperature of the chilled fluid stream is


𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦
𝑇𝑐ℎ𝑤,𝑜𝑢𝑡 = 𝑇𝑐ℎ𝑤,𝑖𝑛 − Eq. 4.3.6-6
𝑚̇𝐶𝑝
Type 118 makes use of two data files that define the performance of the chiller. The first is the performance
data file which contains the chiller capacity and COP at varying chilled water setpoint temperatures and
ambient dry-bulb temperatures. A sample data file (AirCooledChiller_Perf.dat) is included in the Examples
directory. A portion of the file is shown here.
4.44 5.56 6.67 7.78 8.89 10 ! Chilled Water Temperatures (C)
23.89 29.44 35 40.56 46.11 ! Ambient Air Dry-Bulb Temperatures (C)
1305246 3.7863 ! Capacity (kJ/h) and COP (All Power) at 4.44/23.89
1251314.4 3.2913 ! Capacity (kJ/h) and COP (All Power) at 4.44/29.44
1196623.2 2.8545 ! Capacity (kJ/h) and COP (All Power) at 4.44/35
1135348.8 2.4174 ! Capacity (kJ/h) and COP (All Power) at 4.44/40.56
1073314.8 2.0679 ! Capacity (kJ/h) and COP (All Power) at 4.44/46.11
1339048.2 3.8739 ! Capacity (kJ/h) and COP (All Power) at 5.56/23.89
1284990 3.3495 ! Capacity (kJ/h) and COP (All Power) at 5.56/29.44
.
.
.
In this example file, chiller performance data is entered for 6 chilled water setpoint temperatures and for 5
ambient dry-bulb temperatures. For each combination of these temperatures, the chiller capacity in kJ/h
and COP are entered. The COP should be calculated using all of the power consumption by the chiller.

4–163
TRNSYS 18 – Mathematical Reference

The order which these values are entered is very important and the comments in the data file demonstrate
the pattern that should be followed. (Please note that only a portion of the file is included here.)
The second data file includes the chiller’s fraction of full load power for different part load ratios. A sample
data file (AirCooledChiller_PLR.dat) is included in the Examples directory. The information contained in
that file is shown here.
0.0 0.25 0.50 0.75 1.00 ! Part Load Ratio
0.0000 ! Fraction of Full Load Power at PLR=0.00
0.0902 ! Fraction of Full Load Power at PLR=0.25
0.3241 ! Fraction of Full Load Power at PLR=0.50
0.6262 ! Fraction of Full Load Power at PLR=0.75
1.0000 ! Fraction of Full Load Power at PLR=1.00
The performance of the chiller you are modeling will likely have difference performance and new data files
that match your chiller performance will need to be created.

4–164
TRNSYS 18 – Mathematical Reference

4.3.7. Type 119: Air-to-Air Heat Pump


Type 119 uses a manufacturer’s catalog data approach to model an air source heat pump (air flows on both
the condenser and evaporator sides of the device). The model includes mixing algorithms and damper
settings so that the indoor air may be the result of two streams from different sources (recirculation and
makeup air for example). In heating mode, the device is equipped with one of three auxiliary heater types:
no auxiliary heat available, two element electric auxiliary heat, or gas fired auxiliary heat.

4.3.7.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] This parameter indicates whether the absolute humidity ratio inputs
to this model will be used for the moist air calculations (mode 1) or
whether the percent relative humidity inputs will be used (mode 2).

2 Logical Unit - Cooling [-] The logical unit which will be assigned to the data file which
Data contains the heat pump cooling performance data. Logical units
must be unique integers greater than 10 in any TRNSYS input file.

3 Logical Unit - Heating [-] The logical unit which will be assigned to the data file which
Data contains the heat pump heating performance data. Logical units
must be unique integers greater than 10 in any TRNSYS input file.

4 Number of Outdoor [-] The number of outdoor ambient dry-bulb temperatures for which
Dry-Bulb data is provided in the cooling performance data file.
Temperatures –
Cooling

5 Number of Indoor Dry- [-] The number of return air (indoor air) dry-bulb temperatures for
Bulb Temperatures – which cooling performance data is provided in the associated data
Cooling file.

6 Number of Indoor Wet- [-] The number of return air (indoor air) wet bulb temperatures for
Bulb Temperatures – which cooling data is provided in the associated performance data
Cooling file.

7 Number of Outdoor [-] The number of ambient air dry bulb temperatures for which heating
Dry-Bulb performance data is supplied in the associated data file.
Temperatures –
Heating

8 Number of Indoor Dry- [-] The number of return air (indoor air) dry-bulb temperatures for
Bulb Temperatures – which heating performance data is supplied in the associated data
Heating file.

9 Number of Air Flow [-] The number of air flow rate steps for which heating and cooling
Steps performance data is supplied in the associated data file.

10 Total Air Flow Rate [l/s] The volumetric flow rate across the indoor coil of the heat pump
that will be supplied when the unit is operating. This flow rate
should be the sum of the return air and outside air flow rates.

11 Indoor Fan Power [kJ/h] The rated power consumption of the heat pump blower.

12 Outdoor Fan Power [kJ/h] The rated power consumption of the outdoor unit fan.

4–165
TRNSYS 18 – Mathematical Reference

13 Minimum % Relative [%] The percent relative humidity of the entering air below which there
Humidity for Latent is no latent cooling impact.
Heat Transfer

14 Auxiliary Heat Mode [0/1/2] This parameter indicates the type of auxiliary heater used: 0 = no
auxiliary heat, 1= two-stage electric heating elements, 2 = gas
heater used.

For Electric Auxiliary

15 Capacity - Stage 1 [kJ/h] The capacity of the first-stage supplemental electrical heating
Heater device.

16 Capacity - Stage 2 [kJ/h] The capacity of the second-stage supplemental electrical heating
Heater device.

For Gas Auxiliary

15 Capacity of Auxiliary [kJ/h] The capacity of the supplemental gas heating device.

16 Efficiency of Auxiliary [-] The thermal conversion efficiency of the auxiliary heating device
Heater (typically electric=1.0 and gas = 0.8 to 0.9)

INPUTS

1 Return Air [C] The dry-bulb temperature of the air returning to the heat pump from
Temperature the zone. This is typically the room air temperature. This air will
be mixed with a user-controlled amount of outside air before
entering the heat pump.

2 Return Air Humidity [-] The absolute humidity ratio of the air returning to the heat pump
Ratio from the zone. This air is typically at room air conditions. This
return air will be mixed with a user-specified amount of outside air
before entering the heat pump.

3 Return Air Relative [%] The percent relative humidity of the air returning to the heat pump
Humidity from the zone. This air is typically at room air conditions. This
return air will be mixed with a user-specified amount of outside air
before entering the heat pump.

4 Return Air Flow Rate [kg/h] This input is not used by the model and is only included for
connection purposes if the air source heat pump is part of a air-
stream loop. This model sets the air flow rate.

5 Inlet Pressure [atm] The pressure of the air entering the heat pump. This pressure is
typically the zone air pressure and the model assumes both the
return air and outside air are at this pressure.

6 Fan Pressure Rise [atm] The net pressure rise (although it could be a net pressure drop) of
the air across the heat pump due to the operation of the fan and
the pressure drops of the coils and ducting.

7 Outside Air [C] The temperature of the outside air that is mixed with the return air
Temperature before being ducted to the heat pump.

8 Outside Air Humidity [-] The absolute humidity ratio of the air returning to the heat pump
Ratio from the zone. This air is typically at room air conditions. This

4–166
TRNSYS 18 – Mathematical Reference

return air will be mixed with a user-specified amount of outside air


before entering the heat pump.

9 Outside Air Relative [%] The percent relative humidity of the outside air that is mixed with
Humidity the return air before being ducted to the heat pump.

10 Ambient (Sink) [C] The temperature of the air entering the outdoor coil of the heat
Temperature pump. This value is typically the ambient temperature.

11 Cooling Control Signal [-] The control signal for cooling operation: ctrl < 0.5: cooling mode is
off, ctrl >= 0.5: cooling mode is on (and therefore heating is off,
auxiliary heaters are off, and the fan is on).

12 Heating Control Signal [-] The control signal for heating operation: ctrl < 0.5: heating mode is
off, ctrl >= 0.5: heating mode is on (and therefore cooling is off and
the fan is on).

13 Fan Control Signal [-] The control signal for operation of the indoor fan when the heat
pump is not operating in heating or cooling mode: ctrl < 0.5: fan is
off if heat pump compressor is off, ctrl >= 0.5: fan is on regardless
of compressor operation.

14 Outside Air Damper [-] The control for the operation of the outside air damper: 0 = no
Position outside air is mixed in with the return air, 1= only outside air is sent
to the heat pump, between 0 and 1 indicates that a blend of
outside and return air will be sent to the heat pump.

For Electric Auxiliary

15 Stage 1 Supplemental [-] The control signal for the first supplemental auxiliary heater (>0.5 =
Control Signal on).

16 Stage 2 Supplemental [-] The control signal for the second supplemental auxiliary heater
Control Signal (>0.5 = on).

For Gas Auxiliary

15 Stage 1 Supplemental [-] The control signal for the first supplemental auxiliary heater (>0.5 =
Control Signal on).

OUTPUTS

1 Outlet Air Temperature [C] The dry-bulb temperature of the air exiting the indoor coil of the
heat pump.

2 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the indoor coil of the
Ratio heat pump.

3 Outlet Air Relative [%] The percent relative humidity of the air exiting the indoor coil of the
Humidity heat pump.

4 Outlet Air Flow Rate [kg/h] The flow rate of dry air exiting the indoor coil of the heat pump.

5 Outlet Air Pressure [atm] The absolute air pressure of the air exiting the indoor coil of the
heat pump.

4–167
TRNSYS 18 – Mathematical Reference

6 Total Cooling Rate [kJ/h] The rate at which energy (both sensible and latent) is removed
from the conditioned air stream in cooling mode.

7 Sensible Cooling Rate [kJ/h] The rate at which sensible heat is removed from the conditioned air
stream in cooling mode.

8 Latent Cooling Rate [kJ/h] The rate at which latent energy is removed from the conditioned air
stream in cooling mode.

9 Total Heating Rate [kJ/h] The rate at which heat is added to the conditioned air stream by the
heat pump and auxiliary heating devices.

10 Heat Rejection Rate [kJ/h] The rate at which heat is rejected to the sink (from the outdoor coil)
during cooling operation.

11 Heat Absorption Rate [kJ/h] The rate at which heat is absorbed from the sink (from the outdoor
coil) during heating operation.

12 Auxiliary Heating Rate [kJ/h] The rate at which auxiliary energy is added to the conditioned air
stream.

13 Heat Pump Power [kJ/h] The total energy input (compressor + indoor fan + outdoor fan)
required to operate the heat pump but not including any auxiliary
energy requirements.

14 COP [-] The coefficient of performance of the heat pump.

15 EER [-] The energy efficiency rating of the heat pump during the timestep.

16 Indoor Fan Power [kJ/h] The rate at which the heat pump indoor fan is consuming energy.

17 Outdoor Fan Power [kJ/h] The rate at which the heat pump outdoor fan is consuming energy.

18 Compressor Power [kJ/h] The rate at which the heat pump compressor is consuming energy.

19 Total Energy Input [kJ/h] The total energy input to the heat pump (compressor + indoor fan +
outdoor fan + auxiliary heaters).

20 Condensate [C] The temperature of any condensate being drained from the system.
Temperature Condensate can be created from the mixing of the outside and
return air streams and also by cooling of the air below its dewpoint
temperature.

21 Condensate Flow Rate [kg/h] The flow rate of condensate being drained from the system.
Condensate can be created from the mixing of the outside and
return air streams and also by cooling of the air below its dewpoint
temperature.

4.3.7.2. Simulation Summary Report Contents


VALUE FIELDS

Rated Total Cooling [kJ/h] The total cooling capacity of the heat pump at 25.56 C entering dry bulb
Capacity temperature, 19.44 C entering wet bulb temperature, and 35 C outdoor
dry bulb temperature. This is calculated from the data file.

4–168
TRNSYS 18 – Mathematical Reference

Rated Sensible [kJ/h] The sensible cooling capacity of the heat pump at 25.56 C entering dry
Cooling Capacity bulb temperature, 19.44 C entering wet bulb temperature, and 35 C
outdoor dry bulb temperature. This is calculated from the data file.

Rated Heating [kJ/h] The total heating capacity of the heat pump at 21.11 C entering dry bulb
Capacity temperature and -8.33 C outdoor dry bulb temperature. This is
calculated from the data file.

TEXT FIELDS

Auxiliary Type [-] The type of auxiliary specified for the heat pump (None, Electric, or Gas)
from Parameter 14.

INTEGRATED VALUE FIELDS

Total Cooling [kJ] Output 6

Sensible Cooling [kJ] Output 7

Total Heating [kJ] Output 9

Total Energy Input [kJ] Output 19

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Temperature [C] Minimum and maximum of Output 1

Air Flowrate [kg/h] Minimum and maximum of Output 4

COP [-] Minimum and maximum of Output 14

4.3.7.3. Hints and Tips


 Make sure that the parameters that denote the number of points in the data files match the data in the
files. If the parameters do not match, there may be errors in the simulation or the results may not show
the performance of the chiller.
 Type119 assumes that the power values in the data files include both the compressor and fan power.
It reads total power from the data files and fan power from the parameter list. When reporting output
values, Type119 reports the compressor power and fan power separately. If you are using this
component as a heating and/or cooling section in an air handler and have modeled the fan using a
separate Type it is important to modify the data files to make sure that the power values reflect only
the power consumption of the compressor.

4.3.7.4. Nomenclature
hair ,FanIn Enthalpy of mixed air entering the indoor fan.

 damper Control setting of the damper that determines the fraction of primary and
secondary air streams that are mixed together before entering the indoor fan.
hair , primary Enthalpy of the primary (recirculation) air stream

hair ,sec ondary Enthalpy of the secondary (makeup) air stream

4–169
TRNSYS 18 – Mathematical Reference

air,FanIn Humidity ratio of mixed air entering the indoor fan.

air, primary Humidity ratio of the primary (recirculation) air stream

air ,secondary Humidity ratio of the secondary (makeup) air stream


Enthalpy of condensate resulting from mixing the primary and secondary air
hcond streams
m cond Mass flow rate of condensate resulting from mixing the primary and secondary
air streams
m air Mass flow rate of air

hair ,EvapOut Enthalpy of air exiting the evaporator (cooling mode)

hair ,EvapIn Enthalpy of air entering the evaporator (cooling mode)

Q tot ,cool Total cooling power of the heat pump

Q sens,cool Sensible cooling power of the heat pump

Cp air Specific heat of air

TEvap,In Temperature of air entering the evaporator (cooling mode)

TEvapOut Temperature of air exiting the evaporator (cooling mode)

Q rejection Amount of energy rejected by the heat pump (cooling mode)

Pcomp Compressor power

COP Device coefficient of performance

P fan,Outdoor Power drawn by the outdoor fan

P fan , Indoor Power drawn by the indoor fan

hair ,CondenserOut Enthalpy of air exiting the condenser (heating mode)

hair ,CondenserIn Enthalpy of air entering the condenser (heating mode)

Q tot ,heat Total heating power of the heat pump

Q absorption
Amount of energy absorbed from the outdoor air stream by the heat pump
(heating mode)
Q aux Auxiliary energy added to the exiting indoor air stream

 aux1 Control setting on the first stage electric heating element (Auxiliary Mode 1)

Paux1
Capacity of the first stage electric heating element (Auxiliary Mode 1)

 aux 2 Control setting on the second stage electric heating element (Auxiliary Mode 1)

Paux2 Capacity of the second stage electric heating element (Auxiliary Mode 1)

 aux Efficiency of the gas auxiliary heating element (Auxiliary Mode 2)

 aux Control setting of the gas auxiliary heating element (Auxiliary Mode 2)

4–170
TRNSYS 18 – Mathematical Reference

Paux Capacity of the gas auxiliary heating element (Auxiliary Mode 2)

Tcond Temperature of condensate exiting the heat pump


Temperature of condensate resulting from mixing the primary and secondary
Tcond,mixing air streams before entering the indoor fan.
m cond,mixing Mass flow rate of condensate resulting from mixing the primary and secondary
air streams before entering the indoor fan.
Tcond,cooling Temperature of condensate resulting from cooling the indoor air stream

m cond,cooling Mass flow rate of condensate resulting from cooling the indoor air stream

m cond Total mass flow rate of condensate.

4.3.7.5. Detailed Description


Air source heat pumps are vapor compression refrigerant devices that are piped and valved in such a way
that they can be used in either an air conditioning mode to cool a conditioned space or in a heating mode
to heat the same space. The term “air source” simply indicates that air streams pass over both the
condenser and evaporator heat exchangers. Heat pumps are either installed as a package unit where the
compressor, condenser, expansion valve and evaporator are entirely contained inside a single housing or
as “split systems” where the condensing heat exchanger and its associated fan are physically separated
from the remainder of the system by refrigerant piping. Because Type 119 relies on a series of
manufacturer’s catalog data files to predict heat pump performance, it can equally well model standard air
source heat pumps as well as split system heat pumps. A schematic diagram of a heat pump is shown
below.

Figure 4.3.7–1: Air Source Heat Pump Schematic


Type 119 includes the ability to mix two streams of air on the indoor side of the heat pump through the use
of a damper control signal. Normally a fraction of this indoor air stream comes from the conditioned zone
and the remainder is made up of outdoor air. However, because the inlet conditions of each of the two
streams are defined by the user they can come from any source required by the system.
At any given time step, Type 119 first determines the properties of the mixed indoor air state. The process
begins with a call to the TRNSYS psychrometrics routine in order to obtain those air properties for each
inlet air streams. If dry bulb temperature and humidity ratio are inputs to the model and a humidity ratio
higher than the saturation humidity ratio for that dry bulb temperature is specified, the psychrometrics

4–171
TRNSYS 18 – Mathematical Reference

routine will reset the humidity ratio to its saturated condition and print a warning in the TRNSYS list file.
Having fully defined the two individual entering air states, Type 119 next mixes the two streams according
to:
ℎ𝑎𝑖𝑟,𝐹𝑎𝑛𝐼𝑛 = 𝛾𝑑𝑎𝑚𝑝𝑒𝑟 ℎ𝑎𝑖𝑟,𝑝𝑟𝑖𝑚𝑎𝑟𝑦 + (1 − 𝛾𝑑𝑎𝑚𝑝𝑒𝑟 )ℎ𝑎𝑖𝑟,𝑠𝑒𝑐𝑜𝑛𝑑𝑎𝑟𝑦 Eq. 4.3.7-1

𝜔𝑎𝑖𝑟,𝐹𝑎𝑛𝐼𝑛 = 𝛾𝑑𝑎𝑚𝑝𝑒𝑟 𝜔𝑎𝑖𝑟,𝑝𝑟𝑖𝑚𝑎𝑟𝑦 + (1 − 𝛾𝑑𝑎𝑚𝑝𝑒𝑟 )𝜔𝑎𝑖𝑟,𝑠𝑒𝑐𝑜𝑛𝑑𝑎𝑟𝑦 Eq. 4.3.7-2

The flow rate of the mixed air stream is initially set to the rated value of the indoor air fan (a parameter to
the model). Mixing occurs at the user specified pressure of the primary (indoor) air stream as opposed to
the pressure of the secondary (outdoor) air stream. This assumes that the dampers modulate to balance
the pressures of the two inlet streams and that the user has provided a damper position that results in the
correct flow rates and that the ambient pressure modulates to the inlet pressure. The psychrometrics routine
is called once more to determine all properties of the mixed air. Often the procedure of converging on a
mixed air state is iterative. Type 119 calls the psychrometrics routine with pressure, enthalpy and humidity
ratio. In return it obtains temperature and modified values of humidity ratio and enthalpy. If the new humidity
ratio is lower than the humidity ratio going into the call, the air is determined to have been saturated (the
psychrometrics routine sets humidity ratio back to the saturation line value if called with saturated
conditions). The steam properties routine is then called with the new air temperature to determine the
enthalpy of the condensate (condensate is assumed to be at the mixed air temperature) and the enthalpy
of the mixed air is calculated.
𝑚̇𝑐𝑜𝑛𝑑
ℎ𝑎𝑖𝑟,𝐹𝑎𝑛𝐼𝑛 = 𝛾𝑑𝑎𝑚𝑝𝑒𝑟 ℎ𝑎𝑖𝑟,𝑝𝑟𝑖𝑚𝑎𝑟𝑦 + (1 − 𝛾𝑑𝑎𝑚𝑝𝑒𝑟 )ℎ𝑎𝑖𝑟,𝑠𝑒𝑐𝑜𝑛𝑑𝑎𝑟𝑦 − ℎ𝑐𝑜𝑛𝑑 Eq. 4.3.7-3
𝑚̇𝑎𝑖𝑟
If the enthalpy resulting from this calculation is within a tolerance of the mixed air enthalpy returned from
the psychrometrics routine, the mixed air state is said to be converged. If the enthalpy difference between
the calculated value and the psychrometrics routine is not within the tolerance, the air enthalpy is updated
to the new value and the procedure begins again. The mixed air state is also deemed to have converged if
the procedure has iterated more than 50 times. Both the tolerance on enthalpy and the number of allowable
iterations can be modified in the Fortran source.
With the mixed air state fully determined, Type 119 proceeds to determine whether the heat pump is in
heating mode, cooling mode, or whether only the indoor fan is currently in operation. Both cooling
performance and heating performance are determined based on catalog data files.

Cooling Performance Data


Three measures of cooling performance must be provided in the cooling performance data file. These are:
total cooling, sensible cooling, and power consumed. The power consumed should include the power
associated with the indoor fan, the power associated with the outdoor fan and the power associated with
the compressor. The power of the indoor and outdoor fans are also specified among the model’s
parameters so that the power draw of the compressor can be extracted from the total and so that the power
drawn during fan-only operation can be calculated. As with other catalog data performance based
components, Type 119 linearly interpolates between cooling performance measures based on the current
values of the indoor air flow rate, mixed return air wet bulb temperature (ºC), mixed return air dry bulb
temperature (ºC), and outdoor dry bulb temperature (ºC). It should be noted that the component does not
extrapolate beyond the data range provided. If values outside the data range are provided, the maximum
or minimum cooling performance values will be returned and a warning will be written to the TRNSYS listing
file and to the simulation log file.
After having queried the TRNSYS InterpolateData subroutine for the cooling performance data for the
current conditions, checks are made in the code to ensure that the catalog data is reasonable. If, for
example, the sensible cooling power returned is higher than the total cooling power, the total cooling power
is increased to match the sensible value. While this may seem counter intuitive, it is an industry standard
when dealing with this situation in catalog data. The state of the air exiting the cooling mode evaporator is
determined by:

4–172
TRNSYS 18 – Mathematical Reference

𝑄̇𝑡𝑜𝑡,𝑐𝑜𝑜𝑙
ℎ𝑎𝑖𝑟,𝐸𝑣𝑎𝑝𝑂𝑢𝑡 = ℎ𝑎𝑖𝑟,𝐸𝑣𝑎𝑝𝐼𝑛 − Eq. 4.3.7-4
𝑚̇𝑎𝑖𝑟
The psychrometrics routine is called to determine the remaining properties. The pressure rise across the
indoor fan is applied to the air at this point in the calculations. Again, the enthalpy of the exiting air may be
modified by the psychrometrics routine. The total cooling heat transfer is recalculated based on the enthalpy
difference between entering and exiting evaporator air conditions. The sensible cooling is calculated based
on the temperature difference as defined in:
𝑄̇𝑠𝑒𝑛𝑠.𝑐𝑜𝑜𝑙 = 𝑚̇𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 (𝑇𝐸𝑣𝑎𝑝,𝐼𝑛 − 𝑇𝐸𝑣𝑎𝑝,𝑂𝑢𝑡 ) Eq. 4.3.7-5

The latent cooling is computed as the difference between the total and the sensible cooling values. At this
point the rated power of the indoor and outdoor fans supplied as parameters are removed from the total
power returned from the data file so as to arrive at the power of the compressor, which enters into the
calculation of the rejection energy as defined in:
𝑄̇𝑟𝑒𝑗𝑒𝑐𝑡𝑖𝑜𝑛 = 𝑄̇𝑡𝑜𝑡,𝑐𝑜𝑜𝑙 + 𝑃𝑐𝑜𝑚𝑝
̇ Eq. 4.3.7-6

The COP of the heat pump in cooling is defined by:


𝑄̇𝑡𝑜𝑡,𝑐𝑜𝑜𝑙
𝐶𝑂𝑃 = Eq. 4.3.7-7
̇
𝑃𝑐𝑜𝑚𝑝 ̇
+ 𝑃𝑓𝑎𝑛,𝑂𝑢𝑡𝑑𝑜𝑜𝑟 ̇
+ 𝑃𝑓𝑎𝑛,𝐼𝑛𝑑𝑜𝑜𝑟

Heating Performance Data


The specification of heating performance data is much the same as for cooling performance data. Two
measures of heating performance must be provided in the heating performance data file. These are: total
heating, and power consumed. As in the cooling data file, the power consumed should include the power
associated with the indoor and outdoor fans as well as the power associated with the compressor. Type
119 linearly interpolates between heating performance measures based on the current values of the air
flow rate (l/s), indoor air dry bulb temperature (ºC) and outdoor dry bulb temperature (ºC). It should be noted
that the component does not extrapolate beyond the data range provided. If values outside the data range
are provided, the maximum or minimum cooling performance values will be returned and a warning will be
written to the TRNSYS listing file and to the simulation log file.
Again the air flow rate in question is the indoor air coil flow rate. The model assumes that the heat pump’s
heating performance is independent of the air flow rate across the outdoor coil.
With heating performance known, the state of the air exiting the condenser is calculated based on enthalpy
with air pressure increased to account for pressure rise across the fan:
𝑄̇𝑡𝑜𝑡,ℎ𝑒𝑎𝑡
ℎ𝑎𝑖𝑟,𝐶𝑜𝑛𝑑𝑒𝑛𝑠𝑒𝑟𝑂𝑢𝑡 = ℎ𝑎𝑖𝑟,𝐶𝑜𝑛𝑑𝑒𝑛𝑠𝑒𝑟𝐼𝑛 + Eq. 4.3.7-8
𝑚̇𝑎𝑖𝑟
As was the case in cooling, the psychrometrics routine is called to completely define the air state, possibly
resulting in a modified enthalpy. Heating power is recalculated as the mass flow rate of air multiplied by the
enthalpy difference between the air inlet and outlet state. The energy rejected to the indoor air stream and
the appliance COP are computed based on:
𝑄̇𝑎𝑏𝑠𝑜𝑟𝑝𝑡𝑖𝑜𝑛 = 𝑄̇𝑡𝑜𝑡,ℎ𝑒𝑎𝑡 − 𝑃𝑐𝑜𝑚𝑝
̇ Eq. 4.3.7-9

𝑄̇𝑡𝑜𝑡,ℎ𝑒𝑎𝑡
𝐶𝑂𝑃 = Eq. 4.3.7-10
̇
𝑃𝑐𝑜𝑚𝑝 ̇
+ 𝑃𝑓𝑎𝑛,𝑂𝑢𝑡𝑑𝑜𝑜𝑟 ̇
+ 𝑃𝑓𝑎𝑛,𝐼𝑛𝑑𝑜𝑜𝑟

Fan Only Operation


The air source heat pump can also operate in a mode where neither active cooling nor active heating is
required but the indoor fan is on to continue circulating air or mixing return air with outdoor air. In this mode,

4–173
TRNSYS 18 – Mathematical Reference

only mixing with the secondary air stream, indoor fan inefficiencies and associated pressure rise affect the
state of the air returned to the space.

Auxiliary Heat
Type 119 is equipped with the ability to add auxiliary energy to the post condenser (in heating mode) or
post evaporator (in cooling mode) indoor air stream by one of three methods: no auxiliary heat available,
two element staged electric auxiliary heat available, or gas fired auxiliary heat available. In both cases, the
amount of auxiliary energy added is determined by the value of the auxiliary heat control signals (inputs to
the model) and by the capacity of the heaters in question. Note that because the control signals are all
separate, auxiliary heat may be added to the exiting indoor air stream both in cooling and in heating mode.
This feature allows the heat pump to be operated in a dehumidification mode that passes air across a
cooling coil and then reheats it before returning it to the conditioned space.
In auxiliary mode 0, no auxiliary heat is available and the air exits the device at the conditions at which it
left the condenser in heating mode or the evaporator in cooling mode.
Auxiliary mode 1 models a two stage electric heat auxiliary. The amount of auxiliary energy added to the
exiting indoor air stream is given by:
𝑄̇𝑎𝑢𝑥 = 𝛾𝑎𝑢𝑥1 𝑃𝑎𝑢𝑥1
̇ ̇
+ 𝛾𝑎𝑢𝑥2 𝑃𝑎𝑢𝑥2 Eq. 4.3.7-11

Outlet air state is computed through the standard call to the psychrometrics routine and COP is calculated
based on:
𝑄̇𝑡𝑜𝑡,ℎ𝑒𝑎𝑡
𝐶𝑂𝑃 = Eq. 4.3.7-12
̇
𝑃𝑐𝑜𝑚𝑝 ̇
+ 𝑃𝑓𝑎𝑛,𝑂𝑢𝑡𝑑𝑜𝑜𝑟 ̇
+ 𝑃𝑓𝑎𝑛,𝐼𝑛𝑑𝑜𝑜𝑟 + 𝑄̇𝑎𝑢𝑥
In auxiliary mode 2 (gas fired auxiliary), the amount of auxiliary energy added to the exiting indoor air stream
is based on the burner capacity, control signal and efficiency as shown in:
𝑄̇𝑎𝑢𝑥 = 𝜂𝑎𝑢𝑥 𝛾𝑎𝑢𝑥 𝑃𝑎𝑢𝑥
̇ Eq. 4.3.7-13

The corresponding COP is calculated in the same manner as it was for auxiliary mode 1. If any condensate
resulted from either mixing the primary and secondary air streams or through cooling, the total flow rate of
condensate is determined. The temperature of the out flowing condensate is set as shown in:
𝑇𝑐𝑜𝑛𝑑,𝑚𝑖𝑥𝑖𝑛𝑔 𝑚̇𝑐𝑜𝑛𝑑,𝑚𝑖𝑥𝑖𝑛𝑔 + 𝑇𝑐𝑜𝑛𝑑,𝑐𝑜𝑜𝑙𝑖𝑛𝑔 𝑚̇𝑐𝑜𝑛𝑑,𝑐𝑜𝑜𝑙𝑖𝑛𝑔
𝑇𝑐𝑜𝑛𝑑 = Eq. 4.3.7-14
𝑚̇𝑐𝑜𝑛𝑑

Data Files
Two data files define the performance of the air-source heat pump. The first file details the cooling
performance of the heat pump and contains total capacity, sensible capacity and power at varies values of
air flow rate, return air wet-bulb temperature, return air dry-bulb temperature and outdoor air dry-bulb
temperature. The power consumed should include the power associated with the indoor fan, the power
associated with the outdoor fan and the power associated with the compressor. The second file details the
heating performance of the heat pump and includes the capacity and power of the heat pump at varies
values of air flow rate, return air dry-bulb temperature and outdoor air dry-bulb temperature. Again the
power should include the power associated with the indoor fan, the power associated with the outdoor fan
and the power associated with the compressor. For both these files, the air flow rate is the flow rate across
the indoor coil of the heat pump.
Sample data files (ASHP_Cooling.dat and ASHP_Heating,dat) are included in the Examples directory and
portions of those files are shown here.
262.5 300 312.6 !Air Flow Rate (l/s)
15 17.22 19.44 21.67 !Return air wet bulb (C)
22.22 23.33 24.44 25.56 26.67 !Return air dry bulb (C)
29.44 32.22 35 37.78 40.56 46.11 !Outdoor air dry bulb (C)
13685 11301 5405 !Total capacity (kJ/h), sensible capacity (kJ/h), and power (kJ/h) at 262.5 (l/s), 15 [C],22.22 [C], and 29.44 [C]
13622 11301 5566 !Total capacity (kJ/h), sensible capacity (kJ/h), and power (kJ/h) at 262.5 (l/s), 15 [C],22.22 [C], and 32.22 [C]

4–174
TRNSYS 18 – Mathematical Reference

13531 11199 5759 !Total capacity (kJ/h), sensible capacity (kJ/h), and power (kJ/h) at 262.5 (l/s), 15 [C],22.22 [C], and 35 [C]
13257 11096 5952 !Total capacity (kJ/h), sensible capacity (kJ/h), and power (kJ/h) at 262.5 (l/s), 15 [C],22.22 [C], and 37.78 [C]
12981 10994 6177 !Total capacity (kJ/h), sensible capacity (kJ/h), and power (kJ/h) at 262.5 (l/s), 15 [C],22.22 [C], and 40.56 [C]
12523 10823 6595 !Total capacity (kJ/h), sensible capacity (kJ/h), and power (kJ/h) at 262.5 (l/s), 15 [C],22.22 [C], and 46.11 [C]
13685 12325 5405 !Total capacity (kJ/h), sensible capacity (kJ/h), and power (kJ/h) at 262.5 (l/s), 15 [C],23.33 [C], and 29.44 [C]
13622 12223 5566 !Total capacity (kJ/h), sensible capacity (kJ/h), and power (kJ/h) at 262.5 (l/s), 15 [C],23.33 [C], and 32.22 [C]
13531 12223 5759 !Total capacity (kJ/h), sensible capacity (kJ/h), and power (kJ/h) at 262.5 (l/s), 15 [C],23.33 [C], and 35 [C]
.
.
.

262.5 300 312.6 !Air flow rate (l/s)


15.56 21.11 23.89 26.67 !Return air dry bulb temperature (C)
-19.44 -16.67 -13.89 -11.11 -8.33 -5.56 -2.78 0 2.78 5.56 8.33 11.11 13.89
16.67 19.44 22.22 !Outdoor dry bulb temperature (C)
4450 3802 !Capacity (kJ/h) and power (kJ/h) at 262.5 (l/s), 15.56 [C], and -19.44 [C]
5210 4029 !Capacity (kJ/h) and power (kJ/h) at 262.5 (l/s), 15.56 [C], and -16.67 [C]
5991 4256 !Capacity (kJ/h) and power (kJ/h) at 262.5 (l/s), 15.56 [C], and -13.89 [C]
6750 4483 !Capacity (kJ/h) and power (kJ/h) at 262.5 (l/s), 15.56 [C], and -11.11 [C]
7511 4710 !Capacity (kJ/h) and power (kJ/h) at 262.5 (l/s), 15.56 [C], and -8.33 [C]
8401 4852 !Capacity (kJ/h) and power (kJ/h) at 262.5 (l/s), 15.56 [C], and -5.56 [C]
.
.
.

The performance of the heat pump you are modeling will likely have difference performance and new data
files that match your chiller performance will need to be created. The order which these values are entered
is very important and the comments in the data file demonstrate the pattern that should be followed. (Please
note that only a portion of the file is included here.)

4–175
TRNSYS 18 – Mathematical Reference

4.3.8. Type 122: Boiler


Type 122 models a fluid boiler. This model will attempt to meet the user-specified outlet temperature but
may be limited by capacity restraints. The available capacity is calculated by multiplying the rated capacity
by the input control signal. The capacity refers to the heat input to the fluid and not the gross capacity of
the device. In this model, the user enters the boiler efficiency which is then divided into the required fluid
energy to calculate the required fuel input to the model. The user also provides the combustion efficiency
which is used to calculate the boiler thermal losses. Overall efficiency is lower than the combustion
efficiency due to boiler thermal losses and any cycling effects. The boiler is assumed to be off if the inlet
flow rate is zero, the input control signal is zero, or if the inlet temperature is greater than or equal to the
desired outlet temperature. If the desired outlet conditions cannot be met due to capacity limitations, the
machine will run at its available capacity and the outlet state calculated. This model is based on ASHRAE's
definition of boiler efficiencies as published in 2000 ASHRAE Systems and Equipment Handbook.

4.3.8.1. Parameter/Input/Output Reference


PARAMETERS

1 Rated Capacity [kJ/h] The rated capacity of the boiler. The available capacity is simply
this parameter multiplied by the input control signal. The capacity
for this parameter refers to the energy input to the fluid and not the
gross capacity of the device.

2 Fluid Specific Heat [kJ/kg K] The specific heat of the fluid flowing through the device. The fluid in
the boiler is typically water, but different fluids heating by a boiler
can be modeled by adjusting this parameter.

3 Minimum Turn-Down [-] The minimum operating part-load ratio for the modulating boiler. If
Ratio the calculated part load ratio for the boiler (load/capacity) is less
than this parameter, the boiler will operate at the minimum turn-
down ratio and the outlet temperature will exit the boiler greater
than the desired setpoint.

INPUTS

1 Inlet Fluid [C] The temperature of the fluid entering the device.
Temperature

2 Inlet Fluid Flow Rate [kg/h] The flow rate of the fluid entering the device.

3 Input Control Signal [-] The input control signal for the boiler: 0 = the boiler is off; 0 to 1 =
the boiler is on, but running at a reduced available capacity; 1 = the
boiler is on and running at maximum available capacity.

4 Setpoint Temperature [C] The desired temperature of the fluid exiting the device.

5 Boiler Efficiency [-] The overall efficiency of the boiler. The fuel input energy will be
calculated by dividing the energy delivered to the fluid by this boiler
efficiency.

6 Combustion Efficiency [-] The combustion efficiency for the boiler. The combustion efficiency
is defined as (input energy - stack energy) /input energy and
accounts for the losses from the boiler.

OUTPUTS

4–176
TRNSYS 18 – Mathematical Reference

1 Outlet Fluid [C] The temperature of the fluid exiting the device.
Temperature

2 Outlet Fluid Flow Rate [kg/h] The flow rate of fluid exiting the device.

3 Fluid Energy [kJ/h] The rate at which heat is transferred to the fluid.

4 Losses to [kJ/h] The rate at which energy is lost from the boiler shell to the
Surroundings environment.

5 Exhaust Energy [kJ/h] The rate at which energy is exhausted from the boiler stack. This
term is calculated by first determining the required fuel input and
then using the combustion efficiency to calculate the stack losses.

6 Required Boiler [kJ/h] The rate at which fuel is being consumed by the boiler to heat the
Energy Input fluid. This term is calculated by dividing the energy provided to the
fluid by the boiler efficiency.

7 Part Load Ratio [-] The ratio of delivered fluid energy to available energy input
(capacity).

4.3.8.2. Simulation Summary Report Contents


VALUE FIELDS

Rated Capacity [kJ/h] Parameter 1

Minimum Turn-Down [-] Parameter 3


Ratio

INTEGRATED VALUE FIELDS

Energy to Fluid [kJ] Output 3

Energy Input to Boiler [kJ] Output 6

MINIMUM/MAXIMUM VALUE FIELDS

Setpoint [C] Minimum and maximum of Input 4

Boiler Efficiency [-] Minimum and maximum of Input 5

Conversion Efficiency [-] Minimum and maximum of Input 6

Outlet Temperature [C] Minimum and maximum of Output 1

Outlet Flowrate [kg/h] Minimum and maximum of Output 2

4.3.8.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4–177
TRNSYS 18 – Mathematical Reference

4.3.8.4. Nomenclature
Cp fluid Specific heat of the liquid stream

Q need
Energy required to heat the liquid from its entering condition to the setpoint
temperature.
Q max The device capacity. The maximum rate at which energy can be delivered to
the liquid.
Q fluid The energy delivered to the liquid stream.

Q fuel The rate at which fuel energy is consumed.

Q loss The rate at which energy is lost from the device due to combustion process
inefficiency.
Q exhaust
The rate at which energy is exhausted from the boiler through the combustion
stack or chimney.
m fluid The mass flow rate of liquid flowing through the boiler.

Tin The temperature of liquid entering the boiler.

Tout The temperature of liquid exiting the boiler.

Tset The boiler setpoint temperature.

PLR The boiler part load ratio.

 combustion The boiler’s combustion efficiency.

 boiler The boiler’s overall efficiency.

4.3.8.5. Detailed Description


Type 122 uses a simple efficiency equation to predict the energy requirement of heating a liquid to its
setpoint temperature. The heater is capacity limited and in addition to the overall device efficiency, Type
122 also takes a combustion efficiency input and reports the energy lost during the combustion process
and the energy exhausted from the boiler combustion stack.

No Flow Condition
If the flow of liquid through the Type 122 boiler is zero, the model sets the output temperature equal to the
input temperature and sets the output flow rate to zero. It further sets the energy transferred to the fluid, the
energy lost during the combustion process, the energy exhausted through the boiler stack, the amount of
fuel consumed and the device part load ratio all equal to zero. The no flow condition supersedes the device
control signal meaning that if the input flow rate to the boiler is zero, the model ignores the value of the
control signal. Consequently, the boiler may be ON (control signal set to 1) and yet not be meeting the
requested setpoint temperature.

Boiler OFF Condition


If there is flow of liquid through the boiler but the boiler control signal is zero (OFF), the model sets the
output temperature equal to the input temperature and sets the output flow rate equal to the input flow rate.
As with the no flow case, Type 122 sets the energy transferred to the fluid, the energy lost during the
combustion process, the energy exhausted through the boiler stack, the amount of fuel consumed and the
device part load ratio all equal to zero.

4–178
TRNSYS 18 – Mathematical Reference

Boiler ON Condition
If there is flow of liquid through the boiler and the boiler control signal is set to 1 (ON), the model first
calculates the energy required to elevate the temperature of the liquid from its inlet value to the setpoint
value using:
𝑄̇𝑛𝑒𝑒𝑑 = 𝑚̇𝑓𝑙𝑢𝑖𝑑 𝐶𝑝𝑓𝑙𝑢𝑖𝑑 (𝑇𝑠𝑒𝑡 − 𝑇𝑖𝑛 ) Eq. 4.3.8-1

The required energy input is limited by the device capacity (specified as a parameter) and 0. Thus the
device will not calculate a negative value of Qneed if the inlet temperature exceeds the setpoint temperature
and the boiler control signal is ON. If Q need does not exceed device capacity, the energy transferred to the
liquid stream (Qfluid) is set equal to Q need; the device is assumed to be internally controlled in such a way
that it delivers only the required amount of energy to the liquid stream. The outlet temperature is set equal
to the setpoint temperature and the part load ratio (PLR) is set according to:
𝑄̇𝑛𝑒𝑒𝑑
𝑃𝐿𝑅 = Eq. 4.3.8-2
𝑄̇𝑚𝑎𝑥
If the boiler is capacity limited because the required energy exceeds device capacity, the energy transferred
to the fluid (Qfluid) is set to the device capacity (Qmax), the PLR is set to 1 and the outlet fluid temperature is
set according to:
𝑄̇𝑚𝑎𝑥
𝑇𝑜𝑢𝑡 = 𝑇𝑖𝑛 + Eq. 4.3.8-3
𝑚̇𝑓𝑙𝑢𝑖𝑑 𝐶𝑝𝑓𝑙𝑢𝑖𝑑
Once the energy transferred to the fluid is calculated, the amount of fuel consumed by the boiler is
calculated by:
𝑄̇𝑓𝑙𝑢𝑖𝑑
𝑄̇𝑓𝑢𝑒𝑙 = Eq. 4.3.8-4
𝜂𝑏𝑜𝑖𝑙𝑒𝑟
The energy exhausted from the device is given by:
𝑄̇𝑒𝑥ℎ𝑎𝑢𝑠𝑡 = 𝑄̇𝑓𝑢𝑒𝑙 (1 − 𝜂𝑐𝑜𝑚𝑏𝑢𝑠𝑡𝑖𝑜𝑛 ) Eq. 4.3.8-5

And the energy lost during the combustion process is given by:
𝑄̇𝑙𝑜𝑠𝑠 = 𝑄̇𝑓𝑢𝑒𝑙 − 𝑄̇𝑒𝑥ℎ𝑎𝑢𝑠𝑡 Eq. 4.3.8-6

4–179
TRNSYS 18 – Mathematical Reference

4.3.9. Type 123: Chilled Water Coil (Wet or Dry)


The simple cooling coil model provides a good estimation of the performance without the detailed geometric
characteristics of the coil. The parameters of the model are only thermodynamic properties of the coil, which
require no specific manufacturer’s data. The simulation model is based on the ASHRAE Secondary Toolkit
[1] and modifications proposed by Chillar, et al [2]. There are two versions of the simple cooling coil model.
This version assumes that the coil is always either totally dry or wet.

4.3.9.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] The humidity mode determines whether the absolute humidity (=1)
or relative humidity (=2) ratio of the air stream is an input.

2 Design Inlet Fluid [C] The temperature of the fluid inlet to the cooling coil at the
Temperature conditions used to determine the design coil capacities.

3 Design Inlet Fluid Flow [kg/h] The flow rate of the fluid inlet to the cooling coil at the conditions
Rate used to determine the design coil capacities.

4 Design Inlet Air [C] The temperature of the air inlet to the cooling coil at the conditions
Temperature used to determine the design coil capacities.

5 Design Inlet Air [-] The absolute humidity ratio of the air inlet to the cooling coil at the
Humidity Ratio conditions used to determine the design coil capacities.

6 Design Inlet Air Flow [kg/h] The flow rate of the air inlet to the cooling coil at the conditions
Rate used to determine the design coil capacities.

7 Design Total Cooling [kJ/h] The total cooling capacity of the cooling coil at the inlet air and fluid
Capacity properties above.

8 Design Sensible [kJ/h] The sensible cooling capacity of the cooling coil at the inlet air and
Cooling fluid properties above.

9 Fluid Specific Heat [kJ/kg K] The specific heat of the fluid flowing through the cooling coil.

10 Heat Exchanger [-] The parameter denotes the configuration of the cooling coil
Configuration (Counterflow = 1; Parallelflow = 2; Crossflow - both unmixed = 3;
Crossflow - both mixed = 4; Crossflow - minimum capacity unmixed
= 5; Crossflow - maximum capacity unmixed = 6)

INPUTS

1 Inlet Fluid Temperature [C] The temperature of the fluid entering the cooling coil.

2 Inlet Fluid Flow Rate [kg/h] The flow rate of the fluid entering the cooling coil.

3 Inlet Air Temperature [C] The temperature of the air entering the cooling coil.

4 Inlet Air Humidity Ratio [-] The absolute humidity ratio of the air entering the cooling coil.

5 Inlet Air Relative [%] The percent relative humidity of the air entering the cooling coil.
Humidity

4–180
TRNSYS 18 – Mathematical Reference

6 Inlet Air Flow Rate [kg/h] The flow rate of the air entering the cooling coil.

7 Inlet Air Pressure [atm] The pressure (in atmospheres) of the air entering the cooling coil.

OUTPUTS

1 Outlet Fluid [C] The temperature of the fluid exiting the cooling coil.
Temperature

2 Outlet Fluid Flow Rate [kg/h] The flow rate of the fluid exiting the cooling coil.

3 Outlet Air Temperature [C] The temperature of the air exiting the cooling coil.

4 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the cooling coil.
Ratio

5 Outlet Air Relative [%] The percent relative humidity of the air exiting the cooling coil.
Humidity

6 Outlet Air Flow Rate [kg/h] The flow rate of the air exiting the cooling coil.

7 Outlet Air Pressure [atm] The pressure (in atmospheres) of the air exiting the cooling coil.

8 Total Cooling [kJ/h] The total amount of cooling of the air stream.

9 Sensible Cooling [kJ/h] The sensible cooling of the air stream.

10 Fraction Wet [-] The fraction of the coil that is considered 'wet' in the calculations (0
= completely dry; 1= completely wet).

4.3.9.2. Simulation Summary Report Contents


VALUE FIELDS

Rated Total Cooling [kJ/h] Parameter 7

Rated Sensible [kJ/h] Parameter 8


Cooling

TEXT FIELDS

Type of Heat [-] Parameter 10


Exchanger

INTEGRATED VALUE FIELDS

Total Cooling [kJ] Output 8

Sensible Cooling [kJ] Output 9

MINIMUM/MAXIMUM VALUE FIELDS

4–181
TRNSYS 18 – Mathematical Reference

Fluid Outlet [C] Minimum and maximum of Output 1


Temperature

Fluid Flow Rate [kg/h] Minimum and maximum of Output 2

Air Outlet Temperature [C] Minimum and maximum of Output 4

Air Flow Rate [kg/h] Minimum and maximum of Output 6

Fraction Wet [-] Minimum and maximum of Output 10

4.3.9.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.9.4. Detailed Description


The model calculates the coil design U-factor times Area (UA) values from the design conditions. The
calculations are performed assuming a wet coil at design conditions. Because the heat transfer includes
latent effects, the model is based on enthalpies rather than temperatures. Air enthalpies are calculated
using the standard TRNSYS psychrometric routines. The corresponding enthalpies of the coil and water
are related to that of air through fictitious enthalpies, defined as the enthalpy of saturated air at the
temperature of the coil or water. While heat transfer rates are commonly expressed as the product of an
overall heat transfer coefficient (UA) and a temperature difference, the use of enthalpy-based heat transfer
calculations requires an enthalpy-based overall heat transfer coefficient UAh.
𝑄 = 𝑈𝐴ℎ (ℎ𝑜𝑢𝑡 − ℎ𝑖𝑛 ) Eq. 4.3.9-1

Where
𝑈𝐴
𝑈𝐴ℎ = Eq. 4.3.9-2
𝐶𝑝
With UA = conventional heat transfer coefficient and Cp = specific heat across the enthalpy difference.
When using fictitious enthalpies, a corresponding fictitious specific heat must be defined. UAh can be
calculated from a combination of series or parallel enthalpy resistances, similar to temperature resistances.
Then enthalpy capacitance rates relate heat transfer to the enthalpy change of a fluid between inlet and
outlet. On the air side, the enthalpy capacity rate is air mass flow rate. While on the liquid side, the enthalpy
capacitance rate is based on the enthalpy of saturated air at the liquid temperature.
From the coil design parameters, the dewpoint and saturated liquid enthalpy at the rating point are
calculated. The leaving air enthalpies are calculated from the design capacities.
𝑄𝑡𝑜𝑡𝑎𝑙
ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 = ℎ𝑎𝑖𝑟,𝑖𝑛 − Eq. 4.3.9-3
𝑚̇𝑎𝑖𝑟
𝑄𝑡𝑜𝑡𝑎𝑙 − 𝑄𝑠𝑒𝑛𝑠𝑖𝑏𝑙𝑒
ℎ𝑎𝑖𝑟,𝑠𝑎𝑡𝑢𝑟𝑎𝑡𝑒𝑑 = ℎ𝑎𝑖𝑟,𝑖𝑛 − [ ] Eq. 4.3.9-4
𝑚̇𝑎𝑖𝑟
The outlet air humidity ratio is calculated from the inlet air temperature and the saturated air humidity ratio.
The outlet air temperature is then calculated from the outlet air humidity ratio and the outlet air enthalpy.
The Cp at saturated conditions can be estimated from the dew point temperature at the entering air
conditions, the saturated enthalpy at the dew point, the entering water temperature and the saturated air
enthalpy at the entering water temperature.
ℎ𝑠𝑎𝑡,𝑑𝑝 − ℎ𝑠𝑎𝑡,𝑙𝑖𝑞
𝐶𝑝𝑠𝑎𝑡 = Eq. 4.3.9-5
𝑇𝑑𝑝 − 𝑇𝑙𝑖𝑞,𝑖𝑛
The capacitance of the two streams are then estimated

4–182
TRNSYS 18 – Mathematical Reference

𝐶𝑎𝑖𝑟 = 𝑚̇𝑎𝑖𝑟 Eq. 4.3.9-6


𝐶𝑝𝑙𝑖𝑞
𝐶𝑙𝑖𝑞 = 𝑚̇𝑙𝑖𝑞 ( ) Eq. 4.3.9-7
𝐶𝑝𝑠𝑎𝑡
The overall heat transfer coefficient is then determined from the entering conditions, the capacitances of
the streams, and the geometry of the heat exchanger. An iterative scheme is used to adjust the UA until
the leaving conditions are such that
𝑄𝑡𝑜𝑡𝑎𝑙 = 𝐶𝑎𝑖𝑟 (ℎ𝑎𝑖𝑟,𝑖𝑛 − ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 ) Eq. 4.3.9-8

The next step is to determine the air-side overall heat transfer coefficient (UA) assuming that the coil surface
temperature is at the apparatus dewpoint temperature. First we must iterate to determine the apparatus
dewpoint equal to the temperature calculated by extending the line between the entering and leaving
conditions to the saturation curve.
The “slope” of temperature versus humidity ratio between entering and leaving states is calculated:
𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡
𝑠𝑙𝑜𝑝𝑒 = Eq. 4.3.9-9
𝑤𝑎𝑖𝑟,𝑖𝑛 − 𝑤𝑎𝑖𝑟,𝑜𝑢𝑡
We then iterate to find an apparatus dewpoint such that
𝑇𝑎𝑑𝑝 = 𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑠𝑙𝑜𝑝𝑒(𝑤𝑎𝑖𝑟,𝑖𝑛 − 𝑤𝑎𝑑𝑝 ) Eq. 4.3.9-10

With the apparatus dewpoint calculated, the bypass factor for the coil can be determined.
ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 − ℎ𝑎𝑝𝑑
𝐵𝑦𝑝𝑎𝑠𝑠𝐹𝑎𝑐𝑡𝑜𝑟 = Eq. 4.3.9-11
ℎ𝑎𝑖𝑟,𝑖𝑛 − ℎ𝑎𝑝𝑑
The air-side overall heat transfer coefficient is then calculated. If the enthalpy at the apparatus dewpoint is
less than or equal to the enthalpy of saturated air at the entering liquid temperature then the air-side overall
heat transfer coefficient is
𝑈𝐴𝑒𝑥𝑡 = 𝑈𝐴 ∙ 𝐶𝑝𝑎𝑖𝑟 Eq. 4.3.9-12

Otherwise it is
𝑈𝐴𝑒𝑥𝑡 = − ln(𝐵𝑦𝑝𝑎𝑠𝑠𝐹𝑎𝑐𝑡𝑜𝑟) 𝑚̇𝑎𝑖𝑟 (𝐶𝑝𝑎𝑖𝑟 + 𝑤𝑎𝑖𝑟,𝑖𝑛 𝐶𝑝𝑣𝑎𝑝 ) Eq. 4.3.9-13

Then the liquid-side overall heat transfer coefficient is calculated from the enthalpy-based overall coefficient
and the air-side coefficient.
𝐶𝑝𝑠𝑎𝑡
𝑈𝐴𝑖𝑛𝑡 =
1 𝐶𝑝 Eq. 4.3.9-14
− 𝑎𝑖𝑟
𝑈𝐴 𝑈𝐴𝑒𝑥𝑡
These calculated heat transfer coefficients are only calculated once per simulation.
On an iterative call to the cooling coil component, the model first checks if either the air flow rate or the
liquid flow rate is 0. If so, then the outlet conditions are set to the inlet conditions and the model exits. If
there is flow in both streams the model then determines if the coil is dry or wet.
If the dewpoint of the entering air is less than or equal to the entering liquid temperature then the coil is not
condensing and the dry coil calculations are performed. First the capacitances of the air and liquid streams
are calculated.
𝐶𝑎𝑖𝑟 = 𝑚̇𝑎𝑖𝑟 (𝐶𝑝𝑎𝑖𝑟 + 𝑤𝑎𝑖𝑟,𝑖𝑛 𝐶𝑝𝑣𝑎𝑝 ) Eq. 4.3.9-15

𝐶𝑙𝑖𝑞 = 𝑚̇𝑙𝑖𝑞 𝐶𝑝𝑙𝑖𝑞 Eq. 4.3.9-16

The outlet conditions are then determined based on the inlet conditions, the heat exchanger configuration
and the UA values calculated earlier from the design conditions. Since there is no condensation, the outlet
humidity ratio equals the entering humidity ratio. With the outlet conditions known the heat transfer rate can
be determined.
𝑄𝑡𝑜𝑡𝑎𝑙 = 𝐶𝑎𝑖𝑟 (𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 ) Eq. 4.3.9-17

If there is condensation during the cooling process (entering liquid temperature < dewpoint temperature)
then the wet coil performance is calculated.

4–183
TRNSYS 18 – Mathematical Reference

The Cp at saturated conditions can be estimated from the dew point temperature at the entering air
conditions, the saturated enthalpy at the dew point, the entering water temperature and the saturated air
enthalpy at the entering water temperature.
ℎ𝑠𝑎𝑡,𝑑𝑝 − ℎ𝑠𝑎𝑡.𝑙𝑖𝑞
𝐶𝑝𝑠𝑎𝑡 = Eq. 4.3.9-18
𝑇𝑑𝑝 − 𝑇𝑙𝑖𝑞,𝑖𝑛
The enthalpy UA and stream capacitances are determined.
1
𝑈𝐴ℎ =
𝐶𝑝𝑠𝑎𝑡 𝐶𝑝𝑎𝑖𝑟 Eq. 4.3.9-19

𝑈𝐴𝑖𝑛𝑡 𝑈𝐴𝑒𝑥𝑡
𝐶𝑎𝑖𝑟 = 𝑚̇𝑎𝑖𝑟 Eq. 4.3.9-20
𝐶𝑝𝑙𝑖𝑞
𝐶𝑙𝑖𝑞 = 𝑚̇𝑙𝑖𝑞 Eq. 4.3.9-21
𝐶𝑝𝑠𝑎𝑡
The leaving enthalpies are calculated based on the inlet conditions, the heat exchanger configuration and
the enthalpy UA value.
The entering and leaving external surface conditions are calculated from the air and water conditions and
the ratio of the resistances.
1
𝑈𝐴𝑖𝑛𝑡
𝑅𝑒𝑠𝑖𝑠𝑡𝑅𝑎𝑡𝑖𝑜 = Eq. 4.3.9-22
1 𝐶𝑝 1
+ 𝑎𝑖𝑟 ∙
𝑈𝐴𝑒𝑥𝑡 𝐶𝑝𝑠𝑎𝑡 𝑈𝐴𝑒𝑥𝑡
ℎ𝑠𝑎𝑡𝑠𝑢𝑟𝑓,𝑖𝑛 = ℎ𝑠𝑎𝑡𝑙𝑖𝑞,𝑜𝑢𝑡 + 𝑅𝑒𝑠𝑖𝑠𝑡𝑅𝑎𝑡𝑖𝑜(ℎ𝑎𝑖𝑟,𝑖𝑛 − ℎ𝑠𝑎𝑡𝑙𝑖𝑞,𝑜𝑢𝑡 ) Eq. 4.3.9-23

ℎ𝑠𝑎𝑡𝑠𝑢𝑟𝑓,𝑜𝑢𝑡 = ℎ𝑠𝑎𝑡𝑙𝑖𝑞,𝑖𝑛 + 𝑅𝑒𝑠𝑖𝑠𝑡𝑅𝑎𝑡𝑖𝑜(ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 − ℎ𝑠𝑎𝑡𝑙𝑖𝑞,𝑖𝑛 ) Eq. 4.3.9-24

The saturation temperature of the inlet air is determined from the inlet surface saturation enthalpy and the
outlet air conditions are calculated from the enthalpies and surface conditions.
𝑄𝑡𝑜𝑡𝑎𝑙 = 𝑚̇𝑎𝑖𝑟 (ℎ𝑎𝑖𝑟,𝑖𝑛 − ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 ) Eq. 4.3.9-25
𝑄𝑡𝑜𝑡𝑎𝑙
𝑇𝑙𝑖𝑞,𝑜𝑢𝑡 = 𝑇𝑙𝑖𝑞,𝑖𝑛 + Eq. 4.3.9-26
𝑚̇𝑙𝑖𝑞 𝐶𝑝𝑙𝑖𝑞
The temperature effectiveness is calculated assuming that the temperature of the condensate is constant
and the specific heat of the moist air is constant.
𝐶𝑎𝑖𝑟 = 𝑚𝑎𝑖𝑟 (𝐶𝑝𝑎𝑖𝑟 + 𝑤𝑎𝑖𝑟,𝑖𝑛 𝐶𝑝𝑣𝑎𝑝 ) Eq. 4.3.9-27
𝑈𝐴𝑒𝑥𝑡
𝑁𝑇𝑈 = Eq. 4.3.9-28
𝐶𝑎𝑖𝑟
𝜀 = 1 − 𝑒 −𝑁𝑇𝑈 Eq. 4.3.9-29

Using the effectiveness relationship, the surface enthalpy and temperature at the end of the wet part of the
coil are determined.
ℎ𝑎𝑖𝑟,𝑖𝑛 − ℎ𝑎𝑖𝑟,𝑜𝑢𝑡
ℎ𝑠𝑎𝑡,𝑐𝑜𝑛𝑑 = ℎ𝑎𝑖𝑟,𝑖𝑛 − [ ] Eq. 4.3.9-30
𝜀
The condensate temperature is then calculated as the saturation temperature at the above saturation
enthalpy.
If the condensate temperature is less than the entering air dewpoint, then the leaving air temperature is
calculated using the effectiveness and the humidity ratio is determined from the leaving air temperature and
enthalpy.
𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 = 𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝜀(𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑇𝑐𝑜𝑛𝑑 ) Eq. 4.3.9-31

Otherwise the leaving air humidity ratio is the inlet air humidity ratio and the outlet air temperature is
determined from the leaving air humidity ratio and the leaving air enthalpy.

4–184
TRNSYS 18 – Mathematical Reference

The sensible coil load can then be calculated.


𝑄𝑠𝑒𝑛𝑠𝑖𝑏𝑙𝑒 = 𝐶𝑎𝑖𝑟 (𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 ) Eq. 4.3.9-32

If the inlet air dewpoint temperature is less than the inlet air surface temperature then the coil is only partially
wet. In this case both the wet coil and the dry coil performance are calculated and the coil performance is
approximated with the higher of the totally wet and the totally dry coil total heat transfer.

Heat Exchanger Calculations


The calculation of the cooling coil heat exchanger performance is the same whether based on temperatures
or enthalpies.
The minimum and maximum of the two stream capacitances and the ratio of the ratios is determined.
𝐶𝑚𝑖𝑛
𝐶𝑟𝑎𝑡𝑖𝑜 = Eq. 4.3.9-33
𝐶𝑚𝑎𝑥
If Cmax = 0 then Cratio = 1
𝑈𝐴
𝑁𝑇𝑈 = Eq. 4.3.9-34
𝐶𝑟𝑎𝑡𝑖𝑜
If Cmin = 0 then NTU = 1e15
The effectiveness (ԑ) is then calculated based on the heat exchanger configuration.
If the NTU <= 0 then ԑ = 0;
If Cratio < 1e-15 then the effectiveness is independent of configuration;
𝜀 = 1 − 𝑒 −𝑁𝑇𝑈 Eq. 4.3.9-35

If the configuration is counterflow:


if Cratio = 1 then
𝑁𝑇𝑈
𝜀= Eq. 4.3.9-36
𝑁𝑇𝑈 + 1
otherwise
𝑒 = 𝑒 (−𝑁𝑇𝑈(1−𝐶𝑟𝑎𝑡𝑖𝑜 )) Eq. 4.3.9-37
1−𝑒
𝜀= Eq. 4.3.9-38
1 − 𝑒 ∙ 𝐶𝑟𝑎𝑡𝑖𝑜
If the configuration is parallel flow:
1 − 𝑒 (−𝑁𝑇𝑈(1+𝐶𝑟𝑎𝑡𝑖𝑜 ))
𝜀= Eq. 4.3.9-39
1 + 𝐶𝑟𝑎𝑡𝑖𝑜
If the configuration is cross flow, with both streams unmixed:
𝑒 = 𝑁𝑇𝑈 −0.22 Eq. 4.3.9-40

𝑒 (−𝑁𝑇𝑈∙𝐶𝑟𝑎𝑡𝑖𝑜 ∙𝑒) −1
[ ] Eq. 4.3.9-41
𝑒∙𝐶
𝜀 = 1−𝑒
If the configuration is cross flow, with both streams mixed:
1
𝜀= Eq. 4.3.9-42
1 𝐶𝑟𝑎𝑡𝑖𝑜 1
[ + − ]
1 − 𝑒 −𝑁𝑇𝑈 1 − 𝑒 (−𝑁𝑇𝑈∙𝐶𝑟𝑎𝑡𝑖𝑜 ) −𝑁𝑇𝑈
If the configuration is cross flow, with the minimum capacitance stream unmixed:
−𝑁𝑇𝑈 ))
1 − 𝑒 (−𝐶𝑟𝑎𝑡𝑖𝑜 (1−𝑒 Eq. 4.3.9-43
𝜀=
𝐶𝑟𝑎𝑡𝑖𝑜
If the configuration is cross flow, with the maximum capacitance stream unmixed:

4–185
TRNSYS 18 – Mathematical Reference

1−𝑒 (−𝑁𝑇𝑈∙𝐶𝑟𝑎𝑡𝑖𝑜 )
[−( )] Eq. 4.3.9-44
𝐶
𝜀 = 1−𝑒
With the effectiveness known, the leaving conditions are calculated.
𝑄𝑚𝑎𝑥 = 𝐶𝑚𝑖𝑛 (𝑖𝑛1 − 𝑖𝑛2 ) Eq. 4.3.9-45
𝑄𝑚𝑎𝑥
𝑜𝑢𝑡1 = 𝑖𝑛1 − 𝜀 Eq. 4.3.9-46
𝐶1
𝑄𝑚𝑎𝑥
𝑜𝑢𝑡2 = 𝑖𝑛2 + 𝜀 Eq. 4.3.9-47
𝐶2

4.3.9.5. References
1. Brandemeuhl, M. J. 1993 HVAC2 Toolkit: Algorithms and Subroutines for Secondary HVAC
Systems Energy Calculations, ASHRAE.
2. IBPSA BuildSim-2004. 2004. Boulder Colorado: An Inprovement of ASHRAE Secondary HVAC
Toolkit Simple Cooling Coil Model for Building Simulation, Rahul J Chillar, Richard J Liesen, M&IE, UIUC.

4–186
TRNSYS 18 – Mathematical Reference

4.3.10. Type 124: Chilled Water Coil (Partially Wet)


The simple cooling coil model provides a good estimation of the performance without the detailed geometric
characteristics of the coil. The parameters of the model are only thermodynamic properties of the coil, which
require no specific manufacturer’s data. The simulation model is based on the ASHRAE Secondary Toolkit
[1] and modifications proposed by Chillar, et al [2]. There are two versions of the simple cooling coil model.
This version will iterate to determine the performance if the coil is partially wet. Because of the iterations,
this version is slower than Type 123 which assumes the coil is either completely dry or wet.

4.3.10.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] The humidity mode determines whether the absolute humidity (=1)
or relative humidity (=2) ratio of the air stream is an input.

2 Design Inlet Fluid [C] The temperature of the fluid inlet to the cooling coil at the
Temperature conditions used to determine the design coil capacities.

3 Design Inlet Fluid Flow [kg/h] The flow rate of the fluid inlet to the cooling coil at the conditions
Rate used to determine the design coil capacities.

4 Design Inlet Air [C] The temperature of the air inlet to the cooling coil at the conditions
Temperature used to determine the design coil capacities.

5 Design Inlet Air [-] The absolute humidity ratio of the air inlet to the cooling coil at the
Humidity Ratio conditions used to determine the design coil capacities.

6 Design Inlet Air Flow [kg/h] The flow rate of the air inlet to the cooling coil at the conditions
Rate used to determine the design coil capacities.

7 Design Total Cooling [kJ/h] The total cooling capacity of the cooling coil at the inlet air and fluid
Capacity properties above.

8 Design Sensible [kJ/h] The sensible cooling capacity of the cooling coil at the inlet air and
Cooling fluid properties above.

9 Fluid Specific Heat [kJ/kg K] The specific heat of the fluid flowing through the cooling coil.

10 Heat Exchanger [-] The parameter denotes the configuration of the cooling coil
Configuration (Counterflow = 1; Parallelflow = 2; Crossflow - both unmixed = 3;
Crossflow - both mixed = 4; Crossflow - minimum capacity unmixed
= 5; Crossflow - maximum capacity unmixed = 6)

INPUTS

1 Inlet Fluid Temperature [C] The temperature of the fluid entering the cooling coil.

2 Inlet Fluid Flow Rate [kg/h] The flow rate of the fluid entering the cooling coil.

3 Inlet Air Temperature [C] The temperature of the air entering the cooling coil.

4 Inlet Air Humidity Ratio [-] The absolute humidity ratio of the air entering the cooling coil.

4–187
TRNSYS 18 – Mathematical Reference

5 Inlet Air Relative [%] The percent relative humidity of the air entering the cooling coil.
Humidity

6 Inlet Air Flow Rate [kg/h] The flow rate of the air entering the cooling coil.

7 Inlet Air Pressure [atm] The pressure (in atmospheres) of the air entering the cooling coil.

OUTPUTS

1 Outlet Fluid [C] The temperature of the fluid exiting the cooling coil.
Temperature

2 Outlet Fluid Flow Rate [kg/h] The flow rate of the fluid exiting the cooling coil.

3 Outlet Air Temperature [C] The temperature of the air exiting the cooling coil.

4 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the cooling coil.
Ratio

5 Outlet Air Relative [%] The percent relative humidity of the air exiting the cooling coil.
Humidity

6 Outlet Air Flow Rate [kg/h] The flow rate of the air exiting the cooling coil.

7 Outlet Air Pressure [atm] The pressure (in atmospheres) of the air exiting the cooling coil.

8 Total Cooling [kJ/h] The total amount of cooling of the air stream.

9 Sensible Cooling [kJ/h] The sensible cooling of the air stream.

10 Fraction Wet [-] The fraction of the coil that is considered 'wet' in the calculations (0
= completely dry; 1= completely wet).

4.3.10.2. Simulation Summary Report Contents


VALUE FIELDS

Rated Total Cooling [kJ/h] Parameter 7

Rated Sensible [kJ/h] Parameter 8


Cooling

TEXT FIELDS

Type of Heat [-] Parameter 10


Exchanger

INTEGRATED VALUE FIELDS

Total Cooling [kJ] Output 8

Sensible Cooling [kJ] Output 9

4–188
TRNSYS 18 – Mathematical Reference

MINIMUM/MAXIMUM VALUE FIELDS

Fluid Outlet [C] Minimum and maximum of Output 1


Temperature

Fluid Flow Rate [kg/h] Minimum and maximum of Output 2

Air Outlet Temperature [C] Minimum and maximum of Output 4

Air Flow Rate [kg/h] Minimum and maximum of Output 6

Fraction Wet [-] Minimum and maximum of Output 10

4.3.10.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.10.4. Detailed Description


The model calculates the coil design U-factor times Area (UA) values from the design conditions. The
calculations are performed assuming a wet coil at design conditions. Because the heat transfer includes
latent effects, the model is based on enthalpies rather than temperatures. Air enthalpies are calculated
using the standard TRNSYS psychrometric routines. The corresponding enthalpies of the coil and water
are related to that of air through fictitious enthalpies, defined as the enthalpy of saturated air at the
temperature of the coil or water. While heat transfer rates are commonly expressed as the product of an
overall heat transfer coefficient (UA) and a temperature difference, the use of enthalpy-based heat transfer
calculations requires an enthalpy-based overall heat transfer coefficient UAh.
𝑄 = 𝑈𝐴ℎ (ℎ𝑜𝑢𝑡 − ℎ𝑖𝑛 ) Eq. 4.3.10-1

Where
𝑈𝐴
𝑈𝐴ℎ = Eq. 4.3.10-2
𝐶𝑝
With UA = conventional heat transfer coefficient and Cp = specific heat across the enthalpy difference.
When using fictitious enthalpies, a corresponding fictitious specific heat must be defined. UA h can be
calculated from a combination of series or parallel enthalpy resistances, similar to temperature resistances.
Then enthalpy capacitance rates related heat transfer to the enthalpy change of a fluid between inlet and
outlet. On the air side, the enthalpy capacity rate is air mass flow rate. While on the liquid side, the enthalpy
capacitance rate is based on the enthalpy of saturated air at the liquid temperature.
From the coil design parameters, the dewpoint and saturated liquid enthalpy at the rating point are
calculated. The leaving air enthalpies are calculated from the design capacities.
𝑄𝑡𝑜𝑡𝑎𝑙
ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 = ℎ𝑎𝑖𝑟,𝑖𝑛 − Eq. 4.3.10-3
𝑚̇𝑎𝑖𝑟
𝑄𝑡𝑜𝑡𝑎𝑙 − 𝑄𝑠𝑒𝑛𝑠𝑖𝑏𝑙𝑒
ℎ𝑎𝑖𝑟,𝑠𝑎𝑡𝑢𝑟𝑎𝑡𝑒𝑑 = ℎ𝑎𝑖𝑟,𝑖𝑛 − [ ] Eq. 4.3.10-4
𝑚̇𝑎𝑖𝑟
The outlet air humidity ratio is calculated from the inlet air temperature and the saturated air humidity ratio.
The outlet air temperature is then calculated from the outlet air humidity ratio and the outlet air enthalpy.
The Cp at saturated conditions can be estimated from the dew point temperature at the entering air
conditions, the saturated enthalpy at the dew point, the entering water temperature and the saturated air
enthalpy at the entering water temperature.
ℎ𝑠𝑎𝑡,𝑑𝑝 − ℎ𝑠𝑎𝑡,𝑙𝑖𝑞
𝐶𝑝𝑠𝑎𝑡 = Eq. 4.3.10-5
𝑇𝑑𝑝 − 𝑇𝑙𝑖𝑞,𝑖𝑛

4–189
TRNSYS 18 – Mathematical Reference

The capacitance of the two streams are then estimated


𝐶𝑎𝑖𝑟 = 𝑚̇𝑎𝑖𝑟 Eq. 4.3.10-6
𝐶𝑝𝑙𝑖𝑞
𝐶𝑙𝑖𝑞 = 𝑚̇𝑙𝑖𝑞 ( ) Eq. 4.3.10-7
𝐶𝑝𝑠𝑎𝑡
The overall heat transfer coefficient is then determined from the entering conditions, the capacitances of
the streams, and the geometry of the heat exchanger. An iterative scheme is used to adjust the UA until
the leaving conditions are such that
𝑄𝑡𝑜𝑡𝑎𝑙 = 𝐶𝑎𝑖𝑟 (ℎ𝑎𝑖𝑟,𝑖𝑛 − ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 ) Eq. 4.3.10-8

The next step is to determine the air-side overall heat transfer coefficient (UA) assuming that the coil surface
temperature is at the apparatus dewpoint temperature. First we must iterate to determine the apparatus
dewpoint equal to the temperature calculated by extending the line between the entering and leaving
conditions to the saturation curve.
The “slope” of temperature versus humidity ratio between entering and leaving states is calculated:
𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡
𝑠𝑙𝑜𝑝𝑒 = Eq. 4.3.10-9
𝑤𝑎𝑖𝑟,𝑖𝑛 − 𝑤𝑎𝑖𝑟,𝑜𝑢𝑡
We then iterate to find an apparatus dewpoint such that
𝑇𝑎𝑑𝑝 = 𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑠𝑙𝑜𝑝𝑒(𝑤𝑎𝑖𝑟,𝑖𝑛 − 𝑤𝑎𝑑𝑝 ) Eq. 4.3.10-10

With the apparatus dewpoint calculated, the bypass factor for the coil can be determined.
ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 − ℎ𝑎𝑝𝑑
𝐵𝑦𝑝𝑎𝑠𝑠𝐹𝑎𝑐𝑡𝑜𝑟 = Eq. 4.3.10-11
ℎ𝑎𝑖𝑟,𝑖𝑛 − ℎ𝑎𝑝𝑑
The air-side overall heat transfer coefficient is then calculated. If the enthalpy at the apparatus dewpoint is
less than or equal to the enthalpy of saturated air at the entering liquid temperature then the air-side overall
heat transfer coefficient is
𝑈𝐴𝑒𝑥𝑡 = 𝑈𝐴 ∙ 𝐶𝑝𝑎𝑖𝑟 Eq. 4.3.10-12

Otherwise it is
𝑈𝐴𝑒𝑥𝑡 = − ln(𝐵𝑦𝑝𝑎𝑠𝑠𝐹𝑎𝑐𝑡𝑜𝑟) 𝑚̇𝑎𝑖𝑟 (𝐶𝑝𝑎𝑖𝑟 + 𝑤𝑎𝑖𝑟,𝑖𝑛 𝐶𝑝𝑣𝑎𝑝 ) Eq. 4.3.10-13

Then the liquid-side overall heat transfer coefficient is calculated from the enthalpy-based overall coefficient
and the air-side coefficient.
𝐶𝑝𝑠𝑎𝑡
𝑈𝐴𝑖𝑛𝑡 =
1 𝐶𝑝 Eq. 4.3.10-14
− 𝑎𝑖𝑟
𝑈𝐴 𝑈𝐴𝑒𝑥𝑡
The coil area is estimated using some assumptions on the coil design.
The inside heat transfer coefficient for the tubes is calculated assuming an inside diameter of 0.0122 m and
a liquid velocity of 2 m/s. The heat transfer coefficient on the outside of the tubes is assumed to be constant
with a sensible value of 58 W/m 2K and a latent value of 82 W/m 2K. The fin efficiency is set to 0.92 based
on aluminum fins with 12 fins per inch and fin area of 90% of surface area. The inside to outside area ratio
is assumed at 0.07 since typical design area rations vary from 0.06 and 0.08. So the overall heat transfer
coefficient is
1
𝑈𝑜𝑣𝑒𝑟𝑎𝑙𝑙 =
1 1 Eq. 4.3.10-15
+
ℎ𝑖𝑛𝑠𝑖𝑑𝑒 ∙ 𝐴𝑟𝑒𝑎𝑅𝑎𝑡𝑖𝑜 ℎ𝑜𝑢𝑡𝑠𝑖𝑑𝑒 ∙ 𝐹𝑖𝑛𝐸𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦
Giving an estimate of the coil surface area from
𝑈𝐴𝑡𝑜𝑡𝑎𝑙
𝐴𝑟𝑒𝑎 = Eq. 4.3.10-16
𝑈𝐴𝑜𝑣𝑒𝑟𝑎𝑙𝑙
These calculated heat transfer coefficients are only calculated once per simulation.

4–190
TRNSYS 18 – Mathematical Reference

On an iterative call to the cooling coil component, the model first checks if either the air flow rate or the
liquid flow rate is 0. If so, then the outlet conditions are set to the inlet conditions and the model exits.
If there is flow in both streams the model then the UA values are adjusted for the inlet conditions based on
work by Wetter (3).
𝑥𝑎 = 1 + 0.004769(𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑇𝑎𝑖𝑟,𝑖𝑛,𝑟𝑎𝑡𝑒𝑑 ) Eq. 4.3.10-17
0.8
𝑚̇𝑎𝑖𝑟
𝑈𝐴𝑒𝑥𝑡 = 𝑈𝐴𝑒𝑥𝑡,𝑟𝑎𝑡𝑒𝑑 𝑥𝑎 [ ] Eq. 4.3.10-18
𝑚̇𝑎𝑖𝑟,𝑟𝑎𝑡𝑒𝑑
0.014
𝑥𝑤 = 1 + [ ] (𝑇𝑙𝑖𝑞,𝑖𝑛 − 𝑇𝑙𝑖𝑞,𝑖𝑛,𝑟𝑎𝑡𝑒𝑑 ) Eq. 4.3.10-19
1 + 0.014𝑇𝑙𝑖𝑞,𝑖𝑛,𝑟𝑎𝑡𝑒𝑑
0.85
𝑚̇𝑙𝑖𝑞
𝑈𝐴𝑖𝑛𝑡 = 𝑈𝐴𝑖𝑛𝑡,𝑟𝑎𝑡𝑒𝑑 𝑥𝑤 [ ] Eq. 4.3.10-20
𝑚̇𝑙𝑖𝑞,𝑟𝑎𝑡𝑒𝑑
1
𝑈𝐴𝑡𝑜𝑡 =
1 1 Eq. 4.3.10-21
+
𝑈𝐴𝑒𝑥𝑡 𝑈𝐴𝑖𝑛𝑡
The inside and outside heat transfer coefficients are then determined from the corrected UAs and the
estimated surface area.
The completely dry and completely wet coil calculations are the same as the Type 123 coil model. The
difference is in the calculations when the coil is partially wet. Since we have an estimate of the total coil
surface area it is possible to calculate the performance of the wet and dry portions of the coil by adjusting
the UAs based on the fraction wet. The calculations are based on the idea that the leaving conditions from
the dry portion of the coil would be the inlet conditions to the wet portion of the coil. The coil surface
temperature at this boundary condition should be the same as the dewpoint at the entering air conditions.
The model iterates on the fraction wet until the surface temperature at the boundary equals the dewpoint.
(This is actually a double iteration since at each guess of fraction wet the code must iterate on the air
temperature to find the corrected liquid temperature at the boundary.)

4.3.10.5. References
1. Brandemeuhl, M. J. 1993 HVAC2 Toolkit: Algorithms and Subroutines for Secondary HVAC
Systems Energy Calculations, ASHRAE.
2. IBPSA BuildSim-2004. 2004. Boulder Colorado: An Inprovement of ASHRAE Secondary HVAC
Toolkit Simple Cooling Coil Model for Building Simulation, Rahul J Chillar, Richard J Liesen, M&IE, UIUC.
3. Wetter, M. 1999 Simulation Model Finned Water-to-Air Coil without Condensation, LBNL-42355

4–191
TRNSYS 18 – Mathematical Reference

4.3.11. Type 126: Basic Cooling Tower (Single Speed, Control


Signal)
Type 126 estimates the performance of a cooling tower without any detailed parameters of the tower
configuration. Instead it uses the design inlet and outlet conditions to calculate an overall heat transfer
coefficient (UA) for the tower and then uses that UA value to estimate performance at other inlet conditions.
This version calculates the performance of a single speed cooling tower that provides cooling to the fluid
stream with the fan on and fan off (natural convection). The control for this version is a fan and fluid control
signal where the model calculates the outlet conditions that would be achieved with the inlet conditions and
control signals.

4.3.11.1. Parameter/Input/Output Reference


PARAMETERS

1 Design Atmospheric [atm] The pressure of the atmosphere for the cooling tower air at design
Pressure conditions.

2 Design Inlet Fluid [C] The temperature of the fluid entering the cooling tower at design
Temperature conditions.

3 Design Outlet Fluid [C] The temperature of the fluid temperature exiting the cooling tower
Temperature at design conditions.

4 Design Fluid Flow Rate [kg/h] The flow rate of the fluid through the tower at design conditions.

5 Design Entering Air [C] The wet bulb temperature of the air entering the cooling tower at
Wet Bulb Temperature design conditions.

6 Design Air Flow Rate [kg/h] The flow rate of the air through the cooling tower at design
conditions.

7 Design Fan Power [kJ/h] The power consumed by the fan at design conditions.

8 Natural Convection [-] The fraction of the design airflow though the tower when the fan is
Airflow Fraction off and the tower is operating in natural convection mode.

9 Natural Convection [-] The fraction of the design capacity of the tower when the fan is off
Capacity Fraction and the tower is operating in natural convection mode.

INPUTS

1 Entering Fluid [C] The temperature of the fluid entering the cooling tower.
Temperature

2 Entering Fluid Flow [kg/h] The flow rate of fluid entering the cooling tower.
Rate

3 Entering Air Wet Blub [C] The wet bulb temperature of the air entering the cooling tower.
Temperature

4 Atmospheric Pressure [atm] The atmospheric pressure of the air in the cooling tower.

5 Fan Control Signal [-] The control signal for the fan in the cooling tower.

4–192
TRNSYS 18 – Mathematical Reference

OUTPUTS

1 Leaving Fluid [C] The temperature of the fluid leaving the cooling tower.
Temperature

2 Leaving Fluid Flow [kg/h] The flow rate of water exiting the tower sump.
Rate

3 Leaving Air Wet Bulb [C] The wet bulb temperature of the air leaving the cooling tower.
Temperature

4 Leaving Air Flow Rate [kg/h] The flow rate of the air leaving the cooling tower.

5 Fan Power [kJ/h] The power consumed by the fan.


Consumption

6 Heat Rejection [kJ/h] The total heat rejected to the cooling tower.

4.3.11.2. Simulation Summary Report Contents


VALUE FIELDS

UA at Design [kJ/h K] The calculated UA based on the design full flow conditions.
Conditions

UA in Natural [kJ/h K] The calculated UA for the fan off performance.


Convection

INTEGRATED VALUE FIELDS

Fan Power [kJ] Output 5

Heat Rejection [kJ] Output 6

MINIMUM/MAXIMUM VALUE FIELDS

Fluid Outlet [C] Minimum and maximum of Output 1


Temperature

Fluid Flow Rate [kg/h] Minimum and maximum of Output 2

4.3.11.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.11.4. Detailed Description


Based on the specified inlet design conditions, the component iterates to find a UA value that provides the
specified design outlet fluid temperature. An UA value is determined for both fan operating and natural
convection performance modes. The UA values are only calculated once per simulation.
On an iterative call to the component, the operating state of the cooling tower is determined. If there is no
fluid flow through the cooling tower, the outlet fluid temperature is set to the inlet temperature and the
cooling tower power consumption is zero. If there is fluid flow and the fan control signal is less than 0.5

4–193
TRNSYS 18 – Mathematical Reference

then the performance is calculated using the natural convection airflow rate and UA value. Otherwise the
performance with the fan operational airflow rate and UA value is calculated.
The inlet saturated air enthalpy is calculated based on the inlet dry bulb and a relative humidity of 100%.
The capacity rate of the water stream is determined.
𝐶𝑤 = 𝐶𝑝𝑤 𝑚̇𝑤 Eq. 4.3.11-1

The component then guesses an outlet wetbulb temperature and calculates the tower performance for
those conditions.
The outlet saturated air enthalpy is calculated based on the outlet wetbulb temperature and a relative
humidity of 100%.
A fictitious specific heat and capacity rate are calculated from the saturated enthalpies and airflow rate.
ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 − ℎ𝑎𝑖𝑟,𝑖𝑛
𝐶𝑝𝑎𝑖𝑟,𝑓𝑖𝑐𝑡𝑖𝑡𝑖𝑜𝑢𝑠 = Eq. 4.3.11-2
𝑇𝑤𝑏,𝑜𝑢𝑡 − 𝑇𝑤𝑏,𝑖𝑛
𝐶𝑎𝑖𝑟 = 𝐶𝑝𝑎𝑖𝑟,𝑓𝑖𝑐𝑡𝑖𝑡𝑖𝑜𝑢𝑠 𝑚̇𝑎𝑖𝑟 Eq. 4.3.11-3

The maximum and minimum of the water and air capacity rates are determined and the ratio of the capacity
rates is calculated.
The design UA value is adjusted based on the fictitious specific heat.
𝐶𝑝𝑎𝑖𝑟,𝑓𝑖𝑐𝑡𝑖𝑡𝑖𝑜𝑢𝑠
𝑈𝐴𝑓𝑖𝑐𝑡𝑖𝑡𝑖𝑜𝑢𝑠 = 𝑈𝐴𝑑𝑒𝑠𝑖𝑔𝑛 Eq. 4.3.11-4
𝐶𝑝𝑎𝑖𝑟
The NTU for the adjust UA value is calculated.
If Cmin = 0 then NTU = 1e15 ; otherwise
𝑈𝐴𝑓𝑖𝑐𝑡𝑖𝑡𝑖𝑜𝑢𝑠
𝑁𝑇𝑈 = Eq. 4.3.11-5
𝐶𝑚𝑖𝑛
The effectiveness of the tower with the current conditions is calculated from the NTU.
If the ratio of the capacity rates is greater than 0.995 then
𝑁𝑇𝑈
𝜀= Eq. 4.3.11-6
𝑁𝑇𝑈 + 1
Otherwise
𝑒 = 𝑒 (−𝑁𝑇𝑈(1−𝐶𝑟𝑎𝑡𝑖𝑜 )) Eq. 4.3.11-7
1−𝑒
𝜀= Eq. 4.3.11-8
1 − 𝑒 ∙ 𝐶𝑟𝑎𝑡𝑖𝑜
With the effectiveness, the total heat transfer and leaving wet bulb temperature are calculated.
𝑄 = 𝜀𝐶𝑚𝑖𝑛 (𝑇𝑤,𝑖𝑛 − 𝑇𝑤𝑏,𝑖𝑛 ) Eq. 4.3.11-9
𝑄
𝑇𝑤𝑏,𝑜𝑢𝑡 = 𝑇𝑤𝑏,𝑖𝑛 + Eq. 4.3.11-10
𝐶𝑎𝑖𝑟
The component iterates until the guessed and calculated outlet wetbulb temperatures agree and then the
outlet water temperature is calculated.
𝑄
𝑇𝑤,𝑜𝑢𝑡 = 𝑇𝑤,𝑖𝑛 − Eq. 4.3.11-11
𝐶𝑤𝑎𝑡𝑒𝑟

4–194
TRNSYS 18 – Mathematical Reference

4.3.12. Type 128: Cooling Tower (Two Speed, External


Control)
Type 128 estimates the performance of a cooling tower without any detailed parameters of the tower
configuration. Instead it uses the design inlet and outlet conditions to calculate an overall heat transfer
coefficient (UA) for the tower and then uses that UA value to estimate performance at other inlet conditions.
This version calculates the performance of a two speed cooling tower that provides cooling to the fluid
stream with the fan at high speed, at low speed, and off (natural convection). The control for this version
is a fan and fluid control signal where the model calculates the outlet conditions that would be achieved
with the inlet conditions and control signals.

4.3.12.1. Parameter/Input/Output Reference


PARAMETERS

1 Design Atmospheric [atm] The pressure of the atmosphere for the cooling tower air at design
Pressure conditions.

2 Design Inlet Fluid [C] The temperature of the fluid entering the cooling tower at design
Temperature conditions.

3 Design Outlet Fluid [C] The temperature of the fluid temperature exiting the cooling tower
Temperature at design conditions.

4 Design Fluid Flow Rate [kg/h] The flow rate of the fluid through the tower at design conditions.

5 Design Entering Air [C] The wet bulb temperature of the air entering the cooling tower at
Wet Bulb Temperature design conditions.

6 Design Air Flow Rate [kg/h] The flow rate of the air through the cooling tower at design
conditions.

7 Design Fan Power [kJ/h] The power consumed by the fan at design conditions.

8 Low Speed Airflow [-] The fraction of the design flow rate of the air through the tower
Fraction when the fan is running in low speed.

9 Low Speed Capacity [-] The fraction of the design capacity of the tower when the fan is
Fraction operating at low speed.

10 Natural Convection [-] The fraction of the design airflow though the tower when the fan is
Airflow Fraction off and the tower is operating in natural convection mode.

11 Natural Convection [-] The fraction of the design capacity of the tower when the fan is off
Capacity Fraction and the tower is operating in natural convection mode.

INPUTS

1 Entering Fluid [C] The temperature of the fluid entering the cooling tower.
Temperature

2 Entering Fluid Flow [kg/h] The flow rate of fluid entering the cooling tower.
Rate

4–195
TRNSYS 18 – Mathematical Reference

3 Entering Air Wet Blub [C] The wet bulb temperature of the air entering the cooling tower.
Temperature

4 Atmospheric Pressure [atm] The atmospheric pressure of the air in the cooling tower.

5 Fan Control Signal [-] The control signal for the fan in the cooling tower.

OUTPUTS

1 Leaving Fluid [C] The temperature of the fluid leaving the cooling tower.
Temperature

2 Leaving Fluid Flow [kg/h] The flow rate of water exiting the tower sump.
Rate

3 Leaving Air Wet Bulb [C] The wet bulb temperature of the air leaving the cooling tower.
Temperature

4 Leaving Air Flow Rate [kg/h] The flow rate of the air leaving the cooling tower.

5 Fan Power [kJ/h] The power consumed by the fan.


Consumption

4.3.12.2. Simulation Summary Report Contents


VALUE FIELDS

UA at Design [kJ/h K] The calculated UA based on the design full flow conditions.
Conditions

UA at Low Speed [kJ/h K] The calculated UA based on low speed operation.

UA in Natural [kJ/h K] The calculated UA for the fan off performance.


Convection

INTEGRATED VALUE FIELDS

Fan Power [kJ] Output 5

MINIMUM/MAXIMUM VALUE FIELDS

Fluid Outlet [C] Minimum and maximum of Output 1


Temperature

Fluid Flow Rate [kg/h] Minimum and maximum of Output 2

4.3.12.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4–196
TRNSYS 18 – Mathematical Reference

4.3.12.4. Detailed Description


Based on the specified inlet design conditions, the component iterates to find a UA value that provides the
specified design outlet fluid temperature. UA values are determined for high-speed and low-speed fan
operating and natural convection performance modes. The UA values are only calculated once per
simulation.
On an iterative call to the component, the operating state of the cooling tower is determined. If there is no
fluid flow through the cooling tower, the outlet fluid temperature is set to the inlet temperature and the
cooling tower power consumption is zero. If there is fluid flow and the fan control signal is less than 0.25
then the performance is calculated using the natural convection airflow rate and design UA value. If the
control signal is greater than 0.25 and less than 0.75 then the performance is calculated using the low-
speed airflow rate and UA value. Otherwise the performance with the high-speed fan operational airflow
rate and UA value is calculated.
The calculation methods are described in the mathematical reference for Type 126.

4–197
TRNSYS 18 – Mathematical Reference

4.3.13. Type 129: Cooling Tower (Two Speed, Internal


Controls)
Type 129 estimates the performance of a cooling tower without any detailed parameters of the tower
configuration. Instead it uses the design inlet and outlet conditions to calculate an overall heat transfer
coefficient (UA) for the tower and then uses that UA value to estimate performance at other inlet conditions.
This version calculates the performance of a two speed cooling tower that provides cooling to the fluid
stream with the fan at high speed, at low speed, and off (natural convection). In this version of the cooling
tower, the desired temperature of the fluid leaving the tower is an input. The model then determines which
speed (off, natural convection, low speed fan or high speed fan) creates a temperature colder than the
setpoint. If the capacity needed to cool the fluid down to the setpoint exceeds the capacity of the tower at
the inlet conditions, the model calculates the leaving fluid temperature with the high speed fan on.

4.3.13.1. Parameter/Input/Output Reference


PARAMETERS

1 Design Atmospheric [atm] The pressure of the atmosphere for the cooling tower air at design
Pressure conditions.

2 Design Inlet Fluid [C] The temperature of the fluid entering the cooling tower at design
Temperature conditions.

3 Design Outlet Fluid [C] The temperature of the fluid temperature exiting the cooling tower
Temperature at design conditions.

4 Design Fluid Flow Rate [kg/h] The flow rate of the fluid through the tower at design conditions.

5 Design Entering Air [C] The wet bulb temperature of the air entering the cooling tower at
Wet Bulb Temperature design conditions.

6 Design Air Flow Rate [kg/h] The flow rate of the air through the cooling tower at design
conditions.

7 Design Fan Power [kJ/h] The power consumed by the fan at design conditions.

8 Low Speed Airflow [-] The fraction of the design flow rate of the air through the tower
Fraction when the fan is running in low speed.

9 Low Speed Capacity [-] The fraction of the design capacity of the tower when the fan is
Fraction operating at low speed.

10 Natural Convection [-] The fraction of the design airflow though the tower when the fan is
Airflow Fraction off and the tower is operating in natural convection mode.

11 Natural Convection [-] The fraction of the design capacity of the tower when the fan is off
Capacity Fraction and the tower is operating in natural convection mode.

INPUTS

1 Entering Fluid [C] The temperature of the fluid entering the cooling tower.
Temperature

4–198
TRNSYS 18 – Mathematical Reference

2 Entering Fluid Flow [kg/h] The flow rate of fluid entering the cooling tower.
Rate

3 Entering Air Wet Blub [C] The wet bulb temperature of the air entering the cooling tower.
Temperature

4 Atmospheric Pressure [atm] The atmospheric pressure of the air in the cooling tower.

5 Leaving Fluid Setpoint [C] The setpoint for the fluid leaving the tower. The tower will
operature at the lowest speed that creates a fluid leaving
temperature equal to or less than the setpoint.

OUTPUTS

1 Leaving Fluid [C] The temperature of the fluid leaving the cooling tower.
Temperature

2 Leaving Fluid Flow [kg/h] The flow rate of water exiting the tower sump.
Rate

3 Leaving Air Wet Bulb [C] The wet bulb temperature of the air leaving the cooling tower.
Temperature

4 Leaving Air Flow Rate [kg/h] The flow rate of the air leaving the cooling tower.

5 Fan Power [kJ/h] The power consumed by the fan.


Consumption

6 Fan Speed [-] The speed that the tower fan is operating to maintain the setpoint.

4.3.13.2. Simulation Summary Report Contents


VALUE FIELDS

UA at Design [kJ/h K] The calculated UA based on the design full flow conditions.
Conditions

UA at Low Speed [kJ/h K] The calculated UA based on low speed operation.

UA in Natural [kJ/h K] The calculated UA for the fan off performance.


Convection

INTEGRATED VALUE FIELDS

Fan Power [kJ] Output 5

MINIMUM/MAXIMUM VALUE FIELDS

Fluid Setpoint [C] Minimum and maximum of Input 5

Fluid Outlet [C] Minimum and maximum of Output 1


Temperature

Fluid Flow Rate [kg/h] Minimum and maximum of Output 2

4–199
TRNSYS 18 – Mathematical Reference

Fan Speed [-] Minimum and maximum of Output 6

4.3.13.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.13.4. Detailed Description


Based on the specified inlet design conditions, the component iterates to find a UA value that provides the
specified design outlet fluid temperature. UA values are determined for high-speed and low-speed fan
operating and natural convection performance modes. The UA values are only calculated once per
simulation.
On an iterative call to the component, if the inlet water temperature is below the setpoint temperature the
tower is considered off and the outlet water temperature is set to the inlet water temperature. If the inlet
water temperature is above the setpoint temperature the outlet temperature at the fan-off (natural
convection) operation mode is calculated. If this temperature is below the setpoint the calculations are
finished. If the natural convection mode does not satisfy the setpoint, then the low-speed operation is
calculated. If the low-speed operation does not satisfy the setpoint, the high-speed operation is calculated.
If the high-speed operation does not meet the setpoint the model reports the outlet temperature that is
achieved by the high-speed performance and not the setpoint temperature.
The performance calculations of the cooling tower are discussed in the mathematical reference for Type
126.

4–200
TRNSYS 18 – Mathematical Reference

4.3.14. Type 136: Direct Expansion Coil


Type 136 uses a manufacturer’s catalog data approach to model an air to air heat pump section that might
appear in an air handler. It does not include algorithms to mix return and fresh air, it does not include any
auxiliary heating, and it does not include the ability to define a domestic/service water heating
desuperheater. Because of the lack of these features, Type 136 can be used to model a DX Coil –
Condenser component of an air handler.

4.3.14.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] This parameter indicates whether the absolute humidity ratio inputs
to this model will be used for the moist air calculations (mode 1) or
whether the percent relative humidity inputs will be used (mode 2).

2 Logical Unit – Cooling [-] The logical unit which will be assigned to the data file which
Data contains the heat pump cooling performance data. Logical units
must be unique integers greater than 10 in any TRNSYS input file.

3 Logical Unit – Heating [-] The logical unit which will be assigned to the data file which
Data contains the heat pump heating performance data. Logical units
must be unique integers greater than 10 in any TRNSYS input file.

4 Number of Outdoor [-] The number of outdoor ambient dry bulb temperatures for which
Dry-Bulb Steps – data is provided in the cooling performance data file.
Cooling

5 Number of Indoor Dry- [-] The number of return air (indoor air) dry bulb temperatures for
Bulb Steps – Cooling which cooling performance data is provided in the associated data
file.

6 Number of Indoor Wet- [-] The number of return air (jndoor air) wet bulb temperatures for
Bulb Steps – Cooling which cooling data is provided in the associated performance data
file.

7 Number of Outdoor [-] The number of ambient air dry bulb temperatures for which heating
Dry-Bulb Temperatures performance data is supplied in the associated data file.
– Heating

8 Number of Indoor [-] The number of return air (indoor air) dry bulb temperatures for
Temperatures – which heating performance data is supplied in the associated data
Heating file.

9 Number of Air Flow [-] The number of air flow rate steps for which heating and cooling
Steps performance data is supplied in the associated data file.

INPUTS

1 Inlet Air Temperature – [C] The dry bulb temperature of the air entering the indoor coil of the
Indoor Coil heat pump section.

2 Inlet Air Humidity Ratio [-] The absolute humidity ratio of the air entering the indoor coil of the
– Indoor Coil heat pump section.

4–201
TRNSYS 18 – Mathematical Reference

3 Inlet Air Relative [%] The percent relative humidity of the air entering the indoor coil of
Humidity – Indoor Coil the heat pump section.

4 Indoor Coil Air Flow [kg/h] The flow rate of dry air entering the indoor coil of the heat pump
section.

5 Inlet Air Pressure – [atm] The absolute pressure of the air entering the indoor coil of the heat
Indoor Coil pump section.

6 Indoor Coil Pressure [atm] The pressure drop of the air across the indoor coil of the heat
Drop pump section.

7 Inlet Air Temperature – [C] The dry bulb temperature of the air entering the outdoor coil of the
Outdoor Coil heat pump section.

8 Inlet Air Humidity Ratio [-] The absolute humidity ratio of the air entering the outdoor coil of
– Outdoor Coil the heat pump section.

9 Inlet Air Relative [%] The percent relative humidity of the air entering the outdoor coil of
Humidity – Outdoor the heat pump section.
Coil

10 Outdoor Coil Air Flow [kg/h] The flow rate of dry air entering the outdoor coil of the heat pump
section.

11 Inlet Air Pressure – [atm] The absolute pressure of the air entering the outdoor coil of the
Outdoor Coil heat pump section.

12 Outdoor Coil Pressure [atm] The pressure drop of the air across the outdoor coil of the heat
Drop pump section.

13 Cooling Control Signal [-] The control signal for cooling operation: ctrl < 0.5: cooling mode is
off, ctrl >= 0.5: cooling mode is on.

14 Heating Control Signal [-] The control signal for heating operation: ctrl < 0.5: heating mode is
off, ctrl >= 0.5: heating mode is on.

OUTPUTS

1 Outlet Air Temperature [C] The dry bulb temperature of the air exiting the indoor coil of the
– Indoor Coil heat pump.

2 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the indoor coil of the
Ratio – Indoor Coil heat pump.

3 Outlet Air Relative [%] The percent relative humidity of the air exiting the indoor coil of the
Humidity – Indoor Coil heat pump.

4 Indoor Coil Flow Rate [kg/h] The flow rate of dry air exiting the indoor coil of the heat pump.

5 Outlet Air Pressure – [atm] The absolute air pressure of the air exiting the indoor coil of the
Indoor Coil heat pump.

6 Outlet Air Temperature [C] The dry bulb temperature of the air exiting the outdoor coil of the
– Outdoor Coil heat pump.

4–202
TRNSYS 18 – Mathematical Reference

7 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the outdoor coil of the
Ratio – Outdoor Coil heat pump.

8 Outlet Air Relative [%] The percent relative humidity of the air exiting the outdoor coil of
Humidity – Outdoor the heat pump.
Coil

9 Outdoor Coil Air Flow [kg/h] The flow rate of dry air exiting the outdoor coil of the heat pump.
Rate

10 Outlet Air Pressure – [atm] The absolute air pressure of the air exiting the outdoor coil of the
Outdoor Coil heat pump.

11 Total Cooling Rate [kJ/h] The rate at which energy (both sensible and latent) is removed
from the conditioned air stream of the indoor coil in cooling mode.

12 Sensible Cooling Rate [kJ/h] The rate at which sensible heat is removed from the conditioned air
stream of the indoor coil in cooling mode.

13 Latent Cooling Rate [kJ/h] The rate at which latent energy is removed from the conditioned air
stream of the indoor coil in cooling mode.

14 Total Heating Rate [kJ/h] The rate at which heat is added to the conditioned air stream in the
indoor air coil by the heat pump.

15 Power [kJ/h] The power required to operate the heat pump.

16 COP [-] The coefficient of performance of the heat pump.

17 EER [-] The energy efficiency rating of the heat pump during the timestep.

4.3.14.2. Simulation Summary Report Contents


VALUE FIELDS

Rated Total Cooling [kJ/h] The total cooling capacity of the DX coil at 26.7 C EDB, 19.4 C EWB,
Capacity and 35 C ODB.

Rated Sensible [kJ/h] The sensible cooling capacity of the DX coil at 26.7 C EDB, 19.4 C
Cooling Capacity EWB, and 35 C ODB.

Rated Heating [kJ/h] The heating capacity of the DX coil at 21.1 C EDB and 8.33 C ODB.
Capacity

INTEGRATED VALUE FIELDS

Total Cooling [kJ] Output 11

Sensible Cooling [kJ] Output 12

Total Heating [kJ] Output 14

Power [kJ] Output 15

MINIMUM/MAXIMUM VALUE FIELDS

4–203
TRNSYS 18 – Mathematical Reference

Outlet Temperature [C] Minimum and maximum of Output 1

Air Flow Rate [kg/h] Minimum and maximum of Output 4

COP [-] Minimum and maximum of Output 16

4.3.14.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.14.4. Nomenclature
COP [-] Device coefficient of performance

Cp air [kJ/kg.K] Specific heat of air

hair , IndoorCoilIn [kJ/kg] Enthalpy of air entering the indoor coil


hair ,indoorCoilOut [kJ/kg] Enthalpy of air exiting the indoor coil
hair ,OutdoorCoilIn [kJ/kg] Enthalpy of air entering the outdoor coil
hair ,OutdoorCoilOut [kJ/kg] Enthalpy of air exiting the outdoor coil

m air [kg/h] Mass flow rate of air across the indoor coil

Pcomp [kJ/hr] Compressor power

TindoorCoil , In [C] Temperature of air entering the indoor coil


TindoorCoil ,Out [C] Temperature of air exiting the indoor coil

Q tot ,cool [kJ/hr] Total cooling capacity of the heat pump

Q sens,cool [kJ/hr] Sensible cooling capacity of the heat pump

Q evap [kJ/hr] Energy transferred by the evaporator



Q [kJ/hr] Energy transferred by the condenser
cond

Q tot ,heat [kJ/hr] Total heating capacity of the heat pump

4.3.14.5. Detailed Description


Air source heat pump sections in larger air handlers are vapor compression refrigerant devices that are
piped and valved in such a way that they can be used to either heat or cool one air stream and in so doing
cool or heat another. For the purposes of this document, we will refer to the stream that is being conditioned
(i.e. the air that is going into the building) as the “indoor coil” side and to the other stream as the “outdoor
coil” or “exhaust air” side. In this configuration, the heat pump acts like an active heat recovery device.
At any given time step, Type 136 determines whether the heat pump is actively heating or cooling or if the
section is acting as a flow-through device. Both cooling performance and heating performance are
determined based on catalog data files.

4–204
TRNSYS 18 – Mathematical Reference

Cooling Performance Data


Three measures of cooling performance must be provided in the cooling performance data file. These are
total cooling, sensible cooling, and power consumed. The power consumed should not include the power
associated with any fans but only the power associated with the compressor. The powers of the indoor and
outdoor fans are assumed to be handled by other components within the air handler. As with other catalog
data performance based components, Type 136 linearly interpolates between cooling performance
measures based on the current values of the indoor air flow rate, return air wet bulb temperature (ºC), return
air dry bulb temperature (ºC), and outdoor coil dry bulb temperature (ºC). It should be noted that the
component does not extrapolate beyond the data range provided. If values outside the data range are
provided, the maximum or minimum cooling performance values will be returned and a warning will be
written to the TRNSYS listing file and to the simulation log file.
An example cooling performance data file is provided for use with Type 136.
Users creating their own performance data must adhere closely to the syntax of the sample file. The values
of air flow must all appear on the first row of the data file. The values of indoor coil air wet bulb temperature
must all appear on the second row of the data file, the values of the indoor coil air dry bulb temperature
must all appear on the third row of the data file and the values of the outdoor coil air dry bulb temperature
must all appear on the fourth line. Users may specify more or fewer values of each of the four variables
than are shown in the sample file but must also remember to modify the corresponding parameters. For
example, the sample file contains three values of air flow rate. Consequently the value of parameter 9
(number of airflow steps) would be set to 3. The values of all three cooling performance measures must
then appear, each group on its own line with the total capacity first, the sensible capacity second, and the
compressor power last.
It is worth noting that the air flow rate in question is the indoor air coil flow rate (ie the rate of air that is
entering the building). Most heat pump manufacturers do not give performance data for varying air flow
rates across the outdoor coil. As a result, the model assumes that the heat pump’s performance is
independent of the air flow rate across the outdoor coil.
After having queried the TRNSYS InterpolateData subroutine for the cooling performance data for the
current conditions, checks are made in the code to ensure that the catalog data is reasonable. If, for
example, the sensible cooling power returned is higher than the total cooling power, the total cooling power
is increased to match the sensible value. While this may seem counter intuitive, it is an industry standard
when dealing with this situation in catalog data. The state of the air exiting the cooling mode evaporator is
determined by
𝑄̇𝑡𝑜𝑡,𝑐𝑜𝑜𝑙
ℎ𝑎𝑖𝑟,𝐼𝑛𝑑𝑜𝑜𝑟𝐶𝑜𝑖𝑙𝑂𝑢𝑡 = ℎ𝑎𝑖𝑟,𝐼𝑛𝑑𝑜𝑜𝑟𝐶𝑜𝑖𝑙𝐼𝑛 − Eq. 4.3.14-1
𝑚̇𝑎𝑖𝑟
The psychrometrics routine is called to determine the remaining properties. The pressure rise across the
indoor coil is applied to the air at this point in the calculations. The total cooling heat transfer is recalculated
based on the enthalpy difference between entering and exiting indoor coil air conditions. The sensible
cooling is calculated based on the temperature difference as defined in:
𝑄̇𝑠𝑒𝑛𝑠,𝑐𝑜𝑜𝑙 = 𝑚̇𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 (𝑇𝐼𝑛𝑑𝑜𝑜𝑟𝐶𝑜𝑖𝑙,𝐼𝑛 − 𝑇𝐼𝑛𝑑𝑜𝑜𝑟𝐶𝑜𝑖𝑙,𝑜𝑢𝑡 ) Eq. 4.3.14-2

The latent cooling is computed as the difference between the total and the sensible cooling values. The
evaporator and condenser energies are set according to:
𝑄̇𝑒𝑣𝑎𝑝 = 𝑄̇𝑡𝑜𝑡,𝑐𝑜𝑜𝑙 Eq. 4.3.14-3

𝑄̇𝑐𝑜𝑛𝑑 = 𝑄̇𝑡𝑜𝑡,𝑐𝑜𝑜𝑙 + 𝑃𝑐𝑜𝑚𝑝


̇ Eq. 4.3.14-4

The condenser energy is added to the outdoor coil air stream:


𝑄̇𝑡𝑜𝑡,𝑐𝑜𝑜𝑙
ℎ𝑎𝑖𝑟,𝑂𝑢𝑡𝑑𝑜𝑜𝑟𝐶𝑜𝑖𝑙𝑂𝑢𝑡 = ℎ𝑎𝑖𝑟,𝑂𝑢𝑡𝑑𝑜𝑜𝑟𝐶𝑜𝑖𝑙𝐼𝑛 + Eq. 4.3.14-5
𝑚̇𝑎𝑖𝑟
The COP of the heat pump in cooling is defined by:

4–205
TRNSYS 18 – Mathematical Reference

𝑄̇𝑡𝑜𝑡,𝑐𝑜𝑜𝑙
𝐶𝑂𝑃 = Eq. 4.3.14-6
̇
𝑃𝑐𝑜𝑚𝑝

Heating Performance Data


The specification of heating performance data is much the same as for cooling performance data. Two
measures of heating performance must be provided in the heating performance data file. These are total
heating and compressor power consumed. Type 136 linearly interpolates between heating performance
measures based on the current values of the indoor coil air flow rate (l/s), indoor air dry bulb temperature
(ºC) and outdoor dry bulb temperature (ºC). It should be noted that the component does not extrapolate
beyond the data range provided. If values outside the data range are provided, the maximum or minimum
heating performance values will be returned and a warning will be written to the TRNSYS listing file and to
the simulation log file.
An example heating performance data file is provided for use with Type 136.
Users creating their own performance data must adhere closely to the syntax of the sample file. The values
of indoor coil air flow must all appear on the first row of the data file. The values of indoor air dry bulb
temperature must all appear on the second row of the data file, and the values of the outdoor coil air dry
bulb temperature must all appear on the third row of the data file. Users may specify more or fewer values
of each of the three variables than are shown in the sample file but must also remember to modify the
corresponding parameter in the TRNSYS input file. For example, the sample file contains three values of
air flow rate. Consequently the value of the parameter 9 (number of airflow steps) would be set to 3. The
values of both heating performance measures must then appear each group on its own line.
Again the air flow rate in question is the indoor air coil flow rate. The model assumes that the heat pump’s
heating performance is independent of the air flow rate across the outdoor coil.
With heating performance known based on the current inlet conditions and calls to the InterpolateData
routine, the state of the air exiting the indoor coil is calculated based on enthalpy with air pressure increased
to account for pressure rise across the coil:
𝑄̇𝑡𝑜𝑡,ℎ𝑒𝑎𝑡
ℎ𝑎𝑖𝑟,𝐼𝑛𝑑𝑜𝑜𝑟𝐶𝑜𝑖𝑙𝑂𝑢𝑡 = ℎ𝑎𝑖𝑟,𝐼𝑛𝑑𝑜𝑜𝑟𝐶𝑜𝑖𝑙𝐼𝑛 + Eq. 4.3.14-7
𝑚̇𝑎𝑖𝑟
As was the case in cooling, the psychrometrics routine is called to completely define the air state, possibly
resulting in a modified enthalpy. Heating power is recalculated as the mass flow rate of air multiplied by the
enthalpy difference between the air inlet and outlet state. The energy rejected to the indoor air stream and
the appliance COP are computed based on:
𝑄̇𝑒𝑣𝑎𝑝 = 𝑄̇𝑡𝑜𝑡,ℎ𝑒𝑎𝑡 Eq. 4.3.14-8

𝑄̇𝑡𝑜𝑡,ℎ𝑒𝑎𝑡
𝐶𝑂𝑃 = Eq. 4.3.14-9
̇
𝑃𝑐𝑜𝑚𝑝
The condenser energy is removed from the outdoor coil air stream:
𝑄̇𝑡𝑜𝑡,ℎ𝑒𝑎𝑡
ℎ𝑎𝑖𝑟,𝑂𝑢𝑡𝑑𝑜𝑜𝑟𝐶𝑜𝑖𝑙𝑂𝑢𝑡 = ℎ𝑎𝑖𝑟,𝑂𝑢𝑡𝑑𝑜𝑜𝑟𝐶𝑜𝑖𝑙𝐼𝑛 − Eq. 4.3.14-10
𝑚̇𝑎𝑖𝑟

4–206
TRNSYS 18 – Mathematical Reference

4.3.15. Type 137: Fan Coil


This component models a fan coil where the air is heated or cooled as it passes across coils containing hot
and cold liquid flow streams. This model relies on user-provided external data files which contain the
performance of the coils as a function of the entering air and fluid conditions. Refer to the sample data files
which accompany this model for the format of these external files.

4.3.15.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] This parameter indicates whether the inputs for absolute humidity
ratio (this parameter = 1) or percent relative humidity (this
parameter = 2) should be used to set the inlet air conditions.

2 Cooling Fluid Specific [kJ/kg K] The specific heat of the liquid stream flowing through the fan coil
Heat cooling coils.

3 Heating Fluid Specific [kJ/kg K] The specific heat of the liquid stream flowing through the fan coil
Heat heating coils.

4 Rated Volumetric Air [l/s] The volumetric flow rate of air through the device at its rated
Flow Rate conditions.

5 Rated Fan Power [kJ/h] The fan power draw at its rated conditions.

6 Logical Unit – Cooling [-] The logical unit which will be assigned to the external data file
Performance containing the cooling performance data. Logical units must be
unique integers in each TRNSYS simulation. (Simulation Studio will
automatically assign this number.)

7 Number of Dry Bulb [-] The number of air dry bulb temperatures for which cooling coil
Temperatures – performance data will be provided in the user-provided external
Cooling data file.

8 Number of Wet Bulb [-] The number of air wet bulb temperatures for which cooling coil
Temperatures – performance data will be provided in the user-provided external
Cooling data file.

9 Number of Air Flows – [-] The number of normalized air flow rates for which cooling coil
Cooling performance data will be provided in the user-provided external
data file.

10 Number of Liquid [-] The number of liquid (water typically) temperatures for which
Temperatures – cooling coil performance data will be provided in the user-provided
Cooling external data file.

11 Number of Liquid Flow [-] The number of liquid flow rates for which cooling coil performance
Rates – Cooling data will be provided in the user-provided external data file.

12 Logical Unit – Heating [-] The logical unit which will be assigned to the external data file
Performance containing the heating performance data. Logical units must be
unique integers in each TRNSYS simulation. (Simulation Studio will
automatically assign this number.)

4–207
TRNSYS 18 – Mathematical Reference

13 Number of Air [-] The number of air dry bulb temperatures for which heating coil
Temperatures – performance data will be provided in the user-provided external
Heating data file.

14 Number of Air Flows – [-] The number of normalized air flow rates for which heating coil
Heating performance data will be provided in the user-provided external
data file.

15 Number of Liquid [-] The number of liquid (water typically) temperatures for which
Temperatures – heating coil performance data will be provided in the user-provided
Heating external data file.

16 Number of Liquid Flow [-] The number of liquid flow rates for which heating coil performance
Rates – Heating data will be provided in the user-provided external data file.

17 Logical Unit – Fan [-] The logical unit which will be assigned to the external data file
Corrections containing the fan performance data.

18 Number of Fan Speeds [-] The number of normalized fan speeds for which fan performance
data will be provided in the user-provided external data file.

19 Efficiency of Fan Motor [-] The efficiency of the fan motor.

20 Fraction of Fan Heat to [-] The fraction of the fan power/heat that ends up in the air stream.
Air Values are typically zero for fans motors mounted outside of the air
stream and 1 for fan motors mounted within the air stream.

INPUTS

1 Cooling Fluid Inlet [C] The temperature of the liquid stream fluid flowing into the fan coil
Temperature unit's cooling coils.

2 Cooling Fluid Flow [kg/h] The flow rate of the cooling liquid stream fluid flowing into the fan
Rate coil unit's cooling coils.

3 Heating Fluid Inlet [C] The temperature of the liquid stream fluid flowing into the fan coil
Temperature unit's heating coils.

4 Heating Fluid Flow [kg/h] The flow rate of the heating liquid stream fluid flowing into the fan
Rate coil unit's heating coils.

5 Return Air [C] The dry-bulb temperature of the return air entering the fan coil.
Temperature This return air gets mixed with a user-specified fraction of outside
air.

6 Return Air Humidity [-] The absolute humidity ratio of the return air entering the fan coil.
Ratio This return air gets mixed with a user-specified fraction of outside
air.

7 Return Air Relative [%] The percent relative humidity of the return air entering the fan coil.
Humidity This return air gets mixed with a user-specified fraction of outside
air.

8 Return Air Pressure [atm] The absolute pressure of the air streams entering the fan coil.

9 Air-Side Pressure Rise [atm] The pressure rise of the air stream as it flows across the fan.
– Fan

4–208
TRNSYS 18 – Mathematical Reference

10 Air-Side Pressure Drop [atm] The pressure drop of the air stream as it passes across the coils.
– Coils

11 Fresh Air Temperature [C] The dry bulb temperature of the ambient air entering the fan coil for
mixing with the return air.

12 Fresh Air Humidity [-] The absolute humidity ratio of the ambient air entering the fan coil
Ratio for mixing with the return air.

13 Fresh Air Relative [%] The percent relative humidity of the ambient air entering the fan coil
Humidity for mixing with the return air.

14 Heating Control Signal [-] The control signal for heating operation: 0 = Off and 1 = On.

15 Cooling Control Signal [-] The control signal for cooling operation: 0 = Off and 1 = On.

16 Fan Control Signal [-] The control signal for fan operation: 0 = Off, 1 = Full On, Values
between 0 and 1 set the fraction of rated fan speed.

17 Fraction of Outside Air [-] The control signal for outside air mixing: 0 = No outside air and
100% return air and 1 = 100% outside air and no return air. Values
between 0 and 1 set the fraction of outside air.

OUTPUTS

1 Cooling Fluid Outlet [C] The temperature of the liquid stream exiting the fan coil unit's
Temperature cooling coils.

2 Outlet Cooling Fluid [kg/h] The flow rate of the liquid stream exiting the fan coil unit's cooling
Flow Rate coils.

3 Heating Fluid Outlet [C] The temperature of the liquid stream exiting the fan coil unit's
Temperature heating coils.

4 Outlet Heating Fluid [kg/h] The flow rate of the liquid stream exiting the fan coil unit's heating
Flow Rate coils.

5 Outlet Air Temperature [C] The dry bulb temperature of the air exiting the fan coil.

6 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the fan coil.
Ratio

7 Outlet Air Relative [%] The percent relative humidity of the air exiting the fan coil.
Humidity

8 Outlet Air Flow Rate [kg/h] The flow rate of dry air exiting the fan coil.

9 Outlet Air Pressure [atm] The absolute pressure of the air exiting the fan coil.

10 Total Cooling Rate [kJ/h] The rate at which energy is removed from the air stream (sensible
plus latent) across the cooling coil.

11 Sensible Cooling Rate [kJ/h] The rate at which sensible energy is removed from the air stream
across the cooling coil.

4–209
TRNSYS 18 – Mathematical Reference

12 Total Heating Rate [kJ/h] The rate at which energy is added to the air stream across the
heating coil.

13 Fan Power [kJ/h] The rate at which the fan consumes energy.

14 Fan Heat to Air Stream [kJ/h] The rate at which energy is added to the air stream by the fan.

15 Fan Heat to Ambient [kJ/h] The rate at which energy is rejected to the ambient by the fan.

16 Condensate [C] The temperature of the condensed water from the air stream
Temperature leaving the fan coil.

17 Condensate Flow Rate [kg/h] The rate at which condensed water from the air stream exits the
fan coil.

18 Conditioning Energy [kJ/h] The rate at which energy is transferred to the air stream by the
Rate coils; positive implies energy added to the air stream (heating).
This term does not include energy added by the fan or energy
associated with the condensate draining from the unit but is strictly
a measure of the coil heat transfer.

4.3.15.2. Simulation Summary Report Contents


INTEGRATED VALUE FIELDS

Total Cooling [kJ] Output 10

Sensible Cooling [kJ] Output 11

Heating [kJ] Output 12

Power Consumption [kJ] Output 13

MINIMUM/MAXIMUM VALUE FIELDS

Cooling Fluid Outlet [C] Minimum and maximum of Output 1


Temperature

Cooling Fluid Flow [kg/h] Minimum and maximum of Output 2


Rate

Heating Fluid Outlet [C] Minimum and maximum of Output 3


Temperature

Heating Fluid Flow [kg/h] Minimum and maximum of Output 4


Rate

Air Outlet Temperature [C] Minimum and maximum of Output 5

Air Flow Rate [kg/h] Minimum and maximum of Output 8

4.3.15.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4–210
TRNSYS 18 – Mathematical Reference

4.3.15.4. Nomenclature
Cp air [kJ/kg.K] The specific heat of the air flowing through the fan coil

f oa [0..1] Fraction of outside air entering the fan coil

f pwr , fan [0..1] Fraction of rated fan power.

f toAir [0..1] Fraction of fan power that results in an air-stream temperature rise

hair , fan [kJ/kg] Enthalpy of air exiting the fan section of the fan coil
hair ,mixed [kJ/kg] Enthalpy of air exiting the mixing section of the fan coil
hair ,out [kJ/kg] Enthalpy of air exiting the fan coil.
hair ,outside [kJ/kg] Enthalpy of fresh air entering the fan coil.
hair ,return [kJ/kg] Enthalpy of return air entering the fan coil.

Pout [atm] Pressure of air exiting the cooling coil.

Pin [atm] Pressure of air entering the cooling coil.

P [atm] Pressure drop of air as it passes through the cooling coil.


 fan
p [kJ/h] Power consumed by the fan
 rtd , fan
p [kJ/h] Power consumed by the fan at rated volumetric flow
air , fan [kgH2O/kgAir] Absolute humidity ratio of air exiting the fan section of the fan coil
air ,mixed [kgH2O/kgAir] Absolute humidity ratio of air exiting the mixing section of the fan coil
air ,out [kgH2O/kgAir] Absolute humidity ratio of air exiting the fan coil.
air ,outside [kgH2O/kgAir] Absolute humidity ratio of fresh air entering the fan coil.
air ,return [kgH2O/kgAir] Absolute humidity ratio of return air entering the fan coil.

 motor [0..1] Fan motor efficiency

q air , fan [kJ/hr] Energy added to the air stream by the fan.

 cl,tot
q Total (sensible + latent) energy removed from the air stream by the
[kJ/hr]
cooling coil section
 cl , sns
q Sensible energy removed from the air stream by the cooling coil
[kJ/hr]
section
q ht [kJ/hr] Sensible energy added to the air stream by the heating coil section

m cond [kg/hr] Mass flow rate of condensate draining from the cooling coil.

 liquid
m [kg/hr] Mass flow rate of liquid flowing through the cooling coil.
 air ,mixed
m [kg/hr] Mass flow rate (return + fresh) of air entering the cooling coil.

4.3.15.5. Detailed Description


At each timestep, the fan coil type performs a call to the TRNSYS psychrometrics routine in order to obtain
the inlet air properties. If a humidity ratio higher than the saturation humidity ratio for that dry bulb
temperature is specified, the psychrometrics routine will reset the humidity ratio to its saturated condition
and print a warning in the TRNSYS list file. The psychrometrics routine also returns the density of dry air.

4–211
TRNSYS 18 – Mathematical Reference

Next, a call is made to the TRNSYS Air Properties routine to determine the temperature dependent specific
heat of air at the inlet temperature condition.

NO FLOW CONDITION
If either air or liquid is not flowing through the fan coil the fan coil type sets the outlet air temperature to the
inlet temperature, sets the outlet air pressure to the inlet air pressure minus the air side pressure drop
(specified as an input to the model), sets the outlet air humidity ratio to the inlet air humidity ratio and the
outlet air enthalpy to the inlet air enthalpy. The equation used to calculate air outlet pressure is:
𝑃𝑜𝑢𝑡 = 𝑃𝑖𝑛 − ∆𝑃 Eq. 4.3.15-1

The sensible and total cooling energies are set to zero. Before exiting, the fan coil type performs a last call
to the psychrometrics routine to fully determine the air outlet state. Because of the air side pressure drop,
condensation of the air stream may occur in the device even if the water side is not flowing. As with the first
call to the psychrometrics routine, the humidity ratio may be reset if saturated conditions occur. If after the
call to the psychrometrics routine, the outlet humidity ratio is not equal to the inlet humidity ratio, the mass
flow rate of condensate is calculated according to:
𝑚̇𝑐𝑜𝑛𝑑 = 𝑚̇𝑎𝑖𝑟 (𝜔𝑎𝑖𝑟,𝑖𝑛 − 𝜔𝑎𝑖𝑟,𝑜𝑢𝑡 ) Eq. 4.3.15-2

FLOW CONDITION
The fan coil type includes three control-signal inputs. Setting these inputs to a value of 1 indicates the ON
condition. Setting them to zero indicates the OFF condition. The heating and cooling control signals are
simple on/off switches and it should be noted that the fan coil type does not set the liquid flow rate based
on these signals. This means that an error may occur if either the heating or cooling control signal is set to
ON and there is no liquid flow. The third control signal determines the speed of the fan. If this input is set
to a value of -1 then the fan will be activated at its rated flow rate whenever either the heating or cooling
control signal is set to the ON condition. Alternatively the user may set the fan control signal to any value
between 0 and 1. The fan volumetric flow rate will be the rated volumetric flow rate multiplied by the value
of the fan control signal.
When the fan coil type determines that there is air and liquid flow and that the fan coil is in active heating
or cooling mode, the model next fully determines the outside air state then mixes the return and outside air
according to:
ℎ𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 = ℎ𝑎𝑖𝑟,𝑟𝑒𝑡𝑢𝑟𝑛 (1 − 𝑓𝑜𝑎 ) + ℎ𝑎𝑖𝑟,𝑜𝑢𝑡𝑠𝑖𝑑𝑒 𝑓𝑜𝑎 Eq. 4.3.15-3

𝜔𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 = 𝜔𝑎𝑖𝑟,𝑟𝑒𝑡𝑢𝑟𝑛 (1 − 𝑓𝑜𝑎 ) + 𝜔𝑎𝑖𝑟,𝑜𝑢𝑡𝑠𝑖𝑑𝑒 𝑓𝑜𝑎 Eq. 4.3.15-4

The psychrometrics routine is called with the mixed air enthalpy and humidity ratio in order to obtain the
mixed air temperature, relative humidity, and dry air density.
The fan coil type next determines the impact of the fan. The fan performance data file is queried by the
TRNSYS InterpolatData subroutine. The routine returns the fraction of full load fan power that corresponds
to the relative fan speed (the fan control signal input). The fan power is then set as:
̇
𝑃𝑓𝑎𝑛 ̇
= 𝑃𝑟𝑡𝑑,𝑓𝑎𝑛 𝑓𝑝𝑤𝑟,𝑓𝑎𝑛 Eq. 4.3.15-5

The fan coil type allows the user to specify the fraction of the fan’s inefficiency that ends up as a heat gain
in the air stream and the fraction that ends up in the ambient. For fans whose motor is mounted in the air
stream, the “fraction of fan heat to air” parameter should be set to 1. Fans whose motors are mounted
outside the air stream should have this parameter set to 0. The heat gain to the air stream is given by:
𝑄̇𝑎𝑖𝑟,𝑓𝑎𝑛 = 𝜂𝑚𝑜𝑡𝑜𝑟 𝑃𝑓𝑎𝑛
̇ ̇
+ (1 − 𝜂𝑚𝑜𝑡𝑜𝑟 )𝑓𝑇𝑜𝐴𝑖𝑟 𝑃𝑓𝑎𝑛 Eq. 4.3.15-6

The mass flow rate of the air is obtained by multiplying the current volumetric flow rate (rated volumetric
flow rate times fan control signal) by the dry air density that was returned by the mixed air psychrometrics
call. The enthalpy and humidity ratio of the air leaving the fan can be computed:

4–212
TRNSYS 18 – Mathematical Reference

𝑄̇𝑎𝑖𝑟,𝑓𝑎𝑛
ℎ𝑎𝑖𝑟,𝑓𝑎𝑛 = ℎ𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 + Eq. 4.3.15-7
𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑
𝜔𝑎𝑖𝑟,𝑓𝑎𝑛 = 𝜔𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 Eq. 4.3.15-8

The psychrometrics routine is called with enthalpy and humidity ratio to fully determine the state of air
leaving the fan and entering the coils.

COOLING MODE
The performance of the cooling coil is based on a data file that is read through queries to the TRNSYS data
reading subroutine. As such, the data files must conform in their syntax to a predefined format. In the case
of the fan coil type the file provides the total cooling capacity and the sensible cooling capacity as a function
of the inlet mixed air wet bulb temperature, dry bulb temperature, the temperature of the entering liquid and
the air and liquid flow rates.
The syntax of the cooling performance data file is that five independent variables are required. The first line
of the data file must contain at least one value of liquid volumetric flow rate. The second line of the data file
must contain at least one value of volumetric air flow rate. The third line of the data file must contain at least
one value of inlet liquid temperature in degrees C. The fourth line of the data file must contain at least one
value of the inlet air (mixed) dry bulb temperature in degrees C and the fifth line of the data file must contain
at least one value of the inlet air (mixed) wet bulb temperature in degrees C. The subsequent lines of the
file must each contain two values, separated by at least one space. The first value is the total (sensible and
latent) cooling that can be accomplished at the given inlet conditions. The second value is the sensible
cooling that can be accomplished at the current inlet conditions. One line of data (dependent values) must
be provided for each possible combination of independent values. A sample data file is provided.
The TRNSYS data reading subroutine, while able to interpolate the dependent variable values in multiple
dimensions, is unable to extrapolate beyond the data range given in the data files. If a value of one of the
independent variables sent to the data reading routine is above or below the range present in the file, the
data reading routine will print a warning to the TRNSYS simulation log and list files and will return the
corresponding maximum or minimum value.
Once the fan coil’s total and sensible cooling capacity have been determined, the outlet air conditions are
computed:
𝑄̇𝑐𝑙,𝑡𝑜𝑡
ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 = ℎ𝑎𝑖𝑟,𝑓𝑎𝑛 − Eq. 4.3.15-9
𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑
𝑄̇𝑐𝑙,𝑠𝑛𝑠
𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 = 𝑇𝑎𝑖𝑟,𝑓𝑎𝑛 − Eq. 4.3.15-10
𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 𝐶𝑝𝑎𝑖𝑟
The psychrometrics routine is again called to fully determine the outlet air state. A few special cases are
checked since condensation often occurs when the air stream is cooled. If the outlet humidity ratio returned
by the psychrometrics routine is larger than the humidity ratio at the fan outlet then the device outlet humidity
ratio is reset to the fan outlet humidity ratio and the psychrometrics routine is recalled, this time with the
enthalpy and the recomputed humidity ratio. If the returned relative humidity is greater than 99.9% then the
psychrometrics routine is called with the enthalpy Error! Reference source not found.and an RH of 100%.
The total and sensible energy transferred by the fan coil is recomputed from:
𝑄̇𝑐𝑙,𝑡𝑜𝑡 = 𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 (ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 − ℎ𝑎𝑖𝑟,𝑓𝑎𝑛 ) Eq. 4.3.15-11

𝑄̇𝑐𝑙,𝑠𝑛𝑠 = 𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 𝐶𝑝𝑎𝑖𝑟 (𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 − 𝑇𝑎𝑖𝑟,𝑓𝑎𝑛 ) Eq. 4.3.15-12

The flow rate of condensate from the air stream is computed from:
𝑚̇𝑐𝑜𝑛𝑑 = 𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 (𝜔𝑎𝑖𝑟,𝑓𝑎𝑛 − 𝜔𝑎𝑖𝑟,𝑜𝑢𝑡 ) Eq. 4.3.15-13

The temperature of the condensate is set to the leaving air temperature. The liquid outlet temperature is
calculated by adding the energy that was removed from the air stream to the liquid stream.

4–213
TRNSYS 18 – Mathematical Reference

HEATING MODE
As with the cooling coil, the performance of the heating coil is based on a data file that is read through
queries to the TRNSYS data reading subroutine.
The syntax of the heating performance data file is slightly different from that of the cooling file. The first line
of the data file must contain at least one value of liquid volumetric flow rate. The second line of the data file
must contain at least one value of volumetric air flow rate. The third line of the data file must contain at least
one value of inlet liquid temperature in degrees C. The fourth line of the data file must contain at least one
value of the inlet air (mixed) dry bulb temperature in degrees C. The subsequent lines of the file must each
contain a single value of the sensible heating that can be accomplished at the given inlet conditions.
A sample data file is provided.
The TRNSYS data reading subroutine, while able to interpolate the dependent variable values in multiple
dimensions, is unable to extrapolate beyond the data range given in the data files. If a value of one of the
independent variables sent to the data reading routine is above or below the range present in the file, the
data reading routine will print a warning to the TRNSYS simulation log and list files and will return the
corresponding maximum or minimum value.
Once the fan coil’s sensible heating capacity have been determined, the outlet air conditions are computed:
𝑄̇ℎ𝑡
ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 = ℎ𝑎𝑖𝑟,𝑓𝑎𝑛 + Eq. 4.3.15-14
𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑
𝜔𝑎𝑖𝑟,𝑜𝑢𝑡 = 𝜔𝑎𝑖𝑟,𝑓𝑎𝑛 Eq. 4.3.15-15

The psychrometrics routine is again called to fully determine the outlet air state. The liquid outlet
temperature is calculated simply by subtracting the energy that was added to the air stream from the liquid
stream.

4–214
TRNSYS 18 – Mathematical Reference

4.3.16. Type 138: Fluid Heater


An auxiliary heater is modeled to elevate the temperature of a flow stream using either internal control,
external control or a combination of both types of control. The heater is designed to add heat to the flow
stream at a user-designated rate (Qmax) whenever the external control input is equal to one and the heater
outlet temperature is less than a user-specified maximum (Tset). By specifying a constant value of the control
function of 1 and specifying a sufficiently large value of Q max, this routine will perform like a domestic hot
water auxiliary with internal control to maintain an outlet temperature of T set. By providing a control function
of 0 or 1 from a thermostat or controller, this routine will perform like a heater adding heat at a rate of Q max
but not exceeding an outlet temperature of T set. In this application, a constant outlet temperature is not
sought and Tset may be thought of as an arbitrary safety limit.

4.3.16.1. Parameter/Input/Output Reference


PARAMETERS

1 Maximum Heating [kJ/h] The maximum possible energy transfer to the fluid stream. The
Rate maximum available energy transfer to the fluid stream will be the
product of the maximum possible energy transfer and the
conversion efficiency.

2 Specific Heat of Fluid [kJ/kg K] The specific heat of the liquid being heated.

3 Efficiency of Auxiliary [-] The thermal conversion efficiency of the auxiliary heater. (Typical
Heater values: Electric Heater = 1.0 ; Natural Gas = 0.79)

INPUTS

1 Inlet Fluid Temperature [C] The temperature of the fluid entering the heater.

2 Fluid Mass Flow Rate [kg/h] The flow rate of the fluid through the heater.

3 Control Function [-] If the control function = 1 then the heater is on and providing
energy to stream. If the control function = 0 then the heater is off.
The heater control function input requires either 1 or 0; proportional
control signals (e.g. CF=0.53) will be interpreted as heater=off!

4 Setpoint Temperature [C] The desired setpoint temperature at the outlet of the auxiliary
heating device. This device sets the outlet temperature at this
temperature unless the heating capacity is insufficient or the device
is turned off.

OUTPUTS

1 Outlet Fluid [C] The temperature of the fluid exiting the heater.
Temperature

2 Outlet Fluid Flow Rate [kg/h] The flow rate of the fluid through the heater.

3 Rate of Energy [kJ/h] The amount of energy added to the fluid stream.
Delivery to Fluid
Stream

4 Required Energy Input [kJ/h] The amount of energy that must be input to the heater.

4–215
TRNSYS 18 – Mathematical Reference

4.3.16.2. Simulation Summary Report Contents


VALUE FIELDS

Maximum Heating [kJ/h] Parameter 1


Rate

Heater Efficiency [-] Parameter 3

INTEGRATED VALUE FIELDS

Energy to Fluid [kJ] Output 3

Energy Input [kJ] Output 4

MINIMUM/MAXIMUM VALUE FIELDS

Setpoint [C] Minimum and maximum of Input 4

Outlet Temperature [C] Minimum and maximum of Output 1

Outlet Flow Rate [kg/h] Minimum and maximum of Output 2

4.3.16.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.16.4. Detailed Description


First the fluid heater checks if there is flow through the device. If not, then the outlet temperature is set to
the inlet temperature and the calculations are complete. If there is flow, the component next checks the
control signal and the inlet fluid temperature. If the control signal is not 1 or the inlet temperature is higher
than the setpoint temperature, the heater is off. Again the outlet temperature is set to the inlet temperature
and the calculations are complete.
If the control signal is 1 and the inlet temperature is below the setpoint, then the heater is on.
The outlet temperature at the maximum heating rate is calculated
𝑄𝑚𝑎𝑥
𝑇𝑚𝑎𝑥 = 𝑇𝑖𝑛 + Eq. 4.3.16-1
𝑚̇𝐶𝑝
The outlet temperature is then set to the minimum of the maximum temperature and the setpoint
temperature. Using the outlet temperature the energy delivered to the fluid and the required energy input
to the device are determined.
𝑚̇𝐶𝑝(𝑇𝑜𝑢𝑡 − 𝑇𝑖𝑛 )
𝑄𝑖𝑛𝑝𝑢𝑡 = Eq. 4.3.16-2
𝜀ℎ𝑒𝑎𝑡𝑒𝑟
𝑄𝑓𝑙𝑢𝑖𝑑 = 𝑚̇𝐶𝑝(𝑇𝑜𝑢𝑡 − 𝑇𝑖𝑛 ) Eq. 4.3.16-3

4–216
TRNSYS 18 – Mathematical Reference

4.3.17. Type 139: Furnace


This component represents an air heating device that can be controlled either externally, or set to
automatically try and attain a setpoint temperature. The furnace is bound by a heating capacity and an
efficiency. Thermal losses from the furnace are based on the average air temperature. The outlet state of
the air is determined by an enthalpy based energy balance that takes pressure effects into account. This
model includes a blower that can control the flow of air through the device.

4.3.17.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] This parameter indicates whether the inlet absolute humidity ratio
(mode = 1) or the percent relative humidity input (mode = 0) will be
used to calculate the inlet moist air state to this device.

2 Rated Heating Rate [kJ/h] The amount of energy that the heater adds to the air stream.

3 Heater Efficiency [-] The efficiency of the device adding heat to the air stream. Typical
values are 1.0 for electric heaters and 0.8 for gas heaters.

4 Air Flow Rate [kg/h] The flow rate of the air through the heater when the blower is on.

5 Blower Power [kJ/h] The power consumption of the blower when it is on.

INPUTS

1 Inlet Air Temperature [C] The dry bulb temperature of the air entering the auxiliary heater.

2 Inlet Air Humidity Ratio [-] The absolute humidity ratio of the air entering the auxiliary heater
device.

3 Inlet Air Relative [%] The percent relative humidity of the air entering the auxiliary heater
Humidity device.

4 Air Flow Rate [kg/h] The flow rate of dry air entering the auxiliary heater.

5 Inlet Air Pressure [atm] The absolute pressure of the air entering the device.

6 Heater Control [-] The control function for the heater (0 = off, 1 = on).
Function

7 Fan Control Signal [-] The control signal for the blower (0=off, 1=on).

OUTPUTS

1 Outlet Air Temperature [C] The temperature (dry bulb) of the air exiting the device.

2 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the device.
Ratio

3 Outlet Air Relative [%] The percent relative humidity of the air exiting the device.
Humidity

4–217
TRNSYS 18 – Mathematical Reference

4 Outlet Air Flow Rate [kg/h] The flow rate of dry air exiting the device.

5 Outlet Air Pressure [atm] The absolute pressure of the air exiting the device.

6 Heat Added [kJ/h] The amount of energy that is added to the air stream.

7 Power Input [kJ/h] The rate that energy must be added to the furnace (blower &
heater).

8 Heater Input [kJ/h] The amount of energy input to the heater.

9 Blower Input [kJ/h] The power input to the blower.

4.3.17.2. Simulation Summary Report Contents


VALUE FIELDS

Maximum Heating [kJ/h] Parameter 2


Rate

Heater Efficiency [-] Parameter 3

INTEGRATED VALUE FIELDS

Heat Added [kJ] Output 6

Power Input [kJ] Output 7

Blower Power [kJ] Output 8

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Temperature [C] Minimum and maximum of Output 1

Outlet Flow Rate [kg/h] Minimum and maximum of Output 2

4.3.17.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.17.4. Detailed Description


If both the fan control signal and the heater control signal are less than 0.5, the furnace is off. The outlet
conditions are set to the inlet conditions.
If either the fan or heater control signals are greater than 0.5, the blower performance is calculated. The
power consumption is set to the rated power consumption and the flow rate of the air is set to the rated flow
rate. It is assumed that the fan assembly is located in the airstream and the fan power all gets converted
to heat in the air stream. The enthalpy of the air leaving the blower is then calculated.
𝑄𝑎𝑖𝑟
ℎ𝑜𝑢𝑡 = ℎ𝑖𝑛 + Eq. 4.3.17-1
𝑚̇

4–218
TRNSYS 18 – Mathematical Reference

Since this is a heating process, the humidity ratio of the air leaving the blower is set to the humidity ratio of
the air entering the blower. The remaining leaving air properties are calculated from the leaving enthalpy
and humidity ratio. If the heater control is less than 0.5 these outlet air properties become the outputs from
the model, otherwise they become the inputs to the heater calculation.
If the heater control signal is greater than 0.5 then the rated heating capacity is used to calculate the
enthalpy of the air leaving the heater.
𝑄ℎ𝑒𝑎𝑡𝑒𝑟
ℎ𝑜𝑢𝑡 = ℎ𝑖𝑛 + Eq. 4.3.17-2
𝑚̇
Again since the process is an air heating process, the humidity ratio of the air leaving the heater is the same
as the humidity ratio of the air entering the heater. The remaining properties of the air leaving the heater
are calculated from the leaving enthalpy and humidity ratio.
The energy input to the heater is calculated from the heater energy and the heater efficiency.
𝑄ℎ𝑒𝑎𝑡𝑒𝑟
𝑄𝑎𝑢𝑥 = Eq. 4.3.17-3
𝜀ℎ𝑒𝑎𝑡𝑒𝑟
The total energy added to the air stream is the sum of the fan heat and the heater input.
𝑄𝑡𝑜𝑡𝑎𝑙 = 𝑄𝑎𝑖𝑟 + 𝑄ℎ𝑒𝑎𝑡𝑒𝑟 Eq. 4.3.17-4

The total power input required to the furnace is the fan power and the energy input to the heater.
𝑃𝑖𝑛𝑝𝑢𝑡 = 𝑃𝑓𝑎𝑛 + 𝑄𝑎𝑢𝑥 Eq. 4.3.17-5

4–219
TRNSYS 18 – Mathematical Reference

4.3.18. Type 140: Hot Water Coil (constant UA)


The simple heating coil model provides a good estimation of the performance without the detailed geometric
characteristics of the coil. The parameters of the model are only thermodynamic properties of the coil, which
require no specific manufacturer’s data. The simulation model is based on the ASHRAE Secondary Toolkit
[1]. There are two versions of the simple heating coil model. This version assumes that the heat transfer
coefficient (UA) for the coil is constant regardless of the inlet conditions.

4.3.18.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] The humidity mode determines whether the absolute humidity (=1)
or relative humidity (=2) ratio of the air stream is used to calculate
the inlet air properties.

2 Design Inlet Fluid [C] The temperature of the fluid inlet to the heating coil at the rating
Temperature condition.

3 Design Fluid Flow Rate [kg/h] The flow rate of the fluid inlet to the heating coil at the rating
condition.

4 Design Inlet Air [C] The temperature of the air inlet to the heating coil at the rating
Temperature condition.

5 Design Inlet Air [-] The absolute humidity ratio of the air inlet to the heating coil at the
Humidity Ratio rated conditions.

6 Design Air Flow Rate [kg/h] The flow rate of the air inlet to the heating coil at the rated
conditions.

7 Design Total Heating [kJ/h] The total heating capacity of the heating coil at the rating
Capacity conditions.

8 Fluid Specific Heat [kJ/kg K] The specific heat of the fluid flowing through the heating coil.

9 Heat Exchanger [-] The parameter denotes the configuration of the heating coil
Configuration (Counterflow = 1; Parallelflow = 2; Crossflow - both unmixed = 3;
Crossflow - both mixed = 4; Crossflow - minimum capacity unmixed
= 5; Crossflow - maximum capacity unmixed = 6)

INPUTS

1 Inlet Fluid Temperature [C] The temperature of the fluid entering the heating coil.

2 Inlet Fluid Flow Rate [kg/h] The flow rate of the fluid entering the heating coil.

3 Inlet Air Temperature [C] The temperature of the air entering the heating coil.

4 Inlet Air Humidity Ratio [-] The absolute humidity ratio of the air entering the heating coil.

5 Inlet Air Relative [%] The percent relative humidity of the air entering the heating coil.
Humidity

6 Inlet Air Flow Rate [kg/h] The flow rate of the air entering the heating coil.

4–220
TRNSYS 18 – Mathematical Reference

7 Inlet Air Pressure [atm] The pressure (in atmospheres) of the air entering the heating coil.

OUTPUTS

1 Outlet Fluid [C] The temperature of the fluid exiting the heating coil.
Temperature

2 Outlet Fluid Flow Rate [kg/h] The flow rate of the fluid exiting the heating coil.

3 Outlet Air Temperature [C] The temperature of the air exiting the heating coil.

4 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the heating coil.
Ratio

5 Outlet Air Relative [%] The percent relative humidity of the air exiting the heating coil.
Humidity

6 Outlet Air Flow Rate [kg/h] The flow rate of the air exiting the heating coil.

7 Outlet Air Pressure [atm] The pressure (in atmospheres) of the air exiting the heating coil.

8 Total Heating [kJ/h] The total amount of heating of the air stream.

4.3.18.2. Simulation Summary Report Contents


VALUE FIELDS

Design Heating [kJ/h] Parameter 7


Capacity

UA [kJ/kg K] Calculated from the design parameters

TEXT FIELDS

Heat Exchanger [-] Parameter 9


Configuration

INTEGRATED VALUE FIELDS

Total Heating [kJ] Output 8

MINIMUM/MAXIMUM VALUE FIELDS

Fluid Outlet [kJ] Minimum and maximum of Output 1


Temperature

Fluid Outlet Flow Rate [kJ] Minimum and maximum of Output 2

Air Outlet Temperature [C] Minimum and maximum of Output 3

Air Outlet Flow Rate [kg/h] Minimum and maximum of Output 6

4–221
TRNSYS 18 – Mathematical Reference

4.3.18.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.18.4. Detailed Description


The model calculates the coil design U-factor times Area (UA) values from the design conditions.
First the capacity rates of the air and liquid streams are calculated.
𝐶𝑎𝑖𝑟 = 𝑚̇𝑎𝑖𝑟,𝑟𝑎𝑡𝑒𝑑 (𝐶𝑝𝑎𝑖𝑟 + 𝜔𝑖𝑛,𝑟𝑎𝑡𝑒𝑑 𝐶𝑝𝑣𝑎𝑝 ) Eq. 4.3.18-1

𝐶𝑙𝑖𝑞 = 𝑚̇𝑙𝑖𝑞,𝑟𝑎𝑡𝑒𝑑 𝐶𝑝𝑙𝑖𝑞 Eq. 4.3.18-2

Then the model iterates to find a UA for the coil which provides the outlet air temperature such that
𝑄𝑟𝑎𝑡𝑒𝑑 = 𝐶𝑎𝑖𝑟 (𝑇𝑜𝑢𝑡 − 𝑇𝑖𝑛,𝑟𝑎𝑡𝑒𝑑 ) Eq. 4.3.18-3

The calculation of the UA value for the coil is performed only once per simulation and in this version of the
simple heating coil model, the UA is considered to be constant regardless of the inlet condition.
On an iterative call, first the component checks that there is both air flow and liquid flow through the heating
coil. If either flow is zero, then the outlet conditions are set to the inlet conditions and the component exits.
If there is both air flow and liquid flow, the component first determines all of the inlet air and liquid properties.
Then the capacity rates are calculated.
𝐶𝑎𝑖𝑟 = 𝑚̇𝑎𝑖𝑟 (𝐶𝑝𝑎𝑖𝑟 + 𝜔𝑖𝑛 𝐶𝑝𝑣𝑎𝑝 ) Eq. 4.3.18-4

𝐶𝑙𝑖𝑞 = 𝑚̇𝑙𝑖𝑞 𝐶𝑝𝑙𝑖𝑞 Eq. 4.3.18-5

The outlet temperatures are then calculated from the inlet conditions, the capacity rates, the UA for the coil,
and the coil configuration. Since this is an air heating process, the outlet air humidity ratio equals the inlet
air humidity ratio. The total energy added to the air stream is then determined.
𝑄𝑡𝑜𝑡𝑎𝑙 = 𝐶𝑎𝑖𝑟 (𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 ) Eq. 4.3.18-6

4.3.18.5. References
1. Brandemeuhl, M. J. 1993 HVAC2 Toolkit: Algorithms and Subroutines for Secondary HVAC
Systems Energy Calculations, ASHRAE.

4–222
TRNSYS 18 – Mathematical Reference

4.3.19. Type 141: Hot Water Coil (varying UA)


The simple heating coil model provides a good estimation of the performance without the detailed geometric
characteristics of the coil. The parameters of the model are only thermodynamic properties of the coil, which
require no specific manufacturer’s data. The simulation model is based on the ASHRAE Secondary Toolkit
[1]. There are two versions of the simple heating coil model. The version varies the heat transfer coefficient
(UA) for the coil based on the inlet conditions using a technique by Wetter [2].

4.3.19.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] The humidity mode determines whether the absolute humidity (=1)
or relative humidity (=2) ratio of the air stream is used to calculate
the inlet air properties.

2 Design Inlet Fluid [C] The temperature of the fluid inlet to the heating coil at the rating
Temperature condition.

3 Design Fluid Flow Rate [kg/h] The flow rate of the fluid inlet to the heating coil at the rating
condition.

4 Design Inlet Air [C] The temperature of the air inlet to the heating coil at the rating
Temperature condition.

5 Design Inlet Air [-] The absolute humidity ratio of the air inlet to the heating coil at the
Humidity Ratio rated conditions.

6 Design Air Flow Rate [kg/h] The flow rate of the air inlet to the heating coil at the rated
conditions.

7 Design Total Heating [kJ/h] The total heating capacity of the heating coil at the rating
Capacity conditions.

8 Fluid Specific Heat [kJ/kg K] The specific heat of the fluid flowing through the heating coil.

9 Heat Exchanger [-] The parameter denotes the configuration of the heating coil
Configuration (Counterflow = 1; Parallelflow = 2; Crossflow - both unmixed = 3;
Crossflow - both mixed = 4; Crossflow - minimum capacity unmixed
= 5; Crossflow - maximum capacity unmixed = 6)

10 UA Ratio [-] The ratio of the air-side to fluid-side heat transfer at the design
conditions.

INPUTS

1 Inlet Fluid Temperature [C] The temperature of the fluid entering the heating coil.

2 Inlet Fluid Flow Rate [kg/h] The flow rate of the fluid entering the heating coil.

3 Inlet Air Temperature [C] The temperature of the air entering the heating coil.

4 Inlet Air Humidity Ratio [-] The absolute humidity ratio of the air entering the heating coil.

4–223
TRNSYS 18 – Mathematical Reference

5 Inlet Air Relative [%] The percent relative humidity of the air entering the heating coil.
Humidity

6 Inlet Air Flow Rate [kg/h] The flow rate of the air entering the heating coil.

7 Inlet Air Pressure [atm] The pressure (in atmospheres) of the air entering the heating coil.

OUTPUTS

1 Outlet Fluid [C] The temperature of the fluid exiting the heating coil.
Temperature

2 Outlet Fluid Flow Rate [kg/h] The flow rate of the fluid exiting the heating coil.

3 Outlet Air Temperature [C] The temperature of the air exiting the heating coil.

4 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the heating coil.
Ratio

5 Outlet Air Relative [%] The percent relative humidity of the air exiting the heating coil.
Humidity

6 Outlet Air Flow Rate [kg/h] The flow rate of the air exiting the heating coil.

7 Outlet Air Pressure [atm] The pressure (in atmospheres) of the air exiting the heating coil.

8 Total Heating [kJ/h] The total amount of heating of the air stream.

4.3.19.2. Simulation Summary Report Contents


VALUE FIELDS

Design Heating [kJ/h] Parameter 7


Capacity

Design UA [kJ/kg K] Calculated from the design parameters

TEXT FIELDS

Heat Exchanger [-] Parameter 9


Configuration

INTEGRATED VALUE FIELDS

Total Heating [kJ] Output 8

MINIMUM/MAXIMUM VALUE FIELDS

Fluid Outlet [kJ] Minimum and maximum of Output 1


Temperature

Fluid Outlet Flow Rate [kJ] Minimum and maximum of Output 2

4–224
TRNSYS 18 – Mathematical Reference

Air Outlet Temperature [C] Minimum and maximum of Output 3

Air Outlet Flow Rate [kg/h] Minimum and maximum of Output 6

4.3.19.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.19.4. Detailed Description


The model calculates the coil design U-factor times Area (UA) values from the design conditions.
First the capacity rates of the air and liquid streams are calculated.
𝐶𝑎𝑖𝑟 = 𝑚̇𝑎𝑖𝑟,𝑟𝑎𝑡𝑒𝑑 (𝐶𝑝𝑎𝑖𝑟 + 𝑤𝑖𝑛,𝑟𝑎𝑡𝑒𝑑 𝐶𝑝𝑣𝑎𝑝 ) Eq. 4.3.19-1

𝐶𝑙𝑖𝑞 = 𝑚̇𝑙𝑖𝑞,𝑟𝑎𝑡𝑒𝑑 𝐶𝑝𝑙𝑖𝑞 Eq. 4.3.19-2

Then the model iterates to find a UA for the coil which provides the outlet air temperature such that
𝑄𝑟𝑎𝑡𝑒𝑑 = 𝐶𝑎𝑖𝑟 (𝑇𝑜𝑢𝑡 − 𝑇𝑖𝑛,𝑟𝑎𝑡𝑒𝑑 ) Eq. 4.3.19-3

The air-side and liquid-side UA values are determined based on the UA ratio parameter for the coil.
1 + 𝑈𝐴𝑟𝑎𝑡𝑖𝑜
𝑈𝐴𝑙𝑖𝑞 = 𝑈𝐴 [ ] Eq. 4.3.19-4
𝑈𝐴𝑟𝑎𝑡𝑖𝑜
𝑈𝐴𝑎𝑖𝑟 = 𝑈𝐴𝑙𝑖𝑞 𝑈𝐴𝑟𝑎𝑡𝑖𝑜 Eq. 4.3.19-5

On an iterative call, first the component checks that there is both air flow and liquid flow through the heating
coil. If either flow is zero, then the outlet conditions are set to the inlet conditions and the component exits.
If there is both air flow and liquid flow, the component first determines all of the inlet air and liquid properties.
The UA values are adjusted for the inlet temperatures and flow rates based on work by Wetter [2]
𝑥𝑎 = 1 + 0.004769(𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑇𝑎𝑖𝑟,𝑖𝑛,𝑟𝑎𝑡𝑒𝑑 ) Eq. 4.3.19-6
0.8
𝑚̇𝑎𝑖𝑟
𝑈𝐴𝑎𝑖𝑟 = 𝑈𝐴𝑎𝑖𝑟,𝑟𝑎𝑡𝑒𝑑 𝑥𝑎 [ ] Eq. 4.3.19-7
𝑚̇𝑎𝑖𝑟,𝑟𝑎𝑡𝑒𝑑
0.014
𝑥𝑤 = 1 + [ ] (𝑇𝑙𝑖𝑞,𝑖𝑛 − 𝑇𝑙𝑖𝑞,𝑖𝑛,𝑟𝑎𝑡𝑒𝑑 ) Eq. 4.3.19-8
1 + 0.014𝑇𝑙𝑖𝑞,𝑖𝑛,𝑟𝑎𝑡𝑒𝑑
0.85
𝑚̇𝑙𝑖𝑞
𝑈𝐴𝑙𝑖𝑞 = 𝑈𝐴𝑙𝑖𝑞,𝑟𝑎𝑡𝑒𝑑 𝑥𝑤 [ ] Eq. 4.3.19-9
𝑚̇𝑙𝑖𝑞,𝑟𝑎𝑡𝑒𝑑
1
𝑈𝐴 =
1 1 Eq. 4.3.19-10
+
𝑈𝐴𝑙𝑖𝑞 𝑈𝐴𝑎𝑖𝑟
The capacity rates are calculated.
𝐶𝑎𝑖𝑟 = 𝑚̇𝑎𝑖𝑟 (𝐶𝑝𝑎𝑖𝑟 + 𝑤𝑖𝑛 𝐶𝑝𝑣𝑎𝑝 ) Eq. 4.3.19-11

𝐶𝑙𝑖𝑞 = 𝑚̇𝑙𝑖𝑞 𝐶𝑝𝑙𝑖𝑞 Eq. 4.3.19-12

The outlet temperatures are then calculated from the inlet conditions, the capacity rates, the UA for the coil,
and the coil configuration. Since this is an air heating process, the outlet air humidity ratio equals the inlet
air humidity ratio. The total energy added to the air stream is then determined.
𝑄𝑡𝑜𝑡𝑎𝑙 = 𝐶𝑎𝑖𝑟 (𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 ) Eq. 4.3.19-13

4–225
TRNSYS 18 – Mathematical Reference

4.3.19.5. References
1. Brandemeuhl, M. J. 1993 HVAC2 Toolkit: Algorithms and Subroutines for Secondary HVAC
Systems Energy Calculations, ASHRAE.
2. Wetter, M. 1999. Simulation Model: Finned Water-to-Air Coil without Condensation. LBNL-42355.

4–226
TRNSYS 18 – Mathematical Reference

4.3.20. Type 142: Water Cooled Chiller


Type 142 models a vapor compression style water-cooled chiller. It relies on catalog data provided as an
external text files to determine chiller performance. Example data files and information on data file format
are provided.

4.3.20.1. Parameter/Input/Output Reference


PARAMETERS

1 Logical Unit – [-] The logical unit number which will be assigned to the user-supplied
Performance Data data file containing the capacity and COP ratios as a function of
inlet cooling water temperature and chilled water setpoint
temperatures. (Simulation Studio will automatically assign this
number.)

2 Logical Unit – PLR [-] The logical unit which will be assigned to the user-supplied data file
Data which contains the fraction of full-load power data as a function of
the machine part load ratio. (Simulation Studio will automatically
assign this number.)

3 CHW Fluid Specific [kJ/kg K] The specific heat of the chilled water stream flowing through the
Heat chiller.

4 CW Fluid Specific Heat [kJ/kg K] The specific heat of the fluid flowing into the chiller as the cooling
flow stream.

5 Number of CW Points [-] The number of cooling water temperatures for which capacity and
COP ratios are provided in the user-supplied external data file.

6 Number of CHW Points [-] The number of chilled water setpoint temperatures for which the
capacity and COP ratio are provided in the user-supplied external
data file.

7 Number of PLRs [-] The number of part-load ratios for which fraction of full-load power
is supplied in the user-provided external data file.

INPUTS

1 Chilled Water Inlet [C] The temperature of the chilled water stream entering the chiller.
Temperature

2 Chilled Water Flow [kg/h] The mass flow rate at which chilled water enters the chiller.
Rate

3 Cooling Water [C] The temperature at which the cooling water flow stream enters the
Temperature chiller.

4 Cooling Water Flow [kg/h] The mass flow rate at which the cooling fluid (typically water)
Rate enters the chiller.

5 CHW Setpoint [C] The setpoint temperature for the chilled water stream. If the chiller
Temperature has the capacity to meet the current load, the chiller will modulate
to meet the load and chilled water stream will leave at this
temperature.

4–227
TRNSYS 18 – Mathematical Reference

6 Chiller Control Signal [-] The control signal for the operation of the chiller: ctrl < 0.5: chiller is
off, ctrl >= 0.5: chiller is on.

OUTPUTS

1 Chilled Water [C] The temperature of the chilled water stream exiting the chiller.
Temperature

2 Chilled Water Flow [kg/h] The flow rate of the chilled water stream exiting the chiller.
Rate

3 Cooling Water [C] The temperature of the cooling flow stream exiting the chiller.
Temperature

4 Cooling Water Flow [kg/h] The mass flow rate at which the cooling stream exits the chiller.
Rate

5 Chiller Power [kJ/h] The power requirement of the chiller. The power is read (and
interpolated) from the user-supplied data file.

6 Chiller Heat Rejection [kJ/h] The rate at which heat is rejected to the cooling water flow stream
by the chiller.

7 Chiller Capacity [kJ/h] The capacity of the chiller given the current cooling water inlet
temperature and chilled water setpoint temperature.

8 COP [-] The coefficient of performance (capacity divided by power) of the


chiller given the current conditions.

9 Chiller Load [kJ/h] The load that the chiller must attempt to meet at the current
timestep. The load is simply the chilled water mass flow rate
multiplied by the fluid specific heat multiplied by the temperature
difference between the chilled water inlet temperature and chilled
water setpoint. The machine may or may not be able to meet this
load.

10 Chiller Load Met [kJ/h] The load that the chiller was able to meet at the current timestep. If
the chiller was unable to meet the entire load, the temperature of
the exiting flow stream will be higher than the chilled water setpoint
temperature.

11 Chiller PLR [-] The chiller part load ratio at the current conditions. The part load
ratio is defined as the load met by the chiller divided by the
capacity of the chiller at the given conditions.

12 Fraction of Full-Load [-] The fraction of full-load power is interpolated from the user-
Power supplied data file as a function of the chiller part load ratio. The
fraction of full-load power is a ratio of the chiller power at the
current conditions at part-load to the chiller power at the current
conditions but at full-load.

4.3.20.2. Simulation Summary Report Contents


VALUE FIELDS

4–228
TRNSYS 18 – Mathematical Reference

Rated Capacity [kJ/h] Capacity at 6.67C chilled water leaving temperature and 29.44C cooling
water entering temperature from the data file.

Rated COP [-] COP at 6.67C chilled water leaving temperature and 29.44C cooling
water entering temperature from the data file.

INTEGRATED VALUE FIELDS

Power Input [kJ] Output 5

Capacity [kJ] Output 7

Load Met [kJ] Output 10

MINIMUM/MAXIMUM VALUE FIELDS

Chilled Water Setpoint [C] Minimum and maximum of Input 5

Chilled Water Outlet [C] Minimum and maximum of Output 1


Temperature

Chilled Water Flow [kg/h] Minimum and maximum of Output 2


Rate

Cooling Water Outlet [C] Minimum and maximum of Output 3


Temperature

Cooling Water Flow [kg/h] Minimum and maximum of Output 4


Rate

COP [-] Minimum and maximum of Output 8

4.3.20.3. Hints and Tips


 Make sure that the parameters that denote the number of points in the data files match the data in the
files. If the parameters do not match, there may be errors in the simulation or the results may not show
the performance of the device.

4.3.20.4. Nomenclature
COPnom [-] Chiller nominal Coefficient of Performance at current conditions.

COPrated [-] Chiller rated Coefficient of Performance at current conditions.

COPratio [-] Chiller COP at current conditions divided by the rated COP.

Capacity [kJ/hr] Chiller capacity at current conditions.

Capacityrated [kJ/hr] Chiller rated capacity.

Capacityratio [kJ/hr] Chiller capacity at current conditions divided by the rated capacity.

Q [kJ/hr] Current load on the chiller.
load


Q [kJ/hr] Load met by the chiller.
met

4–229
TRNSYS 18 – Mathematical Reference

Q rejected [kJ/hr] Energy rejected by the chiller to the ambient.

m chw [kg/hr] Flow rate of fluid entering the chilled fluid stream.

Cp chw [kJ/kg.K] Specific heat of fluid entering the chilled fluid stream.

m cw [kg/hr] Flow rate of fluid entering the cooling fluid stream.

Cpcw [kJ/kg.K] Specific heat of fluid entering the cooling fluid stream.

Tchw,set [ºC] Desired outlet temperature of fluid in the chilled fluid stream.
Tchw,in [ºC] Temperature of fluid entering the chilled fluid stream.
Tchw,out [ºC] Temperature of fluid exiting the chilled fluid stream.

PLR [0..1] Chiller Part Load Ratio (the ratio of the current load to the rated load).

P [kJ/hr] Power drawn by the chiller at current conditions.

FFLP [0..1] Fraction of full load power.

4.3.20.5. Detailed Description


Type 142 relies on a catalog data lookup method to predict the performance of a vapor compression style
water cooled chiller. These devices cool a fluid stream on the evaporator side while rejecting heat to a
second fluid stream on the condenser side. The fluid stream being cooled is referred to as the chilled water
stream while the stream to which energy is rejected is referred to as the cooling fluid stream. Because of
the data lookup approach, this component may be equally well used to model single and multi-stage chillers.
To set up the model, the user must provide two text based data files in the standard TRNSYS data file
format. The first of these files provides the chiller’s capacity and the chiller’s COP for varying values of
chilled water setpoint temperature (ºC), and for varying entering cooling water temperatures (ºC). The
second data file provides values of the chiller’s fraction of full load power for varying values of part load
ratio. A schematic diagram showing a single stage water cooled chiller is shown in below.

Figure: Schematic Diagram of a Single Stage Water Cooled Chiller


At a given time step, Type 142 first performs a call to the TRNSYS InterpolateData routine with the current
cooling water (sink) temperature and the chilled water setpoint temperature, obtaining in return the COP
and capacity for those conditions. The implicit assumption in the first call to InterpolateData is that the chiller
is running at full load.
The chiller load is calculated by

4–230
TRNSYS 18 – Mathematical Reference

𝑄̇𝑙𝑜𝑎𝑑 = 𝑚̇𝑐ℎ𝑤 𝐶𝑝𝑐ℎ𝑤 (𝑇𝑐ℎ𝑤,𝑖𝑛 − 𝑇𝑐ℎ𝑤,𝑠𝑒𝑡 ) Eq. 4.3.20-1

The PLR (part load ratio) is therefore


𝑄𝑙𝑜𝑎𝑑
𝑃𝐿𝑅 = Eq. 4.3.20-2
𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦
If the calculated PLR is greater than unity, Type 142 automatically limits the load met by the chiller to the
capacity of the machine. With a valid PLR calculated (between 0 and 1), the InterpolateData routine is
called again, this time specifying the second data file. The resulting value is the fraction of full load capacity
for the current conditions. The chiller’s power draw is given by
𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 Eq. 4.3.20-3
𝑃= 𝐹𝐹𝐿𝑃
𝐶𝑂𝑃𝑛𝑜𝑚
A corrected COP is then calculated as
𝑄̇𝑚𝑒𝑡 Eq. 4.3.20-4
𝐶𝑂𝑃 =
𝑃
The energy rejected to the cooling fluid stream by the device is therefore
𝑄̇𝑟𝑒𝑗𝑒𝑐𝑡𝑒𝑑 = 𝑄̇𝑚𝑒𝑡 + 𝑃 Eq. 4.3.20-5

and the outlet temperature of the chilled fluid stream is


𝑄̇𝑚𝑒𝑡 Eq. 4.3.20-6
𝑇𝑐ℎ𝑤,𝑜𝑢𝑡 = 𝑇𝑐ℎ𝑤,𝑖𝑛 −
𝑚̇𝑐ℎ𝑤 𝐶𝑝𝑐ℎ𝑤
while the outlet temperature of the cooling fluid stream is
𝑄̇𝑟𝑒𝑗𝑒𝑐𝑡𝑒𝑑 Eq. 4.3.20-7
𝑇𝑐𝑤,𝑜𝑢𝑡 = 𝑇𝑐𝑤,𝑖𝑛 −
𝑚̇𝑐𝑤 𝐶𝑝𝑐𝑤
Example data files are provided.

4–231
TRNSYS 18 – Mathematical Reference

4.3.21. Type 143: Water-to-Air Heat Pump


This component models a single-stage liquid source heat pump. The heat pump conditions a moist air
stream by rejecting energy to (cooling mode) or absorbing energy from (heating mode) a liquid stream. This
heat pump model was intended for a residential ground source heat pump application, but may be used in
any liquid source application. This model is based on user-supplied data files containing catalog data for
the capacity (both total and sensible in cooling mode), and power, based on the entering water temperature
to the heat pump, the entering water flow rate and the air flow rate. Other curve fits are used to modify the
capacities and power based on off-design indoor air temperatures.

4.3.21.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] The humidity mode indicates which of the humidity values will be
used to calculate the inlet moist air state: 1 = the inlet humidity ratio
will be used, 2 = the inlet relative humidity (%) will be used.

2 Logical Unit for Cooling [-] The logical unit which is assigned to the data file which contains
Data the heat pump cooling performance data. (Simulation Studio will
automatically set this number.)

3 Logical Unit for Heating [-] The logical unit which is assigned to the data file containing the
Data heat pump heating performance data. (Simulation Studio will
automatically set this number.)

4 Logical Unit for Cooling [-] The logical unit which is assigned to the data file which contains
Correction Data the cooling correction factors for off-design indoor air temperatures.
(Simulation Studio will automatically set this number.)

5 Logical Unit for Heating [-] The logical unit which is assigned to the data file containing the
Correction Data heating correction factors for off-design indoor air temperatures.
(Simulation Studio will automatically set this number.)

6 Number of Water Flow [-] The number of water flow rates for which data is provided in the
Steps performance data files.

7 Number of Water [-] The number of water temperatures for which cooling performance
Temperatures – data is provided in the associated data files.
Cooling

8 Number of Water [-] The number of water temperatures for which heating data is
Temperatures – provided in the associated heating performance data file.
Heating

9 Number of Wet Bulb [-] The number of indoor wet bulb temperatures for which cooling
Temperature Steps correction factors are supplied in the associated data file.

10 Number of Dry Bulb [-] The number of indoor dry bulb temperatures for which cooling
Temperature Steps – correction factors are supplied in the associated data file.
Cooling

11 Number of Dry Bulb [-] The number of entering air dry bulb temperatures for which heating
Temperature Steps – correction factor data is supplied in the associated data file.
Heating

4–232
TRNSYS 18 – Mathematical Reference

12 Number of Air Flow [-] The number of air flow rate steps for which cooling performance
Steps – Cooling data will be supplied in the associated data file.

13 Number of Air Flow [-] The number of air flow rate steps for which heating performance
Steps – Heating data is supplied in the associated data file.

14 Density of Liquid [kg/m3] The density of the liquid stream entering the heat pump. The liquid
Stream stream is used for heat rejection when in cooling mode and for heat
absorption when in heating mode.

15 Specific Heat of Liquid [kJ/kg K] The specific heat of the liquid stream entering the heat pump. The
Stream liquid stream is used for heat rejection when in cooling mode and
for heat absorption when in heating mode.

16 Blower Power [kJ/h] The power of the blower motor when the heat pump is operating.
Typically, the entire heat pump package power (compressor +
blower + controls) is given for the reported heat pump power in the
catalog data. The blower and controller power will be subtracted
from the calculated power in order to calculate the compressor
power.

17 Controller Power [kJ/h] The power of the controller in the packaged heat pump unit.
Typically, the total packaged heat pump power (blower + controls +
compressor) is reported for heat pump power in the catalog data.
The blower and controller power will be subtracted from the total
calculated heat pump power in order to get the compressor power.

18 Capacity of Stage-1 [kJ/h] The heating capacity of the first-stage auxiliary heating device.
Auxiliary

19 Capacity of Stage-2 [kJ/h] The heating capacity of the 2nd-stage auxiliary heating device.
Auxiliary

20 Total Air Flow Rate [l/s] The flow rate on the air-side of the heat pump. This flow rate is the
total flow rate (return plus outside air).

INPUTS

1 Inlet Liquid [C] The temperature of the heat transfer fluid entering the heat pump.
Temperature This is typically water from a ground-coupled heat exchanger.

2 Inlet Liquid Flow Rate [kg/h] The flow rate of heat transfer fluid entering the heat pump.

3 Return Air [C] The temperature of the air returning to the heat pump from the
Temperature zone. This is typically the room air temperature. This air will be
mixed with a user-controlled amount of outside air before entering
the heat pump.

4 Return Air Humidity [-] The absolute humidity ratio of the air returning to the heat pump
Ratio from the zone. This air is typically at room air conditions. This
return air will be mixed with a user-specified amount of outside air
before entering the heat pump.

5 Return Air Relative [%] The percent relative humidity of the air returning to the heat pump
Humidity from the zone. This air is typically at room air conditions. This
return air will be mixed with a user-specified amount of outside air
before entering the heat pump.

4–233
TRNSYS 18 – Mathematical Reference

6 Return Air Pressure [atm] The absolute pressure of the air returning to the heat pump from
the zone. This air is typically at room air conditions. This return air
will be mixed with a user-specified amount of outside air before
entering the heat pump.

7 Return Air Damper [atm] The pressure drop of the return air stream as it passes across the
Pressure Drop return air damper.

8 Fresh Air Temperature [C] The temperature of the fresh air available to the heat pump. The
heat pump will mix a user-specified amount of fresh air with the
return air before conditioning this air in the heat pump.

9 Fresh Air Humidity [-] The absolute humidity ratio of the fresh air available to the heat
Ratio pump. The heat pump will mix a user-specified amount of fresh air
with the return air before conditioning this air in the heat pump.

10 Fresh Air Relative [%] The percent relative humidity of the fresh air available to the heat
Humidity pump. The heat pump will mix a user-specified amount of fresh air
with the return air before conditioning this air in the heat pump.

11 Fresh Air Pressure [atm] The absolute pressure of the fresh air available to the heat pump.
The heat pump will mix a user-specified amount of fresh air with
the return air before conditioning this air in the heat pump.

12 Fresh Air Damper [atm] The pressure drop of the fresh air stream as it passes across the
Pressure Drop outside air damper.

13 Cooling Control Signal [-] The control signal for cooling operation: CTRL < 0.5: cooling mode
is OFF; CTRL >= 0.5: cooling mode is ON.

14 Heating Control Signal [-] The control signal for heating operation: CTRL < 0.5: heating mode
is OFF; CTRL >= 0.5: heating mode is ON.

15 Stage 1 Auxiliary [-] The control signal for the 1st stage auxiliary heater: CTRL < 0.5:
Control Signal 1st stage auxiliary heater is OFF; CTRL >= 0.5: 1st stage auxiliary
heater is ON.

16 Stage 2 Auxiliary [-] The control signal for the operation of the 2nd-stage auxiliary
Control Signal heater: CTRL < 0.5: 2nd stage auxiliary heater is OFF; CTRL >=
0.5: 2nd stage auxiliary heater is ON.

17 Fan Control Signal [-] The control signal for operation of the ventilation fan when the heat
pump is not operating in heating or cooling mode: CTRL < 0.5: fan
is OFF if heat pump compressor is OFF; CTRL >= 0.5: fan is ON
regardless of compressor operation.

18 Fraction of Outside Air [-] The heat pump will mix this user-specified amount of fresh air with
the remaining fraction of return air before conditioning this air in the
heat pump.

19 Pressure Rise through [atm] The pressure rise (positive) of the air as it flows through the heat
Heat Pump pump. The pressurization is due to the internal heat pump fan.

OUTPUTS

1 Exiting Fluid [C] The temperature of the liquid stream exiting the heat pump.
Temperature

4–234
TRNSYS 18 – Mathematical Reference

2 Exiting Fluid Flow Rate [kg/h] The flow rate of liquid stream exiting the heat pump.

3 Outlet Air Temperature [C] The temperature of the air stream exiting the heat pump.

4 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the heat pump.
Ratio

5 Outlet Air Relative [%] The percent relative humidity of the air exiting the heat pump.
Humidity

6 Outlet Air Flow Rate [kg/h] The flow rate of dry air exiting the heat pump.

7 Outlet Air Pressure [atm] The absolute pressure of the air exiting the heat pump.

8 Total Cooling Rate [kJ/h] The rate at which energy (both sensible and latent) is removed
from the conditioned air stream in cooling mode.

9 Sensible Cooling Rate [kJ/h] The rate at which sensible energy is removed from the conditioned
air stream in cooling mode.

10 Latent Cooling Rate [kJ/h] The rate at which latent energy is removed from the conditioned air
stream in cooling mode.

11 Total Heating Rate [kJ/h] The rate at which energy is added to the conditioned air stream in
heating mode.

12 Heat Rejection [kJ/h] The rate at which energy is rejected to the water stream in cooling
mode.

13 Heat Absorption [kJ/h] The rate at which energy is absorbed from the fluid stream in
heating mode.

14 Compressor Power [kJ/h] The power consumed by the heat pump compressor while
operating.

15 Heat Pump Power [kJ/h] The total power (compressor + controls + blower) consumed by the
heat pump while operating. This value also includes any auxiliary
heat.

16 COP [-] The Coefficient of Performance of the heat pump.

17 EER [-] The Energy Efficiency Rating of the heat pump during the timestep.

18 Auxiliary Heating [kJ/h] The rate at which the heat pump is using auxiliary energy to heat
Power the outgoing air stream.

19 Condensate [C] The temperature of the condensate leaving the heat pump.
Temperature

20 Condensate Flow Rate [kg/h] The flow rate of condensate leaving the heat pump.

4.3.21.2. Simulation Summary Report Contents


VALUE FIELDS

4–235
TRNSYS 18 – Mathematical Reference

Rated Total Cooling [kJ/h] Total cooling at 21.11C EWT from the data file.
Capacity

Rated Sensible [kJ/h] Sensible cooling at 21.11 EWT from the data file.
Cooling Capacity

Rated Heating [kJ/h] Heating capacity at 10.0C EWT from the data file.
Capacity

INTEGRATED VALUE FIELDS

Total Cooling [kJ] Output 8

Sensible Cooling [kJ] Output 9

Heating [kJ] Output 11

Energy Input [kJ] Output 15

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Fluid [C] Minimum and maximum of Output 1


Temperature

Outlet Fluid Flow Rate [kg/h] Minimum and maximum of Output 2

Outlet Air Temperature [C] Minimum and maximum of Output 3

Outlet Air Flow Rate [kg/h] Minimum and maximum of Output 6

COP [-] Minimum and maximum of Output 16

4.3.21.3. Hints and Tips


 Make sure that the parameters that denote the number of points in the data files match the data in the
files. If the parameters do not match, there may be errors in the simulation or the results may not show
the performance of the device.

4.3.21.4. Detailed Description


A heat pump is a device that transfers energy from a low temperature source to a higher temperature sink.
It differs from a pure refrigeration cycle in that the end result of the application could be either to heat or
cool depending upon the direction that the refrigerant is currently flowing through the system [1]. The
Figurebelow shows a schematic diagram of a heat pump system.

4–236
TRNSYS 18 – Mathematical Reference

Figure: Water Source Heat Pump Schematic


Normally, a fan is included on the air side of the heat pump unit. It is not pictured in the schematic for clarity
purposes. The numbered points on the diagram correspond to the refrigerant states shown on the
psychrometric chart below.

Figure: Generic Heat Pump Refrigeration Cycle


The addition of a desuperheater (an extra heat exchanger between the compressor and condenser (in
cooling mode) or evaporator (in heating mode)) to a heat pump causes the refrigerant exiting the
compressor to move from the point labeled 1 toward the point labeled 1a. Type 143 is not a first principles
model but relies instead upon catalog data readily available from heat pump manufacturers. At the heart of
the component are four data files: a file containing cooling performance data, a file containing heating
performance data, a file containing cooling performance correction data and a file containing heating
performance correction data. In this case “correction” refers to a modification of the device’s capacity and
power draw when the air entering the device is not at the dry bulb and wet bulb temperatures used at the
rated condition.

COOLING PERFORMANCE DATA


Three measures of cooling performance must be provided in the cooling performance data file. These are:
total cooling, sensible cooling, and power consumed. The power consumed should include the power
associated with the indoor fan as well as the power associated with the compressor. Type 143 linearly

4–237
TRNSYS 18 – Mathematical Reference

interpolates between cooling performance measures based on the current values of the air flow rate, fluid
flow rate and entering fluid temperature (ºC). It should be noted that the component does not extrapolate
beyond the data range provided. If values outside the data range are provided, the maximum or minimum
cooling performance values will be returned and a warning will be written to the TRNSYS listing file and to
the simulation log file.
Users creating their own performance data must adhere closely to the syntax of the sample file. The values
of air flow must all appear on the first row of the data file. The values of fluid flow rate must all appear on
the second row of the data file. The values of the entering fluid temperature must all appear on the third
row of the data file. Users may specify more or fewer values of each of the three variables than are shown
in the sample file but must also remember to modify the corresponding parameters in the TRNSYS input
file. For example, the sample file contains two values of air flow rate. Consequently the value of the
parameter: number of airflow steps – cooling; would be set to 2. The values of all three cooling performance
measures must then appear each group on its own line.

HEATING PERFORMANCE DATA


The specification of heating performance data is much the same as for cooling performance data. Two
measures of heating performance must be provided in the heating performance data file. These are: total
heating and power consumed. The power consumed should include the power associated with the indoor
fan as well as the power associated with the compressor. Type 143 linearly interpolates between heating
performance measures based on the current values of the air flow rate, fluid flow rate (l/s) and entering fluid
temperature (ºC). It should be noted that the component does not extrapolate beyond the data range
provided. If values outside the data range are provided, the maximum or minimum cooling performance
values will be returned and a warning will be written to the TRNSYS listing file and to the simulation log file.
As with the cooling performance file, the values of air flow must all appear on the first row of the data file.
The values of fluid flow rate must all appear on the second row of the data file. The values of the entering
fluid temperature must all appear on the third row of the data file. Users may specify more or fewer values
of each of the three variables than are shown in the sample file but must also remember to modify the
corresponding parameters in the TRNSYS input file. For example, the sample file contains two values of
air flow rate. Consequently the value of the parameter: number of airflow steps – heating; would be set to
2. The values of both heating performance measures must then appear; each group on its own line.

COOLING CORRECTION DATA


The performance data specified in the cooling file is given for a specific entering air condition (typically 21.1
ºC (70 ºF) and 50% RH). Of course air does not always enter the device at this condition and as a result, a
correction factor file must also be provided so as to adjust the performance data for other air conditions.
The file can be created based on the information provided in manufacturer’s catalog performance data files.
For cooling, three correction values must be provided: a multiplier for total capacity, a multiplier for sensible
capacity and a multiplier for total power. All three multipliers are dimensionless. A linear interpolation is
performed based on the current value of entering air dry bulb and wet bulb temperatures. Again no
extrapolation is performed for entering conditions that lie outside the data range and the same rules for
syntax apply to the cooling correction data file.
The first line of the data file should contain values of entering air dry bulb temperature. The second line of
the data file should contain values of entering air wet bulb temperature. Thereafter, each line should contain
a total capacity multiplier, a sensible capacity multiplier, and a total (compressor and fan) power multiplier.

HEATING CORRECTION DATA


The performance data specified in the heating file is also given for some nominal air condition and so must
be corrected for other air conditions. For heating, two correction values are provided: a multiplier for total
capacity and a multiplier for total power. Both multipliers are again dimensionless. A linear interpolation is
performed based on the current value of entering air dry bulb and wet bulb temperatures and no
extrapolation is performed for entering conditions that lie outside the data range. The same rules for syntax
apply again to the heating correction data file.

4–238
TRNSYS 18 – Mathematical Reference

The first line of the data file should contain values of entering air dry bulb temperature. Thereafter, each
line should contain a total capacity multiplier and a total (compressor and fan) power multiplier.

AUXILIARY HEATING CAPACITY


Should the heating capacity of the heat pump device be insufficient to meet the load at some time during
the simulation, it is possible to specify two stages of additional capacity so as to meet the load. No
assumption is made about the nature or efficiency of this additional capacity and as with the base heating
and cooling control signals, the auxiliary heating stages are controlled independently and externally (by
equations or another component in the TRNSYS input file).

4.3.21.5. References
1. Mitchell, J.W. and J.E. Braun, Design Analysis, and Control of Space Conditioning Equipment and
Systems, Solar Energy Laboratory, University of Wisconsin – Madison. 1997

4–239
TRNSYS 18 – Mathematical Reference

4.3.22. Type 144: Packaged Terminal Air Condition/Split


System Air Conditioner
This component models an air conditioner for residential or commercial applications. The model requires
an external file of performance data that contains the total capacity, sensible capacity and power as a
function of the outdoor dry bulb temperature, the indoor dry bulb temperature, the indoor wet bulb
temperature, and the evaporator flow rate.

4.3.22.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] The humidity mode indicates which of the input humidity values will
be used to calculate the inlet moist air state: 1= the inlet humidity
ratio will be used, 2 = the inlet relative humidity (%) will be used.

2 Logical Unit for [-] The logical unit number assigned to the data file that contains the
Performance Data cooling coil performance data (the total cooling capacity, sensible
cooling capacity and the power draw) as a function of the
evaporator flow rate, ambient temperature, indoor wet bulb
temperature and the indoor dry bulb temperature. (Simulation
Studio will automatically assign this number.)

3 Number of Condenser [-] The number of ambient temperatures for which the cooling coil
Temperatures capacity and power draw are given in the performance data file.

4 Number of Evaporator [-] The number of evaporator flow rates for which the cooling coil
Flows capacities and power draw are given in the performance data file.

5 Number of Indoor Wet [-] The number of indoor wet bulb temperature data points for which
Bulb Temperatures the cooling coil capacities and power draw are given in the
performance data file.

6 Number of Indoor Dry [-] The number of indoor dry bulb temperature data points for which
Bulb Temperatures the cooling coil capacities and power draw are given in the
performance data file.

7 Blower Power Draw [kJ/h] The power draw of the blower(s) for the device while operating.
The power of the blower is assumed to be included in the total
power read from the external data file.

INPUTS

1 Ambient Temperature [C] The ambient dry bulb temperature (the temperature of the air
flowing across the outdoor coil (the condenser)).

2 Indoor Temperature [C] The indoor dry bulb temperature (the temperature of the air flowing
across the indoor coil (the evaporator)).

3 Indoor Humidity Ratio [-] The absolute humidity ratio of indoor air (the air flowing across the
indoor coil (the evaporator)).

4 Indoor Relative [%] The percent relative humidity of the indoor air (the air flowing
Humidity across the indoor coil (the evaporator)).

4–240
TRNSYS 18 – Mathematical Reference

5 Evaporator Flow Rate [kg/h] The flow rate of dry air across the indoor coil (the evaporator).

6 Indoor Air Pressure [atm] The absolute pressure of the indoor air (the air flowing across the
indoor coil (the evaporator)).

7 Air-Side Pressure Drop [atm] The pressure drop of the indoor air as it flows across the indoor coil
(the evaporator).

8 Control Signal [-] The on/off control signal for the cooling coil (>= 0.5: on, < 0.5: off).

OUTPUTS

1 Return Air [C] The dry bulb temperature of the indoor air after it has passed
Temperature through the air conditioner (across the evaporator section).

2 Return Air Humidity [-] The absolute humidity ratio of the indoor air after it has passed
Ratio through the air conditioner (across the evaporator section).

3 Return Air Relative [%] The percent relative humidity of the indoor air after it has passed
Humidity through the air conditioner (across the evaporator section).

4 Return Air Flow Rate [kg/h] The flow rate of the indoor air passing through the air conditioner
(across the evaporator section).

5 Return Air Pressure [atm] The absolute pressure of the indoor air after it has passed through
the air conditioner (across the evaporator section).

6 Total Energy Removal [kJ/h] The total (sensible+latent) energy removal rate from the indoor air
stream.

7 Sensible Energy [kJ/h] The rate at which sensible energy is removed from the air stream
Removal as it passes across the indoor coil (evaporator).

8 Power [kJ/h] The rate at which power is consumed by the device


(compressor+blower).

9 Compressor Power [kJ/h] The rate at which power is consumed by the blower(s) for the
device.

10 Blower Power [kJ/h] The rate at which power is consumed by the blower(s) for the
device.

11 COP [-] The coefficient of performance of the device.

12 EER [-] The energy efficiency ratio of the device.

13 Condensate [C] The temperature of the condensate being drained from the air
Temperature conditioner.

14 Condensate Flow Rate [kg/h] The flow rate of condensate being drained from the device.

4.3.22.2. Simulation Summary Report Contents


VALUE FIELDS

4–241
TRNSYS 18 – Mathematical Reference

Rated Total Cooling [kJ/h] Total cooling at 26.7C EDB, 19.4C EWB, and 35C ODB from the data
Capacity file.

Rated Sensible [kJ/h] Sensible cooling at 26.7C EDB, 19.4C EWB, and 35C ODB from the
Cooling Capacity data file.

Rated Power [kJ/h] Power at 26.7C EDB, 19.4C EWB, and 35C ODB from the data file.
Consumption

INTEGRATED VALUE FIELDS

Total Cooling [kJ] Output 6

Sensible Cooling [kJ] Output 7

Power [kJ] Output 8

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Temperature [C] Minimum and maximum of Output 1

Outlet Flow Rate [kg/h] Minimum and maximum of Output 4

COP [-] Minimum and maximum of Output 11

4.3.22.3. Hints and Tips


 Make sure that the parameters that denote the number of points in the data files match the data in the
files. If the parameters do not match, there may be errors in the simulation or the results may not show
the performance of the device.
 Type144 assumes that the power values in the data file include both the compressor and fan power.
It reads total power from the data file and fan power from the parameter list. When reporting output
values, Type144 reports the compressor power and fan power separately. If you are using this
component as a cooling section in an air handler and have modeled the fan using a separate Type it
is important to modify the data file to make sure that the power values reflect only the power
consumption of the compressor.

4.3.22.4. Nomenclature
Tevap,in [ºC] Temperature of air entering the evaporator side of the coil
hevap,in [kJ/kg] Enthalpy of air exiting the evaporator side of the coil
evap,in [kgH2O/kgAir] Humidity ratio of air entering the evaporator side of the coil
Pevap,in [atm] Pressure of air entering the evaporator side of the coil
Tevap,out [ºC] Temperature of air exiting the evaporator side of the coil
hevap,out [kJ/kg] Enthalpy of air entering the evaporator side of the coil
evap,out [kgH2O/kgAir] Humidity ratio of air exiting the evaporator side of the coil
Pevap,out [atm] Pressure of air exiting the evaporator side of the coil

Q [kJ/hr] Rate of total energy transferred by the coil
total

4–242
TRNSYS 18 – Mathematical Reference


Q [kJ/hr] Rate of sensible energy transferred by the coil
sensible

Q rejected [kJ/hr] Rate of energy rejected by the coil to ambient

SHR [0..1] Sensible heat ratio


 evap
m [kg/hr] Flow rate of air on the evaporator side of the coil

m condensate [kg/hr] Mass flow rate of condensate exiting the coil

Cp air [kJ/kg.K] Specific heat of dry air

Pevap [atm] Pressure drop across the evaporator side of the coil

COP [-] Coil Coefficient of Performance

Pwrtotal [kJ/hr] Total power draw by the air conditioner (residential cooling coil)

EER [-] Energy Efficiency Rating of the coil

4.3.22.5. Detailed Description


This component relies on a catalog data lookup method to predict the performance of residential air
conditioning devices. The user must provide a single text based data file in the standard TRNSYS data file
format. The file must provide values of the air conditioner’s total and sensible cooling capacity as well as
the air conditioner’s power draw for varying values of evaporator air flow rates (l/s), for varying condenser
temperatures (ºC), for varying indoor air wet bulb temperatures (ºC) and for varying indoor air dry bulb
temperatures (ºC).
This component first performs a call to the TRNSYS psychrometrics routine in order to obtain the remaining
air properties that are not specified by the user among the component’s inputs. If indoor dry bulb
temperature and humidity ratio are inputs to the model and a humidity ratio higher than the saturation
humidity ratio for that dry bulb temperature is specified, the psychrometrics routine will reset the humidity
ratio to its saturated condition and print a warning in the TRNSYS list file. Having fully defined the entering
indoor air state, Type 144 next determines the volumetric flow rate of evaporator air using the mass flow
rate specified by the user and the dry air density returned by the psychrometrics routine. It then calls the
TRNSYS InterpolateData routine, which reads the first data file and returns total cooling capacity and total
power draw. Type 144 then recalls the InterpolateData routine to determine the appropriate sensible cooling
ratio for the current conditions.
If the device is ON (based on the current value of the control signal input) then the outlet conditions of the
evaporator side air stream are calculated using
𝑄̇𝑡𝑜𝑡𝑎𝑙
ℎ𝑒𝑣𝑎𝑝,𝑜𝑢𝑡 = ℎ𝑒𝑣𝑎𝑝,𝑖𝑛 − Eq. 4.3.22-1
𝑚̇𝑒𝑣𝑎𝑝
𝑄̇𝑠𝑒𝑛𝑠𝑖𝑏𝑙𝑒
𝑇𝑒𝑣𝑎𝑝,𝑜𝑢𝑡 = 𝑇𝑒𝑣𝑎𝑝,𝑖𝑛 − Eq. 4.3.22-2
𝑚̇𝑒𝑣𝑎𝑝 𝐶𝑝𝑎𝑖𝑟
𝑃𝑒𝑣𝑎𝑝,𝑜𝑢𝑡 = 𝑃𝑒𝑣𝑎𝑝,𝑖𝑛 − Δ𝑃𝑒𝑣𝑎𝑝 Eq. 4.3.22-3

The total power draw of the air conditioner, as specified in the data file is assumed to include controller
power draw, blower power draw and compressor power draw. Both controller and blower power draw are
requested as inputs to the model; the compressor power is simply the difference between the power read
from the data file and the combined blower and controller power. The heat rejection of the device (the rate
at which heat is rejected from the device to the ambient is calculated using
𝑄̇𝑟𝑒𝑗𝑒𝑐𝑡𝑒𝑑 = 𝑄̇𝑡𝑜𝑡𝑎𝑙 + 𝑃𝑤𝑟𝑡𝑜𝑡𝑎𝑙 Eq. 4.3.22-4

The COP (coefficient of performance) and EER (energy efficiency rating) are therefore

4–243
TRNSYS 18 – Mathematical Reference

𝑄̇𝑡𝑜𝑡𝑎𝑙 Eq. 4.3.22-5


𝐶𝑂𝑃 =
𝑃𝑤𝑟𝑡𝑜𝑡𝑎𝑙
𝐸𝐸𝑅 = 3.413𝐶𝑂𝑃 Eq. 4.3.22-6

The amount of moisture removed from the evaporator air stream leaves the device via a condensate stream
whose fluid temperature is that of the air exiting the evaporator and whose flow rate is given by
𝑚̇𝑐𝑜𝑛𝑑𝑒𝑛𝑠𝑎𝑡𝑒 = 𝑚̇𝑒𝑣𝑎𝑝 (𝜔𝑒𝑣𝑎𝑝,𝑖𝑛 − 𝜔𝑒𝑣𝑎𝑝,𝑜𝑢𝑡 ) Eq. 4.3.22-7

The file containing the capacities and power data should have the following format:
The first line should contain the values of evaporator flow rate in increasing order separated by a space.
The second line should contain the outdoor dry bulb temperature values (C) in increasing order separated
by a space. The third line should contain the indoor wet bulb temperature values (C) in increasing order
separated by a space. The fourth line should contain the indoor dry bulb (C) temperatures values in
increasing order separated by a space. The next line should contain the total cooling capacity, sensible
cooling capacity, and power at the first evaporator flow rate value listed, the first outdoor dry bulb
temperature listed, the first indoor wet bulb temperature listed and the first indoor dry bulb temperature
listed. The next line should contain the total cooling capacity, sensible cooling capacity and power at flow
rate 1, outdoor dry bulb 1, indoor wet bulb 1 and indoor dry bulb 2. Continue until the power and capacities
are specified for each combination of flow rate, outdoor dry bulb, indoor wet bulb, and indoor dry bulb.
Example data files are provided.

4–244
TRNSYS 18 – Mathematical Reference

4.3.23. Type 151: Variable Air Volume (VAV) Air Handler


There are an enormous number of air handler configurations and control strategies that fall under the
category of variable air volume (VAV) systems. At its most basic level, through, a VAV air handler is a
centralized air handler that sends conditioned air to multiple rooms (or groups of rooms) in a building. Each
zone contains a dampered VAV box. The damper in each box adjusts itself to provide more or less air to
the zone based on the difference between the zone’s current temperature and the set point temperature.
Typically, the “worst case” zone (the zone with the greatest conditioning demand) receives the maximum
allowable flow and the other zones damper themselves back to provide less than their maximum allowed.
VAV air handlers can operate based on any number of control strategies. For example, in some
applications, the central air handler is either in heating mode or cooling mode; all outdoor air, heating,
cooling, preheat, and reheat required by the building’s thermal zones are provided centrally at the air
handler. In other applications, the central air handler provides cold air to all the zones and any zone that
requires heating does so through a reheat coil in its local VAV box. Some VAV air handlers mix return and
outdoor air centrally, condition the supply air and send it back to the zones while others condition and supply
only the outdoor air, leaving the return air mixing to be done at the VAV box level. Some VAV air handlers
concern themselves only with the temperature of the supply air where others can also provide supply air
humidification and dehumidification.
Type151 models a fairly basic VAV air handler that mixes outdoor and return air centrally, is able to preheat
and/or cool air to a desired supply condition and provides heat/reheat at the VAV box level. The only fan in
the system is the fan in the central air handler. Type152 offers alternative VAV AHU model that includes
parallel fan powered (PFP) boxes.
It is also important tonote that Type151 is an energy rate control model and therefore takes zone loads as
inputs instead of taking a control signal from an external controller component. For additional information
on this distinction, please read the beginning of section 4.3.23.5.

4.3.23.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of zones [-] The number of zones to be conditioned by this air handler.

If the air handler employs an economizer set this parameter to 1,


2 Economizer? [-]
otherwise set this value to 0.

If the air handler employs a preheat coil in cooling mode set this
3 Preheat coil? [-]
parameter to 1, otherwise set this value to 0.

The maximum volumetric flow rate of dry air that can be


4 Design dry air flow rate [l/s]
delivered by the air handler.

Logical unit for fan The logical unit number which will be ASSIGNed to the fan
5 [-]
performance data performance data file.

Number of fan PLR The number of fan part-load ratio data points for which fraction
6 [-]
points of full-load power data is provided in the external data file.

7 Design fan power [kJ/hr] The rated power draw of the fan when operating at full speed.

The specific heat of air used for the calculations (should be


8 Specific heat of air [kJ/kg.K]
consistent with the value supplied to the building model).

4–245
TRNSYS 18 – Mathematical Reference

The density of dry air used for the calculations (should be


9 Density of dry air [kg/m3]
consistent with the value supplied to the building model).

The next three parameters are cycled, once for each VAV box (specified by parameter 1)

The minimum flow rate of air to the specified zone when the air
Minimum zonal air flow
10 [l/s] handler is operating. This parameter is cycled based on the
rate
value of the “number of zones” parameter.

The maximum flow rate of air to the specified zone when the air
Maximum zonal air
11 [l/s] handler is operating. This parameter is cycled based on the
flow rate
value of the “number of zones” parameter.

The capacity of each zone's reheat coil. Setting this value to -1


indicates that the capacity of that zone's reheat coil is unlimited.
Zonal reheat coil If a zone's reheat coil is capacity limited, the unmet reheat
12 [kJ/hr]
capacity energy will be set as an unmet load among this component's
outputs and should be reimposed on the zone. This parameter is
cycled based on the value of the “number of zones” parameter.

INPUTS

The temperature of the ambient air. A user-specified fraction of


1 Ambient temperature [C zone return air will be mixed with ambient air in the air handler.

The percent relative humidity of the ambient air. A user-specified


Ambient relative fraction of zone return air will be mixed with ambient air in the air
2 humidity [%] handler.

The absolute pressure of the air used for all psychrometric


3 Air pressure [atm] calculations in the model.

The maximum desired temperature of the air supplied to all


zones. Zones with a heating load still receive this temperature
supply air and must heat themselves with their reheat coils. If
Maximum cooling any of the zone cooling loads cannot be met at this temperature,
4 supply air temperature [C] the AHU will reset its supply downward.

The minimum allowable temperature of the air supplied to all


Minimum cooling zones. Zones with a heating load still receive this temperature
5 supply air temperature [C] supply air and must heat themselves with their reheat coils.

The fraction of the design air flow rate that will be outside air
(fresh air) at the current timestep. NOTE: normally, when a
building is unoccupied, its outdoor air dampers close. To model
this correctly, the value of this input should go to zero when the
6 Fraction of outside air [-] building is not occupied.

Set this value to 1 if the preheat coil can be active in the central
air handler. Note: the "Preheat coil?" parameter must also be set
7 Preheat okay? [-] to 1 for the preheat coil to be active.

Set this value to 1 if the economizer can be active in the central


air handler. Note: the "Economizer coil?" parameter must also
8 Economizer okay? [-] be set to 1 for the economizer coil to be active.

The next five inputs are cycled, once for each VAV box (specified by parameter 1)

4–246
TRNSYS 18 – Mathematical Reference

The air temperature of the specified zone. This input is cycled


9 Zone temperature [C] based on the value of the “number of zones” parameter.

The percent relative humidity of the zone air. This input is cycled
10 Zone relative humidity [%] based on the value of the “number of zones” parameter.

The sensible energy demand of the specified zone. A positive


vale implies that the zone requires cooling. A negative value
Zone sensible energy implies that the zone requires heating. This input is cycled based
11 load [kJ/hr] on the value of the “number of zones” parameter.

The amount of energy that will be added to the return air stream
for the specified zone (before outside air is mixed in). This input
is cycled based on the value of the “number of zones”
12 Return air heat gain [kJ/hr] parameter.

Set this value to 1 if reheat at the terminal device is allowed for


this zone. Note: make sure that the reheat coil capacity for each
zone is set to a reasonable value (or to -1 for "infinite capacity).
This input is cycled based on the value of the “number of zones”
13 Reheat okay? [-] parameter.

OUTPUTS

The rate at which energy is used by the preheat coil to boost the
temperature of the mixed air to the supply air set point. The
1 Preheat coil energy [kJ/hr] preheat coil is used in cooling mode only.

Cooling coil heat The rate at which energy is removed from the air stream by the
2 transfer [kJ/hr] cooling coil.

Cooling coil sensible The rate at which sensible energy is removed from the air
3 heat transfer [kJ/hr] stream by the cooling coil.

The rate at which energy is added to the air streams by the


4 Reheat coil energy [kJ/hr] terminal reheat units.

5 Fan power [kJ/hr] The rate at which the air handler fan consumes energy.

6 Fan PLR [-] The fractional speed at which the VAV fan is currently running.

The load imposed on the air handler by the introduction of the


7 Load due to outside air [kJ/hr] outside air into the system.

Sensible load due to The sensible load imposed on the air handler by the introduction
8 outside air [kJ/hr] of the outside air into the system.

The rate at which the air handler failed to meet the sensible
9 Unmet sensible loads [kJ/hr] loads of the zones (a cooling load unmet is a positive value).

Delivered sensible
10 energy rate [kJ/hr] The rate at which sensible energy is delivered to the zones.

The dry bulb temperature of air exiting the preheat coil and
Cooling coil inlet entering the cooling coil. This output is needed for AHUs with
11 drybulb temperature [C] direct expansion (DX) coils in them because the performance of
the DX coil (for example a Type42 performance map) requires

4–247
TRNSYS 18 – Mathematical Reference

the coil inlet conditions (and ambient dry bulb temperature) in


order to return COP.

The wet bulb temperature of air exiting the preheat coil and
entering the cooling coil. This output is needed for AHUs with
direct expansion (DX) coils in them because the performance of
the DX coil (for example a Type42 performance map) requires
Cooling coil inlet the coil inlet conditions (and ambient dry bulb temperature) in
12 wetbulb temperature [C] order to return COP.

The wet bulb temperature of air exiting the preheat coil and
entering the cooling coil. This output is needed for AHUs with
direct expansion (DX) coils in them because the performance of
the DX coil (for example a Type42 performance map) requires
Cooling coil inlet the coil inlet conditions (and ambient dry bulb temperature) in
13 relative humidity [%] order to return COP.

Central unit outlet The dry bulb temperature of the air being supplied by the central
14 temperature [C] unit to the zone boxes.

Central unit outlet The relative humidity of the air being supplied by the central unit
15 relative humidity [%] to the zone boxes.

The next five outputs are cycled, once for each VAV box (specified by parameter 1)

The rate at which energy must be added back to the zone model
to account for load not met by the AHU. This output is also used
to send additional load caused by the supply air temperature
being below zone temperature back to the zone model.This
Unmet / additional load output is cycled based on the value of the “number of zones”
16 for zone [kJ/hr] parameter.

The rate at which moisture must be added back to the specified


zone due to latent energy effects in the air handler. This output
is cycled based on the value of the “number of zones”
17 Latent addition rate [kg/hr] parameter.

Zone supply air flow The volumetric flow rate of air to each zone. This output is
18 rate [l/s] cycled based on the value of the “number of zones” parameter.

The fractional volumetric flow rate of air to each zone. The


fractional flow rate is defined as the current volumetric flow rate
divided by the zone's maximum allowable volumetric flow rate.
Fractional zone supply This output is cycled based on the value of the “number of
19 air flow rate [-] zones” parameter.

The amount of reheat energy required by each zone. This output


Zone reheat energy is cycled based on the value of the “number of zones”
20 required [kJ/hr] parameter.

4.3.23.2. Simulation Summary Report Contents


VALUE FIELDS

Minimum possible flow [L/s] This field is taken from the parameter values set for each zone.
rate for each box

4–248
TRNSYS 18 – Mathematical Reference

Maximum possible [L/s] This field is taken from the parameter values set for each zone.
flow rate for each box

Design fan flow rate [L/s] The value of parameter 4

Design fan power [kW] The value of parameter 7

TEXT FIELDS

Economizer n/a This field has a value of either “active” or “none” depending on the value
of parameter 2

Preheat Coil n/a This field has a value of either “active” or “none” depending on the value
of parameter 3

INTEGRATED VALUE FIELDS

Reheat coil load [kWh] The load on each of the VAV box reheat coils.

Fan energy [kWh] The energy consumed by the central unit fan.
consumption

Preheat coil load [kWh] The load on the central preheat coil

Cooling coil total load [kWh] The total energy (sensible plus latent) removed by the central cooling
coil.

Cooling coil sensible [kWh] The sensible energy removed by the central cooling coil.
load

Combined reheat coil [kWh] The total load on all VAV box reheat coils
load

MINIMUM/MAXIMUM VALUE FIELDS

Box flow during [L/s] The minimum and maximum flow rate through each box during the
operation course of the simulation.

Central unit supply air [C] The minimum and maximum temperature delivered by the central unit to
temperature the VAV boxes during the course of the simulation.

4.3.23.3. Hints and Tips


 When zones undergo a setup or setback temperature during night time it is important to capacity limit
the Type56 HEATING and COOLING types in each zone so that they are not able to recover from the
setup/setback instantaneously in the morning. To do this, define a separate HEATING and a separate
COOLING type for each Type56 zone and limit its capacity based on the current VAV supply
temperature and the maximum box flow rate.
 Type151 includes an “unmet /additional load” output for each zone. This output needs to be connected
back to the building model (usually by means of a time delay component). The reason is that often a
VAV system distributes cold air to all zones of the building at all times. If any zones require heating
then heating is provided at the distribution point (the VAV box). What this means from a simulation
point of view is that some cold air is blown into the zones at all times. This cold air constitutes a
negative energy gain (an energy loss) in the zone that must be accounted for by the building mode

4–249
TRNSYS 18 – Mathematical Reference

(usually Type56). For the sake of convenience we use the "unmet load" outputs from Type151 to pass
back to the building. When looking for unmet load hours as required by standards such as ASHRAE
90.1 you should not use the unmet load output but should instead use another component (such as
Type584 in the TESS Utility library) to determine when the zone temperature falls below or above the
setpoints.

4.3.23.4. Nomenclature
Cp air [kJ/kg.K] Specific heat of dry air

f economizer [0..1] The fraction of outdoor air that can be used in economizer mode.

f overflow [0..1] A fraction that limits the volumetric flow of air through the air handler to the design flow rate.

f underflow [0..1] A fraction that sets the quantity of outdoor air being mixed into the return air at the air handler.

hair ,i [kJ/kg] Enthalpy of air in zone i

hair ,mixed [kJ/kg] Enthalpy of the mixed return and outside air entering the air handler fan.

hair ,ret,i [kJ/kg] Enthalpy of air returning from zone i (affected by return air energy gains/losses)

hbulk ,ret [kJ/kg] Enthalpy of the return air entering the air handler.

hClCoil ,out [kJ/kg] Enthalpy of air exiting the cooiling coil in the air handler.

h fan,out [kJ/kg] Enthalpy of air exiting the fan in the air handler.

hHtCoil ,out [kJ/kg] Enthalpy of air exiting the heating coil in the air handler.

hOA [kJ/kg] Enthalpy of outside air.

hpreheat,out [kJ/kg] Enthalpy of air exiting the preheat coil.

m OA [kg/h] Mass flow rate of outside air

m air ,mixed [kg/h] Mass flow rate of the mixed return and outside air entering the air handler fan.

m air ,ret [kg/h] Mass flow rate of return air entering the air handler

m air ,ret,i [kg/h] Mass flow rate of air returning from zone i

m water,i [kg/h] Mass flow rate of water added to or removed from the supply air to zone i.

P fan [kJ/h] Power of the fan motor at design conditions.

qClCoil ,sens [kJ/h] Sensible energy removed from the air stream by the air handler’s cooling coil

qClCoil ,tot [kJ/h] Total (sensible plus latent) energy removed from the air stream by the air handler’s cooling coil

qdelivered,sens [kJ/h] Sensible energy delivered to the zones by the air handler.

q HtCoil ,sens [kJ/h] Sensible energy added to the air stream by the air handler’s heating coil

q HtCoil ,tot [kJ/h] Total (sensible plus latent) energy added to the air stream by the air handler’s heating coil.

qOA,sens [kJ/h] Sensible energy added to (or removed from) the air supply stream by mixing in outdoor air.

4–250
TRNSYS 18 – Mathematical Reference

qOA,tot [kJ/h]
Total energy (sensible and latent) added to (or removed from) the air supply stream by mixing
in outdoor air.

qreheat,i [kJ/h] Sensible energy added to the air supply stream for zone i by the reheat coil in the air handler.

q ret,i [kJ/h] Sensible energy added to zone i's return air.

qunmet,i [kJ/h] Sensible load for zone i that could not be met by the air handler at the current time.

q zone,sens,i [kJ/h] Sensible load on zone i (an input to Type1249)

Tambient [C] Temperature of outside air entering the air handler.

Tair ,sply [C] Temperature ofair supplied by the air handler.

Tbulk ,ret [C] Temperature of the mixed air returning to the air handler.

TClCoil ,out [C] Temperature ofair exiting the air handler’s cooling coil.

THtCoil ,out [C] Temperature of air exiting the air handler’s heating coil.

Tpreheat,out [C] Temperature of air exiting the air handler’s preheat coil.

Tzone ,i [C] Temperature of zone i.

vair ,i [L/s] Volumetric flow rate of air supplied to zone i.

vdesign [L/s] Volumetric flow rate of air of the air handler under design conditions.

veconomizer [L/s] Volumetric flow rate of air entering the economizer (if present) in the air handler.

vOA [L/s] Volumetric flow rate of air of outside air

vmax,i [L/s] Maximum volumetric flow rate of air allowed to zone i

vtot ,req [L/s] Volumetric flow rate of air required by all zones.

 air [kg/m3] Density of dry air

air,mixed [kgH2O/kgAir] Absolute humidity ratio of the mixed outside and return air entering the air handler.

air ,ret,i [kgH2O/kgAir] Absolute humidity ratio of air returning from zone i.

bulk ,ret [kgH2O/kgAir] Absolute humidity ratio of the return air entering the air handler.

ClCoil ,out [kgH2O/kgAir] Absolute humidity ratio of air leaving the cooling coil in the air handler.

 fan,out [kgH2O/kgAir] Absolute humidity ratio of air leaving the fan in the air handler.

HtCoil ,out [kgH2O/kgAir] Absolute humidity ratio of air leaving the heating coil in the air handler.

zone,i [kgH2O/kgAir] Absolute humidity ratio of zone i.

4.3.23.5. Detailed Description


Unlike many of the TRNSYS HVAC components, Type151 is an energy rate control device. In energy rate
control a zone temperature is predefined and the building model calculates the amount of sensible and
latent energy that the HVAC system would have to add to or remove from the space over the course of the
timestep in order to maintain that space temperature. That amount of energy (called the “load”) is then

4–251
TRNSYS 18 – Mathematical Reference

imposed on the central air handler’s coils. Type151 takes the sensible load as an input, using a sign
convention that is designed to make it compatible with Type56’s NTYPE2 output (QSENS). Heating loads
are negative values while cooling loads are positive values. It also takes the temperature and relative
humidity of each zone. The user specifies a minimum and maximum allowable volumetric flow rate to each
zone and a design outdoor air fraction. Based on current conditions, Type151 determines an air handler
supply temperature and a volumetric flow rate to each zone that it serves. It calculates the total load on the
air handler’s preheat coil, and cooling coil and the load on any VAV box reheat coils, providing each of
these as an output. These total loads can then be imposed by the user on whatever flow streams the central
plant provides to the air handler. In most cases, the flow streams will likely be hot and cold water. However,
it may be that heating is provided by steam, in which case the heating loads (preheat and reheat) would be
imposed on a steam flow. It may be that reheat is provided by hot water to each of the VAV boxes. In some
applications, however, reheat is by electric coil. How the user models the central plant is largely up to them.
The basic idea, however, of “imposing loads on a flow stream” is that a central plant supplies a conditioned
fluid (for example, water at 6.7C) to the air handler’s cooling coil. The cooling coil removes a certain amount
of energy from the air stream and dumps it into the chilled water stream. Consequently, the chilled water
stream returns to the central plant warmer. The most basic equation for imposing a cooling load on a chilled
water stream is:
𝑞̇ 𝐶𝑙𝐿𝑜𝑎𝑑
𝑇𝑐𝑤,𝑟𝑒𝑡𝑢𝑟𝑛 = 𝑇𝑐𝑤,𝑠𝑢𝑝𝑝𝑙𝑦 + Eq. 4.3.23-1
𝑚̇𝑤𝑎𝑡𝑒𝑟 𝐶𝑝𝑤𝑎𝑡𝑒𝑟
Since the sign for a heating load is a negative value of q, the above equation holds true for heating loads
as well.

STEP 1: ZONE CONDITIONS


At each iteration, Type151 first fully determines the properties of the ambient air and the air in each zone
by means of calls to the TRNSYS psychrometrics routine. The psychrometrics routine is called with ambient
absolute pressure, temperature, and relative humidity. It returns the absolute humidity ratio and enthalpy
for the ambient and for each building zone. These values will be used in subsequent calculations as
explained below.
If none of the zones report a load (either heating or cooling) and the fraction of outdoor air currently required
(according to input 6) is zero then the air handler is shut down.

STEP 2: SUPPLY AIR TEMPERATURE


If Type151 determines that there is no cooling load then it sets the supply air temperature to the maximum
allowed value (according to input 4). If at least one zone does report a cooling load then the supply air
temperature from the central unit will be determined using:
𝑞̇ 𝑧𝑜𝑛𝑒,𝑠𝑒𝑛𝑠,𝑖
𝑇𝑎𝑖𝑟,𝑠𝑢𝑝𝑝𝑙𝑦 = 𝑀𝐼𝑁 (𝑇𝑧𝑜𝑛𝑒,𝑖 − ) Eq. 4.3.23-2
3.6𝜌𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 𝑣̇ 𝑚𝑎𝑥,𝑖
This formula finds the zone that has the greatest load on it at the current time and assumes that the zone
will receive its maximum possible flow (as specified by the model’s “maximum zonal airflow” parameter for
each zone). The formula determines the temperature of air that must be supplied at that air flow rate in
order to satisfy the zone load.

STEP 3: ZONE AIR FLOW RATE


Based on the supply air temperature, Type151 next calculates the flow rate required by each of the other
zones. If the zone is already colder than the supply air temperature, that zone’s flow rate gets set to the
minimum allowable value (as specified by the model’s “minimum zonal airflow” parameter for each zone).
If the zone temperature is at or above the supply air temperature then the zones flow rate is calculated by:
𝑞̇ 𝑧𝑜𝑛𝑒,𝑠𝑒𝑛𝑠,𝑖
𝑣̇ 𝑎𝑖𝑟,𝑖 = Eq. 4.3.23-3
3.6𝜌𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 (𝑇𝑧𝑜𝑛𝑒,𝑖 − 𝑇𝑎𝑖𝑟,𝑠𝑢𝑝𝑝𝑙𝑦 )
If the calulated volumetric air flow is above the maximum for any zone, it is limited to that zone’s maximum.

4–252
TRNSYS 18 – Mathematical Reference

The total air flow rate that must be supplied by the air handler (vtot,req) is simply the sum of the zonal
requirements.

STEP 4: FRESH AIR VOLUME CHECK


The quantity of outside (fresh) air required by the air handler is calculated by multiplying the total design air
flow rate parameter by the current value of the “fraction of outside air” input. Note that it is the design dry
air flow rate that sets the required quantity of outdoor air in this step. If the building requires very little flow
to its various zones at the current time, it may be that a high percentage of that air is fresh air. Type151
next checks to make sure that the design quantity of outdoor air does not exceed the total air flow required
by the system at the current time using the formula:
𝑣̇𝑜𝑎
𝑓𝑢𝑛𝑑𝑒𝑟𝑓𝑙𝑜𝑤 = Eq. 4.3.23-4
𝑣̇ 𝑡𝑜𝑡,𝑟𝑒𝑞
The underflow fraction is limited to a maximum value of 1. If the volumetric flow of outdoor air exceeds the
total required based on the Eq. 4.3.23-3 calculated requirements, total flow is increased to the outdoor air
amount (so as to satisfy energy code requirements for fresh air quantities).

STEP 5: AHU AIRFLOW VOLUME CHECK


The modified total required air is next checked to make sure that it does not exceed the total design
volumetric dry air flow rate (a parameter). If it does, the total air flow through the AHU is limited to the design
value and an overflow fraction is calculated:
𝑣̇ 𝑡𝑜𝑡,𝑟𝑒𝑞
𝑓𝑜𝑣𝑒𝑟𝑓𝑙𝑜𝑤 = Eq. 4.3.23-5
𝑣̇ 𝑑𝑒𝑠𝑖𝑔𝑛

STEP 6: ZONE AIR FLOW RECALCULATION


The flow to each of the zones in the building is next recalculated to take into account the impact of both
over and underflow:
𝑓𝑢𝑛𝑑𝑒𝑟𝑓𝑙𝑜𝑤
𝑣̇ 𝑎𝑖𝑟,𝑖 = 𝑣̇ 𝑎𝑖𝑟,𝑖 Eq. 4.3.23-6
𝑓𝑜𝑣𝑒𝑟𝑓𝑙𝑜𝑤

STEP 7: MIXED RETURN AIR


Now that the volumetric flow rate from the air handler to each zone in the building has been determined,
the conditions of the mixed return air can be calculated. The dry air mass flow rate of the return from a
given zone is:
𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖 = 3.6𝑣̇ 𝑎𝑖𝑟,𝑖 𝜌𝑎𝑖𝑟 Eq. 4.3.23-7

The enthalpy of the return air is the enthalpy of the zone air plus any energy that is added to the return air
divided by the mass flow rate of return air. Energy added to the return air is an input to the model for each
zone and allows the user to model situations in which energy gains from lighting balasts and other
equipment located in the plenum space above each zone can heat up the return air or in which return air
ducts exposed to unheated attic spaces can cool down the return air:
𝑞̇ 𝑟𝑒𝑡,𝑖
ℎ𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖 = ℎ𝑎𝑖𝑟,𝑖 + Eq. 4.3.23-8
𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖
The return air enthalpy, the absolute humidity ratio of zone air, and the absolute pressure of ambient air
are used to fully determine the return air state by means of a call to the TRNSYS psychrometrics routine.
The routine returns the temperature and relative humidity of the return air. Next, the enthalpy and humidity
ratio of the mixed return air are computed:
∑ ℎ𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖 𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖
ℎ𝑏𝑢𝑙𝑘,𝑟𝑒𝑡 = Eq. 4.3.23-9
𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡

4–253
TRNSYS 18 – Mathematical Reference

∑ 𝜔𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖 𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖
𝜔𝑏𝑢𝑙𝑘,𝑟𝑒𝑡 = Eq. 4.3.23-10
𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡
The psychrometrics routine is called again to determine the temperature and relative humidity of the mixed
return air.

STEP 8: ECONOMIZER OPERATION


Many VAV air handlers are equipped with air-side economizers. These devices monitor the ambient air and
if conditions are favorable increase the quantity of outside air over the design amount in order to reduce
the amount of air stream conditioning that would otherwise have to be accomplished by the heating and
cooling coils. If the “Economizer?” parameter is set to 1, then the outdoor air fraction is calculated as:
𝑇𝑎𝑖𝑟,𝑠𝑝𝑙𝑦 − 𝑇𝑏𝑢𝑙𝑘,𝑟𝑒𝑡
𝑓𝑒𝑐𝑜𝑛𝑜𝑚𝑖𝑧𝑒𝑟 = Eq. 4.3.23-11
𝑇𝑎𝑚𝑏𝑖𝑒𝑛𝑡 − 𝑇𝑏𝑢𝑙𝑘,𝑟𝑒𝑡
𝑣̇ 𝑒𝑐𝑜𝑛𝑜𝑚𝑖𝑧𝑒𝑟 = 𝑓𝑒𝑐𝑜𝑛𝑜𝑚𝑖𝑧𝑒𝑟 𝑣̇ 𝑡𝑜𝑡,𝑟𝑒𝑞 Eq. 4.3.23-12

STEP 9: MIXED AIR


The return and fresh air are next mixed together. The quantity of outdoor air is the maximum of the amounts
calculated in steps 4 and 8. The mixed air enthalpy and humidity ratios are computed and the
psychrometrics routine is called to determine the mixed air temperature, and relative humidity. At this point
the “total load due to outside air” and “sensible load due to outside air” outputs are computed:
𝑞̇ 𝑜𝑎,𝑡𝑜𝑡 = 𝑚̇𝑜𝑎 (ℎ𝑜𝑎 − ℎ𝑏𝑢𝑙𝑘,𝑟𝑒𝑡 ) Eq. 4.3.23-13

𝑞̇ 𝑜𝑎,𝑠𝑒𝑛𝑠 = 𝑚̇𝑜𝑎 𝐶𝑝𝑎𝑖𝑟 (𝑇𝑎𝑚𝑏𝑖𝑒𝑛𝑡 − 𝑇𝑏𝑢𝑙𝑘,𝑟𝑒𝑡 ) Eq. 4.3.23-14

STEP 10: FAN EFFECTS


Once the return and outside air streams have been mixed, the fan effects are next assessed. Where a
number of TRNSYS fan models allow the user to specify whether the fan motor is inside or outside the air
stream, this model assumes that the fan and motor (and thus the energy gain from the motor inefficiency)
are in the mixed air stream. The fan is assumed to be variable speed; its part load ratio is determined by
dividing the current system volumetric flow rate by the air handler’s design volumetric flow rate. The fan
efficiency at the current PLR is then interpolated based on values read from Type151’s fan efficiency data
file. The energy gain and humidity ratio in the air stream across the fan are then:
̇
𝑃𝑓𝑎𝑛
ℎ𝑓𝑎𝑛,𝑜𝑢𝑡 = ℎ𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 + Eq. 4.3.23-15
𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑
𝜔𝑓𝑎𝑛,𝑜𝑢𝑡 = 𝜔𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 Eq. 4.3.23-16

The psychrometrics routine is again called, this time with pressure, enthalpy and humidity ratio in order to
fully determine the air state exiting the fan. The psychrometrics routine returns the temperature and relative
humidity.

STEP 11: PREHEAT COIL


The user can include a preheat coil in the air handler by setting the “Preheat coil?” parameter to 1. If this
parameter has a value of 0, no preheat coil will be included and this step is skipped. The preheat coil in the
air handler acts to bring the air stream temperature up to the desired supply temperature if necessary. The
preheat coil outlet temperature is set as the supply temperature, the preheat coil outlet humidity ratio is set
as the fan outlet humidity ratio (from step 10) and the psychrometrics routine is called to determine the
relative humidity and enthalpy of air exiting the preheat coil. The preheat coil energy (an output) is then set
by:
𝑞̇ 𝑝𝑟𝑒ℎ𝑒𝑎𝑡 = 𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 (ℎ𝑝𝑟𝑒ℎ𝑒𝑎𝑡,𝑜𝑢𝑡 − ℎ𝑓𝑎𝑛,𝑜𝑢𝑡 ) Eq. 4.3.23-17

STEP 12: COOLING COIL

4–254
TRNSYS 18 – Mathematical Reference

If the air stream temperature exiting the preheat coil is above the desired supply temperature, the cooling
coil brings it down. The psychrometrics routine is called with the desired supply temperature, and the
humidity ratio of the air exiting the preheat coil. The psychrometrics routine returns RH, humidity ratio, and
enthalpy. One of the features of the TRNSYS psychrometrics routine is that if the routine is called with air
conditions that are not physically possible (usually because those conditions are beyond the saturation line
on the psychrometric chart) then based on one of the arguments in the call, the routine will reset one of the
two values to the saturated conditions at the other value. In the present case, the desired supply
temperature and the humidity ratio of air exiting the preheat coil will almost always result in saturation (as
air cools, it is able to hold less moisture and condensation occurs). When the psychrometrics routine returns
its values, it will reset the humidity ratio to the saturation humidity ratio at the desired supply temperature
and the RH will return as 100%. Type151 makes a further check at this point. If the returned RH is greater
than 99%, Type151 resets the RH to 99% and calls the psychrometrics routine once more. Psychrometrics
returns the enthalpy and humidity ratio. The cooling coil total and sensible energy transfer is then calculated:
𝑞̇ 𝐶𝑙𝐶𝑜𝑖𝑙,𝑡𝑜𝑡 = 𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 (ℎ𝑝𝑟𝑒ℎ𝑒𝑎𝑡,𝑜𝑢𝑡 − ℎ𝐶𝑙𝐶𝑜𝑖𝑙,𝑜𝑢𝑡 ) Eq. 4.3.23-18

𝑞̇ 𝐶𝑙𝐶𝑜𝑖𝑙𝑆𝑒𝑛𝑠 = 𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 𝐶𝑝𝑎𝑖𝑟 (𝑇𝑝𝑟𝑒ℎ𝑒𝑎𝑡,𝑜𝑢𝑡 − 𝑇𝐶𝑙𝐶𝑜𝑖𝑙,𝑜𝑢𝑡 ) Eq. 4.3.23-19

Note that the temperature differences are written such that the cooling coil energy transfer is a positive
value when energy is removed from the air stream.

STEP 13: REHEAT


In order to compute the reheat needs of zones whose minimum VAV box flow rate and the supply
temperature would result in overcooling, the sensible energy delivered to each zone is calculated as:
𝑞̇ 𝑑𝑒𝑙𝑖𝑣𝑒𝑟𝑒𝑑,𝑠𝑒𝑛𝑠 = −3.6𝑣̇ 𝑎𝑖𝑟,𝑖 𝜌𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 (𝑇𝑧𝑜𝑛𝑒,𝑖 − 𝑇𝑎𝑖𝑟,𝑠𝑝𝑙𝑦 ) Eq. 4.3.23-20

The amount of reheat energy required by a given zone is then:


𝑞̇ 𝑟𝑒ℎ𝑒𝑎𝑡,𝑖 = 𝑀𝐴𝑋(0, −𝑞̇ 𝑑𝑒𝑙𝑖𝑣𝑒𝑟𝑒𝑑,𝑠𝑒𝑛𝑠,𝑖 − 𝑞̇ 𝑧𝑜𝑛𝑒,𝑠𝑒𝑛𝑠,𝑖 ) Eq. 4.3.23-21

In the above equation, the sensible cooling energy required by each zone (q zone,sens,i) is taken from the
inputs to the model.
The user may limit the amount of reheat that each box may provide or may set the reheat capacity of one
or more boxes to a value of “-1” indicating that the reheat capacity is unlimited.

STEP 14: MOISTURE ADDITION RATE


Once Type151 has converged on a supply air temperature, it computes the rate at which the air handler is
removing moisture from the supply air to each zone. The total moisture removed is the sum of the zonal
quantities:
𝑚̇𝑤𝑎𝑡𝑒𝑟,𝑖 = −3.6𝑣̇ 𝑎𝑖𝑟,𝑖 𝜌𝑎𝑖𝑟 (𝜔𝑧𝑜𝑛𝑒,𝑖 − 𝜔𝐶𝑙𝐶𝑜𝑖𝑙,𝑜𝑢𝑡 ) Eq. 4.3.23-22

The sign convention of the mass flow rate is such that a positive result would indicate that the air handler
is adding moisture to the air stream, which is almost never the case. However, writing this term as moisture
addition (where a negative result indicates moisture removal) fits with the Type56 sign convention in which
a negative moisture gain can be specified as a dehumidification rate for a thermal zone.

STEP 15: UNMET LOAD


Lastly, Type151 performs a sensible energy balance in order to make sure that the zone loads were met.
In this case:
𝑞̇ 𝑢𝑛𝑚𝑒𝑡,𝑖 = 𝑞̇ 𝑧𝑜𝑛𝑒,𝑠𝑒𝑛𝑠,𝑖 + 𝑞̇ 𝑑𝑒𝑙𝑖𝑣𝑒𝑟𝑒𝑑,𝑠𝑒𝑛𝑠,𝑖 + 𝑞̇ 𝑟𝑒ℎ𝑒𝑎𝑡,𝑖 Eq. 4.3.23-23

Any unmet load should be returned to the building mode (normally Type56), usually with a one time step
delay in order to promote convergence. Note: it is important, therefore, to use a short timestep such as 5
minutes. Note that the energy provided by the reheat coils in the VAV boxes is added in to the “unmet load”
term here. This is done for convenience and to avoid additional connections between the VAV model and

4–255
TRNSYS 18 – Mathematical Reference

the building model. The reheat energy added must get back to the building model so that the zone
temperatures are correctly computed for its addition but it is understood that reheat does not really
constitute an unmet zone load.

4–256
TRNSYS 18 – Mathematical Reference

4.3.24. Type 152: Variable Air Volume (VAV) Air Handler with
Parallel Fan Powered (PFP) Boxes
Type152 models a variable air volume (VAV) air handler that mixes outdoor and return air centrally, is able
to preheat and/or cool air to a desired supply condition and provides heat/reheat at the VAV box level. The
zonal VAV boxes are equipped with the own fans
It is also important to note that Type151 is an energy rate control model and therefore takes zone loads as
inputs instead of taking a control signal from an external controller component. For additional information
on this distinction, please read the beginning of section 4.3.24.5.

4.3.24.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of zones [-] The number of zones to be conditioned by this air handler.

If the air handler employs an economizer set this parameter to 1,


2 Economizer? [-]
otherwise set this value to 0.

If the air handler employs a preheat coil in cooling mode set this
3 Preheat coil? [-]
parameter to 1, otherwise set this value to 0.

The maximum volumetric flow rate of dry air that can be


4 Design dry air flow rate [l/s]
delivered by the air handler.

Logical unit for fan The logical unit number which will be ASSIGNed to the fan
5 [-]
performance data performance data file.

Number of fan PLR The number of fan part-load ratio data points for which fraction
6 [-]
points of full-load power data is provided in the external data file.

7 Design fan power [kJ/hr] The rated power draw of the fan when operating at full speed.

The specific heat of air used for the calculations (should be


8 Specific heat of air [kJ/kg.K]
consistent with the value supplied to the building model).

The density of dry air used for the calculations (should be


9 Density of dry air [kg/m3]
consistent with the value supplied to the building model).

The next five inputs are cycled, once for each VAV box (specified by parameter 1)

The minimum flow rate of air to the specified zone when the air
Minimum zonal air flow
10 [l/s] handler is operating. This parameter is cycled based on the
rate
value of the “number of zones” parameter.

The maximum flow rate of air to the specified zone when the air
Maximum zonal air
11 [l/s] handler is operating. This parameter is cycled based on the
flow rate
value of the “number of zones” parameter.

The capacity of each zone's reheat coil. Setting this value to -1


indicates that the capacity of that zone's reheat coil is unlimited.
Zonal reheat coil If a zone's reheat coil is capacity limited, the unmet reheat
12 [kJ/hr]
capacity energy will be set as an unmet load among this component's
outputs and should be reimposed on the zone. This parameter is
cycled based on the value of the “number of zones” parameter.

4–257
TRNSYS 18 – Mathematical Reference

The power consumed by the fan in the VAV terminal box for
13 Box fan power for zone [kJ/h]
each zone.

INPUTS

The temperature of the ambient air. A user-specified fraction of


1 Ambient temperature [C
zone return air will be mixed with ambient air in the air handler.

The percent relative humidity of the ambient air. A user-specified


Ambient relative
2 [%] fraction of zone return air will be mixed with ambient air in the air
humidity
handler.

The absolute pressure of the air used for all psychrometric


3 Air pressure [atm]
calculations in the model.

The maximum desired temperature of the air supplied to all


zones. Zones with a heating load still receive this temperature
Maximum cooling
4 [C] supply air and must heat themselves with their reheat coils. If
supply air temperature
any of the zone cooling loads cannot be met at this temperature,
the AHU will reset its supply downward.

The minimum allowable temperature of the air supplied to all


Minimum cooling
5 [C] zones. Zones with a heating load still receive this temperature
supply air temperature
supply air and must heat themselves with their reheat coils.

The fraction of the design air flow rate that will be outside air
(fresh air) at the current timestep. NOTE: normally, when a
6 Fraction of outside air [-] building is unoccupied, its outdoor air dampers close. To model
this correctly, the value of this input should go to zero when the
building is not occupied.

Set this value to 1 if the preheat coil can be active in the central
7 Preheat okay? [-] air handler. Note: the "Preheat coil?" parameter must also be set
to 1 for the preheat coil to be active.

Set this value to 1 if the economizer can be active in the central


8 Economizer okay? [-] air handler. Note: the "Economizer coil?" parameter must also
be set to 1 for the economizer coil to be active.

The next three parameters are cycled, once for each VAV box (specified by parameter 1)

The air temperature of the specified zone. This input is cycled


9 Zone temperature [C]
based on the value of the “number of zones” parameter.

The percent relative humidity of the zone air. This input is cycled
10 Zone relative humidity [%]
based on the value of the “number of zones” parameter.

The sensible energy demand of the specified zone. A positive


Zone sensible energy vale implies that the zone requires cooling. A negative value
11 [kJ/hr]
load implies that the zone requires heating. This input is cycled based
on the value of the “number of zones” parameter.

The amount of energy that will be added to the return air stream
for the specified zone (before outside air is mixed in). This input
12 Return air heat gain [kJ/hr]
is cycled based on the value of the “number of zones”
parameter.

4–258
TRNSYS 18 – Mathematical Reference

Set this value to 1 if reheat at the terminal device is allowed for


this zone. Note: make sure that the reheat coil capacity for each
13 Reheat okay? [-] zone is set to a reasonable value (or to -1 for "infinite capacity).
This input is cycled based on the value of the “number of zones”
parameter.

OUTPUTS

The rate at which energy is used by the preheat coil to boost the
1 Preheat coil energy [kJ/hr] temperature of the mixed air to the supply air set point. The
preheat coil is used in cooling mode only.

Cooling coil heat The rate at which energy is removed from the air stream by the
2 [kJ/hr]
transfer cooling coil.

Cooling coil sensible The rate at which sensible energy is removed from the air
3 [kJ/hr]
heat transfer stream by the cooling coil.

The rate at which energy is added to the air streams by the


4 Reheat coil energy [kJ/hr]
terminal reheat units.

5 Fan power [kJ/hr] The rate at which the air handler fan consumes energy.

6 Fan PLR [-] The fractional speed at which the VAV fan is currently running.

The load imposed on the air handler by the introduction of the


7 Load due to outside air [kJ/hr]
outside air into the system.

Sensible load due to The sensible load imposed on the air handler by the introduction
8 [kJ/hr]
outside air of the outside air into the system.

The rate at which the air handler failed to meet the sensible
9 Unmet sensible loads [kJ/hr]
loads of the zones (a cooling load unmet is a positive value).

Delivered sensible
10 [kJ/hr] The rate at which sensible energy is delivered to the zones.
energy rate

The dry bulb temperature of air exiting the preheat coil and
entering the cooling coil. This output is needed for AHUs with
Cooling coil inlet direct expansion (DX) coils in them because the performance of
11 [C]
drybulb temperature the DX coil (for example a Type42 performance map) requires
the coil inlet conditions (and ambient dry bulb temperature) in
order to return COP.

The wet bulb temperature of air exiting the preheat coil and
entering the cooling coil. This output is needed for AHUs with
Cooling coil inlet direct expansion (DX) coils in them because the performance of
12 [C]
wetbulb temperature the DX coil (for example a Type42 performance map) requires
the coil inlet conditions (and ambient dry bulb temperature) in
order to return COP.

The wet bulb temperature of air exiting the preheat coil and
entering the cooling coil. This output is needed for AHUs with
Cooling coil inlet direct expansion (DX) coils in them because the performance of
13 [%]
relative humidity the DX coil (for example a Type42 performance map) requires
the coil inlet conditions (and ambient dry bulb temperature) in
order to return COP.

4–259
TRNSYS 18 – Mathematical Reference

Central unit outlet The dry bulb temperature of the air being supplied by the central
14 [C]
temperature unit to the zone boxes.

Central unit outlet The relative humidity of the air being supplied by the central unit
15 [%]
relative humidity to the zone boxes.

Central unit outlet


16 [C] The dry bulb temperature of the air leaving the central unit.
temperature

Terminal unit fan


17 [kJ/h] The total fan power consumed by all of the terminal boxes.
power

The next six outputs are cycled, once for each VAV box (specified by parameter 1)

The rate at which energy must be added back to the zone model
to account for load not met by the AHU. This output is also used
Unmet /additional load to send additional load caused by the supply air temperature
18 [kJ/hr]
for zone being below zone temperature back to the zone model.This
output is cycled based on the value of the “number of zones”
parameter.

The rate at which moisture must be added back to the specified


zone due to latent energy effects in the air handler. This output
19 Latent addition rate [kg/hr]
is cycled based on the value of the “number of zones”
parameter.

Zone supply air flow The volumetric flow rate of air to each zone. This output is
20 [l/s]
rate cycled based on the value of the “number of zones” parameter.

The fractional volumetric flow rate of air to each zone. The


fractional flow rate is defined as the current volumetric flow rate
Fractional zone supply
21 [-] divided by the zone's maximum allowable volumetric flow rate.
air flow rate
This output is cycled based on the value of the “number of
zones” parameter.

The amount of reheat energy required by each zone. This output


Zone reheat energy
22 [kJ/hr] is cycled based on the value of the “number of zones”
required
parameter.

Terminal unit fan


23 [kJ/h] The fan power consumed by the terminal box in each zone.
power for zone

4.3.24.2. Simulation Summary Report Contents


VALUE FIELDS

Minimum possible flow [L/s] This field is taken from the parameter values set for each zone.
rate for each box

Maximum possible flow [L/s] This field is taken from the parameter values set for each zone.
rate for each box

Design fan flow rate [L/s] The value of parameter 4

Design fan power [kW] The value of parameter 7

4–260
TRNSYS 18 – Mathematical Reference

TEXT FIELDS

Economizer n/a This field has a value of either “active” or “none” depending on the value
of parameter 2

Preheat Coil n/a This field has a value of either “active” or “none” depending on the value
of parameter 3

INTEGRATED VALUE FIELDS

Reheat coil load [kWh] The load on each of the VAV box reheat coils.

Terminal unit fan [kWh] The power consumed by each terminal unit (box) fan.
power

Fan energy [kWh] The energy consumed by the central unit fan.
consumption

Preheat coil load [kWh] The load on the central preheat coil

Cooling coil total load [kWh] The total energy (sensible plus latent) removed by the central cooling
coil.

Cooling coil sensible [kWh] The sensible energy removed by the central cooling coil.
load

Combined reheat coil [kWh] The total load on all VAV box reheat coils
load

Combined PFP Box [kWh] The power consumed by all VAV box fans.
Fan Energy
Consumption

MINIMUM/MAXIMUM VALUE FIELDS

Box flow during [L/s] The minimum and maximum flow rate through each box during the
operation course of the simulation.

Central unit supply air [C] The minimum and maximum temperature delivered by the central unit to
temperature the VAV boxes during the course of the simulation.

4.3.24.3. Hints and Tips


 When zones undergo a setup or setback temperature during night time it is important to capacity limit
the Type56 HEATING and COOLING types in each zone so that they are not able to recover from the
setup/setback instantaneously in the morning. To do this, define a separate HEATING and a separate
COOLING type for each Type56 zone and limit its capacity based on the current VAV supply
temperature and the maximum box flow rate.
 Type152 includes an “unmet load” output. This output needs to be connected back to the building
model (usually by means of a time delay component). The reason is that often a VAV system
distributes cold air to all zones of the building at all times. If any zones require heating then heating is
provided at the distribution point (the VAV box). What this means from a simulation point of view is
that some cold air is blown into the zones at all times. This cold air constitutes a negative energy gain
(an energy loss) in the zone that must be accounted for by the building mode (usually Type56). For
the sake of convenience we use the "unmet load" outputs from Type152 to pass back to the building.

4–261
TRNSYS 18 – Mathematical Reference

When looking for unmet load hours as required by standards such as ASHRAE 90.1 you should not
use the unmet load output but should instead use another component (such as Type584 in the TESS
Utility library) to determine when the zone temperature falls below or above the setpoints.

4.3.24.4. Nomenclature
Cp air [kJ/kg.K] Specific heat of dry air

f economizer [0..1] The fraction of outdoor air that can be used in economizer mode.

f overflow [0..1] A fraction that limits the volumetric flow of air through the air handler to the design flow rate.

f underflow [0..1] A fraction that sets the quantity of outdoor air being mixed into the return air at the air handler.

hair ,i [kJ/kg] Enthalpy of air in zone i

hair ,mixed [kJ/kg] Enthalpy of the mixed return and outside air entering the air handler fan.

hair ,ret,i [kJ/kg] Enthalpy of air returning from zone i (affected by return air energy gains/losses)

hbulk ,ret [kJ/kg] Enthalpy of the return air entering the air handler.

hClCoil ,out [kJ/kg] Enthalpy of air exiting the cooiling coil in the air handler.

h fan,out [kJ/kg] Enthalpy of air exiting the fan in the air handler.

hHtCoil ,out [kJ/kg] Enthalpy of air exiting the heating coil in the air handler.

hOA [kJ/kg] Enthalpy of outside air.

hpreheat,out [kJ/kg] Enthalpy of air exiting the preheat coil.

m OA [kg/h] Mass flow rate of outside air

m air ,mixed [kg/h] Mass flow rate of the mixed return and outside air entering the air handler fan.

m air ,ret [kg/h] Mass flow rate of return air entering the air handler

m air ,ret,i [kg/h] Mass flow rate of air returning from zone i

m water,i [kg/h] Mass flow rate of water added to or removed from the supply air to zone i.

P fan [kJ/h] Power of the fan motor at design conditions.

qClCoil ,sens [kJ/h] Sensible energy removed from the air stream by the air handler’s cooling coil

qClCoil ,tot [kJ/h] Total (sensible plus latent) energy removed from the air stream by the air handler’s cooling coil

qdelivered,sens [kJ/h] Sensible energy delivered to the zones by the air handler.

q HtCoil ,sens [kJ/h] Sensible energy added to the air stream by the air handler’s heating coil

q HtCoil ,tot [kJ/h] Total (sensible plus latent) energy added to the air stream by the air handler’s heating coil.

qOA,sens [kJ/h] Sensible energy added to (or removed from) the air supply stream by mixing in outdoor air.

qOA,tot [kJ/h]
Total energy (sensible and latent) added to (or removed from) the air supply stream by mixing
in outdoor air.

4–262
TRNSYS 18 – Mathematical Reference

qreheat,i [kJ/h] Sensible energy added to the air supply stream for zone i by the reheat coil in the air handler.

q ret,i [kJ/h] Sensible energy added to zone i's return air.

qunmet,i [kJ/h] Sensible load for zone i that could not be met by the air handler at the current time.

q zone,sens,i [kJ/h] Sensible load on zone i (an input to Type1249)

Tambient [C] Temperature of outside air entering the air handler.

Tair ,sply [C] Temperature ofair supplied by the air handler.

Tbulk ,ret [C] Temperature of the mixed air returning to the air handler.

TClCoil ,out [C] Temperature ofair exiting the air handler’s cooling coil.

THtCoil ,out [C] Temperature of air exiting the air handler’s heating coil.

Tpreheat,out [C] Temperature of air exiting the air handler’s preheat coil.

Tzone ,i [C] Temperature of zone i.

vair ,i [L/s] Volumetric flow rate of air supplied to zone i.

vdesign [L/s] Volumetric flow rate of air of the air handler under design conditions.

veconomizer [L/s] Volumetric flow rate of air entering the economizer (if present) in the air handler.

vOA [L/s] Volumetric flow rate of air of outside air

vmax,i [L/s] Maximum volumetric flow rate of air allowed to zone i

vtot ,req [L/s] Volumetric flow rate of air required by all zones.

 air [kg/m3] Density of dry air

air,mixed [kgH2O/kgAir] Absolute humidity ratio of the mixed outside and return air entering the air handler.

air ,ret,i [kgH2O/kgAir] Absolute humidity ratio of air returning from zone i.

bulk ,ret [kgH2O/kgAir] Absolute humidity ratio of the return air entering the air handler.

ClCoil ,out [kgH2O/kgAir] Absolute humidity ratio of air leaving the cooling coil in the air handler.

 fan,out [kgH2O/kgAir] Absolute humidity ratio of air leaving the fan in the air handler.

HtCoil ,out [kgH2O/kgAir] Absolute humidity ratio of air leaving the heating coil in the air handler.

zone,i [kgH2O/kgAir] Absolute humidity ratio of zone i.

4.3.24.5. Detailed Description


Unlike many of the TRNSYS HVAC components, Type152 is an energy rate control device. In energy rate
control a zone temperature is predefined and the building model calculates the amount of sensible and
latent energy that the HVAC system would have to add to or remove from the space over the course of the
timestep in order to maintain that space temperature. That amount of energy (called the “load”) is then
imposed on the central air handler’s coils. Type152 takes the sensible load as an input, using a sign

4–263
TRNSYS 18 – Mathematical Reference

convention that is designed to make it compatible with Type56’s NTYPE2 output (QSENS). Heating loads
are negative values while cooling loads are positive values. It also takes the temperature and relative
humidity of each zone. The user specifies a minimum and maximum allowable volumetric flow rate to each
zone and a design outdoor air fraction. Based on current conditions, Type152 determines an air handler
supply temperature and a volumetric flow rate to each zone that it serves. It calculates the total load on the
air handler’s preheat coil, and cooling coil and the load on any VAV box reheat coils, providing each of
these as an output. These total loads can then be imposed by the user on whatever flow streams the central
plant provides to the air handler. In most cases, the flow streams will likely be hot and cold water. However,
it may be that heating is provided by steam, in which case the heating loads (preheat and reheat) would be
imposed on a steam flow. It may be that reheat is provided by hot water to each of the VAV boxes. In some
applications, however, reheat is by electric coil. How the user models the central plant is largely up to them.
The basic idea, however, of “imposing loads on a flow stream” is that a central plant supplies a conditioned
fluid (for example, water at 6.7C) to the air handler’s cooling coil. The cooling coil removes a certain amount
of energy from the air stream and dumps it into the chilled water stream. Consequently, the chilled water
stream returns to the central plant warmer. The most basic equation for imposing a cooling load on a chilled
water stream is:
𝑞̇ 𝐶𝑙𝐿𝑜𝑎𝑑
𝑇𝑐𝑤,𝑟𝑒𝑡𝑢𝑟𝑛 = 𝑇𝑐𝑤,𝑠𝑢𝑝𝑝𝑙𝑦 + Eq. 4.3.24-1
𝑚̇𝑤𝑎𝑡𝑒𝑟 𝐶𝑝𝑤𝑎𝑡𝑒𝑟
Since the sign for a heating load is a negative value of q, the above equation holds true for heating loads
as well.

STEP 1: ZONE CONDITIONS


At each iteration, Type152 first fully determines the properties of the ambient air and the air in each zone
by means of calls to the TRNSYS psychrometrics routine. The psychrometrics routine is called with ambient
absolute pressure, temperature, and relative humidity. It returns the absolute humidity ratio and enthalpy
for the ambient and for each building zone. These values will be used in subsequent calculations as
explained below.
If none of the zones report a load (either heating or cooling) and the fraction of outdoor air currently required
(according to input 6) is zero then the air handler is shut down.

STEP 2: SUPPLY AIR TEMPERATURE


If Type152 determines that there is no cooling load and no heating load and the required outdoor air fraction
is 0 then it turns off the central unit and all zone box fans. If there is a heating load but no cooling load and
no required outdoor air then the individual boxes may be on so as to use their reheat coils to provide the
required heating energy. If there is either a requirement for outdoor air or a cooling load then Type152 sets
the supply air temperature to the maximum allowed value (according to input 4). If at least one zone does
report a cooling load then the supply air temperature from the central unit will be determined using:
𝑞̇ 𝑧𝑜𝑛𝑒,𝑠𝑒𝑛𝑠,𝑖
𝑇𝑎𝑖𝑟,𝑠𝑢𝑝𝑝𝑙𝑦 = 𝑀𝐼𝑁 (𝑇𝑧𝑜𝑛𝑒,𝑖 − ) Eq. 4.3.24-2
3.6𝜌𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 𝑣̇ 𝑚𝑎𝑥,𝑖
This formula finds the zone that has the greatest load on it at the current time and assumes that the zone
will receive its maximum possible flow (as specified by the model’s “maximum zonal airflow” parameter for
each zone). The formula determines the temperature of air that must be supplied at that air flow rate in
order to satisfy the zone load.

STEP 3: ZONE AIR FLOW RATE


Based on the supply air temperature, Type152 next calculates the flow rate required by each of the other
zones. If the zone is already colder than the supply air temperature, that zone’s flow rate gets set to the
minimum allowable value (as specified by the model’s “minimum zonal airflow” parameter for each zone).
If the zone temperature is at or above the supply air temperature then the zones flow rate is calculated by:

4–264
TRNSYS 18 – Mathematical Reference

𝑞̇ 𝑧𝑜𝑛𝑒,𝑠𝑒𝑛𝑠,𝑖
𝑣̇ 𝑎𝑖𝑟,𝑖 = Eq. 4.3.24-3
3.6𝜌𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 (𝑇𝑧𝑜𝑛𝑒,𝑖 − 𝑇𝑎𝑖𝑟,𝑠𝑢𝑝𝑝𝑙𝑦 )
If the calulated volumetric air flow is above the maximum for any zone, it is limited to that zone’s maximum.
The total air flow rate that must be supplied by the air handler (vtot,req) is simply the sum of the zonal
requirements.

STEP 4: FRESH AIR VOLUME CHECK


The quantity of outside (fresh) air required by the air handler is calculated by multiplying the total design air
flow rate parameter by the current value of the “fraction of outside air” input. Note that it is the design dry
air flow rate that sets the required quantity of outdoor air in this step. If the building requires very little flow
to its various zones at the current time, it may be that a high percentage of that air is fresh air. Type152
next checks to make sure that the design quantity of outdoor air does not exceed the total air flow required
by the system at the current time using the formula:
𝑣̇𝑜𝑎
𝑓𝑢𝑛𝑑𝑒𝑟𝑓𝑙𝑜𝑤 = Eq. 4.3.24-4
𝑣̇ 𝑡𝑜𝑡,𝑟𝑒𝑞
The underflow fraction is limited to a maximum value of 1. If the volumetric flow of outdoor air exceeds the
total required based on the Eq. 4.3.24-3 calculated requirements, total flow is increased to the outdoor air
amount (so as to satisfy energy code requirements for fresh air quantities).

STEP 5: AHU AIRFLOW VOLUME CHECK


The modified total required air is next checked to make sure that it does not exceed the total design
volumetric dry air flow rate (a parameter). If it does, the total air flow through the AHU is limited to the design
value and an overflow fraction is calculated:
𝑣̇ 𝑡𝑜𝑡,𝑟𝑒𝑞
𝑓𝑜𝑣𝑒𝑟𝑓𝑙𝑜𝑤 = Eq. 4.3.24-5
𝑣̇ 𝑑𝑒𝑠𝑖𝑔𝑛

STEP 6: ZONE AIR FLOW RECALCULATION


The flow to each of the zones in the building is next recalculated to take into account the impact of both
over and underflow:
𝑓𝑢𝑛𝑑𝑒𝑟𝑓𝑙𝑜𝑤
𝑣̇ 𝑎𝑖𝑟,𝑖 = 𝑣̇ 𝑎𝑖𝑟,𝑖 Eq. 4.3.24-6
𝑓𝑜𝑣𝑒𝑟𝑓𝑙𝑜𝑤

STEP 7: MIXED RETURN AIR


Now that the volumetric flow rate from the air handler to each zone in the building has been determined,
the conditions of the mixed return air can be calculated. The dry air mass flow rate of the return from a
given zone is:
𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖 = 3.6𝑣̇ 𝑎𝑖𝑟,𝑖 𝜌𝑎𝑖𝑟 Eq. 4.3.24-7

The enthalpy of the return air is the enthalpy of the zone air plus any energy that is added to the return air
divided by the mass flow rate of return air. Energy added to the return air is an input to the model for each
zone and allows the user to model situations in which energy gains from lighting ballasts and other
equipment located in the plenum space above each zone can heat up the return air or in which return air
ducts exposed to unheated attic spaces can cool down the return air:
𝑞̇ 𝑟𝑒𝑡,𝑖
ℎ𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖 = ℎ𝑎𝑖𝑟,𝑖 + Eq. 4.3.24-8
𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖
The return air enthalpy, the absolute humidity ratio of zone air, and the absolute pressure of ambient air
are used to fully determine the return air state by means of a call to the TRNSYS psychrometrics routine.

4–265
TRNSYS 18 – Mathematical Reference

The routine returns the temperature and relative humidity of the return air. Next, the enthalpy and humidity
ratio of the mixed return air are computed:
∑ ℎ𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖 𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖
ℎ𝑏𝑢𝑙𝑘,𝑟𝑒𝑡 = Eq. 4.3.24-9
𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡
∑ 𝜔𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖 𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡,𝑖
𝜔𝑏𝑢𝑙𝑘,𝑟𝑒𝑡 = Eq. 4.3.24-10
𝑚̇𝑎𝑖𝑟,𝑟𝑒𝑡
The psychrometrics routine is called again to determine the temperature and relative humidity of the mixed
return air.

STEP 8: ECONOMIZER OPERATION


Many VAV air handlers are equipped with air-side economizers. These devices monitor the ambient air and
if conditions are favorable increase the quantity of outside air over the design amount in order to reduce
the amount of air stream conditioning that would otherwise have to be accomplished by the heating and
cooling coils. If the “Economizer?” parameter is set to 1, then the outdoor air fraction is calculated as:
𝑇𝑎𝑖𝑟,𝑠𝑝𝑙𝑦 − 𝑇𝑏𝑢𝑙𝑘,𝑟𝑒𝑡
𝑓𝑒𝑐𝑜𝑛𝑜𝑚𝑖𝑧𝑒𝑟 = Eq. 4.3.24-11
𝑇𝑎𝑚𝑏𝑖𝑒𝑛𝑡 − 𝑇𝑏𝑢𝑙𝑘,𝑟𝑒𝑡
𝑣̇ 𝑒𝑐𝑜𝑛𝑜𝑚𝑖𝑧𝑒𝑟 = 𝑓𝑒𝑐𝑜𝑛𝑜𝑚𝑖𝑧𝑒𝑟 𝑣̇ 𝑡𝑜𝑡,𝑟𝑒𝑞 Eq. 4.3.24-12

STEP 9: MIXED AIR


The return and fresh air are next mixed together. The quantity of outdoor air is the maximum of the amounts
calculated in steps 4 and 8. The mixed air enthalpy and humidity ratios are computed and the
psychrometrics routine is called to determine the mixed air temperature, and relative humidity. At this point
the “total load due to outside air” and “sensible load due to outside air” outputs are computed:
𝑞̇ 𝑜𝑎,𝑡𝑜𝑡 = 𝑚̇𝑜𝑎 (ℎ𝑜𝑎 − ℎ𝑏𝑢𝑙𝑘,𝑟𝑒𝑡 ) Eq. 4.3.24-13

𝑞̇ 𝑜𝑎,𝑠𝑒𝑛𝑠 = 𝑚̇𝑜𝑎 𝐶𝑝𝑎𝑖𝑟 (𝑇𝑎𝑚𝑏𝑖𝑒𝑛𝑡 − 𝑇𝑏𝑢𝑙𝑘,𝑟𝑒𝑡 ) Eq. 4.3.24-14

STEP 10: FAN EFFECTS


Once the return and outside air streams have been mixed, the fan effects are next assessed. Where a
number of TRNSYS fan models allow the user to specify whether the fan motor is inside or outside the air
stream, this model assumes that the fan and motor (and thus the energy gain from the motor inefficiency)
are in the mixed air stream. The fan is assumed to be variable speed; its part load ratio is determined by
dividing the current system volumetric flow rate by the air handler’s design volumetric flow rate. The fan
efficiency at the current PLR is then interpolated based on values read from Type152’s fan efficiency data
file. The energy gain and humidity ratio in the air stream across the fan are then:
̇
𝑃𝑓𝑎𝑛
ℎ𝑓𝑎𝑛,𝑜𝑢𝑡 = ℎ𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 + Eq. 4.3.24-15
𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑
𝜔𝑓𝑎𝑛,𝑜𝑢𝑡 = 𝜔𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 Eq. 4.3.24-16

The psychrometrics routine is again called, this time with pressure, enthalpy and humidity ratio in order to
fully determine the air state exiting the fan. The psychrometrics routine returns the temperature and relative
humidity.

STEP 11: PREHEAT COIL


The user can include a preheat coil in the air handler by setting the “Preheat coil?” parameter to 1. If this
parameter has a value of 0, no preheat coil will be included and this step is skipped. The preheat coil in the
air handler acts to bring the air stream temperature up to the desired supply temperature if necessary. The
preheat coil outlet temperature is set as the supply temperature, the preheat coil outlet humidity ratio is set
as the fan outlet humidity ratio (from step 10) and the psychrometrics routine is called to determine the

4–266
TRNSYS 18 – Mathematical Reference

relative humidity and enthalpy of air exiting the preheat coil. The preheat coil energy (an output) is then set
by:
𝑞̇ 𝑝𝑟𝑒ℎ𝑒𝑎𝑡 = 𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 (ℎ𝑝𝑟𝑒ℎ𝑒𝑎𝑡,𝑜𝑢𝑡 − ℎ𝑓𝑎𝑛,𝑜𝑢𝑡 ) Eq. 4.3.24-17

STEP 12: COOLING COIL


If the air stream temperature exiting the preheat coil is above the desired supply temperature, the cooling
coil brings it down. The psychrometrics routine is called with the desired supply temperature, and the
humidity ratio of the air exiting the preheat coil. The psychrometrics routine returns RH, humidity ratio, and
enthalpy. One of the features of the TRNSYS psychrometrics routine is that if the routine is called with air
conditions that are not physically possible (usually because those conditions are beyond the saturation line
on the psychrometric chart) then based on one of the arguments in the call, the routine will reset one of the
two values to the saturated conditions at the other value. In the present case, the desired supply
temperature and the humidity ratio of air exiting the preheat coil will almost always result in saturation (as
air cools, it is able to hold less moisture and condensation occurs). When the psychrometrics routine returns
its values, it will reset the humidity ratio to the saturation humidity ratio at the desired supply temperature
and the RH will return as 100%. Type152 makes a further check at this point. If the returned RH is greater
than 99%, Type151 resets the RH to 99% and calls the psychrometrics routine once more. Psychrometrics
returns the enthalpy and humidity ratio. The cooling coil total and sensible energy transfer is then calculated:
𝑞̇ 𝐶𝑙𝐶𝑜𝑖𝑙,𝑡𝑜𝑡 = 𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 (ℎ𝑝𝑟𝑒ℎ𝑒𝑎𝑡,𝑜𝑢𝑡 − ℎ𝐶𝑙𝐶𝑜𝑖𝑙,𝑜𝑢𝑡 ) Eq. 4.3.24-18

𝑞̇ 𝐶𝑙𝐶𝑜𝑖𝑙𝑆𝑒𝑛𝑠 = 𝑚̇𝑎𝑖𝑟,𝑚𝑖𝑥𝑒𝑑 𝐶𝑝𝑎𝑖𝑟 (𝑇𝑝𝑟𝑒ℎ𝑒𝑎𝑡,𝑜𝑢𝑡 − 𝑇𝐶𝑙𝐶𝑜𝑖𝑙,𝑜𝑢𝑡 ) Eq. 4.3.24-19

Note that the temperature differences are written such that the cooling coil energy transfer is a positive
value when energy is removed from the air stream.

STEP 13: REHEAT


In order to compute the reheat needs of zones whose minimum VAV box flow rate and the supply
temperature would result in overcooling, the sensible energy delivered to each zone is calculated as:
𝑞̇ 𝑑𝑒𝑙𝑖𝑣𝑒𝑟𝑒𝑑,𝑠𝑒𝑛𝑠 = −3.6𝑣̇ 𝑎𝑖𝑟,𝑖 𝜌𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 (𝑇𝑧𝑜𝑛𝑒,𝑖 − 𝑇𝑎𝑖𝑟,𝑠𝑝𝑙𝑦 ) Eq. 4.3.24-20

The amount of reheat energy required by a given zone is then:


𝑞̇ 𝑟𝑒ℎ𝑒𝑎𝑡,𝑖 = 𝑀𝐴𝑋(0, −𝑞̇ 𝑑𝑒𝑙𝑖𝑣𝑒𝑟𝑒𝑑,𝑠𝑒𝑛𝑠,𝑖 − 𝑞̇ 𝑧𝑜𝑛𝑒,𝑠𝑒𝑛𝑠,𝑖 − 𝑝̇𝑏𝑜𝑥𝑓𝑎𝑛,𝑖 ) Eq. 4.3.24-21

In the above equation, the sensible cooling energy required by each zone (q zone,sens,i) is taken from the
inputs to the model. The power drawn by the box fans is assumed to result in a temperature rise in the air
stream. The box fans are assumed to be constant volume such that when on they always draw the same
power (as specified for each zone among the Type’s parameters).
The user may limit the amount of reheat that each box may provide or may set the reheat capacity of one
or more boxes to a value of “-1” indicating that the reheat capacity is unlimited.

STEP 14: MOISTURE ADDITION RATE


Once Type152 has converged on a supply air temperature, it computes the rate at which the air handler is
removing moisture from the supply air to each zone. The total moisture removed is the sum of the zonal
quantities:
𝑚̇𝑤𝑎𝑡𝑒𝑟,𝑖 = −3.6𝑣̇ 𝑎𝑖𝑟,𝑖 𝜌𝑎𝑖𝑟 (𝜔𝑧𝑜𝑛𝑒,𝑖 − 𝜔𝐶𝑙𝐶𝑜𝑖𝑙,𝑜𝑢𝑡 ) Eq. 4.3.24-22

The sign convention of the mass flow rate is such that a positive result would indicate that the air handler
is adding moisture to the air stream, which is almost never the case. However, writing this term as moisture
addition (where a negative result indicates moisture removal) fits with the Type56 sign convention in which
a negative moisture gain can be specified as a dehumidification rate for a thermal zone.

STEP 15: UNMET LOAD

4–267
TRNSYS 18 – Mathematical Reference

Lastly, Type152 performs a sensible energy balance in order to make sure that the zone loads were met.
In this case:
𝑞̇ 𝑢𝑛𝑚𝑒𝑡,𝑖 = 𝑞̇ 𝑧𝑜𝑛𝑒,𝑠𝑒𝑛𝑠,𝑖 + 𝑞̇ 𝑑𝑒𝑙𝑖𝑣𝑒𝑟𝑒𝑑,𝑠𝑒𝑛𝑠,𝑖 + 𝑞̇ 𝑟𝑒ℎ𝑒𝑎𝑡,𝑖 + 𝑝̇𝑏𝑜𝑥𝑓𝑎𝑛,𝑖 Eq. 4.3.24-23

Any unmet load should be returned to the building mode (normally Type56), usually with a one time step
delay in order to promote convergence. Note: it is important, therefore, to use a short time step such as 5
minutes. Note that the energy provided by the reheat coils and by fans in the VAV boxes is added in to the
“unmet load” term here. This is done for convenience and to avoid additional connections between the VAV
model and the building model. The reheat energy added must get back to the building model so that the
zone temperatures are correctly computed for its addition but it is understood that reheat does not really
constitute an unmet zone load.

4–268
TRNSYS 18 – Mathematical Reference

4.3.25. Type 161: Cooling Tower (Single Speed, Internal


Control)
Type 161 estimates the performance of a cooling tower without any detailed parameters of the tower
configuration. Instead it uses the design inlet and outlet conditions to calculate an overall heat transfer
coefficient (UA) for the tower and then uses that UA value to estimate performance at other inlet conditions.
This version calculates the performance of a single speed cooling tower that provides cooling to the fluid
stream with the fan on and fan off (natural convection). In this version of the cooling tower, the desired
temperature of the fluid leaving the tower is an input. The model then determines which speed (off, natural
convection, or fan operating) creates a temperature colder than the setpoint. If the capacity needed to cool
the fluid down to the setpoint exceeds the capacity of the tower at the inlet conditions, the model calculates
the leaving fluid temperature with the fan on.

4.3.25.1. Parameter/Input/Output Reference


PARAMETERS

1 Design Atmospheric [atm] The pressure of the atmosphere for the cooling tower air at design
Pressure conditions.

2 Design Inlet Fluid [C] The temperature of the fluid entering the cooling tower at design
Temperature conditions.

3 Design Outlet Fluid [C] The temperature of the fluid temperature exiting the cooling tower
Temperature at design conditions.

4 Design Fluid Flow Rate [kg/h] The flow rate of the fluid through the tower at design conditions.

5 Design Entering Air [C] The wet bulb temperature of the air entering the cooling tower at
Wet Bulb Temperature design conditions.

6 Design Air Flow Rate [kg/h] The flow rate of the air through the cooling tower at design
conditions.

7 Design Fan Power [kJ/h] The power consumed by the fan at design conditions.

8 Natural Convection [-] The fraction of the design airflow though the tower when the fan is
Airflow Fraction off and the tower is operating in natural convection mode.

9 Natural Convection [-] The fraction of the design capacity of the tower when the fan is off
Capacity Fraction and the tower is operating in natural convection mode.

INPUTS

1 Entering Fluid [C] The temperature of the fluid entering the cooling tower.
Temperature

2 Entering Fluid Flow [kg/h] The flow rate of fluid entering the cooling tower.
Rate

3 Entering Air Wet Blub [C] The wet bulb temperature of the air entering the cooling tower.
Temperature

4 Atmospheric Pressure [atm] The atmospheric pressure of the air in the cooling tower.

4–269
TRNSYS 18 – Mathematical Reference

5 Leaving Fluid Setpoint [C] The setpoint for the fluid leaving the tower. The tower will
operature at the lowest speed that creates a fluid leaving
temperature equal to or less than the setpoint.

OUTPUTS

1 Leaving Fluid [C] The temperature of the fluid leaving the cooling tower.
Temperature

2 Leaving Fluid Flow [kg/h] The flow rate of water exiting the tower sump.
Rate

3 Leaving Air Wet Bulb [C] The wet bulb temperature of the air leaving the cooling tower.
Temperature

4 Leaving Air Flow Rate [kg/h] The flow rate of the air leaving the cooling tower.

5 Fan Power [kJ/h] The power consumed by the fan.


Consumption

6 Fan Speed [-] The speed that the tower fan is operating to maintain the setpoint.

4.3.25.2. Simulation Summary Report Contents


VALUE FIELDS

UA at Design [kJ/h K] The calculated UA based on the design full flow conditions.
Conditions

UA in Natural [kJ/h K] The calculated UA for the fan off performance.


Convection

INTEGRATED VALUE FIELDS

Fan Power [kJ] Output 5

MINIMUM/MAXIMUM VALUE FIELDS

Fluid Setpoint [C] Minimum and maximum of Input 5

Fluid Outlet [C] Minimum and maximum of Output 1


Temperature

Fluid Flow Rate [kg/h] Minimum and maximum of Output 2

Fan Speed [-] Minimum and maximum of Output 6

4.3.25.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4–270
TRNSYS 18 – Mathematical Reference

4.3.25.4. Detailed Description


Based on the specified inlet design conditions, the component iterates to find a UA value that provides the
specified design outlet fluid temperature. An UA value is determined for both fan operating and natural
convection performance modes. The UA values are only calculated once per simulation.
On an iterative call to the component, if the inlet water temperature is below the setpoint temperature the
tower is considered off and the outlet water temperature is set to the inlet water temperature. If the inlet
water temperature is above the setpoint temperature the outlet temperature at the fan-off (natural
convection) operation mode is calculated. If this temperature is below the setpoint the calculations are
finished, otherwise the performance for the fan-on mode is calculated. If the fan-on operation does not
meet the setpoint, the model reports the outlet temperature that is achieved by the fan-on performance and
not the setpoint temperature.
The performance calculations of the cooling tower are discussed in the mathematical reference for Type
126.

4–271
TRNSYS 18 – Mathematical Reference

4.3.26. Type 162: Detailed Cooling Tower (Variable speed,


Internal or External Control)
In a cooling tower, a hot water stream is in direct contact with an air stream and cooled as a result of
sensible heat transfer due to temperature differences with the air and mass transfer resulting from
evaporation to the air. The air and water streams may be configured in either counterflow or crossflow
arrangements. Figure 4.3.26–1 shows a schematic of a counterflow forced-draft cooling tower. Ambient air
is drawn upward through the falling water. Most towers contain a fill material that increases the water
surface area in contact with the air. A cooling tower is usually composed of several tower cells that are in
parallel and share a common sump. Water loss from the tower cells is replaced with make-up water to the
sump.
Air
m Ta,o  a,o
a

Wat er
m Tw,i
w,i

Air
mw,o Tw,o

m a Ta,i  a,i
Ts Sump

Figure 4.3.26–1: Schematic of a Single Cell Counterflow Cooling Tower

4.3.26.1. Parameter/Input/Output Reference


PARAMETERS

1 Calculation Mode [-] The mode that determines whether the performance data will be
read from an external data file (=2) or that the user will supply the
coefficients of the mass transfer relationship to be used in the
analysis (=1)

2 Flow Geometry [-] The flow geometry for the cooling tower (1 = Counterflow geometry,
2 = Crossflow geometry).

3 Number of Tower Cells [-] The number of identical tower cells that make up the cooling tower.

4 Maximum Cell Flow [m3/h] The maximum volumetric air flow rate for each cell.
Rate

5 Fan Power at [kW] The power consumed by one cell fan at the maximum volumetric
Maximum Flow air flow rate specified.

6 Natural Convection [m3/h] The constant volumetric flow rate of air per cell when a cell is
Cell Flow Rate operating in its natural convection mode.

4–272
TRNSYS 18 – Mathematical Reference

7 Sump Volume [m3] The sump volume for the cooling tower. Set this parameter to -1 if a
steady state analysis is to be used for the sump temperature.

8 Initial Sump [C] The temperature of the sump at the beginning of the simulation.
Temperature

For Calculation Mode = 1

9 Mass Transfer [-] The constant used in the relationship between flow rate and heat
Coefficient transfer coefficient.

10 Mass Transfer [-] The exponent used in the relationship between the mass flow rate
Exponent and the heat transfer coefficient.

11 Print Performance [-] The mode for writing the results from the curve-fit and the
Results? performance data to the output file (1 = Print the results to the
output file, 2 = Don't print the results).

For Calculation Mode = 2

9 Logical Unit [-] The logical unit through which the tower performance data will be
read. Each external file that TRNSYS reads from or writes to must
be assigned a unique logical unit in the TRNSYS input file.

10 Number of Data Points [-] The number of data points that will be read from the external
cooling tower performance data file.

11 Print Performance [-] The mode for writing the results from the curve-fit and the
Results? performance data to the output file (1 = Print the results to the
output file, 2 = Don't print the results).

INPUTS

1 Water Inlet [C] The temperature of the water entering the cooling tower.
Temperature

2 Inlet Water Flow Rate [kg/h] The flow rate of water entering the cooling tower.

3 Dry Bulb Temperature [C] The dry bulb temperature of the air entering the cooling tower.

4 Wet Bulb Temperature [C] The wet bulb temperature of the air entering the cooling tower.

5 Sum Make-Up [C] The temperature of the replacement water entering the sump.
Temperature

6 Relative Fan Speed for [-] The relative fan speed (fraction of maximum volumetric flow) of the
Cell specified tower cell. Set this input to -1 if the tower is operating in
natural convection mode.

OUTPUTS

1 Sump Temperature [C] The temperature of the tower sump.

2 Sump Flow Rate [kg/h] The flow rate of water exiting the tower sump.

4–273
TRNSYS 18 – Mathematical Reference

3 Fan Power Required [kW] The total fan power requirement for the cooling tower.

4 Heat Rejection Rate [kJ/h] The rate at which energy is transferred to the air stream from the
tower cells.

5 Cell Outlet [C] The effective mixed outlet temperature of the water from the tower
Temperature cells that is the inlet to the sump.

6 Water Loss Rate [kg/h] The rate at which water is evaporated into the air stream from the
cooling tower cells.

7 Outlet Air Dry Bulb [C] The bulk dry bulb temperature of the air exiting the cooling tower.

8 Outlet Air Wet Bulb [C] The bulk wet bulb temperature of the air exiting the cooling tower.

9 Outlet Humidity Ratio [-] The bulk humidity ratio (kg's of H2O / kg of dry air) of the air exiting
the cooling tower.

10 Outlet Air Flow Rate [kg/h] The flow rate of dry air exiting the cooling tower.

11 Change in Internal [kJ] The change in internal energy of the sump since the beginning of
Energy the simulation. The internal energy change is an energy term and
not an energy rate and therefore should not be integrated.

4.3.26.2. Simulation Summary Report Contents


VALUE FIELDS

Number of Cells [-] Parameter 3

Maximum Airflow per [C] Parameter 4


Cell

Minimum (Natural [C] Parameter 6


Convection) Airflow
per Cell

Fan Power per Cell at [kW] Parameter 5


Maximum Flow

Sump Volume [m3/h] Parameter 7

Sump Overall Thermal [kJ/h K] Variant


Loss Coefficient

Mass Transfer [-] Parameter 9 – or calculated from external data


Constant

Mass Transfer [-] Parameter 10 – or calculated from external data


Exponent

TEXT FIELDS

Data Mode [-] Parameter 1

4–274
TRNSYS 18 – Mathematical Reference

Flow Geometry Mode [-] Parameter 2

Control Mode [-] Variant

INTEGRATED VALUE FIELDS

Fan Power [kWh] Output 3


Consumption

Tower Energy [kJ] Output 4


Rejection

Water Loss [kg] Output 6

MINIMUM/MAXIMUM VALUE FIELDS

Tower Water Outlet [C] Minimum and maximum of output 5


Temperature

Sump Temperature [C] Minimum and maximum of output 1

For Each Tower Cell

Relative Fan Speed of [0..1] Minimum and maximum of output 5


Each Cell

4.3.26.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.3.26.4. Nomenclature
AV surface area of water droplets per tower cell exchange volume
Cpw constant pressure specific heat of water
Cs average derivative of saturation air enthalpy with respect to temperature
ha enthalpy of moist air per mass of dry air
hD mass transfer coefficient
hs enthalpy of saturated air
ma mass flow rate of dry air
mw mass flow rate of water
Ncell number of tower cells operating
Ntu mass transfer number of transfer units
Q cell overall tower cell heat transfer rate
Ta air temperature
Tmain temperature of water make-up to sump
Ts fully-mixed sump temperature
Tw water temperature
Twb ambient air wet bulb temperature
Tref water reference temperature (0 ° C)
Vcell total tower cell exchange volume

4–275
TRNSYS 18 – Mathematical Reference

Vs total volume of water in sump


a air humidity ratio
s humidity of saturated air
a air-side heat transfer effectiveness
w water density
SUBSCRIPTS:
a Air stream conditions
e Effective
i Inlet conditions
o Outlet conditions
w Water stream conditions
exit Combined exit air conditions

4.3.26.5. Detailed Description


This component models the performance of a multiple-cell counterflow or crossflow cooling tower and
sump. There are two primary modes for this model. In the first mode, the user enters the coefficients of
the mass transfer correlation, c and n. Although this data is difficult to obtain, the ASHRAE Equipment
Guide (1) and Simpson and Sherwood (2) give some typical data. In the second mode, the user enters
overall performance data for the cooling tower and the model determines the parameters c and n that
provide a best fit to the data in a least-squares sense. Values for c and n are output and can be used in
subsequent simulations instead of the program recalculating them.
In mode 2, the user specifies parameters for the Fortran logical unit associated with a data file and the
number of data points to be supplied. Each line of Input in the data file has the six items summarized in
Table 4.3.26.4–1.
Table 4.3.26.4–1: Tower Performance Data Input
Data Variable Description Units
Item
1 Va air volumetric flow rate m3/hr
2 Ta,i air dry bulb temperature C
3 Twb air wet bulb temperature C
4 m w,i water mass flow rate kg/hr
5 Tw,i water inlet temperature C
6 Tw,o water outlet temperature C

A minimum of 2 and a maximum of 50 data points are required. The correlation used in this program is in
terms of the ratio of the mass flow rate of water to the mass flow rate of air. The data must contain at least
two different flow rate ratios in order for the program to correlate the data. For best results, the performance
data should cover a range of conditions typical of the expected operation of the tower.
The provided Type162 example data file shown below was created from a manufacturer’s nominal 240 ton
cooling tower:

128017 31.61 23.33 108792.40 35.00 26.67


128017 35.67 26.67 111290.76 37.78 29.44
128017 30.28 22.22 125826.70 35.00 26.67
128017 34.28 25.56 131277.67 37.78 29.44
128017 31.61 23.33 134911.66 32.22 26.67
128017 35.67 26.67 136501.52 35.00 29.44
128017 28.94 21.11 141271.13 35.00 26.67
128017 32.94 24.44 149220.47 37.78 29.44

4–276
TRNSYS 18 – Mathematical Reference

128017 27.56 20.00 155807.06 35.00 26.67


128017 30.28 22.22 158078.30 32.22 26.67
128017 34.28 25.56 163529.28 35.00 29.44
128017 31.61 23.33 165573.40 37.78 29.44
128017 26.22 18.89 169207.38 35.00 26.67
128017 28.94 21.11 179427.96 32.22 26.67
128017 30.28 22.22 180790.70 37.78 29.44
128017 28.94 21.11 194872.39 37.78 29.44
128017 27.56 20.00 199187.75 32.22 26.67
128017 27.56 20.00 208045.58 37.78 29.44
128017 31.61 23.33 210316.82 35.00 29.44
128017 32.94 24.44 210543.95 35.00 29.44
128017 26.22 18.89 217584.79 32.22 26.67
128017 30.28 22.22 230757.98 35.00 29.44
128017 28.94 21.11 249609.28 35.00 29.44
128017 27.56 20.00 267097.82 35.00 29.44

Ai r Ef fecti venes s
h
 = a
a h
a,m ax
h
a,m ax
Humidity Ratio
h
a

T wb Ta,i Ta,o Tw,i


Temperature
Figure 4.3.26–2: Psychometric Chart for the Air States through a Cooling Tower

Tower Cell Heat Rejection


Figure 4.3.26–2 shows a hypothetical process on a psychometric chart for the air states through a cooling
tower. The air enters at a known state, characterized by a temperature, T a,i, and humidity ratio,a,i and exits
at Ta,o and a,o. The limiting exit state for the air would be if the air were saturated at a temperature equal
to that of the incoming water stream. This corresponds to the maximum possible enthalpy of the exit air.
Lines of constant enthalpy are shown for the air inlet and outlet and the saturated state corresponding to
the water inlet. In terms of these enthalpies, the air-side heat transfer effectiveness is defined as the ratio

4–277
TRNSYS 18 – Mathematical Reference

of the air enthalpy difference to the maximum possible air enthalpy difference. For a known effectiveness,
the heat rejection for an individual tower cell is then
𝑄𝑐𝑒𝑙𝑙 = 𝜀𝑎 𝑚𝑎 (ℎ𝑎,𝑤,𝑖 − ℎ𝑎,𝑖 ) Eq. 4.3.26-1

Using the assumption that the Lewis number equals one, Braun (3) has shown that the air effectiveness
can be determined using the relationships for sensible heat exchangers with modified definitions for the
number of transfer units and the capacitance rate ratios. For a counterflow cooling tower,
1 − 𝑒𝑥𝑝(−𝑁𝑇𝑈(1 − 𝑚∗ ))
𝜀𝑎 = Eq. 4.3.26-2
1 − 𝑚∗ 𝑒𝑥𝑝(−𝑁𝑇𝑈(1 − 𝑚∗ ))
and for the cross-flow cooling tower,
1
𝜀𝑎 = (1 − 𝑒𝑥𝑝 (−𝑚∗ (1 − 𝑒𝑥𝑝(−𝑁𝑇𝑈)))) Eq. 4.3.26-3
𝑚∗

where,
ℎ𝐷 𝐴𝑣 𝑉𝑐𝑒𝑙𝑙
𝑁𝑇𝑈 = Eq. 4.3.26-4
𝑚𝑎
𝑚𝑎 𝐶𝑠
𝑚∗ = Eq. 4.3.26-5
𝑚𝑤,𝑖 𝐶𝑝𝑤
The saturation specific heat, Cs, is defined as the average slope of the saturation enthalpy with respect to
temperature curve. It is determined with the water inlet and outlet conditions and psychometric data using
ℎ𝑠, 𝑤, 𝑖 − ℎ𝑠,𝑤,𝑜
𝐶𝑠 = Eq. 4.3.26-6
𝑇𝑤,𝑖 − 𝑇𝑤,𝑜
Tower Cell Performance Data
In order to determine tower effectiveness, it is necessary to have a relationship for the number of transfer
units. General correlations for heat and mass transfer in cooling towers in terms of the physical tower
characteristics are not readily available. As presented in the ASHRAE Equipment Guide (1), mass transfer
data is generally correlated in the form
ℎ𝐷 𝐴𝑉 𝑉𝑐𝑒𝑙𝑙 𝑚𝑤 𝑛
= 𝑐( ) Eq. 4.3.26-7
𝑚𝑤 𝑚𝑎
Multiplying both sides of the above equation by m w/ m a and utilizing the definition for NTU gives
𝑚𝑤 1+𝑛
𝑁𝑇𝑈 = 𝑐 ( ) Eq. 4.3.26-8
𝑚𝑎
The exponent n is typically between -0.35 and -1.1, while c may be in the range of 0.5 to 5. Simpson and
Sherwood (2) give data for a number of different tower designs. It is usually necessary to correlate specific
data in order to determine the parameters for a particular tower. This component correlates performance
data when in mode 2.
Tower Cell Exit Conditions
From an overall energy balance, the outlet temperature from a tower cell that is an inlet to the sump is
determined as
𝑚𝑤,𝑖 𝐶𝑝𝑤 (𝑇𝑤,𝑖 − 𝑇𝑟𝑒𝑓 ) − 𝑄𝑐𝑒𝑙𝑙
𝑇𝑤,𝑜 = + 𝑇𝑟𝑒𝑓 Eq. 4.3.26-9
𝑚𝑤,𝑜 𝐶𝑝𝑤
Most analyses neglect the water loss and assume that m w,o = mw,i. Generally, the water loss rate is on the
order of 1% to 4% of the entering water flow rate. Neglecting this loss can result in about a 1 degree Celsius
error in the exit water temperature. It is also necessary to know the water loss for analyzing the performance

4–278
TRNSYS 18 – Mathematical Reference

of the cooling tower sump, in order to incorporate the effects of water makeup. This component model
includes the effect of the water loss.
From an overall mass balance, the exit water flow rate is
𝑚𝑤,𝑜 = 𝑚𝑤,𝑖 − 𝑚𝑎 (𝜔𝑎,𝑜 − 𝜔𝑎,𝑖 ) Eq. 4.3.26-10

The exit humidity ratio is determined from an analytic solution to an equation for the mass transfer assuming
an effective water surface condition and a Lewis Number of unity (3).
𝜔𝑎,𝑜 = 𝜔𝑠,𝑤,𝑒 + (𝜔𝑎,𝑖 − 𝜔𝑠,𝑤,𝑒 )𝑒𝑥𝑝(−𝑁𝑇𝑈) Eq. 4.3.26-11

The effective saturation humidity ratio, s,w,e, is found with psychometric data using an effective saturation
enthalpy computed from the solution to the heat transfer equation.
ℎ𝑎,𝑜 − ℎ𝑎,𝑖
ℎ𝑠,𝑤,𝑒 = ℎ𝑎,𝑖 + Eq. 4.3.26-12
1 − 𝑒𝑥𝑝(−𝑁𝑇𝑈)
where,
ℎ𝑎,𝑜 = ℎ𝑎,𝑖 + 𝜀𝑎 (ℎ𝑠,𝑤,𝑖 − ℎ𝑎,𝑖 ) Eq. 4.3.26-13

To determine the air conditions exiting the tower, the exit air from each of the cells are combined to find
"bulk" air conditions. The total exiting air flow rate is the sum of the flow rates exiting the cells,
𝑁𝑐𝑒𝑙𝑙

𝑚̇𝑎,𝑒𝑥𝑖𝑡 = ∑ 𝑚̇𝑎,𝑘 Eq. 4.3.26-14


𝑘=1

The exiting enthalpy is found by summing the energy flow rates exiting the cells and dividing by the total air
flow rate,
𝑁
𝑐𝑒𝑙𝑙
∑𝑘=1 (𝑚̇𝑎 ℎ𝑎,𝑜 ) 𝑘 Eq. 4.3.26-15
ℎ𝑎,𝑒𝑥𝑖𝑡 =
𝑚̇𝑎,𝑒𝑥𝑖𝑡
From a mass balance on the moist air, an overall exit air humidity ratio can be calculated,
𝑁
𝑐𝑒𝑙𝑙
∑𝑘=1 (𝑚̇𝑤,𝑖 − 𝑚̇𝑤,𝑜 ) 𝑘 Eq. 4.3.26-16
𝜔𝑎,𝑒𝑥𝑖𝑡 = + 𝜔𝑎,𝑖
𝑚̇𝑎,𝑒𝑥𝑖𝑡
Using ha,exit and a,exit, psychometrics data is used to find the bulk dry bulb temperature, T a,exit, and the bulk
wet bulb temperature, Ta,exit.
Natural Convection Mode
Under certain conditions cooling towers are operated with the fans off, using natural convection to move
the air through the towers. This component allows a constant convective air flow rate to be specified as a
parameter. The natural convection mode of the model is used when -1 is input for the fan speed control
signal.

Sump and Fan Power Analyses


Water enters the sump from each of the operating tower cells and from a water make-up source. The level
of the sump is assumed to be constant, so that the flow of water make-up is equal to the total water loss
from the cells. The water volume of the sump is further assumed to be fully-mixed, so that an energy balance
is expressed as,

4–279
TRNSYS 18 – Mathematical Reference

𝑁𝑐𝑒𝑙𝑙
𝑑𝑇𝑠
𝜌𝑤 = ( ∑ (𝑚̇𝑤,𝑜 (𝑇𝑤,𝑜 − 𝑇𝑠 )) )
𝑑𝑡 𝑘
𝑘=1
𝑁𝑐𝑒𝑙𝑙 Eq. 4.3.26-17

+ ((𝑚̇𝑤,𝑖 − ∑ (𝑚̇𝑤,𝑜 )𝑘 ) − (𝑇𝑚𝑎𝑖𝑛 − 𝑇𝑠 ))


𝑘=1

If the user specifies a sump volume less than or equal to zero, the left-hand side of the energy balance
equation is set to zero and the steady-state sump temperature is computed.
The cooling tower fans are assumed to obey the fan laws. Given the power requirement at maximum fan
speed, the power consumption for a cooling tower consisting of N cell tower cells is calculated as
𝑁𝑐𝑒𝑙𝑙

𝑃𝑡𝑜𝑤𝑒𝑟 = ∑ 𝛾𝑘 3 𝑃𝑚𝑎𝑥,𝑘 Eq. 4.3.26-18


𝑘=1

where k and Pmax,k are the relative fan speed and maximum power for the k th tower cell.

4.3.26.6. References
1. ASHRAE Equipment Guide, American Society of Heating, Refrigerating, and Air Conditioning Engineers,
Atlanta, 1983.
2. Simpson, W.M. and Sherwood, T.K.,"Performance of Small Mechanical Draft Cooling Towers,"
Refrigerating Engineering, December, 1946.
3. Braun, J.E., “Methodologies for the Design and Control of Chilled Water Systems,” Ph. D. Thesis,
University of Wisconsin - Madison, 1988

4–280
TRNSYS 18 – Mathematical Reference

4.4. Hydrogen
Acknowledgements
The Hydrogen Systems components in this section are part of the HYDROGEMS library developed by
Øystein Ulleberg and Ronny Glöckner at the Institute for Energy Technology (IFE), Norway. The
components were originally integrated into the standard TRNSYS library for version 16.
Available Components
At the core of the Hydrogen Energy Systems library are two different fuel cell models, Type 170 and Type
173. Type 170 models a Proton Exchange Membrane Fuel Cell (PEMFC) and Type 173 models an Alkaline
Fuel Cell (AFC). Both models include detailed electrical, thermodynamic and thermal models and can
operate from Hydrogen and Air or Hydrogen and (pure) Oxygen.
Hydrogen storage is modeled by Type 164 (compressed gas tank). The model calculates the gas pressure
using the ideal gas law or the van der Waals equation of state for real gases.
Electricity generation from Hydrogen in an Advanced Alkaline Water Electrolyzer is modeled in Type 160.
The model is based on a combination of fundamental thermodynamics, heat transfer theory, and empirical
electrochemical relationships. A dynamic thermal model is also included.
The library also includes dedicated high level controllers (Type 100, electrolyzer controller, and Type 105,
Master level controller) and accessories (Type 167, multistage compressor).
Detailed Mathematical Reference
In addition to this manual, the Hydrogen Systems components mathematical description is provided as an
EES-based executable program which is included with TRNSYS. The program
(HydrogenSystemsDocumentation.exe) is located in "%TRNSYS18%\Documentation"
(where %TRNSYS18% is the TRNSYS 18 installation directory).

4–281
TRNSYS 18 – Mathematical Reference

4.4.1. Type 100: Electrolyzer Controls


Type 100 implements a set of control functions for an electrolyzer of an integrated mini-grid connected
system (e.g. RE source, electrolyzer, H2 storage, fuel cell). The electrolyzer can operate in two power
modes (constant or variable power).

4.4.1.1. Parameter/Input/Output Reference


PARAMETERS

1 Mode [-] Power mode (1=variable power, 2=fixed power)

2 Lower SOC limit [-] H2-storage level at which the electrolyzer is to be switched ON

3 Upper SOC limit [-] H2-storage level at which electrolyzer is to be switched OFF

4 Idling power [W] Minimum allowable idling power for electrolyzer (usually 20% of
rated power)

INPUTS

1 Tank SOC [-] H2-storage 'state of charge' (normalized pressure level)

2 Power to electrolyzer [W] If the electrolyzer mode parameter is set to 1 the electrolyzer will
run on the excess power on mini-grid. If the electrolyzer mode
parameter is set to 2 the electrolyzer will run at full power.

OUTPUTS

1 Electrolyzer control [-] Control signal (0=Idle, 1=full or variable power). NOTE: Care
signal must be taken when directing this control signal to the
electrolyzer. This control signal should not always be connected
to the electrolyzer. Instead the power set point signal (output#2)
should be used instead.

2 Power set point [W] Power set point signal. NOTE: electrolyzers are connected to
the mini-grid via power conditioning equipment. Hence, the
power set point signal should be directed to this equipment, and
not to the electrolyzer itself.

4.4.1.2. Simulation Summary Report Contents


VALUE FIELDS

Lower SOC limit [-] Parameter 2

Upper SOC limit [-] Parameter 3

TEXT FIELDS

Control Mode [-] “Variable Power” or “Fixed Power” depending on the value of Parameter
1

4–282
TRNSYS 18 – Mathematical Reference

4.4.1.3. Hints and Tips


 Despite electrolyzer mode 2 being called “fixed power” mode, in reality the electrolyzer will run at the
maximum of the electrolyzer idling power and the “power to the electrolyzer” input value. The
electrolyzer would run at a fixed power if that input were set to a constant value above the idling power.
 Electrolyzers cannot start generating clean enough hydrogen to be used by a fuel cell for some period
of time after they have started receiving input power (approximately half an hour). An electrolyzer can
either be shut down completely (in which case the first half-hour’s worth of hydrogen production should
be dumped) or it can revert to an idling state where it is kept ready to generate clean hydrogen. In this
case the electrolyzer must be powered at its idling power at all times.
 It is important to realize that the action from the controller is to calculate a power setpoint for a power
conditioning device (Type 175) which is connected to the electrolyzer (Type 160). The controller also
has a "switch" output for numerical reasons, but that output should not be connected to the electrolyzer.
Please study the examples of Hydrogen System control to make sure you understand the operation of
Type 100.

4.4.1.4. Nomenclature
Pexcess [W] Excess power from the RE sources to the mini-grid
SOC [-] State Of Charge of the energy storage
Pely,set [W] Electrolyzer setpoint power
Pidle [W] Electrolyzer idling (minimum) power
ELlow [-] State Of Charge for which the Electrolyzer is switched ON
ELup [-] State Of Charge for which the Electrolyzer is switched OFF

4.4.1.5. Detailed Description


The controller actually set a power setpoint for a power device that is linking the electrolyzer. The power
setpoint is adjusted to maintain the state of charge of a storage device (e.g. compressed gas tank) within
the target range.

CONTROL STRATEGY
If the electrolyzer is currently OFF (Idling):
 If SOC < ELlow, switch ON and operate with Pely,set = Pexcess
 Else, remain OFF (Idling)
If the electrolyzer is currently ON:
 If SOC > ELup, switch OFF (Idling)
 Else, keep operating at Pely,set = Pexcess

IDLING POWER
The electrolyzer is assumed to have a minimum idling power. When switched "OFF", P ely,set is not set to
zero but to Pidle.

CONTROLLER MODES
The controller has two modes: Constant power and Variable power.
In Variable Power mode (MODE = 1):

4–283
TRNSYS 18 – Mathematical Reference

 If the electrolyzer is ON: Pely,set = Max ( Pexcess , Pidle)


 If the electrolyzer is OFF: Pely,set = Pidle
In Constant Power mode (MODE = 2):
 If the electrolyzer is ON: Pely,set = Pexcess (always)
 If the electrolyzer is OFF: Pely,set = Pidle
This means that in Constant Power mode, Type 100 will allow the electrolyzer to operate at a power below
the set limit for idling. To ensure correct operation of Type 160 (electrolyzer), it is necessary to implement
a correction mechanism in the system.

4–284
TRNSYS 18 – Mathematical Reference

4.4.2. Type 160: Alkaline Electrolyzer


Type 160 is a mathematical model for a high pressure alkaline water electrolyzer. The model is based on
a combination of fundamental thermodynamics, heat transfer theory, and empirical electrochemical
relationships. A dynamic thermal model is also included. A temperature dependent current-voltage curve
for a given pressure, and a Faraday efficiency relation independent of temperature and pressure form the
basis of the electrochemical model. The electrolyzer temperature can be given as Input, or calculated from
a simple or detailed thermal model [1,2].

4.4.2.1. Parameter/Input/Output Reference


PARAMETERS

Temperature mode. In TMODE=1, T is given as input 7. In


TMODE=2, T is calculated based on a simple quasi-static
1 Temperature mode [-]
thermal model. In TMODE=3, T is calculated based on a
complex lumped capacitance thermal model.

2 Electrode area [m2] Area of electrode

Number of cells is
3 [-] Number of cells in series per stack
series

Number of stacks in
4 [-] Number of stacks in parallel per unit
parallel

Maximum allowable
5 [mA/cm2] Maximum allowable current density per stack
current density

Maximum allowable
6 [C] Maximum allowable operating temperature
operating temperature

Minimum allowable cell


7 [V] Minimum allowable cell voltage
voltage

Thermal resistance. NOTE: this value is ignored in TMODE 1. It


8 Thermal resistance [K/W] is only needed when using one of the two thermal models
(TMODE=2 or 3)

Thermal time constant, TAU_T = C_T * R_T (See manual for


9 Thermal time constant [hr]
further information on equation)

10 Electrolyzer type [-] The identification number of the electrolyzer listed in external file

Logical Unit for data


11 [-] Logical unit for external file with electrolyzer parameters
file

INPUTS

Electrolyzer control
1 [-] Electrolyzer operating switch. 0=OFF, 1=ON
signal

2 Electrolyzer current [A] Current through single electrolyzer stack

4–285
TRNSYS 18 – Mathematical Reference

Electrolyzer pressure. Constant pressure is assumed. The main


3 Electrolyzer pressure [bar]
equations in the model are based on a constant pressure.

Electrolyzer
4 environment [C] Ambient (or room) temperature
temperature

Cooling water inlet


5 [C] Temperature of inlet cooling water
temperature

6 Cooling water flow rate [m3/hr] Volumetric flow rate of cooling water

Electrolyzer operating Temperature of electrolyzer. In TMODES 2 and 3, this input


7 [C]
temperature gives the electrolyzer’s initial temperature.

OUTPUTS

1 Current drawn by [A] Current drawn by electrolyzer


electrolyzer

2 Electrolyzer voltage [V] Total voltage across electrolyzer

3 Electrolyzer power [W] Total power drawn by electrolyzer

4 Hydrogen production [m3/hr] The volumetric rate at which hydrogen gas is produced by the
rate electrolyzer.

5 Oxygen production rate [m3/hr] The volumetric rate at which oxygen gas is produced by the
electrolyzer.

6 Overall efficiency [-] Overall efficiency

7 Energy efficiency [-] Energy efficiency

8 Faraday efficiency [-] Faraday efficiency (i.e., current efficiency)

9 Heat generated [W] Heat generated by electrolyzer

10 Thermal energy lost [W] Heat losses from electrolyzer to ambient

11 Auxiliary cooling rate [W] Auxiliary cooling

12 Energy storage rate [W] Energy storage rate

13 Electrolyzer [C] Electrolyzer temperature


temperature

14 Cooling water outlet [C] Temperature of cooling water outlet


temperature

15 Current density [mA/cm2] Electrical current density

16 Cell voltage [V] Voltage across a single cell

17 Cell reverse voltage [V] Reversible voltage for a single cell

4–286
TRNSYS 18 – Mathematical Reference

18 Cell thermoneutral [V] Thermoneutral voltage for a single cell


voltage

4.4.2.2. Simulation Summary Report Contents


VALUE FIELDS

Electrode area [cm2] Parameter 2

Number of cells in [-] Parameter 3


series

Number of cells in [-] Parameter 4


parallel

TEXT FIELDS

Operating temperature n/a Text description corresponding to the value of parameter 1


mode

INTEGRATED VALUE FIELDS

Current drawn by the [A] Output 1


electrolyzer

Power drawn by the [kWh] Output 3


electrolyzer

Hydrogen production [Nm3] Output 4

Oxygen production [Nm3] Output 5

Heat generated [kWh] Output 9

Thermal energy losses [kWh] Output 10

Auxiliary cooling [kWh] Output 11


energy

Energy storage rate [kWh] Output 12

MIN/MAX VALUE FIELDS

Electrolyzer voltage [V] Output 2

Overall efficiency [0..1] Output 6

Energy efficiency [0..1] Output 7

Faraday efficiency [0..1] Output 8

Cooling water outlet [C] Output 14


temperature

4–287
TRNSYS 18 – Mathematical Reference

4.4.2.3. Hints and Tips


 Type 160 is also described in an EES-based executable program distributed with TRNSYS:
.\TrnsysXX\Documentation\HydrogenSystemsDocumentation.exe (in which XX is the Trnsys version
number)
 The Faraday loss results primarily from the unwanted chemical byproduct during the electrolysis
process, and thus they are not counted as heat generation in the electrolyzer (Although some
unwanted chemical reactions indeed release some heat). This is the reason that the heat generation
in the electrolyzer model is calculated as "Pely*(1-eta_e)" rather than "Pely*(1-eta_tot)".

4.4.2.4. Detailed Description


A principle scheme of an electrolyzer is shown in Figure 4.4.2–1

Figure 4.4.2–1: Electrolyzer principle


The decomposition of water into hydrogen and oxygen can be achieved by passing an electric current (DC)
between two electrodes separated by an aqueous electrolyte with good ionic conductivity. The total reaction
for splitting water is:
H2O (l) + Electric Energy  H2 (g) + ½ O2 (g) Eq. 4.4.2-1

For this reaction to occur a minimum electric voltage must be applied to the two electrodes. This minimum
voltage, or reversible voltage, can be determined from Gibbs energy for water splitting (Error! Reference
ource not found.). In an alkaline electrolyzer the electrolyte is usually aqueous potassium hydroxide
(KOH), where the potassium ion K+ and hydroxide ion OH- take care of the ionic transport. The anodic and
cathodic reactions taking place here are:
Anode: 2 OH- (aq)  ½ O2(g) + H2O (l) + 2 e- Eq. 4.4.2-2

Cathode: 2 H2O (l) + 2 e-  H2(g) + 2 OH- (aq) Eq. 4.4.2-3

In an alkaline solution the electrodes must be resistant to corrosion, and must have good electric
conductivity and catalytic properties, as well as good structural integrity, while the diaphragm should have
low electrical resistance. This can, for instance, be achieved by using anodes based on nickel, cobalt, and
iron (Ni, Co, Fe), cathodes based on nickel with a platinum activated carbon catalyst (Ni, C-Pt), and nickel
oxide (NiO) diaphragms.

ELECTROCHEMICAL MODEL
The electrode kinetics of an electrolyzer cell can be modeled using empirical current-voltage (I-U)
relationships. Several empirical I-U models for electrolyzers have been suggested [4,5,6,7]. In order to
properly model the I-U curve for a given tempearture, overvoltages and ohmic resistance are taken into
account, as proposed in [1].

4–288
TRNSYS 18 – Mathematical Reference

Current-Voltage Characteristic (per cell)


𝐼𝑒𝑙𝑦 𝑡 ∗ 𝐼𝑒𝑙𝑦
𝑈𝑐𝑒𝑙𝑙 = 𝑈𝑟𝑒𝑣 𝑟 ∗ + 𝑠 ∗ log ( + 1) Eq. 4.4.2-4
𝐴𝑅𝐸𝐴 𝐴𝑅𝐸𝐴
With:
𝑟 ∗ = 𝑟1 + 𝑟2 𝑇𝑒𝑙𝑦 Eq. 4.4.2-5

𝑠 ∗ = 𝑠1 + 𝑠2 𝑇𝑒𝑙𝑦 + 𝑠3 𝑇𝑒𝑙𝑦 2 Eq. 4.4.2-6


𝑡2 𝑡3
𝑡 ∗ = 𝑡1 + + Eq. 4.4.2-7
𝑇𝑒𝑙𝑦 𝑇𝑒𝑙𝑦 2
The Faraday efficiency is defined as the ratio between the actual and theoretical maximum amount of
hydrogen produced in the electrolyzer. Since the Faraday efficiency comprises the parasitic current losses
along the gas ducts, it is often called the current efficiency. The parasitic currents increase with decreasing
current densities due to an increasing share of electrolyte and therefore also a lower electrical resistance
[7]. Furthermore, the parasitic current in a cell is linear to the cell potential (Error! Reference source not
ound.). Hence, the fraction of parasitic currents to total current increases with decreasing current densities.
An increase in temperature leads to a lower resistance, more parasitic current losses, and lower Faraday
efficiencies. An empirical expression that accurately depicts these phenomena for a given temperature is:

Faraday Efficiency
𝐼𝑑𝑒𝑛𝑠𝑖𝑡𝑦 2
𝜂𝑓 = ( ) 𝑎2 Eq. 4.4.2-8
𝑎1 + 𝐼𝑑𝑒𝑛𝑠𝑖𝑡𝑦 2
According to Faraday’s law, the production rate of hydrogen in an electrolyzer cell is directly proportional
to the transfer rate of electrons at the electrodes, which in turn is equivalent to the electrical current in the
external circuit. Hence, the total hydrogen production rate in an electrolyzer, which consists of several cells
connected in series, can be expressed as:

Hydrogen Production
𝐼𝑒𝑙𝑦
𝑛̇ 𝐻2 = 𝜂𝑓 𝑁𝑐𝑒𝑙𝑙𝑠 Eq. 4.4.2-9
𝑛𝐹
The oxygen production rate is simply found from stoichiometry (Eq. 4.4.2-3), which on a molar basis is:

Oxygen Production
𝑛̇ 𝑂2 = 0.5𝑛̇ 𝐻2 Eq. 4.4.2-10

The generation of heat in an electrolyzer is mainly due to electrical inefficiencies. The energy efficiency can
be calculated from the thermoneutral voltage (Utn) and the cell voltage (Ucell):

Energy Efficiency
𝑈𝑡𝑛
𝜂𝑒 = Eq. 4.4.2-11
𝑈𝑐𝑒𝑙𝑙
For a given temperature, an increase in hydrogen production (i.e., an increase in current density) increases
the cell voltage, which consequently decreases the energy efficiency. For a given current density, the
energy efficiency increases with increasing cell temperature (see Figure 4.4.2–2).

4–289
TRNSYS 18 – Mathematical Reference

Figure 4.4.2–2: Electrolyzer – Cell voltage vs. Current for different Temperatures
It should be noted here that Error! Reference source not found. is only valid for systems where no
uxiliary heat is added to the system. If auxiliary heat is added, the voltage may drop into the region between
the reversible and thermoneutral voltage, and the efficiency would be greater than 100%. In low-
temperature electrolysis, the cell voltage will during normal operation (50-80°C and 40-300 mA/cm2) always
be well above the thermoneutral voltage, as observed in Figure 4.4.2–2. However, some initial heating may
be required during start-up if the electrolyzer has been allowed to cool down to ambient temperature.
In order to calculate the overall performance of an electrolyzer system, information about number of cells
in series and/or parallel per stack and number of stacks per unit is needed. The rated voltage of an
electrolyzer stack is found from the number of cells in series, while the number of cells in parallel yields the
rated current (and H2-production). The total power is simply the product of the current and voltage.

THERMODYNAMIC MODEL
Thermodynamics provides a framework for describing reaction equilibrium and thermal effects in
electrochemical reactors. It also gives a basis for the definition of the driving forces for transport phenomena
in electrolytes and leads to the description of the properties of the electrolyte solutions [3]. Below is a
description of the thermodynamics of the low-temperature hydrogen-oxygen electrochemical reactions
used in the electrolyzer model.
The following assumptions can be made about the water splitting reaction: (a) Hydrogen and air (or oxygen)
are ideal gases, (b) water is an incompressible fluid, and (c) the gas and liquid phases are separate. Based
on these assumptions the change in enthalpy H, Entropy S and Gibbs Energy G of the water splitting
reaction can be calculated with reference to pure hydrogen (H 2), oxygen (O2), and water (H2O) at a standard
temperature and pressure (25°C and 1 atm). The total change in enthalpy for splitting water is the enthalpy
difference between the products (H2 and O2) and the reactants (H2O). The same applies for the total change
in entropy. The change in Gibbs energy is expressed by:

Gibbs free energy


Δ𝐺 = Δ𝐻 − Δ𝑆𝑇𝑒𝑙𝑦 Eq. 4.4.2-12

4–290
TRNSYS 18 – Mathematical Reference

At standard conditions (25°C and 1 atm) the splitting of water is a non-spontaneous reaction, which means
that the change in Gibbs energy is positive. The standard Gibbs energy for water splitting is G0 = 237 kJ
mol-1. For an electrochemical process operating at constant pressure and temperature the maximum
possible useful work (i.e., the reversible work) is equal to the change in Gibbs energy G. Faraday’s law
relates the electrical energy (emf) needed to split water to the chemical conversion rate in molar quantities.
The emf for a reversible electrochemical process, or the reversible cell voltage, is expressed by:

Reversible voltage (per cell)


Δ𝐺
𝑈𝑟𝑒𝑣 = Eq. 4.4.2-13
𝑛𝐹
The total amount of energy needed in water electrolysis is equivalent to the change in enthalpy H. From
Error! Reference source not found. it is seen that G includes the thermal irreversibility TS, which for a
eversible process is equal to the heat demand. The standard enthalpy for splitting water is H0 = 286 kJ
mol-1. The total energy demand H is related to the thermoneutral cell voltage:

Thermoneutral voltage (per cell)


Δ𝐻
𝑈𝑡𝑛 = Eq. 4.4.2-14
𝑛𝐹
At standard conditions Urev = 1.229 V and Utn = 1.482, but these will change with temperature and pressure.
In the applicable temperature range Urev decreases slightly with increasing temperature (Urev @ 80°C, 1 bar
= 1.184 V), while Utn remains almost constant (Utn @ 80°C, 1 bar = 1.473 V). Increasing pressure increases
Urev slightly (Urev @ 25°C, 30 bar = 1.295 V), while Utn remains constant.

THERMAL MODEL
The temperature of the electrolyte of the electrolyzer can be determined using simple or complex thermal
models, depending on the need for accuracy. Assuming a lumped thermal capacitance model, the overall
thermal energy balance can be expressed as a linear, first order, non-homogeneous differential equation.
Type 160 can calculate Tstack in 3 different ways:
 TMODE=1: T is given as Input
 TMODE=2: T is calculated based on a simple quasi-static thermal model
 TMODE=3: T is calculated based on a complex lumped capacitance thermal model
Overall energy balance
𝐶𝑇 𝑑𝑇𝑑𝑡𝑒𝑙𝑦 = 𝑄̇𝑔𝑒𝑛 − 𝑄̇𝑙𝑐𝑠𝑠 − 𝑄̇𝑐𝑤 Eq. 4.4.2-15

Generated thermal energy


𝑄̇𝑔𝑒𝑛 = 𝑁𝑐𝑒𝑙𝑙𝑠 𝐼𝑒𝑙𝑦 (𝑈𝑐𝑒𝑙𝑙 − 𝑈𝑡𝑛 ) Eq. 4.4.2-16

Heat losses to ambient


1
𝑄̇𝑙𝑐𝑠𝑠 = (𝑇 − 𝑇𝑎𝑚𝑏 ) Eq. 4.4.2-17
𝑅𝑇 𝑒𝑙𝑦
Auxiliary cooling requirements
𝑄̇𝑐𝑤 = 𝐶𝑝,𝐻2𝑂 (𝑇𝑐𝑤,𝑜𝑢𝑡 − 𝑇𝑐𝑤,𝑖𝑛 ) Eq. 4.4.2-18

The first term on the right hand side of Error! Reference source not found. is the internal heat generation,
he second term the total heat loss to the ambient, and the third term the auxiliary cooling demand. The
overall thermal capacity Ct and resistance Rt for the electrolyzer, and the UA-product for the cooling water
heat exchanger are the constants that need to be determined analytically or empirically prior to solving the

4–291
TRNSYS 18 – Mathematical Reference

thermal equations. It should be noted that the thermal model presented here is on a per stack basis. In
Type 160, UA is given as a function of electrolyzer current:
𝑈𝐴ℎ𝑥 = ℎ1 + ℎ2 𝐼𝑒𝑙𝑦 Eq. 4.4.2-19

4.4.2.5. External Data File


Type 160 reads the electrolyzer performance data from a data file. An example is provided in
"Examples\Data Files". The data file should have the following information:
<Nb of electrolyzers>
<No of the electrolyzer>, <Name of electrolyzer> For each electrolyzer
<r1> <r2> <s1> <t1> <t2> <t3> <a1> <a2> <h1> <h2>
The parameters that must be provided are described here below:

No Parameter Units Description


1 r1  m² Ohmic resistance (Error! Reference source not found.)
2 r2  m² / °C Ohmic resistance (Error! Reference source not found.)
3 s1 V Overvoltage on electrodes (Error! Reference source not
ound.)
4 t1 m² / A Overvoltage on electrodes (Error! Reference source not
ound.)
5 t2 m² °C / A Overvoltage on electrodes (Error! Reference source not
ound.)
6 t3 m² °C² / A Overvoltage on electrodes (Error! Reference source not
ound.)
7 a1 mA / cm Faraday efficiency (Error! Reference source not found.)
8 a2 0..1 Faraday efficiency (Error! Reference source not found.)
9 h1 W / °C Convective heat transfer coefficient (Error! Reference source
ot found.)
10 h2 W / °C per A Convective heat transfer coefficient (Error! Reference source
ot found.)

EXAMPLE
2
1,Alkaline Electrolyzer PHOEBUS (KFA)
8.05031E-05 -2.50410E-07 0.1849 -0.10015 8.4242 247.2663 250.0 0.96 7.0 0.020
2,GHW Electrolyzer (p=30 bar) (Munich Airport)
1.997990E-05 0.0 0.2113 0.01984 0.0 0.0 250.0 0.96 7.0 0.0200

4.4.2.6. References
1. Ulleberg Ø. (2002) Modeling of advanced alkaline electrolyzers: a system simulation approach. Int.
J. Hydrogen Energy 28(1): 7-19.
2. Ulleberg Ø. (1998) Stand-Alone Power Systems for the Future: Optimal Design, Operation &
Control of Solar-Hydrogen Energy Systems. PhD thesis, Norwegian University of Science and
Technology, Trondheim.

4–292
TRNSYS 18 – Mathematical Reference

3. Rousar I. (1989) Fundamentals of electrochemical reactors. In Electrochemical Reactors: Their


Science and Technology Part A, Ismail M. I. (Eds), Elsevier Science, Amsterdam.
4. GriesshaberW. and Sick F. (1991) Simulation of Hydrogen-Oxygen-Systems with PV for the Self-
Sufficient Solar House (in German). FhG-ISE, Freiburg im Breisgau.
5. Havre K., Borg P. and Tømmerberg K. (1995) Modeling and control of pressurized electrolyzer for
operation in stand alone power systems. In Proceedings of 2nd Nordic Symposium on Hydrogen
and Fuel Cells for Energy Storage, January 19-20, Helsinki, Lund P. D. (Ed.), pp. 63-78.
6. Vanhanen J. (1996) On the Performance Improvements of Small-Scale Photovoltaic-Hydrogen
Energy Systems. Ph.D. thesis, Helsinki University of Technology, Espoo, Finland.
7. Hug W., Divisek J., Mergel J., Seeger W. and Steeb H. (1992) “Highly Efficient Advanced Alkaline
Electrolyzer for Solar Operation.” Int. J. Hydrogen Energy 17(9): 699-705

4–293
TRNSYS 18 – Mathematical Reference

4.4.3. Type 164: Compressed Gas Storage


Type 164 is a compressed gas storage model. The model calculates the pressure in the storage based on
either the ideal gas law, or van der Waals equation of state for real gases [1,2].

4.4.3.1. Parameter/Input/Output Reference


PARAMETERS

1 Pressure mode [-] Pressure mode (1=ideal gas, 2=real gas)

Maximum allowable
2 [bar] Maximum allowable pressure
pressure

3 Tank volume [m3] Actual volume of pressure tank

4 Molar weight of gas [kg/mol] Molar weight of gas

If Pressure Mode (parameter 1) =2

Gas critical
5 [C] Critical temperature of gas
temperature

6 Gas critical pressure [-] Critical pressure of gas

INPUTS

1 Volumetric flow rate of [m3/hr] Inlet gas flow rate


gas entering the tank

2 Volumetric flow rate of [m3/hr] Outlet gas flow rate


gas leaving the tank

3 Gas temperature [C] Temperature of gas

4 Initial pressure level [-] Initial pressure level. This value is normalized 0: completely
empty. 1: completely full (pressure will in this case be set to the
maximum allowable tank pressure that is specified as a
parameter to this model.

OUTPUTS

1 Gas volume [Nm3] Volume of gas stored in tank (1 Nm3 = 1 Normal cubic meter at
0°C and 1 bar)

2 Gas pressure [bar] Pressure of gas in tank

3 Pressure level [-] Pressure level in tank

4 Rate at which gas is [m3/s] Dumped gas (through high pressure safety valve)
dumped

4–294
TRNSYS 18 – Mathematical Reference

4.4.3.2. Simulation Summary Report Contents


VALUE FIELDS

Maximum allowable [bar] Parameter 2


pressure

Tank volume [m3] Parameter 3

Gas molar weight [kg/mol] Parameter 4

If gas mode (parameter 1) = 2

Gas critical
[C] Critical temperature of gas
temperature

Gas critical pressure [-] Critical pressure of gas

TEXT FIELDS

Gas mode n/a Text description corresponding to the value of parameter 1

INTEGRATED VALUE FIELDS

Gas dumped to [Nm3] Output 4


prevent overpressure

MIN/MAX VALUE FIELDS

Volumetric flow rate [Nm3/h] Input 1


into tank

Volumetric flow out of [Nm3/h] Input 2


tank

Gas temperature [C] Input 3

Gas volume [Nm3] Output 1

Gas pressure [bar] Output 2

4.4.3.3. Hints and Tips


 Type 164 is also described in an EES-based executable program distributed with
TRNSYS: %TRNSYS18%\Documentation\HydrogenSystemsDocumentation.exe
 This component does not perform any thermal gain/loss calculation but assumes that the gas enters,
is stored at, and exits at a uniform temperature that is specified as an input to the model.

4.4.3.4. Detailed Description


The pressure gas storage model described below was originally developed by Griesshaber and Sick [3].
However, the model has been modified to also include van der Waals equation of state for real gases
(PMODE=2, while PMODE=1 uses the ideal gas law).

4–295
TRNSYS 18 – Mathematical Reference

According to the van der Waals equation of state, the pressure p of a real gas in a storage tank can be
calculated from:
𝑛𝑅𝑇𝑔𝑎𝑠 𝑛2
𝑝= −𝑎 Eq. 4.4.3-1
𝑉𝑜𝑙 − 𝑛𝑏 𝑉𝑜𝑙 2
Where n denotes the number of moles of gas, R is the universal gas constant, Vol is the volume of the
storage tank, and Tgas is the temperature of the gas. The second term (comprising the constant a ) account
for the intermolecular attraction forces, while b accounts for the volume occupied by the gas molecules.
Note that the ideal gas law is obtained by setting a and b to 0:
𝑝𝑉𝑜𝑙 = 𝑛𝑅𝑇𝑔𝑎𝑠 Eq. 4.4.3-2

In the Van der Waals equation, a and b are defined as


27𝑅2 𝑇𝑐𝑟 2
𝑎= Eq. 4.4.3-3
64𝑝𝑐𝑟
𝑅𝑇𝑐𝑟
𝑏= Eq. 4.4.3-4
8𝑝𝑐𝑟
Where Tcr and pcr are respectively the critical temperature and pressure of the substance.
The model simply performs a mass (or moles) balance of gas entering and leaving the storage and
calculates the pressure corresponding to the resulting mass of Hydrogen in the tank.
If the pressure rises beyond a fixed level, the excess of Hydrogen is dumped.

4.4.3.5. References
1. C¸ engel Y. A. and Boles M. A. (1989) Thermodynamics - An Engineering Approach. 1 edn,
McGraw-Hill, London.
2. Ulleberg Ø. (1998) Stand-Alone Power Systems for the Future: Optimal Design, Operation &
Control of Solar-Hydrogen Energy Systems. PhD thesis, Norwegian University of Science and
Technology, Trondheim.
3. GriesshaberW. and Sick F. (1991) Simulation of Hydrogen-Oxygen-Systems with PV for the Self-
Sufficient Solar House (in German). FhG-ISE, Freiburg im Breisgau, Germany.

4–296
TRNSYS 18 – Mathematical Reference

4.4.4. Type 167: Gas Compressor


Type 167 is a multi-stage polytropic compressor model. The model calculates the work and cooling need
for a polytropic compressor of 1 to 5 stages; [1, 2]. This manual uses a 2-stage compressor as an example.

4.4.4.1. Parameter/Input/Output Reference


PARAMETERS

Number of parallel
1 [-] Number of identical compressors in parallel.
compressors

Number of compressor
2 [-] The number of stages in the compressor.
stages

3 Heat capacity of gas [J/kmol] Heat capacity at constant pressure of gas.

INPUTS

1 On/Off switch [-] 1: the compressor is on, 0: the compressor is off.

2 Gas inlet pressure [bar] The pressure at which gas enters the compressor.

3 Desired outlet pressure [bar] The pressure at which the compressor should deliver gas.

A reference point temperature used in computing the amount of


4 Low temperature [C]
energy released during compression.

Volumetric flow rate of


5 gas entering the [m3/hr] Volumetric rate at which gas enters the compressor
compressor

OUTPUTS

1 Compressor power [W] The power required for compression.

2 Energy released [W] Energy released during compression

3 Maximum outlet [C] The temperature at which gas would exit the compressor if no
temperature cooling were applied.

4 Volumetric outlet flow [m3/hr] The volumetric rate at which gas exits the compressor.

5 Isentropic efficiency [-] The efficiency at which the compressor is currently operating.

6 Intermediate pressure [bar] first intermediate pressure if the device has more than one stage
1

7 Intermediate pressure [bar] second intermediate pressure if the device has more than two
2 stages

8 Intermediate pressure [bar] third intermediate pressure if the device has more than three
3 stages

4–297
TRNSYS 18 – Mathematical Reference

9 Intermediate pressure [bar] fourth intermediate pressure if the device has more than four
4 stages

4.4.4.2. Simulation Summary Report Contents


VALUE FIELDS

Number of parallel Parameter 1


[-]
compressors

Number of compressor Parameter 2


[-]
stages

Heat capacity of gas [J/kmol] Parameter 3

INTEGRATED VALUE FIELDS

Compressor power [kWh] Output 1

MINIMUM/MAXIMUM VALUE FIELDS

Gas Inlet Pressure [bar] Input 1

Gas Outlet Pressure [bar] Input 2

4.4.4.3. Hints and Tips


 Type 167 is also described in an EES-based executable program distributed with
TRNSYS: %TRNSYS18%\Documentation\HydrogenSystemsDocumentation.exe

4.4.4.4. Detailed Description


THERMODYNAMIC MODEL
This model is based on an ideal gas model in a quasi-equilibrium compression process. A quasi-equilibrium
process is a process in which all states through which the system passes may be considered equilibrium
states. A polytropic process, is a quasi- equilibrium process which describes the relationship between
pressure and volume during a compression. It can be expressed as:
(𝑝𝑉)𝑁 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 Eq. 4.4.4-1

where p and V are the pressure and volume of the ideal gas, respectively, and the value of N is a constant
for the particular prosess.

Polytropic Work (ideal gas)


1st compression stage:
𝑁−1
𝑁𝑅𝑇𝑙𝑜𝑤 𝑝𝑥 ( 𝑁
)
𝑊1 = ( ) (1 − ( ) ) Eq. 4.4.4-2
𝑁−1 𝑝𝑖𝑛

2nd compression stage:

4–298
TRNSYS 18 – Mathematical Reference

𝑁−1
𝑁𝑅𝑇𝑙𝑜𝑤 𝑝𝑜𝑢𝑡 ( 𝑁
)
𝑊2 = ( ) (1 − ( ) ) Eq. 4.4.4-3
𝑁−1 𝑝𝑥

Overall compression work:


𝑃𝑐𝑜𝑚𝑝 = 𝑚̇𝑖𝑛 (𝑊1 + 𝑊2 ) Eq. 4.4.4-4

Isothermic Work
𝑝𝑜𝑢𝑡
𝑊𝑖𝑠𝑜 = −𝑅𝑇𝑙𝑜𝑤 ln ( ) Eq. 4.4.4-5
𝑝𝑖𝑛
𝑃𝑖𝑠𝑜 = 𝑚̇𝑖𝑛 𝑊𝑖𝑠𝑜 Eq. 4.4.4-6

Isentropic Efficiency
𝑃𝑖𝑠𝑜
𝜂𝑖𝑠𝑒𝑛 = Eq. 4.4.4-7
𝑃𝑐𝑜𝑚𝑝
Isentropic efficiency involve a comparison between the actual performance of the compressor and an
idealized performance which neglects the change in entropy.

THERMAL MODEL
Ramp factor - effect of step compression:
1
𝑝𝑜𝑢𝑡 𝑁𝑠𝑡𝑎𝑔𝑒𝑠
𝑅𝑓 = ( ) Eq. 4.4.4-8
𝑝𝑖𝑛
Outlet temperature of a polytropic process:
𝑁−1
𝑇ℎ𝑖𝑔ℎ = 𝑇𝑙𝑜𝑤 𝑅𝑓 𝑁 Eq. 4.4.4-9

Heat produced by compression:


𝑄𝑐𝑜𝑜𝑙 = 𝑛̇ 𝑖𝑛 𝐶𝑝 (𝑇ℎ𝑖𝑔ℎ − 𝑇𝑙𝑜𝑤 ) Eq. 4.4.4-10

A few remarks about this process can be made. Intercooling means that the gas at the intermediate
pressure (after the first compression stage) is cooled to the initial temperature T low before it is passed on to
the second compression stage. It should also be noted that the sign convention used in Eq. 4.4.4-2 and
Eq. 4.4.4-3 is such that the required compressor work (work added to the system) is negative.

4.4.4.5. References
1. C¸ engel Y. A. and Boles M. A. (1989) Thermodynamics - An Engineering Approach. 1 edn,
McGraw-Hill, London.
2. Ulleberg Ø. (1998) Stand-Alone Power Systems for the Future: Optimal Design, Operation &
Control of Solar-Hydrogen Energy Systems. PhD thesis, Norwegian University of Science and
Technology, Trondheim.

4–299
TRNSYS 18 – Mathematical Reference

4.4.5. Type 170: Proton Exchange Membrane (PEM) Fuel


Cell
This component is a generic mathematical model for a proton exchange membrane fuel cell (PEMFC). The
model is largely mechanistic, with most terms being derived from theory or including coefficients that have
a theoretical basis. The major nonmechanistic term is the ohmic overvoltage that is primarily empirically
based. The main equations of the electrochemical model are described in published literature (Mann et al.,
2000). A thermal dynamic model is also included. The theory behind the thermal model is found in previous
PEMFC-modeling work (Ulleberg, 1998), while the recommended thermal coefficients were derived from
two sources (Amphlett et al., 1996; Ulleberg, 2001).
The fuel cell model has two mode parameters.
The resistance and capacitance calculation (R_T/C_T) mode parameter (parameter 10) can be set to 1
(simplified calculations of R_t and C_t using minimal cell geometry parameters), 2 (detailed calculations of
R_t and C_t using more extensive cell geometry parameters), or 3 (user-provided values of R_t and C_t
are provided as parameters).
The temperature mode parameter (parameter 2) can be set to 1 indicating that the fuel cell operates at a
stack temperature indicated by one of the component’s inputs. Setting the temperature mode to 2 indicates
that the fuel cell will attempt to reach a set point temperature by the end of the time step and that it operates
at the average of the set point temperature from the previous and current time steps

4.4.5.1. Parameter/Input/Output Reference


PARAMETERS

OXmode=1: Air is provided to the cathode. OXmode=2: Pure


1 Cathode oxidant type [-]
oxygen is provided to the cathode.

Temperature mode. TMODE = 1: TSTACK is a constant.


TSTACKout = TSTACKin. TMODE = 2: TSTACK is calculated
based on a set point temperature:
2 Temperature mode [-] TSTACKout=(TNEW+TOLD)/2 where TNEW is TSTACKin (the
set point temperature) and TOLD is the temperature in the
previous time step. In TMODE=2 it is assumed that the fuel cell
reaches TSTACKin during the current time step.

Number of cells in Number of cells in series per stack. NCELLS gives the
3 [-]
series per stack VOLTAGE RATING of the fuel cell.

Number of stacks in Number of stacks in parallel per FC unit. NSTACKS gives the
4 [-]
parallel per module CURRENT RATING of the fuel cell.

Electrode area of PEM. Note: A_PEM < A_CELL. This value is


5 Electrode area [cm2]
ignored if the R_T/C_T mode (parameter 10) is set to 2

Proton Exchange Membrane (PEM) thickness. One single FC


consists of a MEA sandwiched between 2 bipolar plates. Note:
6 PEM thickness [cm]
T_PEM << T_CELL. (MEA = Cathode + PEM + Anode =
Membrane Electrode Assembly)

Transport number for Transport number for water. 0.0 = Well hydrated PEM. 1.2 =
7 [-]
water Water deficient, or lean water PEM.

Minimum allowable cell


8 [V] Minimum allowable cell voltage.
voltage

4–300
TRNSYS 18 – Mathematical Reference

Maximum allowable
9 [mA/cm2] Maximum allowable current density.
cell current density

Mode for calculating the overall thermal resistance (R_T) and


Resistance and capacitance (C_t) of a single FC stack. 1 = Simple (few FC
10 capacitance calculation [-] geometry and thermal parameters needed.) 2 = Detailed:
mode Several FC geometry and thermal parameters needed. 3 =
Experimental: R_t & C_t provided.

If R_T/C_T Mode (parameter 10) is 1

Heat transfer Heat transfer coefficient from FC stack to ambient air. 5-50 =
11 [W/m2.K]
coefficient natural convection. 50-250 = forced convection.

Cross-sectional area of a single fuel cell. A single FC consists of


Cross sectional area of an MEA sandwiched between two bipolar plates. Note: A_CELL
12 [cm2]
one cell > A_PEM. (MEA = Cathode + PEM + Anode = Membrane
Electrode Assembly).

Thickness of one single fuel cell. One single FC consists of an


13 Thickness of one cell [cm] MEA sandwiched between 2 bipolar plates. Note: T_CELL >>
T_PEM.

If R_T/C_T Mode (parameter 10) is 2

Heat transfer Heat transfer coefficient from FC stack to ambient air. 5-50 =
11 [W/m2.K]
coefficient natural convection. 50-250 = forced convection.

Height of PEM, i.e., one side of a rectangular PEM (Note!


12 PEM height [cm]
A_PEM (parameter 5) is ignored in this mode.)

Width of PEM, i.e., one side of a rectangular PEM (Note!


13 PEM width [cm]
A_PEM (parameter 5) is ignored in this mode.)

Thickness of one single fuel cell, where a cell consists of a MEA


14 Thickness of one cell [cm]
sandwiched between two bipolar plates. T_CELL >> T_PEM.

Height of a single fuel Height of a single fuel cell, i.e., one side of a rectangular cell.
15 [cm]
cell H_CELL > H_PEM.

Width of a single fuel Width of a single fuel cell, i.e., one side of a rectangular cell.
16 [cm]
cell W_CELL > W_PEM

17 End plate thickness [cm] Thickness of end plate (supporting plate) of PEMFC-stack

Height of end plate, i.e., one side of a rectangular end plate.


18 End plate height [cm]
H_PLATE > H_CELL

Width of end plate, i.e., one side of rectangular end plate.


19 End plate width [cm]
W_PLATE > W_CELL

Cell material thermal


20 [W/m.K] Thermal conductivity of cell material (graphite is default).
conductivity

Density of cell material (graphite is default). Not needed in


21 Density of cell material [kg/m3]
TMODE=1.

4–301
TRNSYS 18 – Mathematical Reference

Specific heat of cell Specific heat of cell material (graphite is default). Not needed in
22 [J/kg.K]
material TMODE=1.

End plate material Thermal conductivity of end plate material (stainless steel is
23 [W/m.K]
thermal conductivity default)

Density of end plate Density of end plate material (stainless steel is default). Not
24 [kg/m3]
material needed in TMODE=1.

Specific heat of end Specific heat of end plate material (stainless steel is default).
25 [J/kg.K]
plate material Not needed in TMODE=1.

If R_T/C_T Mode (parameter 10) is 3

Single stack thermal Thermal resistance for a single FC stack. Rt = 1/UA, where
11 [K/W]
resistance UA = overall heat loss coefficient

Single stack thermal Thermal capacitance per FC stack. Not needed in


12 [J/kg]
capacitance TMODE=1.

INPUTS

1 Control signal [-] ON/OFF Switch. 0 = OFF. 1 = ON.

Current needed from


2 [A] Total electrical current provided by fuel cell unit.
stack

Set point temperature for FC stack. In TMODE=1 this input is the


temperature at which the stack will operate at this time step. In
3 Set point temperature [C] TMODE=2, this is the set point temperature for the stack. See
the description for the TMODE parameter for details on the way
in which the set point temperature is used.

Hydrogen inlet
4 [bar] Hydrogen inlet pressure.
pressure

Inlet pressure on cathode side (Oxygen or Air depending on


5 Oxidant inlet pressure [bar]
oxidant mode (parameter 1) ).

Stoichiometric ratio for hydrogen (H2). A stoichiometric ratio of 1


is the theoretical minimum H2 needed in a 100% complete
Hydrogen
6 [-] reaction. In practical systems some excess H2 is needed to
stoichiometric ratio
assure a complete reaction. Example: 15% excess H2 fed to the
anode equals as a stoichiometric ratio of 1.15

Stoichiometric ratio for oxygen (O2). A stoichiometric ratio of 1 is


the theoretical minimum of O2 needed in a 100% complete
reaction. In practical systems some excess air or oxygen is
Oxygen stoichiometric
7 [-] needed to compete the reaction. Example: 150% excess oxygen
ratio
to the cathode gives a stoichiometric ratio of 1.5. Note: even
when the fuel cell oxidant is air, this input should be the oxygen
stoichiometric ratio.

Ambient air temperature. The air directly surrounding the FC


8 Ambient temperature [C]
stack is usually the air in a room or a container.

4–302
TRNSYS 18 – Mathematical Reference

Cooling water inlet


9 [C] Cooling water inlet temperature.
temperature

Cooling water Temperature rise in cooling water, as it passes through the fuel
10 [C]
temperature rise cell. DELTATCW=TCWout-TCWout

Evaporation rate of
11 [-] Evaporation rate of process water produced in the fuel cell
process water

OUTPUTS

1 Fuel cell power output [W] Total power output from FC unit.

Voltage across each FC stack in parallel = Voltage across


2 Stack voltage [V]
terminals of FC unit.

3 Energy efficiency [-] Energy efficiency.

Current density = Electrical current per square unit of area


4 Current density [mA/cm2]
(cross-sectional area of PEM).

5 Cell voltage [V] Voltage per cell.

Total hydrogen consumption in Nm3/hr. 1 Nm3 = 1 normal cubic


6 Hydrogen consumption [m3/hr]
meter = 1 cubic meter of gas at 1 bar and 0°C.

Total oxidant (air or pure oxygen) consumption in Nm 3/hr. 1 Nm3


7 Oxidant consumption [m3/hr]
= 1 Normal cubic meter = 1 cubic meter at 1 bar and 0°C.

8 Heat generated [W] Total heat generated by FC unit.

Auxiliary cooling
9 [W] Total auxiliary cooling demand for FC unit.
demand

10 Heat loss to ambient [W] Total heat loss to the ambient

11 Evaporation heat loss [W] Total heat lost due to evaporation.

Auxiliary heating
12 [W] Total auxiliary heating demand for FC unit.
demand

Required cooling water


13 [m3/hr] Total required cooling water flow rate for FC unit.
flow rate

Average FC stack temperature over last time step. TMODE=1.


Average stack Constant temperature: TSTACKout = TSTACKin (INPUT #3).
14 [C]
temperature TMODE=2. Calculated temperature: TSTACKout =
(TNEW+TOLD)/2.

Thermal resistance for one single stack of the FC unit. R_t =


Stack thermal
15 [K/W] 1/UA_FC, where UA_FC = Overall heat loss coefficient for the
resistance
fuel cell.

Stack thermal
16 [J/kg] Thermal capacitance for one single stack of the FC unit.
capacitance

4–303
TRNSYS 18 – Mathematical Reference

4.4.5.2. Simulation Summary Report Contents


VALUE FIELDS

Number of modules in [-] Parameter 3


series per stack

Number of stacks in [-] Parameter 4


parallel

Electrode Area [cm2] Parameter 5

PEM thickness [cm] Parameter 6

Water Transport [-] Parameter 7


Number

Minimum Allowable [V] Parameter 8


Cell Voltage

Maximum Allowable [A/cm2] Parameter 9


Cell Current Density

TEXT FIELDS

Cathode Oxidant n/a “Air” or “Oxygen” as set by Parameter 1

Stack Temperature n/a “Constant” or “Setpoint Following” as set by Parameter 2


Assumption

Thermal Resistance n/a “Simple,” “Detailed,” or “Provided as Input” as set by Parameter 10


and Capacitance
Calculation Mode

INTEGRATED VALUE FIELDS

Power Produced [kWh] Output 1

Hydrogen Consumed [Nm3] Output 6

Oxidant Consumed [Nm3] Output 7

Heat Generated [Nm3] Output 8

Heat Loss to Ambient [kWh] Output 10

Heat Loss to [kWh] Output 11


Evaporation

Auxiliary Cooling [kWh] Output 9


Demand

Auxiliary Heating [kWh] Output 12


Demand

4–304
TRNSYS 18 – Mathematical Reference

MINIMUM/MAXIMUM VALUE FIELDS

Energy Efficiency [0..1] Output 3

Current Density [A/cm2] Output 4

Desired Cooling Water [C] Input 10


Temperature Rise

Required Cooling [m3/h] Output 13


Water Flowrate

4.4.5.3. Hints and Tips


 Type 170 is also described in an EES-based executable program distributed with
TRNSYS: %TRNSYS18%\Documentation\HydrogenSystemsDocumentation.exe

4.4.5.4. Detailed Description

Figure 4.4.5–1: PEMFC principle (Air can be replaced with pure O2)
A fuel cell (Figure 4.4.5–1) is an electrochemical device that converts the chemical energy of a fuel and an
oxidant to electrical current (DC). The oxidant can be pure oxygen or a gas containing oxygen, such as air.
An example of PEMFC geometry is shown in Figure 4.4.5–2 (page 4–310).
In the case of a hydrogen-air fuel cell (OXMODE = 1), hydrogen (H2) is the fuel and air (O2) is the oxidant
[8]. In the case of a hydrogen-oxygen fuel cell (OXMODE = 2), hydrogen (H2) is the fuel and oxygen (O2) is
the oxidant [8].
The two equations below show the anodic and cathodic reactions taking place in a PEM fuel cell that is fed
with hydrogen-containing anode gas and an oxygen-containing cathode gas.
Anode: H2(g)  2 H+ (aq) + 2 e- Eq. 4.4.5-1

Cathode: 2 H+ (aq) + 2 e- + ½ O2(g)  H2O (l) Eq. 4.4.5-2

The total fuel cell reaction is:


H2 (g) + ½ O2 (g)  H2O (l) Eq. 4.4.5-3

The products of the process shown in the equation above are electricity, liquid water and heat

ELECTROCHEMICAL MODEL

4–305
TRNSYS 18 – Mathematical Reference

The performance of a fuel cell (output voltage) is defined as a function of the thermodynamical potential,
the activation overvoltage, and the ohmic overvoltage, with mass transport losses incorporated in each of
the terms [3]. The basic expression for the voltage of the single cell is:

Cell Voltage
𝑈𝑐𝑒𝑙𝑙 = 𝐸𝜂𝑎𝑐𝑡 𝜂𝑜ℎ𝑚𝑖𝑐 Eq. 4.4.5-4

Where: ‘E’ is the thermodynamic potential, act is the anode and cathode activation over-voltage, a measure
of the voltage loss associated with the anode and cathode, and ‘ETA ohmic’ is the ohmic over-voltage, a
measure of the IR losses associated with the proton conductivity of the solid polymer electrolyte and
electronic internal resistances.

Thermodynamic Potential
𝐸 = 1.23 − 0.00085(𝑇𝑠𝑡𝑎𝑐𝑘 − 298) + 0.0000431𝑇𝑠𝑡𝑎𝑐𝑘 ln(𝑝𝐻2 𝑝𝑂2 0.5 ) Eq. 4.4.5-5

Activation Overvoltage
𝜂𝑎𝑐𝑡 = −0.95 + 0.00234𝑇𝑠𝑡𝑎𝑐𝑘 + 0.000192𝑇𝑠𝑡𝑎𝑐𝑘 ln(𝐴𝑃𝐸𝑀 ) − 0.000192𝑇𝑠𝑡𝑎𝑐𝑘 ln(𝐼𝐹𝐶 )
Eq. 4.4.5-6
+ 0.000076𝑇𝑠𝑡𝑎𝑐𝑘 ln(𝐶𝑂2 )

Ohmic Overvoltage
−𝐼𝐹𝐶 𝑡𝑃𝐸𝑀 8 𝐼𝐹𝐶 𝐼𝐹𝐶 3
𝜂𝑜ℎ𝑚𝑖𝑐 = (1 + 1.64 +𝛾( ) ) Eq. 4.4.5-7
𝐴𝑃𝐸𝑀 𝑇𝑠𝑡𝑎𝑐𝑘 − 353 𝐴𝑃𝐸𝑀 𝐴𝑃𝐸𝑀
𝑒𝑥𝑝 (3.6 )
𝑇𝑠𝑡𝑎𝑐𝑘
The thermodynamical potential is defined through the Nernst equation. The parametric coefficients in the
activation overvoltage term act, are based on the theoretical equations from kinetic, thermodynamic and
electrochemistry fundamentals [2]. The parametric coefficients in the internal resistance term ohmic, are
purely empirical, based on temperature and current experimental data [3].

THERMODYNAMIC MODEL
Thermodynamics provides a framework for describing reaction equilibrium and thermal effects in
electrochemical reactors. It also gives a basis for the definition of the driving forces for transport phenomena
in electrolytes and leads to the description of the properties of the electrolyte solutions [1]. Below is a
description of the thermodynamics of the low-temperature hydrogen-air or hydrogen-oxygen
electrochemical reactions used in the fuel cell model.
The following assumptions can be made about the water splitting reaction: (a) Hydrogen and air (or oxygen)
are ideal gases, (b) water is an incompressible fluid, and (c) the gas and liquid phases are separate. Based
on these assumptions the change in enthalpy H of the water splitting reaction can be calculated with
reference to pure hydrogen (H2), oxygen (O2), and water (H2O) at a standard temperature and pressure
(25°C and 1 atm). The total change in enthalpy for splitting water is the enthalpy difference between the
products (H2 and O2) and the reactants (H2O). The same applies for the total change in entropy.
The total amount of energy released in the fuel cell reaction is equivalent to the change in enthalpy H. The
standard enthalpy for splitting water is H0 = 286 kJ mol-1. The total energy demand H is related to the
thermo-neutral cell voltage by the expression:

Thermoneutral Voltage (per cell)


Δ𝐻
𝑈𝑡𝑛 = Eq. 4.4.5-8
𝑛𝐹
At standard conditions Utn = 1.482 V, but it will change with temperature and pressure as shown below, in
the appendix of Thermodynamic model. In the applicable temperature and pressure range, U tn is almost
constant, with negligible change [6]. The generation of heat in from a fuel cell is mainly due to electrical

4–306
TRNSYS 18 – Mathematical Reference

inefficiencies. The energy efficiency can be calculated from the thermoneutral voltage (Eq. 4.4.5-8) and the
cell voltage (above) by the expression:

Energy Efficiency
𝑈𝑐𝑒𝑙𝑙
𝜂𝑒 = Eq. 4.4.5-9
𝑈𝑡𝑛
It would appear from Eq. 4.4.5-9 that a high operating voltage Ucell is required for high efficiency. At a fixed
fuel flow rate. However, utilization declines with increasing operating voltage. Power also decreases as
operating voltage is raised from the maximum power voltage which in common experience is slightly less
than half the open circuit voltage. The greatest efficiency at any given fuel flow is obtained at the operating
voltage which results in the highest power output.

Hydrogen and Oxygen (air) Flowrates


According to Faraday’s law, the consumption rates of hydrogen and oxygen (air) in a fuel cell is directly
proportional to the transfer rate of electrons to the electrodes, which in turn is equivalent to the electrical
current in the external circuit. Hence, the total consumption rate of hydrogen and oxygen(air) in a fuel cell,
which consists of several cells connected in series, can be expressed as:
𝑁𝑐𝑒𝑙𝑙𝑠 𝐼𝐹𝐶
𝑛̇ 𝐻2,𝑎,𝑐𝑜𝑛𝑠 = Eq. 4.4.5-10
𝑛𝐹
1
𝑛̇ 𝑜2,𝑐,𝑐𝑜𝑛𝑠 = 𝑛̇ 𝐻2,𝑎,𝑐𝑜𝑛𝑠 Eq. 4.4.5-11
2
𝑛̇ 𝑎𝑖𝑟,𝑐𝑜𝑛𝑠 = 4.76𝑛̇ 𝑂2,𝑐,𝑐𝑜𝑛𝑠 (𝑖𝑓 𝑂𝑋𝑀𝑂𝐷𝐸 = 1) Eq. 4.4.5-12

The inlet rates of hydrogen, oxygen and air are sized by empirical stoichiometric factors of the consumption
rates. Hydrogen, oxygen and air inlet rates:
𝑛̇ 𝐻2,𝑎,𝑖𝑛 = 𝑆𝐻2 𝑛̇ 𝐻2,𝑎,𝑐𝑜𝑛𝑠 Eq. 4.4.5-13

𝑛̇ 𝑂2,𝑐,𝑖𝑛 = 𝑆𝑂2 𝑛̇ 𝑂2,𝑐,𝑐𝑜𝑛𝑠 Eq. 4.4.5-14

𝑛̇ 𝑎𝑖𝑟,𝑖𝑛 = 𝑛̇ 𝑎𝑖𝑟,𝑐𝑜𝑛𝑠 𝑆𝑂2 (𝑖𝑓 𝑂𝑋𝑀𝑂𝐷𝐸 = 1) Eq. 4.4.5-15

The flow rate of hydrogen on the fuel side and oxygen (air) on the oxidant side affects the performance of
the PEM fuel cell. For instance, if the H2 flow is kept fixed and the O2 stoichiometry is increased, the overall
performance of the fuel cell also increases. In the H2/Air fuel cells, which have lower concentrations of O 2
on the cathode side than H2/O2 fuel cells, the air flow rates are typically kept about twice the O 2 flow rate.

Hydrogen and Oxygen Pressure


In a H2/O2 PEMFC's, the hydrogen and oxygen pressure levels are usually kept fairly constant during
operation. In an H2/Air PEMFC, a fan is usually used to force atmospheric air across the cathode side.
Thus the need to model the influence of pressure on the I-U curve is limited (Eq. 4.4.5-1). This leaves only
temperature as a variable that needs to be modeled. A mechanistic form of expressing these pressures
follows [2]:
Interfacial partial pressure of hydrogen
−1.653𝐼𝐹𝐶
𝑝𝐻2 = 𝑝𝑎,𝑖𝑛 𝑒𝑥𝑝 ( ) − 0.5𝑃𝐻2𝑂,𝑠𝑎𝑡 Eq. 4.4.5-16
𝐴𝑃𝐸𝑀 𝑇𝑠𝑡𝑎𝑐𝑘 1.334
Interfacial partial pressure of oxygen (OXMODE = 1, H2/Air)
𝑝𝑂2 = 𝑝𝑐,𝑖𝑛 (1 − 𝑋𝐻2𝑂,𝑠𝑎𝑡 − 𝑋𝑁2 ) Eq. 4.4.5-17

Interfacial partial pressure of oxygen (OXMODE = 2, H2/O2)

4–307
TRNSYS 18 – Mathematical Reference

−4.192𝐼𝐹𝐶
𝑝𝑂2 = 𝑝𝑐,𝑖𝑛 𝑒𝑥𝑝 ( ) − 𝑝𝐻20,𝑠𝑎𝑡 Eq. 4.4.5-18
𝐴𝑃𝐸𝑀 𝑇𝑠𝑡𝑎𝑐𝑘 1.334

Thermal Resistance and Capacitance, Fuel Cell Geometry


Type 170 has 3 modes to calculate overall thermal resistance (Rt) and capacitance (Ct) of a single FC stack:
 RTCTMODE = 1: Simple - Few FC geometry and thermal parameters needed
 Square design cells assumed
 Thermal properties for PEM assumed (graphite)
 RTCTMODE = 2: Detailed - Several FC geometry and thermal parameters needed
 Thermal properties for PEM supplied
 RTCTMODE = 3: Experimental - Rt & Ct provided
The overall thermal resistance (Rt=1/UAFC) and thermal capacity Ct of the fuel cell are estimated according
to [5] and [6].
A typical fuel cell geometry is shown in Figure 4.4.5–2 (page 4–310). The PEM is mounted on bipolar
graphite plates; the overall assembly (MEA + graphite plate) is called a ‘cell’ . The width and height of the
cell is usually slightly larger than the width and height of the MEA or PEM. In the calculation of the cells’
outside surface area this is taken into consideration.
 MEA = Membrane Electrode Assembly (MEA = anode + PEM + cathode)
 PEM = Proton Exchange Membrane

Thermal Resistance
𝐿𝑓𝑟𝑎𝑚𝑒 1
𝑅𝑡 = + Eq. 4.4.5-19
𝑘𝑐𝑒𝑙𝑙 𝐴𝐹𝐶 ℎ𝑎𝑖𝑟 𝐴𝐹𝐶

Thermal Capacity
𝐶𝑡 = 𝐶𝑝,𝑐𝑒𝑙𝑙 𝑁𝑐𝑒𝑙𝑙𝑠 ℎ𝑐𝑒𝑙𝑙 𝑤𝑐𝑒𝑙𝑙 𝑡𝑐𝑒𝑙𝑙 𝜌𝑐𝑒𝑙𝑙 + 𝐶𝑝,𝑝𝑙𝑎𝑡𝑒 𝜌𝑝𝑙𝑎𝑡𝑒 2ℎ𝑝𝑙𝑎𝑡𝑒 𝑤𝑝𝑙𝑎𝑡𝑒 𝑡𝑝𝑙𝑎𝑡𝑒 Eq. 4.4.5-20

The overall thermal capacity Ct and resistance Rt for the fuel cell, and the UA-product for the cooling water
heat exchanger are the constants that need to be determined analytically or empirically prior to solving the
thermal equations.

THERMAL MODEL
A heat balance of a fuel cell can be determined using simple or complex thermal models, depending on the
need for accuracy. Assuming a lumped thermal capacitance model, the overall thermal energy balance can
be expressed as a linear, first order, non-homogeneous differential equation. If TMODE = 1, the stack
temperature is assumed to be constant (Tstack,in = Tstack,out). If TMODE = 2, the stack temperature is
calculated.

Overall Energy Balance


𝐶𝑡 𝑑𝑇𝑑𝑡 = 𝑄̇𝑔𝑒𝑛 − 𝑄̇𝑙𝑜𝑠𝑠 − 𝑄̇𝑐𝑜𝑜𝑙 − 𝑄̇𝑒𝑣𝑎𝑝 Eq. 4.4.5-21

The first term on the right hand side of Eq. 4.4.5-21 is the internal heat generation (Qgen), the second term
the total heat loss to the ambient (Qloss), the third term the auxiliary cooling demand (Qcool) and the fourth
term is the evaporation of water at the cathode (Q evap). The left hand terms describes the accumulation of
heat, defined by the thermal capacity (Ct ) and the stack temperature gradient (dT/dt).
Internal Heat Generation

4–308
TRNSYS 18 – Mathematical Reference

1 − 𝜂𝑒
𝑄̇𝑔𝑒𝑛 = 𝑃𝑠𝑡𝑎𝑐𝑘 ( ) Eq. 4.4.5-22
𝜂𝑒
Heat losses to Ambient
1
𝑄̇𝑙𝑜𝑠𝑠 = (𝑇 − 𝑇𝑎𝑚𝑏 ) Eq. 4.4.5-23
𝑅𝑡 𝑠𝑡𝑎𝑐𝑘
Evaporative Losses (on cathode side)
𝑄̇𝑒𝑣𝑎𝑝 = 𝑋𝑒𝑣𝑎𝑝 𝑛̇ 𝐻2𝑂 ℎ𝑓𝑔,𝐻2𝑂 𝑀𝐻2𝑂 Eq. 4.4.5-24

Auxiliary Cooling Requirement


𝑄̇𝑐𝑜𝑜𝑙 = 𝑉𝑐𝑜𝑜𝑙 𝜌𝐻2𝑂 𝐶𝑝,𝐻2𝑂 (𝑇𝑐𝑜𝑜𝑙,𝑜𝑢𝑡 − 𝑇𝑐𝑜𝑜𝑙,𝑖𝑛 ) Eq. 4.4.5-25

The internal heat generation (Qgen), is calculated using the energy efficiency (e) to determine the fraction
of heat produced from the stack power (Pstack). Heat loss to ambient (Qloss), is calculated using the overall
thermal resistance (Rt) of the fuel cell and the temperature difference to the ambient. The main cooling of
the fuel cell is detemined by the heat absorbtion from the cooling water (Q cool), using specific heat capacity
of water (Cpwater), flow rate (Vcool) and a fixed temperature difference of the in/out flow. The heat consumption
from the evaporation of outlet water (Qevap), is calculated from the enthalpy of vaporization (h fgH2O) and
fraction of water vaporized (Xvap). It should be noted that the thermal model presented here is on a per stack
basis.

4–309
TRNSYS 18 – Mathematical Reference

Figure 4.4.5–2: PEMFC Geometry

4.4.5.5. References
1. Rousar I. (1989) Fundamentals of electrochemical reactors. In Electrochemical Reactors: Their
Science and Technology Part A, Ismail M. I. (Eds), Vol pp. Elsevier Science, Amsterdam.
2. Amphlett J. C., Baumert R. M., Mann R. F., Peppley B. A., Roberge P. R. and Harris T. J. (1995)
Performance modeling of the Ballard Mark IV solid polymer electrolyte fuel cell. Part I - mechanistic
model development. J. Electrochem. Soc. 142(1): 1-8.

4–310
TRNSYS 18 – Mathematical Reference

3. Amphlett J. C., Baumert R. M., Mann R. F., Peppley B. A., Roberge P. R. and Harris T. J. (1995)
Performance modeling of the Ballard Mark IV solid polymer electrolyte fuel cell. Part II - empirical
model development. J. Electrochem. Soc. 142(1): 9-15.
4. Amphlett J. C., Mann R. F., Peppley B. A., Roberge P. R., Rodrigues A. and Salvador J. P. (1996)
A model predicting transient responses of proton exchange membrane fuel cells. J. Power Sources
61(1-2): 183-188.
5. Ulleberg Ø. (1998) Stand-Alone Power Systems for the Future: Optimal Design, Operation &
Control of Solar-Hydrogen Energy Systems. PhD thesis, Norwegian University of Science and
Technology, Trondheim.
6. Ulleberg Ø. (2001) Evaluation of IFE’s 100 W PEM Fuel Cell Stack Performance. Internal report,
Institute for Energy Technology,
7. Mann R. F., Amphlett J. C., Hooper M. A. I., Jensen H. M., Peppley B. A. and Roberge P. R. (2000)
Development and application of a generalised steady-state electrochemical model for a PEM fuel
cell. J. Power Sources 86(1-2): 173-180.
8. Kordesch K. and Simader G. (1996) Fuel Cells and their Applications. 1st edn, VCH, New York.

4–311
TRNSYS 18 – Mathematical Reference

4.4.6. Type 173: Alkaline Fuel Cell


Type173 is a simple mathematical model for an alkaline fuel cell (AFC). The electrochemical model is based
on an empirical relationship for the current-voltage characteristic at normal operating temperature. The heat
generated by the AFC-stack is calculated, but no detailed dynamic thermal model is included. Type173 has
been modeled with a specific AFC from ZeTek in mind [1,2].

4.4.6.1. Parameter/Input/Output Reference


PARMETERS

OXmode=1. Air is provided to the cathode. OXmode=2. Pure


1 Cathode oxidant type [-]
oxygen is provided to the cathode.

Number of modules in Number of FC modules in series per stack. NMSER gives the
2 [-]
series VOLTAGE RATING of the fuel cell.

Number of modules in Number of stacks in parallel per FC unit. NSTACKS gives the
3 [-]
parallel CURRENT RATING of the fuel cell.

4 Electrode area [cm2] Electrode area.

5 Faraday efficiency [-] Faraday efficiency = current efficiency.

I-U curve coefficient #1: Open circuit voltage (on a per FC


6 Open circuit voltage [V]
module basis).

7 Tafel slope [V/dec] I-U curve coefficient #2: Tafel slope (on a per FC module basis)

8 Ohmic resistance [ohm] I-U curve coefficient #3: Resistance (on a per FC module basis).

Minimum allowable cell


9 [V] Minimum cell voltage limit.
voltage

INPUTS

1 Control signal [-] ON/OFF Switch. 0 = OFF, 1 = ON.

2 Fuel cell current [A] Total electrical current that must be provided by FC unit.

Stack operating
3 [C] Nominal operating temperature for FC stack.
temperature

Hydrogen inlet
4 [bar] Hydrogen inlet pressure.
pressure

Cathode oxidant inlet Oxidant (air or oxygen depending on the value of parameter 1)
5 [bar]
pressure inlet pressure.

Stoichiometric ratio for hydrogen (H2). A stoichiometric ratio of 1


is the theoretical minimum H2 needed in a 100% complete
Hydrogen
6 [-] reaction. In practical systems some excess H2 is needed to
stoichiometric ratio
assure a complete reaction. Example: 15% excess H2 fed to the
anode equals as a stoichiometric ratio of 1.15

4–312
TRNSYS 18 – Mathematical Reference

Stoichiometric ratio for oxygen (O2). A stoichiometric ratio of 1 is


the theoretical minimum of O2 needed in a 100% complete
reaction. In practical systems some excess air or oxygen is
Oxygen stoichiometric
7 [-] needed to compete the reaction. Example: 150% excess oxygen
ratio
to the cathode gives a stoichiometric ratio of 1.5. Note: even if
the oxidant is air, this value should be the stoichiometric ratio of
oxygen, not the stoichiometric ratio of the oxidant.

OUTPUTS

1 Fuel cell power output [W] Total power output from FC unit.

Voltage across each FC stack in parallel = Voltage across


2 Stack voltage [V]
terminals of FC unit.

3 Energy efficiency [-] Energy efficiency.

Current density = Electrical current per square unit of area


4 Current density [mA/cm2]
(cross-sectional area of electrode).

5 Cell voltage [V] Voltage per cell.

Hydrogen consumption Total hydrogen consumption in Nm3/hr. 1 Nm3 = 1 normal cubic


6 [m3/h]
rate meter = 1 cubic meter of gas at 1 bar and 0°C.

Total air consumption in Nm3/hr. 1 Nm3 = 1 Normal cubic meter


7 Air consumption rate [m3/h]
= 1 cubic meter at 1 bar and 0°C.

8 Energy generated [W] Total heat generated by FC unit.

4.4.6.2. Simulation Summary Report Contents


VALUE FIELDS

Number of modules in [-] Parameter 2


series per stack

Number of stacks in [-] Parameter 3


parallel

Electrode Area [cm2] Parameter 4

Faraday Efficiency [0..1] Parameter 5

Open Circuit Voltage [V] Parameter 6

Taefel Slope [V/dec] Parameter 7

Ohmic Resistance [] Parameter 8

Minimum Allowable [V] Parameter 9


Cell Voltage

TEXT FIELDS

4–313
TRNSYS 18 – Mathematical Reference

Cathode Oxidant n/a “Air” or “Oxygen depending on the value of Parameter 1

INTEGRATED VALUE FIELDS

Power Produced [kWh] Output 1

Hydrogen Consumed [Nm3/h] Output 6

Oxidant consumed [Nm3/h] Output 7

MINIMUM/MAXIMUM VALUE FIELDS

Energy Efficiency [0..1] Output 3

Current Density [mA/cm2] Output 4

4.4.6.3. Hints and Tips


 Type 173 is also described in an EES-based executable program distributed with
TRNSYS: %TRNSYS18%\Documentation\HydrogenSystemsDocumentation.exe

4.4.6.4. Detailed Description


A fuel cell is an electrochemical device that converts the chemical energy of a fuel and an oxidant to
electrical current (DC). In the case of a hydrogen-air fuel cell (OXMODE = 1), hydrogen (H2) is the fuel and
air (O2) is the oxidant. In the case of a hydrogen-oxygen fuel cell (OXMODE = 2), hydrogen (H2) is the fuel
and oxygen (O2) is the oxidant. A principle scheme of a Fuel Cell is given in Figure 4.4.5–1.
Eq. 4.4.6-1 and Eq. 4.4.6-2 show the anodic and cathodic reactions taking place in a PEM fuel cell that is
fed with hydrogen-containing anode gas and an oxygen-containing cathode gas.
Anode: H2(g)  2 H+ (aq) + 2 e- Eq. 4.4.6-1

Cathode: 2 H+ (aq) + 2 e- + ½ O2(g)  H2O (l) Eq. 4.4.6-2

The total fuel cell reaction is:


H2 (g) + ½ O2 (g)  H2O (l) Eq. 4.4.6-3

The products of this process (Eq. 4.4.6-3) are electricity, liquid water and heat

ELECTRICAL MODEL
Cell, module and stack voltage:
𝑈𝑚𝑜𝑑
𝑈𝑐𝑒𝑙𝑙 = Eq. 4.4.6-4
𝑛𝑐,𝑠𝑒𝑟
𝑈𝑚𝑜𝑑 = 𝑈𝑜 − 𝑏 log(𝐼𝑠𝑡𝑎𝑐𝑘 ) − 𝑅𝑜ℎ𝑚 𝐼𝑠𝑡𝑎𝑐𝑘 Eq. 4.4.6-5

𝑈𝑠𝑡𝑎𝑐𝑘 = 𝑛𝑚,𝑠𝑒𝑟 𝑈𝑚𝑜𝑑 Eq. 4.4.6-6

Cell and stack current:


𝐼𝐹𝐶
𝐼𝑐𝑒𝑙𝑙 = Eq. 4.4.6-7
𝑛𝑐,𝑝𝑎𝑟 𝑛𝑠,𝑝𝑎𝑟
𝐼𝐹𝐶
𝐼𝑠𝑡𝑎𝑐𝑘 = Eq. 4.4.6-8
𝑛𝑠,𝑝𝑎𝑟

4–314
TRNSYS 18 – Mathematical Reference

Stack power:
𝑃𝑠𝑡𝑎𝑐𝑘 = 𝑈𝑠𝑡𝑎𝑐𝑘 𝐼𝑠𝑡𝑎𝑐𝑘 Eq. 4.4.6-9

Energy efficiency:
𝑈𝑐𝑒𝑙𝑙
𝜂𝐸 = Eq. 4.4.6-10
𝑈𝑡𝑛

THERMODYNAMIC MODEL
Stoichiometric molar flow of hydrogen:
𝑛𝑐,𝑠𝑒𝑟 𝑛𝑚,𝑠𝑒𝑟 𝐼𝐹𝐶
𝑛̇ 𝐻2 = 𝜂𝐹 Eq. 4.4.6-11
𝑧𝐹
Total hydrogen consumption:
𝑛̇ 𝐻2
̇ =
𝑉𝐻2 𝑆 Eq. 4.4.6-12
𝜌𝑔𝑎𝑠 𝐻2

THERMAL MODEL
Total heat generated by fuel cell:
1 − 𝜂𝐸
𝑄𝑔𝑒𝑛 = 𝑃𝑠𝑡𝑎𝑐𝑘 ( ) Eq. 4.4.6-13
𝜂𝐸

4.4.6.5. References
1. Brown M. (2001) Testing of ZeTek stacks. Personal communication, Industrial Research Limited,
Christchurch, New Zealand.
2. ZeTek (2001) ZeTek Mk2-4 stack specification sheet.

4–315
TRNSYS 18 – Mathematical Reference

4.5. Hydronics

4–316
TRNSYS 18 – Mathematical Reference

4.5.1. Type 5: Heat Exchanger


A zero capacitance sensible heat exchanger is modeled in the parallel, counter, various cross flow
configurations and shell and tube modes. For all modes, given the hot and cold side inlet temperatures
and flow rates, the effectiveness is calculated for a given fixed value of the overall heat transfer coefficient.
The cross flow modes assume one of the following.
1. That the hot (source) side fluid is unmixed while the cold (load) side is completely mixed
2. That the cold (load) side fluid is unmixed while the hot (source) side is completely mixed
3. That neither the cold nor the hot side fluids are mixed or
4. That both the hot and cold sides are mixed.
The mathematical description that follows is covered in detail in Kays and London. The shell and tube model
and the situation in which both fluids are unmixed are covered in DeWitt and Incropera. Type 91 models a
constant effectiveness heat exchanger in which UA is calculated instead of being provided as an input.
NOTE: "source" and "load" are merely convenient designations; energy will be transferred from the source
side to the load side if the source side is hotter than the load side. It will be transferred from the load side
to the source side if the load side is hotter than the source side.

4.5.1.2. Parameter/Input/Output Reference


PARAMETERS

1 Configuration Mode [-] 1 = Parallel Flow; 2 = Counter Flow; 3 = Cross Flow with Cold
Side Mixed and Hot Side Unmixed; 4 = Cross Flow with Hot Side
Mixed and Cold Side Unmixed; 5 = Cross Flow with Both
Unmixed; 6 = Cross Flow with Both Mixed; 7 = Shell and Tube.

2 Specific Heat of [kJ/kg K] The specific heat of the fluid flowing through the source side of
Source Side Fluid the heat exchanger.

3 Specific Heat of Load [kJ/kg K] The specific heat of the fluid flowing through the load side of the
Side Fluid heat exchanger.

4 Number of Shell [-] For mode 7 - The number of times that fluid in the shell passes
Passes over the tube bank. Often the shell is internally divided by baffles
that force the shell fluid to flow over the tube bank in multiple
passes. The number of passes is typically one more than the
number of internal baffles. For all other modes this parameter is
not used.

INPUTS

1 Source Side Inlet [C] The temperature of the fluid flowing into the source side of the
Temperature parallel flow heat exchanger.

2 Source Side Flow Rate [kg/h] The flow rate of the fluid flowing through the source side of the
heat exchanger.

3 Load Side Inlet [C] The temperature of the fluid flowing into the load side of the
Temperature parallel flow heat exchanger.

4 Load Side Flow Rate [kg/h] The flow rate of the fluid flowing through the load side of the
heat exchanger.

4–317
TRNSYS 18 – Mathematical Reference

5 Overall Heat Transfer [kJ/h K] Overall heat transfer coefficient of the heat exchanger.
Coefficient of
Exchanger

OUTPUTS

1 Source Side Outlet [C] The temperature of the fluid leaving the source side of the heat
Temperature exchanger.

2 Source Side Flow Rate [kg/h] The flow rate of fluid exiting the source side of the heat
exchanger.

3 Load Side Outlet [C] The temperature of the fluid leaving the load side of the heat
Temperature exchanger

4 Load Side Flow Rate [kg/h] The flow rate of fluid exiting the load side of the heat exchanger.

5 Heat Transfer Rate [kJ/h] The total heat transfer rate between the fluids in the heat
exchanger.

6 Effectiveness [-] The effectiveness of the heat exchanger.

4.5.1.3. Simulation Summary Report Contents


TEXT FIELDS

Heat Exchanger [-] Parameter 1


Configuration

MINIMUM/MAXIMUM VALUE FIELDS

Heat Exchanger UA [kJ/h K] The minimum and maximum of input 5

Effectiveness [-] The minimum and maximum of output 6

4.5.1.4. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.5.1.5. Nomenclature
Cc capacity rate of fluid on cold side, mcCpc
Ch capacity rate of fluid on hot side, mhCph
Cmax maximum capacity rate
Cmin minimum capacity rate
Cpc specific heat of cold side fluid
Cph specific heat of hot side fluid
 heat exchanger effectiveness

4–318
TRNSYS 18 – Mathematical Reference

mc fluid mass flow rate on cold side


mh fluid mass flow rate on hot side

QT total heat transfer rate across heat exchanger

Q max the maximum heat transfer rate across exchanger


Tci cold side inlet temperature
Tco cold side outlet temperature
Thi hot side inlet temperature
Tho hot side outlet temperature
UA overall heat transfer coefficient of exchanger
N number of shell passes

4.5.1.6. Detailed Description


Type 5 relies on an effectiveness minimum capacitance approach to modeling a heat exchanger. Under
this assumption, the user is asked to provide the heat exchanger’s UA and inlet conditions. The model then
determines whether the cold (load) or the hot (source) side is the minimum capacitance side and calculates
an effectiveness based upon the specified flow configuration and on UA. The heat exchanger outlet
conditions are then computed.
A schematic of the heat exchanger is shown below.
m h , Thi mc , T
co

Hot Side Q Cold Side


T

m h, T mc , Tc i
ho
Figure: Heat Exchanger Schematic
The capacitance of each side of the heat exchanger is calculated according to the following four equations.
𝐶𝑐 = 𝑚̇𝑐 𝐶𝑝𝑐 Eq. 4.5.1-1

𝐶ℎ = 𝑚̇ℎ 𝐶𝑝ℎ Eq. 4.5.1-2

𝐶𝑚𝑎𝑥 = 𝑚𝑎𝑥(𝐶𝑐 , 𝐶ℎ ) Eq. 4.5.1-3

𝐶𝑚𝑖𝑛 = 𝑚𝑖𝑛(𝐶𝑐 , 𝐶ℎ ) Eq. 4.5.1-4

The following indicate the expression used to calculate the heat exchanger effectiveness at each timestep
depending upon heat exchanger configuration.

4–319
TRNSYS 18 – Mathematical Reference

Mode 1 - Parallel Flow


𝑈𝐴 𝐶
1 − exp [− (1 + 𝑚𝑖𝑛 )]
𝐶𝑚𝑖𝑛 𝐶𝑚𝑎𝑥
𝜀= Eq. 4.5.1-5
𝐶
1 + 𝑚𝑖𝑛
𝐶𝑚𝑎𝑥
Mode 2 – Counter Flow
𝑈𝐴 𝐶
1 − 𝑒𝑥𝑝 [− (1 − 𝑚𝑖𝑛 )]
𝐶𝑚𝑖𝑛 𝐶𝑚𝑎𝑥
𝜀= Eq. 4.5.1-6
𝐶 𝑈𝐴 𝐶
1 − ( 𝑚𝑖𝑛 ) 𝑒𝑥𝑝 [− (1 − 𝑚𝑖𝑛 )]
𝐶𝑚𝑎𝑥 𝐶𝑚𝑖𝑛 𝐶𝑚𝑎𝑥
Mode 3 – Cross Flow (Hot (source) Side Unmixed, Cold (load) Side Mixed)

If Cmax = Ch,
𝑈𝐴 𝐶𝑚𝑖𝑛
𝛾 = 1 − 𝑒𝑥𝑝 ( ) Eq. 4.5.1-7
𝐶𝑚𝑖𝑛 𝐶𝑚𝑎𝑥
𝐶𝑚𝑎𝑥
𝜀 = 1 − 𝑒𝑥𝑝 (−𝛾 ) Eq. 4.5.1-8
𝐶𝑚𝑖𝑛
If Cmin = Ch,
𝑈𝐴
𝛾 = 1 − 𝑒𝑥𝑝 (− ) Eq. 4.5.1-9
𝐶𝑚𝑖𝑛
𝐶𝑚𝑎𝑥 𝐶𝑚𝑖𝑛
𝜀= [1 − 𝑒𝑥𝑝 (−𝛾 )] Eq. 4.5.1-10
𝐶𝑚𝑖𝑛 𝐶𝑚𝑎𝑥
Mode 4 – Cross Flow (Cold (load) Side Unmixed, Hot (source) Side Mixed)

If Cmax = Ch,
𝑈𝐴
𝛾 = 1 − 𝑒𝑥𝑝 (− ) Eq. 4.5.1-11
𝐶𝑚𝑖𝑛
𝐶𝑚𝑎𝑥 𝐶𝑚𝑖𝑛
𝜀= [1 − 𝑒𝑥𝑝 (−𝛾 )] Eq. 4.5.1-12
𝐶𝑚𝑖𝑛 𝐶𝑚𝑎𝑥
If Cmin = Ch ,
𝑈𝐴 𝐶𝑚𝑖𝑛
𝛾 = 1 − 𝑒𝑥𝑝 ( ) Eq. 4.5.1-13
𝐶𝑚𝑖𝑛 𝐶𝑚𝑎𝑥
𝐶𝑚𝑎𝑥
𝜀 = 1 − 𝑒𝑥𝑝 (−𝛾 ) Eq. 4.5.1-14
𝐶𝑚𝑖𝑛
Mode 5 – Cross Flow: Both Sides Unmixed
𝐶𝑚𝑎𝑥 𝑈𝐴 0.22 𝐶𝑚𝑖𝑛 𝑈𝐴 0.78
𝜀 = 1 − 𝑒𝑥𝑝 [( )( ) {𝑒𝑥𝑝 [− ( ) ] − 1}] Eq. 4.5.1-15
𝐶𝑚𝑖𝑛 𝐶𝑚𝑖𝑛 𝐶𝑚𝑎𝑥 𝐶𝑚𝑖𝑛
Mode 6 – Cross Flow: Both Sides Mixed
𝑈𝐴
𝐶𝑚𝑖𝑛
𝜀=
𝑈𝐴 𝐶𝑚𝑖𝑛 𝑈𝐴 Eq. 4.5.1-16
𝐶𝑚𝑖𝑛 𝐶𝑚𝑎𝑥 𝐶𝑚𝑖𝑛
𝑈𝐴 + 𝑈𝐴 𝐶𝑚𝑖𝑛 − 1
1 − 𝑒𝑥𝑝 (− ) 1 − 𝑒𝑥𝑝 (− )
𝐶𝑚𝑖𝑛 𝐶𝑚𝑖𝑛 𝐶𝑚𝑎𝑥
Mode 7 – Shell and Tube

4–320
TRNSYS 18 – Mathematical Reference

0.5 −1
2
𝑈𝐴 𝐶
0.5 1 + 𝑒𝑥𝑝 [− 𝐶 (1 + ( 𝑚𝑖𝑛 ) ) ]
𝐶𝑚𝑖𝑛 𝐶𝑚𝑖𝑛 2 𝑚𝑖𝑛 𝐶𝑚𝑎𝑥
𝜀1 = 2 1 + + (1 + ( ) ) Eq. 4.5.1-17
𝐶𝑚𝑎𝑥 𝐶𝑚𝑎𝑥 2 0.5
𝑈𝐴 𝐶
1 − 𝑒𝑥𝑝 [− (1 + ( 𝑚𝑖𝑛 ) ) ]
{ 𝐶𝑚𝑖𝑛 𝐶𝑚𝑎𝑥 }
−1
𝐶𝑚𝑖𝑛 𝑁 𝐶 𝑁
1 − 𝜀1 1 − 𝜀1 𝑚𝑖𝑛 𝐶𝑚𝑖𝑛
𝐶𝑚𝑎𝑥 𝐶𝑚𝑎𝑥 Eq. 4.5.1-18
𝜀= ( ) −1 ( ) −
1 − 𝜀1 1 − 𝜀1 𝐶𝑚𝑎𝑥
[ ][ ]
All Modes
𝐶𝑚𝑖𝑛
𝑇ℎ,𝑜𝑢𝑡 = 𝑇ℎ,𝑖𝑛 − 𝜀 ( ) (𝑇ℎ,𝑖𝑛 − 𝑇𝑐,𝑖𝑛 ) Eq. 4.5.1-19
𝐶ℎ
𝑄𝑇 = 𝜀𝐶𝑚𝑖𝑛 (𝑇ℎ,𝑖𝑛 − 𝑇𝑐,𝑖𝑛 ) Eq. 4.5.1-20

Special Cases

Mode 3:
𝑈𝐴
𝐶𝑚𝑖𝑛 𝐶𝑚𝑖𝑛
𝐼𝑓 | − 1| < 0.01 𝑇ℎ𝑒𝑛 𝜀 = Eq. 4.5.1-21
𝐶𝑚𝑎𝑥 𝑈𝐴
+1
𝐶𝑚𝑖𝑛

All Modes:
𝐶𝑚𝑖𝑛 𝑈𝐴
𝐼𝑓 ≤ 0.01 𝑇ℎ𝑒𝑛 𝜀 = 1 − 𝑒𝑥𝑝 (− ) Eq. 4.5.1-22
𝐶𝑚𝑎𝑥 𝐶𝑚𝑖𝑛

4–321
TRNSYS 18 – Mathematical Reference

4.5.2. Type 11: Tee Piece, Flow Diverter, Flow Mixer,


Tempering Valve
The use of pipe or duct 'tee-pieces', mixers, and diverters, which are subject to external control, is often
necessary in thermal systems. This component has ten modes of operation. Modes 1 through 5 are
normally used for fluids with only one important property, such as temperature. Modes 6 through 10 are
for fluids, such as moist air, with two important properties, such as temperature and humidity (however any
condensation effects of mixing are ignored). Modes 1 and 6 simulate the function of a tee-piece that
completely mixes two inlet streams of the same fluid at different temperatures and or humidities as shown
in Figure 4.5.2–1. Modes 2 and 7 simulate the operation of a flow diverter with one inlet which is
proportionally split between two possible outlets, depending on the value of gamma, an input control
function as shown in Figure 4.5.2–2. Modes 3 and 8 simulate the operation of a flow mixer whose outlet
flow rate, temperature, and/or humidity is determined by mixing its two possible inlets in the proportion
determined by gamma as shown in Figure 4.5.2–3. For modes 2, 3, 7, and 8, gamma must have a value
between 0 and 1. Modes 4, 5, 9 and 10 are temperature controlled flow diverters that may be used to model
tempering valves.

4.5.2.1. Parameter/Input/Output Reference


PARAMETERS

1 Mode [-] The mode of the valve (1-10) [see above for description of the
modes]

If mode = 4,5,9 or 10

2 Number of Oscillations [-] The number of oscillations of the controller state allowed in one
Permitted timestep before the output will be fixed and the solution found. Set
to an odd number to allow the controller to bounce between two
control states for successive timesteps. (See Control Basics for a
more complete discussion of controller oscillations.)

INPUTS

For Mode = 1

1 Temperature at inlet 1 [C] The temperature of the first fluid entering the tee piece

2 Flow rate at inlet 1 [kg/h] The flow rate of the first fluid entering the tee piece

3 Temperature at inlet 2 [C] The temperature of the second fluid entering the tee piece

4 Flow rate at inlet 2 [kg/h] The flow rate of the second fluid entering the tee piece

For Mode = 2

1 Inlet temperature [C] The temperature of the fluid entering the flow diverter.

2 Inlet flow rate [kg/h] The flow rate of the fluid entering the flow diverter.

3 Control signal [0..1] The input control signal. The control signal sets the position of a
damper controlling the proportion of fluid to each exit. mdot,1 =
mdot,in * (1-Y); mdot,2 = mdot,in * Y

4–322
TRNSYS 18 – Mathematical Reference

For Mode = 3

1 Temperature at inlet 1 [C] The temperature of the first fluid entering the tee piece

2 Flow rate at inlet 1 [kg/h] The flow rate of the first fluid entering the tee piece

3 Temperature at inlet 2 [C] The temperature of the second fluid entering the tee piece

4 Flow rate at inlet 2 [kg/h] The flow rate of the second fluid entering the tee piece

3 Control signal [0..1] The control signal for the controlled flow mixer. The controlled flow
mixer uses the control signal to proportion the amount of flow from
each of the inlets. mdot,out = mdot,in,1 * (1 - Y) + mdot,in,2 * Y

For Modes = 4 & 5

1 Inlet temperature [C] The temperature of the fluid entering the flow diverter.

2 Inlet flow rate [kg/h] The flow rate of the fluid entering the flow diverter.

3 Heat source [C] The temperature of the fluid exiting the heat source that is to be
temperature cooled by the addition of fluid from the tempering valve component.
This temperature is used to determine how much of the fluid
entering the tempering valve will be sent to the heat source and
how much of the fluid will be diverted to mix with the fluid exiting
the heat source.

4 Setpoint temperature [C] The temperature below which the heat source flow stream is to be
kept at all times. The heat source flow stream temperature will be
kept at or below the setpoint temperature (if possible) by the
diversion of cooler fluid from the inlet of the heat source to a mixing
component at the exit of the heat source.

For Mode = 6

1 Temperature at inlet 1 [C] The temperature of the first fluid entering the tee piece

2 Humdity ratio at inlet 1 [-] The humidity ratio of the first fluid entering the tee piece

3 Flow rate at inlet 1 [kg/h] The flow rate of the first fluid entering the tee piece

4 Temperature at inlet 2 [C] The temperature of the second fluid entering the tee piece

5 Humdity ratio at inlet 2 [-] The humidity ratio of the second fluid entering the tee piece

6 Flow rate at inlet 2 [kg/h] The flow rate of the second fluid entering the tee piece

For Mode = 7

1 Inlet temperature [C] The temperature of the fluid entering the flow diverter.

2 Inlet humidity ratio [-] The humidity ratio of the fluid entering the flow diverter.

3 Inlet flow rate [kg/h] The flow rate of the fluid entering the flow diverter.

4–323
TRNSYS 18 – Mathematical Reference

4 Control signal [0..1] The input control signal. The control signal sets the position of a
damper controlling the proportion of fluid to each exit. mdot,1 =
mdot,in * (1-Y); mdot,2 = mdot,in * Y

For Mode = 8

1 Temperature at inlet 1 [C] The temperature of the first fluid entering the tee piece

2 Humdity ratio at inlet 1 [-] The humidity ratio of the first fluid entering the tee piece

3 Flow rate at inlet 1 [kg/h] The flow rate of the first fluid entering the tee piece

4 Temperature at inlet 2 [C] The temperature of the second fluid entering the tee piece

5 Humdity ratio at inlet 2 [-] The humidity ratio of the second fluid entering the tee piece

6 Flow rate at inlet 2 [kg/h] The flow rate of the second fluid entering the tee piece

7 Control signal [0..1] The control signal for the controlled flow mixer. The controlled flow
mixer uses the control signal to proportion the amount of flow from
each of the inlets. mdot,out = mdot,in,1 * (1 - Y) + mdot,in,2 * Y

For Modes = 9 & 10

1 Inlet temperature [C] The temperature of the fluid entering the flow diverter.

2 Inlet humidity ratio [-] The humidity ratio of the fluid entering the flow diverter.

3 Inlet flow rate [kg/h] The flow rate of the fluid entering the flow diverter.

4 Heat source [C] The temperature of the fluid exiting the heat source that is to be
temperature cooled by the addition of fluid from the tempering valve component.
This temperature is used to determine how much of the fluid
entering the tempering valve will be sent to the heat source and
how much of the fluid will be diverted to mix with the fluid exiting
the heat source.

5 Setpoint temperature [C] The temperature below which the heat source flow stream is to be
kept at all times. The heat source flow stream temperature will be
kept at or below the setpoint temperature (if possible) by the
diversion of cooler fluid from the inlet of the heat source to a mixing
component at the exit of the heat source.

OUTPUTS

For Modes = 1 & 3

1 Outlet temperature [C] The temperature of the fluid exiting the tee piece

2 Outlet flow rate [kg/h] The flow rate of the fluid exiting the tee piece

For Mode = 2

1 Temperature at outlet 1 [C] The temperature of the first fluid exiting the diverter

2 Flow rate at outlet 1 [kg/h] The flow rate of the first fluid exiting the diverter

4–324
TRNSYS 18 – Mathematical Reference

3 Temperature at outlet 2 [C] The temperature of the second fluid exiting the diverter

4 Flow rate at outlet 2 [kg/h] The flow rate of the second fluid exiting the diverter

For Modes = 4 & 5

1 Temperature at outlet 1 [C] The temperature of the first fluid exiting the diverter

2 Flow rate at outlet 1 [kg/h] The flow rate of the first fluid exiting the diverter

3 Temperature at outlet 2 [C] The temperature of the second fluid exiting the diverter

4 Flow rate at outlet 2 [kg/h] The flow rate of the second fluid exiting the diverter

5 Control function [-] The calculated fraction of fluid exiting through the first outlet of the
tempering valve. The fraction is defined as: Y = mdot,1 / mdot,in

For Mode = 6 & 8

1 Outlet temperature [C] The temperature of the fluid exiting the tee piece

2 Outlet humidity ratio [-] The humidity ratio of the fluid exiting the tee piece

3 Outlet flow rate [kg/h] The flow rate of the fluid exiting the tee piece

For Mode = 7

1 Temperature at outlet 1 [C] The temperature of the first fluid exiting the diverter

2 Humidity ratio at output [-] The humidity ratio of the first fluid exiting the diverter
1

3 Flow rate at outlet 1 [kg/h] The flow rate of the first fluid exiting the diverter

4 Temperature at outlet 2 [C] The temperature of the second fluid exiting the diverter

5 Humidity ratio at output [-] The humidity ratio of the second fluid exiting the diverter
2

6 Flow rate at outlet 2 [kg/h] The flow rate of the second fluid exiting the diverter

For Modes = 9 & 10

1 Temperature at outlet 1 [C] The temperature of the first fluid exiting the diverter

2 Humidity ratio at output [-] The humidity ratio of the first fluid exiting the diverter
1

3 Flow rate at outlet 1 [kg/h] The flow rate of the first fluid exiting the diverter

4 Temperature at outlet 2 [C] The temperature of the second fluid exiting the diverter

5 Humidity ratio at output [-] The humidity ratio of the second fluid exiting the diverter
2

6 Flow rate at outlet 2 [kg/h] The flow rate of the second fluid exiting the diverter

4–325
TRNSYS 18 – Mathematical Reference

5 Control function [-] The calculated fraction of fluid exiting through the first outlet of the
tempering valve. The fraction is defined as: Y = mdot,1 / mdot,in

4.5.2.2. Simulation Summary Report Contents


MINIMUM/MAXIMUM VALUE FIELDS

For Modes = 4, 5, 9, & 10

Tempering Valve [C] The minimum and maximum of the input setpoint for tempering
Setpoint

4.5.2.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.5.2.4. Nomenclature
mi mass flow rate of inlet fluid
mo mass flow rate of outlet fluid
m1 mass flow rate at position 1 (See Figures)
m2 mass flow rate at position 2 (See Figures)
Th heat source fluid temperature
Ti temperature of inlet fluid
To temperature of outlet fluid
Tset maximum temperature of fluid supplied to load
T1 temperature at position 1 (See Figures)
T2 temperature at position 2 (See Figures)
 control function having a value between 0 and 1
1 humidity ratio at position 1
2 humidity ratio at position 2
i humidity ratio of inlet fluid
o humidity ratio of outlet fluid

4.5.2.5. Detailed Description


m T + m2T2
T1 To = 1 1
 (Mode 6) m1 + m2
1 m11 + m22
m1 T o = (Mode 6)
o m1 + m2
o(Mode 6) mo = m1 + m2
m
T2 o
2 (Mode 6)
m
2

Figure 4.5.2–1: Mode 1 and 6: (Tee Piece)

4–326
TRNSYS 18 – Mathematical Reference

T1 = Ti
T1 1 = i (Mode 7)
 (Mode 7) m1 = mi 1-
1
m1 T2 = Ti
Ti =1
2 = i (Mode 7)
 i (Mode 7)
m2 = mi 
mi =0
T
2
2 (Mode 7)
m2

Figure 4.5.2–2: Mode 2 and 7: (Flow Diverter)

m T 1- + m2T2 
T
To = 1 1
1 m1 1- + m2 
 (Mode 8) m  1- + m22 
1
=1 o = 1 1 (Mode 8)
m1 To m1 1- + m2 
 o (Mode 8)
mo = m1 1- + m2 
T =0 m
2 o
 (Mode 8)
2
m2

Figure 4.5.2–3: Mode 3 and 8: (Flow Mixer)


WARNING: In TRNSYS v.16 and earlier, the outlet temperatures were left unchanged from the previous
call under no-flow conditions to avoid unnecessary calls to downstream components. As a result, the outlet
temperatures could not be used for any control decisions. With the release of TRNSYS v.17, the outlet
temperatures were set to the inlet 1 temperature under no-flow conditions so that these temperatures could
be used for control decisions.
Modes 4, 5, 9 and 10 are similar to modes 2 and 7 except that  is calculated by the Type 11 routine. In
domestic, commercial and industrial heating applications, it is common to mix heated fluid with colder supply
fluid so that the flow stream to the load is no hotter than necessary. Often this is accomplished by placing
a "tempering valve" in the storage outlet stream (position A on Figure 4.5.2–4 below). Such a valve relies
on the supply pressure to drive fluid through the heat source and bypass lines in proportion to the valve
setting.
Although thermally equivalent, it is better for simulation purposes to place a temperature controlled flow
diverter at point B (in the figure below) than to place a temperature controlled mixer at point A. Modes 4
and 5 of Type 11 are designed for this purpose. The control function  is set so that if flow stream 1
displaces fluid of temperature Th, the mixed fluid temperature will not exceed the temperature T set. Modes
4 and 9 differ from 5 and 10 in that Modes 4 and 9 send the entire flow stream through outlet 1 when Th <
Ti, while Modes 5 and 10 send the entire flow stream through outlet 2 when T h < Ti

4–327
TRNSYS 18 – Mathematical Reference

Th , m 1 TL , m i
A To Load

T ,m
Stor age i 2

B Make- Up
Ti ,m 1 T i , mi

Figure 4.5.2–4: Example of Tempering Valve Use

T1
 ( Mode s 9 & 10)
1
Ti m1
 ( Mode s 9 & 10)
i
mi
T
2
 ( Mode s 9 & 10)
2
m2

Figure 4.5.2–5: Modes 4, 5, 9, and 10 (Tempering Valve)

Table 4.5.2–1:

T1 = Ti  = (Tset - Ti)/(Th - Ti) if Th > Tset

1 = i (Modes 9 & 10) =1 if Ti ≤ Th ≤ Tset

m1 = mi () =1 if Th < Ti (Modes 4 & 9)

T2 = Ti =0 if Th < Ti (Modes 5 & 10)

2 = i (Modes 9 & 10) Note: The control function 


will not be changed after
NSTK iterations at the same
time step.

m2 = m1 (1 - ) Also Note: Tset must be  Ti


at all times.

4–328
TRNSYS 18 – Mathematical Reference

4.5.3. Type 31: Pipe


This component models the thermal behavior of fluid flow in a pipe using variable size segments of fluid.
Entering fluid shifts the position of existing segments. The mass of the new segment is equal to the flow
rate times the simulation timestep. The new segment's temperature is that of the incoming fluid. The outlet
of this pipe is a collection of the elements that are pushed out by the inlet flow. This plug-flow model does
not consider mixing or conduction between adjacent elements. A maximum of 25 segments is allowed in
the pipe. When the maximum is reached, the two adjacent segments with the closest temperatures are
combined to make one segment.

4.5.3.1. Parameter/Input/Output Reference


PARAMETERS

1 Inside Diameter [m] The inside diameter of the pipe.

2 Pipe Length [m] The length of the pipe to be considered.

3 Loss Coefficient [kJ/h m2 K] The heat transfer coefficient for thermal losses to the environment
based on the inside pipe surface area.

4 Fluid Density [kg/m3] The density of the fluid in the pipe.

5 Fluid Specific Heat [kJ/kg K] The specific heat of the fluid in the pipe.

6 Initial Fluid [C] The temperature of the fluid in the pipe at the beginning of the
Temperature simulation.

INPUTS

1 Inlet Temperature [C] The temperature of the fluid flowing into the pipe.

2 Inlet Flow Rate [kg/h] The flow rate of fluid entering the pipe.

3 Environment [C] The temperature of the environment in which the pipe is located.
Temperature

OUTPUTS

1 Outlet Temperature [C] The temperature of the fluid exiting the pipe.

2 Outlet Flow Rate [kg/h] The flow rate of fluid exiting the pipe.

3 Environment Losses [kJ/h] The rate at which energy is lost to the environment from the pipe.

4 Energy to Pipe [kJ/h] The net rate at which energy is transferred to the pipe by the flow
stream.

5 Change in Internal [kJ] The change in internal energy of the pipe since the beginning of the
Energy simulation. This output should not be integrated as it is an energy
term and not an energy rate term.

6 Average Temperature [C] The average temperature of the fluid in the pipe over the timestep.

4–329
TRNSYS 18 – Mathematical Reference

7 Rate of Change in [kJ/h] The rate at which internal energy changes during the current
Internal Energy timestep.

4.5.3.2. Simulation Summary Report Contents


VALUE FIELDS

Pipe Diameter m] Parameter 1

Pipe Length [m] Parameter 2

Pipe Volume [m3] Calculated from Parameter 1 and Parameter 2

Thermal Loss [kJ/h m2 K] Parameter 3


Coefficient

Overall Thermal Loss [kJ/h K] Calculated from Parameter 1, Parameter 2 and Parameter 3
Coefficient

INTEGRATED VALUE FIELDS

Energy Loss [kJ] Output 3

4.5.3.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.5.3.4. Nomenclature
Cp [kJ/kg.K] Fluid specific heat
M [kg] mass of fluid inside the pipe
m [kg/hr] mass flow rate of fluid

Qenv [kJ/hr] energy loss rate from pipe

Qin _ out [kJ/hr] rate of energy change due to fluid flow


t [hr] time
T [C] temperature of fluid
Ti [C] inlet temperature of fluid
TI [C] initial temperature of fluid in pipe
To [C] outlet temperature of fluid in pipe
Tf [C] average temperature of fluid in pipe at end of current timestep

T f ,t t [C] average temperature of fluid in pipe at end of previous timestep


(UA) [kJ/hr] overall loss conductance
E [kJ] change in internal energy of fluid in pipe
t [hr] simulation timestep
SUBSCRIPTS
j,k refer to segments of fluid in pipe

4–330
TRNSYS 18 – Mathematical Reference

4.5.3.5. Detailed Description


The Figure illustrates the concept behind this component.
T
T 3
1
T T2
a)
x
O L

T
i
T1 T3
T T
2
b)
x
O L

T
1
T
T 2
T
3
c) x
O L

Figure: Fluid Flow in Pipe or Duct


The pipe is initially composed of 3 segments with temperatures T1, T2, and T3 and lengths X1, X2, and X3
(part a). In one time period (Dt), a mass of fluid enters the pipe, creating a new segment (part b). The
existing profile is displaced such that the same quantity of fluid that enters the pipe also exits the pipe. The
segments and/or fractions of segments that fall outside the pipe are removed from the profile (part c). The
average outlet temperature is computed as the mass weighted average of leaving elements.
𝑘−1
1
𝑇𝑜 = (∑ 𝑀𝑗 𝑇𝑗 + 𝑎𝑀𝑘 𝑇𝑘 ) Eq. 4.5.3-1
𝑚̇∆𝑡
𝑗−1

where a and k must satisfy


0<a<1
𝑘−1

∑ 𝑀𝑗 + 𝑎𝑀𝑘 = 𝑚̇∆𝑡 Eq. 4.5.3-2


𝑗−1

Energy losses are considered for each element by solution of the following differential equation
𝑑𝑇𝑗
𝑀𝑗 𝐶𝑝 = −(𝑈𝐴)𝑗 (𝑇𝑗 − 𝑇𝑒𝑛𝑣 ) Eq. 4.5.3-3
𝑑𝑡
For elements that enter or leave during a particular timestep, only the duration of time within the pipe is
considered. The total energy loss rate to the environment is the summation of the individual losses from
each element given as:
𝑄𝑒𝑛𝑣,𝑗 = (𝑈𝐴)𝑗 (𝑇𝑗 − 𝑇𝑒𝑛𝑣 ) Eq. 4.5.3-4

The change in internal energy of the pipe since the beginning of the simulation is:
∆𝐸 = 𝑀𝐶𝑝(𝑇̅𝑓 − 𝑇𝐼 ) Eq. 4.5.3-5

4–331
TRNSYS 18 – Mathematical Reference

It is possible to verify the energy balance on this model by calculating the following quantities:
- Rate of energy flow across boundaries:
𝑄𝑖𝑛_𝑜𝑢𝑡 = 𝑚̇𝐶𝑝(𝑇𝑜 − 𝑇𝑖 ) Eq. 4.5.3-6

- Rate of change of internal energy:


∆𝐸 𝑀𝐶𝑝(𝑇̅𝑓 − 𝑇̅𝑓,𝑡−∆𝑡 ) Eq. 4.5.3-7
=
∆𝑡 ∆𝑡
Energy balance yields:
∆𝐸
= 𝑄𝑖𝑛_𝑜𝑢𝑡 − 𝑄𝑒𝑛𝑣 Eq. 4.5.3-8
∆𝑡

4–332
TRNSYS 18 – Mathematical Reference

4.5.4. Type 91: Effectiveness Heat Exchanger


A zero capacitance sensible heat exchanger is modeled as either constant or user-provided effectiveness
device that is independent of the system configuration. The maximum possible heat transfer rate is
calculated based on the minimum capacity rate fluid and the cold side and hot side fluid inlet temperatures.
The concept of an overall heat transfer coefficient for the heat exchanger is not used. The mathematical
description that follows is covered in detail in Kays and London [1].
NOTE: "source" and "load" are merely convenient designations; energy will be transferred from the source
side to the load side if the source side is hotter than the load side. It will be transferred from the load side
to the source side if the load side is hotter than the source side.

4.5.4.1. Parameter/Input/Output Reference


PARAMETERS

For Constant Effectiveness Mode

1 Heat Exchanger [-] The effectiveness of the heat exchanger. The effectiveness is a
Effectiveness ratio of the actual heat exchanger heat transfer to the maximum
possible heat transfer which could occur in the heat exchanger.
(Effectiveness = Q/Qmax)

2 Specific Heat of [kJ/kg K] The specific heat of the fluid flowing through the source side of the
Source Side Fluid heat exchanger.

3 Specific Heat of Load [kJ/kg K] The specific heat of the fluid flowing through the load side of the
Side Fluid heat exchanger.

For User-Provided Effectiveness Mode

1 Specific Heat of [kJ/kg K] The specific heat of the fluid flowing through the source side of the
Source Side Fluid heat exchanger.

2 Specific Heat of Load [kJ/kg K] The specific heat of the fluid flowing through the load side of the
Side Fluid heat exchanger.

INPUTS

1 Source Side Inlet [C] The temperature of the fluid flowing into the source side of the heat
Temperature exchanger.

2 Source Side Flow Rate [kg/h] The flow rate of the fluid flowing through the source side of the
heat exchanger.

3 Load Side Inlet [C] The temperature of the fluid flowing into the load side of the heat
Temperature exchanger.

4 Load Side Flow Rate [kg/h] The flow rate of fluid flowing through the load side of the heat
exchanger.

For User-Provided Effectiveness Mode

5 Heat Exchanger [-] The effectiveness of the heat exchanger. The effectiveness is a
Effectiveness ratio of the actual heat exchanger heat transfer to the maximum

4–333
TRNSYS 18 – Mathematical Reference

possible heat transfer which could occur in the heat exchanger:


Effectiveness = Q/Qmax

OUTPUTS

1 Source Side Outlet [C] The temperature of the fluid leaving the source side of the heat
Temperature exchanger.

2 Source Side Flowrate [kg/h] The flow rate of fluid exiting the source side of the heat exchanger.

3 Load Side Outlet [C] The temperature of the fluid leaving the load side of the heat
Temperature exchanger.

4 Load Side Flowrate [kg/h] The flow rate of fluid exiting the load side of the heat exchanger.

5 Heat Transfer Rate [kJ/h] The total heat transfer rate between the fluids in the heat
exchanger.

6 Overall Heat Transfer [kJ/h K] The overall heat transfer coefficient of the heat exchanger is
Coefficient commonly referred to as the heat exchanger's UA value.

4.5.4.2. Simulation Summary Report Contents


VALUE FIELDS

For Constant Effectiveness Mode

Cold Side Specific [kJ/h K] Parameter 2


Heat

Hot Side Specific Heat [kJ/h K] Parameter 3

Effectiveness [-] Parameter 1

For User-Provided Effectiveness Mode

Cold Side Specific [kJ/h K] Parameter 1


Heat

Hot Side Specific Heat [kJ/h K] Parameter 2

INTEGRATED VALUE FIELDS

Energy Transferred [kJ] Output 5

MINIMUM/MAXIMUM VALUE FIELDS

For Constant Effectiveness Mode

Heat Exchanger UA [kJ/h K] The minimum and maximum of output 6

For User-Provided Effectiveness Mode

Heat Exchanger UA [kJ/h K] The minimum and maximum of output 6

4–334
TRNSYS 18 – Mathematical Reference

Effectiveness [-] The minimum and maximum of input 5

4.5.4.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.5.4.4. Nomenclature
Cc capacity rate of fluid on cold side, mcCpc
Ch capacity rate of fluid on hot side, mhCph
Cmax maximum capacity rate
Cmin minimum capacity rate
Cpc specific heat of cold side fluid
Cph specific heat of hot side fluid
 heat exchanger effectiveness
mc fluid mass flow rate on cold side
mh fluid mass flow rate on hot side

QT total heat transfer rate across heat exchanger

Q max the maximum heat transfer rate across exchanger


Tci cold side inlet temperature
Tco cold side outlet temperature
Thi hot side inlet temperature
Tho hot side outlet temperature
UA overall heat transfer coefficient of exchanger

4.5.4.5. Detailed Description


Type 91 relies on an effectiveness minimum capacitance approach to model a heat exchanger. Under this
assumption, the user is asked to provide the heat exchanger’s effectiveness and inlet conditions.
A schematic of the heat exchanger is shown below.

4–335
TRNSYS 18 – Mathematical Reference

m h , Thi mc , T
co

Hot Side Q Cold Side


T

m h, T mc , Tc i
ho
Figure: Heat Exchanger Schematic

The model determines whether the cold (load) or the hot (source) side is the minimum capacitance side
and calculates the heat transfer. The heat exchanger outlet conditions are then computed. The capacitance
of each side of the heat exchanger is calculated according to the following four equations.
𝐶𝑐 = 𝑚̇𝑐 𝐶𝑝𝑐 Eq. 4.5.4-1

𝐶ℎ = 𝑚̇ℎ 𝐶𝑝ℎ Eq. 4.5.4-2

𝐶𝑚𝑎𝑥 = 𝑚𝑎𝑥(𝐶𝑐 , 𝐶ℎ ) Eq. 4.5.4-3

𝐶𝑚𝑖𝑛 = 𝑚𝑖𝑛(𝐶𝑐 , 𝐶ℎ ) Eq. 4.5.4-4

The following expressions are used to determine the maximum possible amount of heat transfer at a given
time step.
𝐼𝑓 𝐶𝑚𝑖𝑛 = 𝐶ℎ , 𝑄𝑚𝑎𝑥 = 𝐶ℎ (𝑇ℎ,𝑖𝑛 − 𝑇𝑐,𝑖𝑛 ) Eq. 4.5.4-5

𝐼𝑓 𝐶𝑚𝑖𝑛 = 𝐶𝑐 , 𝑄𝑚𝑎𝑥 = 𝐶𝑐 (𝑇ℎ,𝑖𝑛 − 𝑇𝑐,𝑖𝑛 ) Eq. 4.5.4-6

The actual heat transfer then depends upon the user specified effectiveness.
𝑄𝑡𝑜𝑡𝑎𝑙 = 𝜀𝑄𝑚𝑎𝑥 Eq. 4.5.4-7

Lastly, heat exchanger outlet conditions are calculated for the two flow streams.
𝑄𝑡𝑜𝑡𝑎𝑙
𝑇ℎ,𝑜𝑢𝑡 = 𝑇ℎ.𝑖𝑛 − Eq. 4.5.4-8
𝐶ℎ
𝑄𝑡𝑜𝑡𝑎𝑙
𝑇𝑐,𝑜𝑢𝑡 = 𝑇𝑐.𝑖𝑛 + Eq. 4.5.4-9
𝐶𝑐

4.5.4.6. References
1. Kays, W.M. and A.L. London. 1964. Compact Heat Exchangers, 2nd Edition, New York:
McGraw-Hill.

4–336
TRNSYS 18 – Mathematical Reference

4.5.5. Type 110: Variable Speed Pump


Type 110 models a variable speed pump that is able to maintain any outlet mass flow rate between zero
and a rated value. The mass flow rate of the pump varies linearly with control signal setting. Pump power
draw, however, is modeled using a polynomial. Pump starting and stopping characteristics are not modeled,
nor are pressure drop effects. As with most pumps and fans in TRNSYS, Type 110 takes mass flow rate
as an input but ignores the value except in order to perform mass balance checks. Type 110 sets the
downstream flow rate based on its rated flow rate parameter and the current value of its control signal Input.

4.5.5.1. Parameter/Input/Output Reference


PARAMETERS

1 Rated Flow Rate [kg/h] The flow rate of fluid through the pump when operating.

2 Fluid Specific Heat [kJ/kg K] The specific heat of the fluid flowing through the device.

3 Rated Power [kJ/h] The pump power consumption during operation.

4 Motor Heat Loss [-] The fraction of the motor heat loss transferred to the fluid stream.
Fraction The motor heat loss is calculated by subtracting the efficiency of the
motor from 1 and multiplying the resultant quantity by the power
consumption. Typical values for this parameter are 0 for motors
mounted outside the fluid stream and 1 for motors mounted within
the fluid stream.

5 Number of Power [-] The number of polynomial multipliers that will be supplied relating
Coefficients the normalized pump power to the normalized pump flow rate (input
control signal).

For Each Power Coefficient

6-N Power Coefficient [-] The value of the polynomial multiplier for the relationship between
normalized pump power and normalized pump flow rate (input
control signal).

INPUTS

1 Inlet Fluid [C] The temperature of the fluid entering the pump.
Temperature

2 Inlet Fluid Flow Rate [kg/h] The flow rate of fluid entering the pump. This input is not used by
this component except for convergence checking.

3 Control Signal [-] The input control signal to the pump. It determines the fraction of
the rated power that is delivered by the pump, as P_pump =
P_rated * (a0 + a1*gamma + a2*gamma^2 + ...) where gamma is
the control signal, and a0, a1, a2,..., are coefficients.

4 Overall Pump [-] The overall efficiency of the pump. The overall pump efficiency
Efficiency includes the inefficiencies due to the motor and shaft friction. The
overall pump efficiency must be less than the motor efficiency. The
lower the efficiency the greater the amount of power consumed and
the greater the heat transfer to the fluid and/or ambient.

4–337
TRNSYS 18 – Mathematical Reference

5 Motor Efficiency [-] The efficiency of the pump motor. The motor efficiency must be
greater than the overall pump efficiency. The lower the motor
efficiency the greater the amount of power consumed and the
greater the heat transfer to the fluid and/or ambient.

OUTPUTS

1 Outlet Fluid [C] The temperature of the fluid exiting the pump.
Temperature

2 Outlet Flow Rate [kg/h] The flow rate of fluid exiting the pump:

3 Power Consumption [kJ/h] The power consumed by the pump.

4 Fluid Heat Transfer [kJ/h] The rate at which heat is transferred to the fluid by the pump
operation.

5 Environmental Heat [kJ/h] The rate at which heat is transferred from the pump to the
Transfer environment. This value is simply the pump power minus the heat
transfer directly to the fluid.

4.5.5.2. Simulation Summary Report Contents


VALUE FIELDS

Rated Flow Rate [kg/h] Parameter 1

Rated Power [kW] Parameter 3

Motor Loss Fraction [-] Parameter 4

TEXT FIELDS

Pump Control [-] Variable Speed

INTEGRATED VALUE FIELDS

Power Consumption [kWh] Output 3

Thermal Energy to the [kJ] Output 4


Liquid

Thermal Energy to the [kJ] Output 5


Ambient

MINIMUM/MAXIMUM VALUE FIELDS

Overall Efficiency [kJ/h K] Minimum and maximum of input 4

Motor Efficiency [kJ/h K] Minimum and maximum of input 5

Non-zero Flow Rate [kg/h] Minimum and maximum of output 2

4–338
TRNSYS 18 – Mathematical Reference

4.5.5.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.5.5.4. Nomenclature
Q fluid [kJ/hr]
Energy transferred from the pump motor to the fluid stream passing
through the pump.
 motor [0..1] Pump motor efficiency

 overall [0..1] Overall pump efficiency (motor efficiency * pumping efficiency)

 pumping [0..1] Efficiency of pumping the fluid


Fraction of pump motor inefficiencies that contribute to a temperature
f motorloss [0..1] rise in the fluid stream passing through the pump. The remainder of
these inefficiencies contribute to an ambient temperature rise.
Prated [kJ/hr] Rated power of the pump.

P [kJ/hr] Power drawn by the pump at the current time.

Pshaft [kJ/hr]
Shaft power required by the pumping process (does not include motor
inefficiency)
a 0 , a1 , a 2 ... [-] Polynomial coefficients in the pump power curve

 [0..1] Pump control signal.

Q ambient
[kJ/hr]
Energy transferred from the pump motor to the ambient air surrounding
the pump.
T fluid ,out [C] Temperature of fluid exiting the pump

T fluid ,in [C] Temperature of fluid entering the pump

m fluid [kg/hr] Mass flow rate of fluid passing though the pump.

Cp fluid [kJ/kg K] Specific Heat of the fluid

4.5.5.5. Detailed Description


If the pump is determined to be off due to the control signal being set equal to 0, the Type 110 pump mass
flow rate, power drawn, energy transferred from the pump to ambient and energy transferred from the pump
to the fluid stream are all set to zero. The temperature of fluid exiting the pump under the OFF condition is
set to the temperature of fluid at the pump inlet. If, however, the pump is determined to be ON (control
signal greater than 0) then the power drawn by the pump is determined using
𝑃 = 𝑃𝑟𝑎𝑡𝑒𝑑 (𝑎0 + 𝑎1 𝛾 + 𝑎2 𝛾 2 + 𝑎3 𝛾 3 + 𝑎4 𝛾 4 + ⋯ ) Eq. 4.5.5-1

The mass flow rate of fluid exiting the pump is a linear function of the control signal with a control signal of
1 resulting in the pump delivering its rated mass flow. The efficiency of pumping the fluid from its inlet to its
outlet pressure is given by the equation below; both the motor and overall efficiency of the pump are entered
by the user as inputs to the model.
𝜂𝑜𝑣𝑒𝑟𝑎𝑙𝑙
𝜂𝑝𝑢𝑚𝑝𝑖𝑛𝑔 = Eq. 4.5.5-2
𝜂𝑚𝑜𝑡𝑜𝑟
The shaft power of the pump can now be calculated. The shaft power is the power required to perform the
pumping operation, excluding the effects of motor inefficiency.
𝑃𝑠ℎ𝑎𝑓𝑡 = 𝑃𝜂𝑚𝑜𝑡𝑜𝑟 Eq. 4.5.5-3

4–339
TRNSYS 18 – Mathematical Reference

Energy transferred from the pump motor to the fluid stream is calculated as
𝑄𝑓𝑙𝑢𝑖𝑑 = 𝑃𝑠ℎ𝑎𝑓𝑡 (1 − 𝜂𝑝𝑢𝑚𝑝𝑖𝑛𝑔 ) + (𝑃 − 𝑃𝑠ℎ𝑎𝑓𝑡 )𝑓𝑚𝑜𝑡𝑜𝑟𝑙𝑜𝑠𝑠 Eq. 4.5.5-4

In which pumping is the pumping process efficiency and fmotorloss is a value between 0 and 1 that determines
whether the pump motor inefficiencies cause a temperature rise in the fluid stream that passes through the
pump or whether they cause a temperature rise in the ambient air surrounding the pump. Through use of
the fmotorloss fraction, the user can in effect specify whether the pump has an inline motor, in which case all
waste heat would impact the fluid stream temperature and fmotorloss would have a value of 1, or whether the
pump motor is housed outside of the fluid stream such that it’s waste heat impacts the ambient and fmotorloss
would have a value of 0.
The energy transferred from the pump motor to the ambient is given by
𝑄𝑎𝑚𝑏𝑖𝑒𝑛𝑡 = (𝑃 − 𝑃𝑠ℎ𝑎𝑓𝑡 )(1 − 𝑓𝑚𝑜𝑡𝑜𝑟𝑙𝑜𝑠𝑠 ) Eq. 4.5.5-5

The temperature of fluid exiting the pump can now be calculated as


𝑄𝑓𝑙𝑢𝑖𝑑
𝑇𝑓𝑙𝑢𝑖𝑑,𝑜𝑢𝑡 = 𝑇𝑓𝑙𝑢𝑖𝑑,𝑖𝑛 + Eq. 4.5.5-6
𝑚̇𝑓𝑙𝑢𝑖𝑑
Type 110 does not model pump starting and stopping characteristics. As soon as the control signal indicates
that the pump should be ON, the outlet flow of fluid jumps to the appropriate value between 0 and its rated
condition. The reasoning is that the time constants with which pumps react to control signal changes is
shorter than the typical timesteps used in hydronic simulations. Type 110 also operates as many pump and
fan models do in TRNSYS. That is to say that they ignore the fluid mass flow rate provided as an input to
the model except so as to perform a mass balance on the pump. Therefore care must be taken in specifying
fluid loops with multiple pumps that inlet mass flow rates greater than the rated mass flow rate for a given
pump are not specified. The total number of timesteps during which the fluid inlet mass flow rate for Type
110 is not equal to its outlet flow rate is reported to the list file at the end of each simulation.

4–340
TRNSYS 18 – Mathematical Reference

4.5.6. Type 114: Constant Speed Pump


Type 114 models a single (constant) speed pump that is able to maintain a constant fluid outlet mass flow
rate. Pump starting and stopping characteristics are not modeled, nor are pressure drop effects. As with
most pumps and fans in TRNSYS, Type 114 takes mass flow rate as an input but ignores the value except
in order to perform mass balance checks. Type 114 sets the downstream flow rate based on its rated flow
rate parameter and the current value of its control signal input.

4.5.6.1. Parameter/Input/Output Reference


PARAMETERS

1 Rated Flow Rate [kg/h] The flow rate of fluid through the pump when operating.

2 Fluid Specific Heat [kJ/kg K] The specific heat of the fluid flowing through the device.

3 Rated Power [kJ/h] The pump power consumption during operation.

4 Motor heat Loss [-] The fraction of the motor heat loss transferred to the fluid stream.
Fraction The motor heat loss is calculated by subtracting the efficiency of the
motor from 1 and multiplying the resultant quantity by the power
consumption. Typical values for this parameter are 0 for motors
mounted outside the fluid stream and 1 for motors mounted within
the fluid stream.

INPUTS

1 Inlet Fluid [C] The temperature of the fluid entering the pump.
Temperature

2 Inlet Fluid Flow Rate [kg/h] The flow rate of fluid entering the pump. This input is not used by
this component except for convergence checking.

3 Control Signal [-] The input control signal to the pump <0.5 - the pump is OFF, >= 0.5
- the pump is ON

4 Overall Pump [-] The overall efficiency of the pump. The overall pump efficiency
Efficiency includes the inefficiencies due to the motor and shaft friction. The
overall pump efficiency must be less than the motor efficiency. The
lower the efficiency the greater the amount of power consumed and
the greater the heat transfer to the fluid and/or ambient.

5 Motor Efficiency [-] The efficiency of the pump motor. The motor efficiency must be
greater than the overall pump efficiency. The lower the motor
efficiency the greater the amount of power consumed and the
greater the heat transfer to the fluid and/or ambient.

OUTPUTS

1 Outlet Fluid [C] The temperature of the fluid exiting the pump.
Temperature

2 Outlet Flow Rate [kg/h] The flow rate of fluid exiting the pump:

3 Power Consumption [kJ/h] The power consumed by the pump.

4–341
TRNSYS 18 – Mathematical Reference

4 Fluid Heat Transfer [kJ/h] The rate at which heat is transferred to the fluid by the pump
operation.

5 Environmental Heat [kJ/h] The rate at which heat is transferred from the pump to the
Transfer environment. This value is simply the pump power minus the heat
transfer directly to the fluid.

4.5.6.2. Simulation Summary Report Contents


VALUE FIELDS

Rated Flow Rate [kg/h] Parameter 1

Rated Power [kW] Parameter 3

TEXT FIELDS

Pump Control [-] Constant Speed

INTEGRATED VALUE FIELDS

Power Consumption [kWh] Output 3

Thermal Energy to the [kJ] Output 4


Liquid

Thermal Energy to the [kJ] Output 5


Ambient

MINIMUM/MAXIMUM VALUE FIELDS

Overall Efficiency [kJ/h K] Minimum and maximum of input 4

Motor Efficiency [kJ/h K] Minimum and maximum of input 5

4.5.6.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.5.6.4. Nomenclature
Q fluid [kJ/hr]
Energy transferred from the pump motor to the fluid stream passing
through the pump.
 motor [0..1] Pump motor efficiency

 overall [0..1] Overall pump efficiency (motor efficiency * pumping efficiency)

 pumping [0..1] Efficiency of pumping the fluid


Fraction of pump motor inefficiencies that contribute to a temperature rise
f motorloss [0..1] in the fluid stream passing through the pump. The remainder of these
inefficiencies contribute to an ambient temperature rise.

4–342
TRNSYS 18 – Mathematical Reference

Prated [kJ/hr] Rated power of the pump.

Pshaft [kJ/hr]
Shaft power required by the pumping process (does not include motor
inefficiency)
Q ambient [kJ/hr]
Energy transferred from the pump motor to the ambient air surrounding
the pump.
T fluid ,out [C] Temperature of fluid exiting the pump

T fluid ,in [C] Temperature of fluid entering the pump

m fluid [kg/hr] Mass flow rate of fluid passing though the pump.

Cp fluid [kJ/kg K] Specific Heat of fluid

4.5.6.5. Detailed Description


If the pump is determined to be off due to the control signal being set less than 0.5, the pump mass flow
rate, power drawn, energy transferred from the pump to ambient and energy transferred from the pump to
the fluid stream are all set to zero. The temperature of fluid exiting the pump under the OFF condition is set
to the temperature of fluid at the pump inlet. If, however, the pump is determined to be ON (control signal
greater than or equal to 0.5) then the mass flow rate of fluid exiting the pump and the power drawn by the
pump are set to the respective rated conditions specified in the model’s parameter list. The overall efficiency
of the pump and the efficiency of the pump motor are used to calculate the efficiency of the pumping process
as
𝜂𝑜𝑣𝑒𝑟𝑎𝑙𝑙
𝜂𝑝𝑢𝑚𝑝𝑖𝑛𝑔 = Eq. 4.5.6-1
𝜂𝑚𝑜𝑡𝑜𝑟
The power required at the pump shaft (excluding motor efficiency effects) may then be calculated as
𝑃𝑠ℎ𝑎𝑓𝑡 = 𝑃𝑟𝑎𝑡𝑒𝑑 𝜂𝑚𝑜𝑡𝑜𝑟 Eq. 4.5.6-2

Energy transferred from the pump motor to the fluid stream is calculated as
𝑄𝑓𝑙𝑢𝑖𝑑 = 𝑃𝑠ℎ𝑎𝑓𝑡 (1 − 𝜂𝑝𝑢𝑚𝑝𝑖𝑛𝑔 ) + (𝑃 − 𝑃𝑠ℎ𝑎𝑓𝑡 )𝑓𝑚𝑜𝑡𝑜𝑟𝑙𝑜𝑠𝑠 Eq. 4.5.6-3

In which pumping is the pumping process efficiency and fmotorloss is a value between 0 and 1 that determines
whether the pump motor inefficiencies cause a temperature rise in the fluid stream that passes through the
pump or whether they cause a temperature rise in the ambient air surrounding the pump. Through use of
the fmotorloss fraction, the user can in effect specify whether the pump has an inline motor, in which case all
waste heat would impact the fluid stream temperature and fmotorloss would have a value of 1, or whether the
pump motor is housed outside of the fluid stream such that it’s waste heat impacts the ambient and fmotorloss
would have a value of 0.
The energy transferred from the pump motor to the ambient is given by
𝑄𝑎𝑚𝑏𝑖𝑒𝑛𝑡 = 𝑃𝑟𝑎𝑡𝑒𝑑 (1 − 𝜂𝑚𝑜𝑡𝑜𝑟 )(1 − 𝑓𝑚𝑜𝑡𝑜𝑟𝑙𝑜𝑠𝑠 ) Eq. 4.5.6-4

The temperature of fluid exiting the pump can now be calculated as


𝑄𝑓𝑙𝑢𝑖𝑑
𝑇𝑓𝑙𝑢𝑖𝑑,𝑜𝑢𝑡 = 𝑇𝑓𝑙𝑢𝑖𝑑,𝑖𝑛 + Eq. 4.5.6-5
𝑚̇𝑓𝑙𝑢𝑖𝑑
Type 114 does not model pump starting and stopping characteristics. As soon as the control signal indicates
that the pump should be ON, the outlet flow of fluid jumps to its rated condition. The reasoning is that the
time constants with which pumps react to control signal changes is shorter than the typical timesteps used
in hydronic simulations. Type 114 also operates as many pump and fan models do in TRNSYS. That is to
say that they ignore the fluid mass flow rate provided as an input to the model except so as to perform a
mass balance on the pump. Therefore care must be taken in specifying fluid loops with multiple pumps that
inlet mass flow rates greater than the rated mass flow rate for a given pump are not specified. The total

4–343
TRNSYS 18 – Mathematical Reference

number of timesteps during which the fluid inlet mass flow rate for Type 114 is not equal to its outlet flow
rate is reported to the list file at the end of each simulation.

4–344
TRNSYS 18 – Mathematical Reference

4.5.7. Type 145: Air Duct


This component models the thermal behavior of air flow in a duct using variable size segments of air.
Entering fluid shifts the position of existing segments. The mass of the new segment is equal to the flow
rate times the simulation timestep. The new segment's temperature and humidity is that of the incoming
air. The outlet of this pipe is a collection of the elements that are pushed out by the inlet flow. This plug-
flow model does not consider mixing or conduction between adjacent elements. This model ignores friction
effects, air leakage and condensation energy. If the conditions of any segment would lead to condensation,
the humidity level of that segment is set to the saturated humidity properties. A maximum of 25 segments
is allowed in the pipe. When the maximum is reached, the two adjacent segments with the closest
temperatures are combined to make one segment.

4.5.7.1. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] This parameter determines if the inlet air absolute humidity ratio
(mode = 1) or the percent relative humidity (mode = 2) is used to
calculate the properties of the air entering the duct.

2 Inside Diameter [m] The inside diameter of the duct. If a square duct is to be modeled,
this parameter should be set to an equivalent diameter which gives
the same surface area.

3 Duct Length [m] The length of the duct to be considered.

4 Loss Coefficient [kJ/h m2 K] The heat transfer coefficient for thermal losses to the environment
based on the inside duct surface area.

5 Initial Air Temperature [C] The temperature of the air in the duct at the beginning of the
simulation.

6 Initial Air Humidity [-] The humidity ratio of the air in the duct at the beginning of the
Ratio simulation.

INPUTS

1 Inlet Temperature [C] The temperature of the air flowing into the duct.

2 Inlet Humidity Ratio [-] The humidity ratio of the air entering the duct.

3 Inlet Relative Humidity [%] The percent relative humidity of the air entering the duct.

4 Inlet Flow Rate [kg/h] The flow rate of the air entering the duct.

5 Inlet Pressure [atm] The pressure of the air entering the duct.

6 Environment [C] The temperature of the environment in which the duct is located.
Temperature

OUTPUTS

1 Outlet Temperature [C] The temperature of the air exiting the duct.

4–345
TRNSYS 18 – Mathematical Reference

2 Outlet Humidity Ratio [-] The absolute humidity ratio of the air leaving the duct.

3 Outlet Relative [%] The percent relative humidity of the air leaving the duct.
Humidity

4 Outlet Flow Rate [kg/h] The flow rate of the air exiting the duct.

5 Outlet Pressure [atm] The pressure of the air leaving the duct.

6 Environmental Losses [kJ/h] The rate at which energy is lost to the environment from the duct.

7 Energy to Duct [kJ/h] The net rate at which energy is transferred to the duct by the flow
stream.

8 Change in Internal [kJ] The change in internal energy of the duct since the beginning of the
Energy simulation. This output should not be integrated as it is an energy
term and not an energy rate term.

9 Average Temperature [C] The average temperature of the air in the duct over the timestep.

10 Average Humidity [-] The average humidity ratio of the air in the duct over the timestep.
Ratio

11 Rate of Change in [kJ/h] The rate at which internal energy changes during the current time
Internal Energy step.

4.5.7.2. Simulation Summary Report Contents


VALUE FIELDS

Inside Diameter [m] Parameter 2

Length [m] Parameter 3

Loss Coefficient [kJ/h m2 K] Parameter 4

INTEGRATED VALUE FIELDS

Losses to Environment [kJ] Output 6

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Temperature [C] The minimum and maximum of output 1

Outlet Flow Rate [kg/h] The minimum and maximum of output 4

4.5.7.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4–346
TRNSYS 18 – Mathematical Reference

4.5.7.4. Detailed Description


The Figure illustrates the concept behind this component. The duct is initially composed of 3 segments with
temperatures T1, T2, and T3; humidity ratios w1, w2, and w3; and lengths X1, X2, and X3 (part a). In one
time period (Dt), a mass of air enters the pipe, creating a new segment (part b). The existing profile is
displaced such that the same quantity of air that enters the pipe also exits the pipe. The segments and/or
fractions of segments that fall outside the pipe are removed from the profile (part c). The average outlet
temperature and humidity ratio is computed as the mass weighted average of leaving elements.
T
T 3
1
T T2
a)
x
O L

T
i
T1 T3
T T
2
b)
x
O L

T
1
T
T 2
T
3
c) x
O L

Figure: Air Flow in Duct

In general:
𝑘−1
1
𝑇𝑜 = (∑ 𝑀𝑗 𝑇𝑗 + 𝑎𝑀𝑘 𝑇𝑘 ) Eq. 4.5.7-1
𝑚̇∆𝑡
𝑗=1

𝑘−1
1 Eq. 4.5.7-2
𝜔𝑜 = (∑ 𝑀𝑗 𝜔𝑗 + 𝑎𝑀𝑘 𝜔𝑘 )
𝑚̇∆𝑡
𝑗=1

where a and k must satisfy 0 < a < 1 and


𝑘−1

∑ 𝑀𝑗 + 𝑎𝑀𝑘 = 𝑚̇∆𝑡 Eq. 4.5.7-3


𝑗=1

If the resulting humidity ratio is above the saturation humidity ratio at the calculated temperature, the water
vapor in the air is considered to have condensed and the humidity ratio is set to the saturated humidity
ratio.
Energy losses are considered for each element by solution of the following differential equation

4–347
TRNSYS 18 – Mathematical Reference

𝑑𝑇𝑗
𝑀𝑗 𝐶𝑝 = −(𝑈𝐴)𝑗 (𝑇𝑗 − 𝑇𝑒𝑛𝑣 ) Eq. 4.5.7-4
𝑑𝑡
For elements that enter or leave during a particular timestep, only the duration of time within the duct is
considered. The total energy loss rate to the environment is the summation of the individual losses from
each element given as:
𝑄𝑒𝑛𝑣,𝑗 = (𝑈𝐴)𝑗 (𝑇𝑗 − 𝑇𝑒𝑛𝑣 ) Eq. 4.5.7-5

The change in internal energy of the pipe since the beginning of the simulation is:
∆𝐸 = 𝑀𝐶𝑝(𝑇̅𝑓 − 𝑇𝐼 ) Eq. 4.5.7-6

It is possible to verify the energy balance on this model by calculating the following quantities:
- Rate of energy flow across boundaries:
𝑄𝑖𝑛_𝑜𝑢𝑡 = 𝑚̇𝐶𝑝(𝑇𝑜 − 𝑇𝑖 ) Eq. 4.5.7-7

- Rate of change of internal energy:


∆𝐸 𝑀𝐶𝑝(𝑇̅𝑓 − 𝑇̅𝑓,𝑡−∆𝑡 )
= Eq. 4.5.7-8
∆𝑡 ∆𝑡
Energy balance yields:
∆𝐸
= 𝑄𝑖𝑛_𝑜𝑢𝑡 − 𝑄𝑒𝑛𝑣 Eq. 4.5.7-9
∆𝑡

4–348
TRNSYS 18 – Mathematical Reference

4.5.8. Type 146: Single-Speed Fan


Type 146 models a fan that is able to spin at a single speed and thereby maintain a constant volumetric
flow rate of air. As with most pumps and fans in TRNSYS, Type 146 takes mass flow rate as an input but
ignores the value except in order to perform mass balance checks. Type 146 sets the downstream flow rate
based on its rated flow rate parameter and the current value of its control signal input.

4.5.8.2. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] This parameter indicates whether the calculation will be based on
the inlet humidity ratio input (mode = 1) or the inlet relative humidity
input (mode = 2).

2 Rated Volumetric Flow [l/s] The rated volumetric flow rate of dry air through the fan when
Rate operating.

3 Rated Power [kJ/h] The fan power consumption during operation.

4 Motor Efficiency [-] The efficiency of the fan motor. This efficiency is used to calculate
the amount of heat added to the air stream.

5 Motor Heat Loss [-] The fraction of the motor heat loss transferred to the air stream.
Fraction The motor heat loss is calculated by subtracting the efficiency of the
motor from 1 and multiplying the resultant quantity by the power
consumption. Typical values are 0 for motors mounted outside the
air stream and 1 for motors mounted within the air stream.

INPUTS

1 Inlet Air Temperature [C] The dry bulb temperature of the air entering the fan.

2 Inlet Air Humidity Ratio [-] The absolute humidity ratio of the air entering the fan.

3 Inlet Air Relative [%] The percent relative humidity of the air entering the fan.
Humidity

4 Air Flow Rate [kg/h] The flow rate of the air (dry) entering the fan. This input is not used
by this component except for mass balance checking.

5 Inlet Air Pressure [atm] The inlet air pressure (absolute).

6 Control Signal [-] The input control signal to the fan: < 0.5 = the fan is off, >= 0.5 =
the fan in on.

7 Air-Side Pressure [atm] The increase in air-side pressure for the fan. This value should be
Increase set to zero when the fan is off.

OUTPUTS

1 Outlet Air Temperature [C] The outlet air dry bulb temperature from the fan.

2 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the fan. In all cases,
Ratio the exiting humidity ratio is set to the inlet air humidity ratio.

4–349
TRNSYS 18 – Mathematical Reference

3 Outlet Air Relative [%] The percent relative humidity of the air exiting the fan.
Humidity

4 Outlet Air Flow Rate [kg/h] The flow rate of dry air exiting the fan

5 Outlet Air Pressure [atm] The absolute pressure of the air exiting the fan.

6 Power Consumption [kJ/h] The power consumed by the fan.

7 Air Heat Transfer [kJ/h] The rate at which heat is transferred to the air by the fan operation.
This value may include motor heat loss if the motor is located within
the air stream.

8 Ambient Heat Transfer [kJ/h] The rate at which energy is transferred to the environment from the
fan. This value is calculated by subtracting the heat transfer to the
air stream from the total fan power.

4.5.8.3. Simulation Summary Report Contents


VALUE FIELDS

Rated Volumetric Flow [l/s] Parameter 2


Rate

Rated Power [kJ/h] Parameter 3


Consumption

INTEGRATED VALUE FIELDS

Power [kJ] Output 6

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Temperature [C] The minimum and maximum of output 1

Outlet Flow Rate [kg/h] The minimum and maximum of output 4

4.5.8.4. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.5.8.5. Nomenclature

Q
Energy transferred from the fan motor to the air stream passing through
air [kJ/hr]
the fan.
 motor [0..1] Fan motor efficiency
Fraction of fan motor inefficiencies that contribute to a temperature rise
f motorloss [0..1] in the air stream passing through the fan. The remainder of these
inefficiencies contributes to an ambient temperature rise.

P [kJ/hr] Rated power of the fan.
rated

 Energy transferred from the fan motor to the ambient air surrounding the
Q ambient [kJ/hr]
fan.

4–350
TRNSYS 18 – Mathematical Reference

hair ,out [kJ/kg] Enthalpy of air exiting the fan


hair ,in [kJ/kg] Enthalpy of air entering the fan

m air [kg/hr] Mass flow rate of air passing though the fan.

vair [l/s] Volumetric flow rate of air passing through the fan.

4.5.8.6. Detailed Description


During any given timestep, Type 146 performs a very simple set of calculations to determine the conditions
of air exiting a fan. As inputs, it takes air pressure, temperature, relative humidity and absolute humidity
ratio. Depending upon the mode in which Type 146 is operating, the value of either the relative humidity or
the humidity ratio input is ignored. The component passes pressure, temperature and either relative
humidity or humidity ratio to the TRNSYS Psychrometrics routine, which returns values of temperature,
humidity ratio, relative humidity, and enthalpy. If above saturated conditions were, for some reason, passed
to the Psychrometrics routine, Psychrometrics will return the saturated conditions corresponding to the
given temperature. This means that the humidity ratio and relative humidity used in calculations may be
slightly different than those passed to the model by the user. If the air condition is saturated at any point in
the simulation, the Psychrometrics routine will print a warning in the TRNSYS list file.
If the fan is determined to be OFF because its control signal is set to 0, the temperature, humidity ratio,
relative humidity, and pressure of air exiting the fan are set to the corresponding inlet conditions. Fan power,
energy transferred from the fan motor to the air stream, energy transferred from the fan motor to ambient,
and the outlet mass flow rate are all set to zero. If the fan is ON because its control signal is set to 1, the
energy added to the air stream by the fan is calculated as shown below.
𝑄̇𝑎𝑖𝑟 = (𝜂𝑚𝑜𝑡𝑜𝑟 + (1 − 𝜂𝑚𝑜𝑡𝑜𝑟 )𝑓𝑚𝑜𝑡𝑜𝑟𝑙𝑜𝑠𝑠 )𝑃𝑟𝑎𝑡𝑒𝑑
̇ Eq. 4.5.8-1

In which ηmotor is the motor efficiency and fmotorloss is a value between 0 and 1 that determines whether the
fan motor inefficiencies cause a temperature rise in the air stream that passes through the fan or whether
they cause a temperature rise in the ambient air surrounding the fan. Through use of the fmotorloss fraction,
the user can in effect specify whether the fan has an inline motor, in which case all waste heat would impact
the air stream temperature and fmotorloss would have a value of 1, or whether the fan motor is housed outside
of the air stream such that it’s waste heat impacts the ambient and fmotorloss would have a value of 0.
The power drawn by the fan when it is operating is simply the rated power specified among the component
parameters. The energy transferred from the fan motor to the ambient is given by
𝑄̇𝑎𝑚𝑏𝑖𝑒𝑛𝑡 = 𝑃𝑟𝑎𝑡𝑒𝑑
̇ − 𝑄̇𝑎𝑖𝑟 Eq. 4.5.8-2

The enthalpy of air exiting the fan can now be calculated as


𝑄̇𝑎𝑖𝑟
ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 = ℎ𝑎𝑖𝑟,𝑖𝑛 + Eq. 4.5.8-3
𝑚̇𝑎𝑖𝑟
The mass flow rate of air flowing through the fan is given by
𝑚̇𝑎𝑖𝑟 = 3.6𝑣̇ 𝑎𝑖𝑟 𝜌𝑎𝑖𝑟 Eq. 4.5.8-4

using the dry air density returned by Psychrometrics


Lastly, the pressure rise of the fan is added to the inlet air pressure and the Psychrometrics routine is called
to determine the remaining properties of the exiting air state (temperature, humidity ratio and relative
humidity.) The absolute humidity ratio of outlet air is unaffected by the fan (ωin = ωout) and as with most
pump and fan components in TRNSYS the flow rate of air exiting the fan is set to the rated flow rate specified
as one of the model’s parameters regardless of the value of the mass flow rate that is an input to this model.
The input is retained to make connections around an air loop more intuitive and to allow for a mass balance
check to be made on the fan. Care should be taken in setting up air loops that no more than the fan rated
mass flow rate is passed to the model as an input.

4–351
TRNSYS 18 – Mathematical Reference

4.5.9. Type 147: Variable-Speed Fan


Type 147 models a fan that is able to turn at any speed between 0 (full stop) and its rated speed. While the
volumetric flow rate of air moved by the fan is linearly related to the control signal, the power drawn by the
fan at a given flow rate can be any polynomial expression of the control signal. As with most pumps and
fans in TRNSYS, Type 147 takes mass flow rate as an input but ignores the value except to perform mass
balance checks. Type 147 sets the downstream flow rate based on its rated flow rate parameters and the
current value of its control signal inputs.

4.5.9.2. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] This parameter indicates whether the calculation will be based on
the inlet humidity ratio input (mode = 1) or the inlet relative humidity
input (mode = 2).

2 Rated Volumetric Flow [l/s] The rated volumetric flow rate of dry air through the fan when
Rate operating.

3 Rated Power [kJ/h] The fan power consumption during operation.

4 Motor Efficiency [-] The efficiency of the fan motor. This efficiency is used to calculate
the amount of heat added to the air stream.

5 Motor Heat Loss [-] The fraction of the motor heat loss transferred to the air stream.
Fraction The motor heat loss is calculated by subtracting the efficiency of the
motor from 1 and multiplying the resultant quantity by the power
consumption. Typical values are 0 for motors mounted outside the
air stream and 1 for motors mounted within the air stream.

6 Number of Power [-] The number of polynomial multipliers that will be supplied relating
Coefficients the normalized fan power to the normalized fan flow rate.

For Each Power Coefficient

7-N Power Coefficient [-] The value of the polynomial multiplier for the relationship between
normalized fan power and normalized fan flow rate.

INPUTS

1 Inlet Air Temperature [C] The dry bulb temperature of the air entering the fan.

2 Inlet Air Humidity Ratio [-] The absolute humidity ratio of the air entering the fan.

3 Inlet Air Relative [%] The percent relative humidity of the air entering the fan.
Humidity

4 Air Flow Rate [kg/h] The flow rate of the air (dry) entering the fan. This input is not used
by this component except for mass balance checking.

5 Inlet Air Pressure [atm] The inlet air pressure (absolute).

6 Control Signal [-] The input control signal to the fan: < 0.5 = the fan is off, >= 0.5 =
the fan in on.

4–352
TRNSYS 18 – Mathematical Reference

7 Air-Side Pressure [atm] The increase in air-side pressure for the fan. This value should be
Increase set to zero when the fan is off.

OUTPUTS

1 Outlet Air Temperature [C] The outlet air dry bulb temperature from the fan.

2 Outlet Air Humidity [-] The absolute humidity ratio of the air exiting the fan. In all cases,
Ratio the exiting humidity ratio is set to the inlet air humidity ratio.

3 Outlet Air Relative [%] The percent relative humidity of the air exiting the fan.
Humidity

4 Outlet Air Flow Rate [kg/h] The flow rate of dry air exiting the fan

5 Outlet Air Pressure [atm] The absolute pressure of the air exiting the fan.

6 Power Consumption [kJ/h] The power consumed by the fan.

7 Air Heat Transfer [kJ/h] The rate at which heat is transferred to the air by the fan operation.
This value may include motor heat loss if the motor is located within
the air stream.

8 Ambient Heat Transfer [kJ/h] The rate at which energy is transferred to the environment from the
fan. This value is calculated by subtracting the heat transfer to the
air stream from the total fan power.

4.5.9.3. Simulation Summary Report Contents


VALUE FIELDS

Rated Volumetric Flow [l/s] Parameter 2


Rate

Rated Power [kJ/h] Parameter 3


Consumption

INTEGRATED VALUE FIELDS

Power [kJ] Output 6

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Temperature [C] The minimum and maximum of output 1

Outlet Flow Rate [kg/h] The minimum and maximum of output 4

4.5.9.4. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4–353
TRNSYS 18 – Mathematical Reference

4.5.9.5. Nomenclature
 Energy transferred from the fan motor to the air stream passing through
Q air [kJ/hr]
the fan.
 motor [0..1] Fan motor efficiency
Fraction of fan motor inefficiencies that contribute to a temperature rise
f motorloss [0..1] in the air stream passing through the fan. The remainder of these
inefficiencies contributes to an ambient temperature rise.
P [kJ/hr] Power drawn by the fan at a given time.

P [kJ/hr] Fan power draw when operating at rated conditions.
rated

a 0 , a1 , a 2 ... [kJ/hr] Coefficients of the polynomial relating control setting to power draw.
 [0..1] Fan control signal.
 Energy transferred from the fan motor to the ambient air surrounding
Q ambient [kJ/hr]
the fan.
hair ,out [kJ/kg] Enthalpy of air exiting the fan
hair ,in [kJ/kg] Enthalpy of air entering the fan

m air [kg/hr] Mass flow rate of air passing though the fan.

m rated [kg/hr] Maximum air mass flow rate that can pass through the fan.

4.5.9.6. Detailed Description


During any given time step, Type 147 performs a simple set of calculations to determine the conditions of
air exiting a fan. As inputs, it takes air pressure, temperature, relative humidity and absolute humidity ratio.
Depending upon the mode in which Type 147 is operating, the value of either the relative humidity or the
humidity ratio input is ignored. The component passes pressure, temperature and either relative humidity
or humidity ratio to the TRNSYS Psychrometrics routine, which returns values of temperature, humidity
ratio, relative humidity, enthalpy, and air density. If above saturated conditions were passed to the
Psychrometrics routine, Psychrometrics will return the saturated conditions corresponding to the specified
drybulb temperature. This means that the humidity ratio and relative humidity used in calculations may be
slightly different than those passed to the model by the user. If the air condition is saturated at any point in
the simulation, the Psychrometrics routine will print a warning in the TRNSYS list file.
If the fan is determined to be OFF because its control signal is set to 0, the temperature, humidity ratio,
relative humidity, and pressure of air exiting the fan are set to the corresponding inlet conditions. Fan power,
energy transferred from the fan motor to the air stream, energy transferred from the fan motor to ambient,
and the outlet mass flow rate are all set to zero. If, on the other hand, the fan is ON because its control
signal has a value greater than 0 and less than 1, the power drawn by the fan is calculated by
𝑃̇ = 𝑃𝑟𝑎𝑡𝑒𝑑
̇ (𝑎0 + 𝑎1 𝛾 + 𝑎2 𝛾 2 + 𝑎3 𝛾 3 + 𝑎4 𝛾 4 + ⋯ ) Eq. 4.5.9-1

With the current power drawn by the fan known the energy transferred to the fan air stream is calculated
using
𝑄̇𝑎𝑖𝑟 = (𝜂𝑚𝑜𝑡𝑜𝑟 + (1 − 𝜂𝑚𝑜𝑡𝑜𝑟 )𝑓𝑚𝑜𝑡𝑜𝑟𝑙𝑜𝑠𝑠 )𝑃̇ Eq. 4.5.9-2

In which ηmotor is the motor efficiency and fmotorloss is a value between 0 and 1 that determines whether the
fan motor inefficiencies cause a temperature rise in the air stream that passes through the fan or whether
they cause a temperature rise in the ambient air surrounding the fan. Through use of the fmotorloss fraction,
the user can in effect specify whether the fan has an inline motor, in which case all waste heat would impact
the air stream temperature and fmotorloss would have a value of 1, or whether the fan motor is housed outside
of the air stream such that it’s waste heat impacts the ambient and fmotorloss would have a value of 0.

4–354
TRNSYS 18 – Mathematical Reference

The energy transferred from the fan motor to the ambient is given by
𝑄̇𝑎𝑚𝑏𝑖𝑒𝑛𝑡 = 𝑃̇ − 𝑄̇𝑎𝑖𝑟 Eq. 4.5.9-3

The mass flow rate of air passing through the fan at any given time is linearly related to the control signal
as
𝑚̇ = 𝑚̇𝑟𝑎𝑡𝑒𝑑 𝛾 = 3.6𝑣̇ 𝑟𝑎𝑡𝑒𝑑 𝜌𝑎𝑖𝑟 Eq. 4.5.9-4

As with most pump and fan components in TRNSYS the flow rate of air exiting the fan is set by the
component without regard to the value of the mass flow rate that is an input to the model. The mass flow
rate input is retained to make connections around an air loop more intuitive and to allow for a mass balance
check to be made on the fan. Care should be taken in setting up air loops that no more than the fan rated
mass flow rate is passed to the model as an input. Type 147 prints a warning to the TRNSYS list file at the
end of the simulation if the fan mass balance failed during the simulation. Type 147 does not generate a
simulation stopping error if the mass balance fails.
The enthalpy of air exiting the fan can be calculated as
𝑄̇𝑎𝑖𝑟
ℎ𝑎𝑖𝑟,𝑜𝑢𝑡 = ℎ𝑎𝑖𝑟,𝑖𝑛 + Eq. 4.5.9-5
𝑚̇𝑎𝑖𝑟
Lastly, the pressure rise of the fan is added to the inlet air pressure and the PSYCHROMETRICS routine
is called to determine the remaining properties of the exiting air state (temperature, humidity ratio and
relative humidity.) The absolute humidity ratio of outlet air is unaffected by the fan (ωin = ωout).

4–355
TRNSYS 18 – Mathematical Reference

4.5.10. Type 148: Air Flow Diverter/Mixer


Type 148 models either a flow mixer or a flow diverter for moist air. In the flow mixer mode the model takes
the properties of two air streams and combines them into a single flow. In the flow diverter mode, a single
inlet air stream is split according to a user specified valve setting into two air outlet streams.

4.5.10.2. Parameter/Input/Output Reference


PARAMETERS

1 Humidity Mode [-] The parameter determine if the inlet humidity ratio (=1) or the inlet
relative humidity (=2) is used to calculate the inlet air properties.

2 Mode [-] The mode for the model. To model a flow mixer set the mode = 1.
To model a flow diverter set the mode = 2.

INPUTS

For mode = 1 Flow Mixer

1 Inlet Temperature 1 [C] The temperature of the air stream entering the first inlet of the flow
mixer.

2 Inlet Humidity Ratio 1 [-] The absolute humidity ratio of the first air stream entering the mixer.

3 Inlet Relative Humidity [%] The relative humidity of the first air stream entering the mixer.
1

4 Inlet Flow Rate 1 [kg/h] The flow rate of first air stream entering the flow mixer.

5 Inlet Pressure 1 [atm] The pressure of the first air stream entering the mixer.

6 Inlet Temperature 2 [C] The temperature of the air stream entering the second inlet of the
flow mixer.

7 Inlet Humidity Ratio 2 [-] The absolute humidity ratio of the second air stream entering the
mixer.

8 Inlet Relative Humidity [%] The relative humidity of the second air stream entering the mixer.
2

9 Inlet Flow Rate 2 [kg/h] The flow rate of second air stream entering the flow mixer.

10 Inlet Pressure 2 [atm] The pressure of the second air stream entering the mixer.

For mode = 2 Flow Diverter

1 Inlet Temperature [C] The temperature of the air stream entering the inlet of the flow
diverter.

2 Inlet Humidity Ratio [-] The absolute humidity ratio of the air stream entering the diverter.

3 Inlet Relative Humidity [%] The relative humidity of the air stream entering the diverter.

4 Inlet Flow Rate [kg/h] The flow rate of air stream entering the inlet of the flow diverter.

4–356
TRNSYS 18 – Mathematical Reference

5 Inlet Pressure [atm] The pressure of the air stream entering the diverter.

6 Control Signal [-] The input control signal. The control signal sets the position of a
damper controlling the proportion of air to each exit. mdot,1 =
mdot,in * (1-Y); mdot,2 = mdot,in * Y

OUTPUTS

For mode = 1 Flow Mixer

1 Outlet Temperature [C] The temperature of the air stream exiting the mixer.

2 Outlet Humidity Ratio [-] The absolute humidity ratio of the air stream exiting the mixer.

3 Outlet Relative [%] The relative humidity of the air stream leaving the mixer.
Humidity

4 Outlet Flow Rate [kg/h] The flow rate of air stream leaving the mixer.

5 Outlet Pressure [atm] The pressure of the air stream leaving the mixer.

For mode = 2 Flow Diverter

1 Temperature at Outlet [C] The temperature of the air exiting through the first outlet of the flow
1 diverter. The outlet temperature is set to the inlet temperature for
all cases.

2 Humidity Ratio at [-] The absolute humidity ratio of the air exiting the diverter through
Outlet 1 outlet 1. The exiting humidity ratio is always set to the inlet
humidity ratio.

3 Relative Humidity at [%] The relative humidity of the air leaving the diverter through outlet 1.
Outlet 1 The exiting relative humidity is always set to the entering relative
humidity.

4 Flow Rate at Outlet 1 [kg/h] The flow rate of air leaving the first outlet of the controlled flow
diverter. The first outlet flow rate is: mdot,1 = mdot,in * (1-Y)

5 Pressure at Outlet 1 [atm] The pressure of the air leaving the diverter through outlet 1. The
outlet pressure is always set to the inlet pressure.

6 Temperature at Outlet [C] The temperature of the air exiting through the second outlet of the
2 flow diverter. The temperature at the outlet is set to the inlet
temperature for all cases.

7 Humidity Ratio at [-] The absolute humidity ratio of the air leaving the diverter through
Outlet 2 outlet 2. The outlet humidity ratio is always set to the inlet humidity
ratio.

8 Relative Humidity at [%] The relative humidity of the air leaving the diverter through outlet 2.
Outlet 2 The outlet relative humidity is always set to the inlet relative
humidity.

9 Flow Rate at Outlet 2 [kg/h] The flow rate of air exiting the flow diverter through the second
outlet. The flow rate through the second outlet is: mdot,2 = mdot,in
*Y

4–357
TRNSYS 18 – Mathematical Reference

10 Pressure at Outlet 2 [atm] The pressure of the air leaving the diverter through outlet 2. The
outlet pressure is always set to the inlet pressure.

4.5.10.3. Simulation Summary Report Contents


This component does not write an entry in the Simulation Summary Report (*.ssr) file

4.5.10.4. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.5.10.5. Detailed Description


FOR MODE = 1 FLOW MIXER:
In this mode, Type 148 takes the flow rates and properties of two air streams and calculates the resulting
flow rate and properties of mixing the two streams. First the component uses the TRNSYS Psychrometrics
routines to calculate all of the inlet air properties based on the input properties. The resulting properties
from mixing the two streams are calculated by
𝑚̇𝑜𝑢𝑡 = 𝑚̇𝑖𝑛.1 + 𝑚̇𝑖𝑛,2 Eq. 4.5.10-1
𝑚̇𝑖𝑛,1 𝑇𝑖𝑛,1 + 𝑚̇𝑖𝑛,2 𝑇𝑖𝑛,2
𝑇𝑜𝑢𝑡 = Eq. 4.5.10-2
𝑚̇𝑜𝑢𝑡
𝑚̇𝑖𝑛,1 𝑃𝑖𝑛,1 + 𝑚̇𝑖𝑛,2 𝑃𝑖𝑛,2
𝑃𝑜𝑢𝑡 = Eq. 4.5.10-3
𝑚̇𝑜𝑢𝑡
𝑚̇𝑖𝑛,1 𝑤𝑖𝑛,1 + 𝑚̇𝑖𝑛,2 𝑤𝑖𝑛,2
𝑤𝑜𝑢𝑡 = Eq. 4.5.10-4
𝑚̇𝑜𝑢𝑡
If the resulting humidty ratio is above the saturation humidity ratio at the combined temperature, the outlet
humidity ratio is set to the saturated humidity ratio. The remaining leaving air properties are then calculated
from these properties using the TRNSYS Psychrometics routines.

FOR MODE = 2 FLOW DIVERTER:


In this mode Type 148 takes an input single stream of air and splits the airstream into two separate streams.
First the inlet air properties are calculated using the TRNSYS Psychrometrics routines and the input air
properties. The outlet stream flowrates are then calculated based on the inlet control signal.
𝑚̇1 = 𝑚̇𝑖𝑛 (1 − 𝛾) Eq. 4.5.10-5

𝑚̇2 = 𝑚̇𝑖𝑛 𝛾 Eq. 4.5.10-6

The remaining outlet air properties are the same as the inlet air properties.

4–358
TRNSYS 18 – Mathematical Reference

4.6. Loads and Structures

4–359
TRNSYS 18 – Mathematical Reference

4.6.1. Type 19: Detailed Single Zone (Transfer Function)


This model is useful for estimating heating or cooling loads for a single zone. Walls, windows, flat roofs,
doors, and floors are included in this component. The set of equations for heat transfer from and within the
zone are formulated in a matrix and solved in a computationally efficient manner each simulation timestep.
In order to describe a zone using this component, the user specifies separate sets of parameters and Inputs
describing the internal space, the walls (also floors and ceilings), windows, and doors. The walls are
modeled using the ASHRAE transfer function approach [1]. Exterior walls, interior partitions (walls within a
zone at one temperature), or walls separating zones at different temperatures can be handled. The user
may select from the list of standard walls, partitions, ceilings, or floors, taken from the ASHRAE Handbook
of Fundamentals [1] and listed near the end of this section. The transfer function coefficients are in the file
ASHRAE.COF, which is accessed by the program at the beginning of the simulation through logical unit. .
Alternatively, the program PREP is included with TRNSYS for the purpose of generating transfer function
coefficients for arbitrarily constructed walls. If the user wishes to consider a wall or floor that is not
appropriately modeled according to the transfer function concept, then conduction from this wall must be
provided as an Input to the Type19 zone. An example of such a wall would be a Type36 Thermal Storage
Wall.
This model has two basic modes of operation that make it compatible with the energy rate or temperature
level control strategies discussed in the introduction to this section. In mode 1, the user specifies limits on
the maximum and minimum zone temperatures, T max and Tmin. These are the set points for cooling and
heating, respectively. When the calculated value of the zone temperature falls between these limits, no load
is output. If the zone temperature would rise above T max or fall below Tmin, then the energy required to
maintain the zone at either limit is output along with the limit temperature. Cooling loads are positive, while
heating is negative. The implicit assumption in Mode 1 is that the load is exactly met since the required
zone temperature is assumed. The load that is output is independent of any heating or cooling equipment
operation. Latent loads are also calculated in Mode 1 on an energy rate basis. The zone humidity ratio is
allowed to float between a maximum and minimum limit specified by the user, max and min. If the calculated
humidity ratio would fall outside these limits, then the humidification or dehumidification energy required to
maintain a ratio of min or max is output. Otherwise, the latent load is zero.
In temperature level control (Mode 2), the zone temperature and humidity reflect both the ambient
conditions and the heating or cooling equipment Input. Heat may be added or removed by use of a
ventilation flow stream or an instantaneous heat gain Input (heat added is positive, while heat removed is
negative). There are no minimum or maximum limits on the zone temperature or humidity. Normally, a
controller is used in conjunction with this mode to command the heating or cooling equipment.
Note: Type 19 component configuration and instructions to use PREP are located in a
supplement to this manual. The supplement can be found
in %TRNSYS18%\Documentation\A2-Type19Supplement.pdf
Note that all the features in Type 19 are available in Type 56, which is easier to use thanks
to its visual interface TRNBuild. Type 56 is the recommended model for most cases (except
for very simple building loads modeled with Type 88).

4.6.1.1. Parameter / Input / Output Reference


The parameter / input / output reference for Type19 can be found in the A2-Type19Supplement document
that is part of the TRNSYS documentation set.

4.6.1.2. Simulation Summary Report Contents


VALUE FIELDS

Zone Volume [m3] Parameter 2

4–360
TRNSYS 18 – Mathematical Reference

Zone Thermal [kJ/K] Parameter 6


Capacitance

Number of Zone [-] Parameter 7


Surfaces

If control mode (parameter 1) = 1

Heating Set Point [C] Parameter 10

Cooling Set Point [C] Parameter 11

Humidification Set [kgH2O/kgAir] Parameter 12


Point

Dehumidification Set [kgH2O/kgAir] Parameter 13


Point

Peak Sensible Heating [kJ/h] Output 10


Load

Peak Sensible Cooling [kJ/h] Output 9


Load

Surface Area [m2] The area of each wall, window, partition, etc. This value is cycled for
each surface of the zone.

If control mode (parameter 1) = 2

Surface Area [m2] The area of each wall, window, partition, etc. This value is cycled for
each surface of the zone.

TEXT FIELDS

Control Mode n/a Either “Energy Rate Control” or “Temperature Level Control” depending
on the value of Parameter 1

Surface Type n/a This value is cycled (repeated) for each surface of the zone. The value
may be any of the following: Exterior Wall/Roof, Boundary Wall,
Adjacent Wall, Conduction Wall, or Window

INTEGRATED VALUE FIELDS

Convection Sensible [kJ] Output 3


Energy Gains

Occupant Sensible [kJ] Output 4


Energy Gains

Infiltration Sensible [kJ] Output 5


Energy Gains

Ventilation Sensible [kJ] Output 6


Energy

4–361
TRNSYS 18 – Mathematical Reference

If mode (parameter 1) = 1

Sensible Heating Load [kJ] Heating load values from output 7

Sensible Cooling Load [kJ] Cooling load values from output 7

Latent Heating Load [kJ] Humidification load values from output 8

Latent Cooling Load [kJ] dehumidification load values from output 8

MINIMUM/MAXIMUM VALUE FIELDS

Min/Max Value Fields are only present in the *.ssr file if Type19 is in Control Mode 2 (parameter 1 = 2)

Zone Temperature [C] Output 1

Zone Humidity Ratio [kgH2O/kgAir] Output 2

4.6.1.3. Hints and Tips


 In the Simulation Studio Type19 appears as a number of separate icons; one for the zone (airnode),
one each for the surfaces (walls, ceilings, floors, etc.). There may also be a “geometry” icon.
 The order in which the individual pieces of Type19 appear in the input file is important. You can change
the order of components in the Simulation Studio by clicking on the “component control cards” tool
(where you set the simulation start and stop times) and then clicking on the “component order” tab.
 For users unfamiliar with Type19 it is highly recommended that you begin from the Type19 example.
 When specifying transfer function coefficients for user-created walls, Type19 assumes that the d0
coefficient has a value of 1. The user should NOT enter a 1 as the first d coefficient but should begin
with the second d coefficient.

4.6.1.4. Nomenclature
A - overall surface area of wall or window exposed to inside of zone
b - transfer function coefficient for current and previous sol-air temperature
Cap - effective capacitance of room air plus any mass not considered with transfer functions
Cpa - specific heat of air
c - transfer function coefficient for current and previous equivalent zone air temperature
d - transfer function coefficient for current and previous heat flux to zone
Fki - view factor from surface k to i
F ki - net exchange factor from surface k to i
hc,i - convection coefficient at inside surface
hc,o - outside convection coefficient
hr,ij - linearized radiative coefficient between surfaces i and j
IT - total incident solar radiation
K1 - constant air change per hour
K2 - proportionality constant for air change due to indoor-outdoor temperature difference
K3 - proportionality constant for air change due to wind effects
minfl - mass flow rate of air infiltration
mv - mass flow rate of ventilation stream
N - total number of surfaces comprising zone

4–362
TRNSYS 18 – Mathematical Reference

q - heat transfer rate per unit area at the inside surface of a wall or window
I
Q - total heat transfer rate at the inside surface of a wall or window
Q infl - rate of energy gain into the zone due to infiltration
Q int - rate of energy transfer to the zone due to internal gains other than people or lights
Q lat - latent load; energy required to keep humidity levels within the comfort zone. Dehumidification is a
positive latent load, while humidification is negative.
Q sens - sensible load; energy required by auxiliary heating or cooling equipment to keep zone temperature
within the comfort zone. Cooling is positive, heating is negative.
Q spepl - rate of energy transfer to the zone due to sensible gains from people
Qv - rate of energy gain to the space due to the ventilation flow stream
Qz - rate of energy gain to the space due to convection from attached zones
s - sum of radiative energy absorbed at an inside surface due to solar, lights,
and people
Ta - ambient temperature
Teq - equivalent zone temperature; inside air temperature which, in the absence of radiative exchange at
the inside surface, gives the same heat transfer as actually occurs
Tmin - minimum allowable zone temperature; set point for heating
Tmax - maximum allowable zone temperature; set point for cooling
Tsa - sol-air temperature; outside air temperature, which in the absence of radiative exchange at outside
surface gives the same heat transfer as actually occurs
Ts - surface temperature
Tz - zone temperature
T'z - temperature of an adjacent zone
Ug - loss coefficient of window from inside to outside surface
Ug,o - overall loss coefficient of window including convection at inside and outside surfaces
Va - volume of air in the zone
W - windspeed
min - minimum allowable zone humidity ratio; set point for humidification
max - maximum allowable zone humidity ratio; set point for dehumidification
a - humidity ratio of ambient air
I - rate of internal moisture gains to zone other than people
v - humidity ratio of entering ventilation flow stream
z - humidity ratio of zone air
X - vector containing time varying Inputs that affect surface and zone temperatures
Z - matrix containing time independent factors affecting surface and zone temperatures
hvap - heat of vaporization of water
 - absorptance of the outside of a surface for solar radiation
 - reflectance term of inside surface for solar radiation
a - density of zone air
 - Stephan-Boltzman constant

SUBSCRIPTS
i, j, or k - refer to surfaces i, j, k
h - denotes the term of a transfer function. 0 is the current hour, l is the previous hour, etc.

4–363
TRNSYS 18 – Mathematical Reference

4.6.1.5. Detailed Description


In order to solve the basic equations modeling the heat transfer through and between all elements in the
zone, the problem is reduced to the following matrix equation.
[𝑍𝑖,𝑗 ][𝑇𝑠,𝑖 ] = [𝑋𝑖 ] Eq. 4.6.1-1

where Ts,i represents the inside surface temperature of element i, unless i is equal to the number of surfaces
plus one (n+1), in which case it is the zone air temperature. The factor X i includes time varying Inputs that
affect Ts,i, Zi,j is a coefficient relating the heat transfer between elements i and j.
The objective is to formulate the problem in terms of Eq. 4.6.1-1, making simplifying assumptions that result
in a time independent Zi,j matrix. In this manner, the Zi,j matrix is inverted once at the beginning of the
simulation and stored for later use. The solution of the set of equations is then reduced to multiplication of
the inverted Zi,j matrix and the time varying Xi vector as given by Eq. 4.6.1-2 and formulated by Madsen [3].
−1
[𝑇𝑠,𝑖 ] = [𝑍𝑖,𝑗 ] [𝑋𝑖 ] Eq. 4.6.1-2

EXTERIOR WALL
The instantaneous heat flux entering or leaving the zone for an exterior wall can be modeled according to
the following transfer function relationship.

𝑞𝑖 = ∑ 𝑏ℎ,𝑖 𝑇𝑠𝑎,𝑖,ℎ − ∑ 𝑐ℎ,𝑖 𝑇𝑒𝑞,𝑖,ℎ − ∑ 𝑑ℎ,𝑖 𝑞𝑖,ℎ Eq. 4.6.1-3


ℎ=0 ℎ=0 ℎ=1

The coefficients bh, ch, and dh are transfer function coefficients for current and previous values of the sol-
air temperature (Tsa,i), equivalent zone temperature (Teq,i), and heat flux, q i . A value of h equal to zero
represents the current time interval, h equal to one is the previous hour and so on. The sol-air temperature,
Tsa,i, is the temperature of the outdoor air which, in the absence of all radiation exchanges, would give the
same heat transfer at the outside surface as actually occurs. For a vertical wall, it is generally expressed
as:
(𝛼𝐼𝑇 )𝑖
𝑇𝑠𝑎,𝑖 = 𝑇𝑎 + Eq. 4.6.1-4
ℎ𝑐,𝑜
The following expression is used to evaluate the heat transfer coefficient for convection over the building:
ℎ𝑐,𝑜 = 5.7 + 3.8𝑊 Eq. 4.6.1-5

where the windspeed W has the units of m/s and hc,o is in W/m2-C.
The equivalent zone temperature, Teq,i, is analogous to a sol-air temperature for the inside surface. It is the
inside air temperature, which in the absence of radiative exchange at the inside surface, gives the same
heat transfer as actually occurs. This is expressed as:
𝑠𝑖 + ∑𝑁
𝑗=1 ℎ𝑟,𝑖𝑗 (𝑇𝑠,𝑗 − 𝑇𝑠,𝑖 )
𝑇𝑒𝑞,𝑖 = 𝑇𝑧 + Eq. 4.6.1-6
ℎ𝑐,𝑖
The quantity si is the sum of radiative gains absorbed by the surface due to solar, lights, equipment, and
people. A discussion of the calculation of these gains appears in a following section. Long-wave radiation
between surfaces in the zone is considered through the use of a linearized radiative heat transfer
coefficient, hr,i,j. All surfaces are assumed to be black for long-wave radiation, such that
ℎ𝑟,𝑖,𝑗 = 4𝜎𝐹𝑖𝑗 𝑇̅ 3 Eq. 4.6.1-7

This radiative coefficient is assumed to be constant throughout the simulation. It is evaluated at the initial
temperature of the zone specified by the user. View factors between all surfaces in the zone are calculated
for a rectangular parallelpiped by subroutine Enclosure_17, as described in the Programmer’sGuide
manual. The user specifies the dimensions of the zone, along with the location of any windows or doors.

4–364
TRNSYS 18 – Mathematical Reference

Eq. 4.6.1-3 expressed the heat transfer at the inside surface in terms of a transfer function relationship.
However, it can also be given according by the following heat transfer equation:
𝑞𝑖 = ℎ𝑐,𝑖 (𝑇𝑠,𝑖 − 𝑇𝑒𝑞,𝑖 ) Eq. 4.6.1-8

If Eq. 4.6.1-8 is substituted into Eq. 4.6.1-3, the result can be arranged in the form of Eq. 4.6.1-1 as
∗ 𝑁 ∗ 𝑁
𝑐𝑜,𝑖 𝑐𝑜,𝑖 ∗
𝑇𝑠,𝑖 (1 − ∑ ℎ𝑟,𝑖𝑗 |) + ∑ ℎ𝑟,𝑖𝑗 𝑇𝑠,𝑗 + 𝑐𝑜,𝑖 𝑇𝑧
ℎ𝑐,𝑖 ℎ𝑐,𝑖
𝑗=1 𝑗=1 Eq. 4.6.1-9

∗ ∗
𝑐𝑜,𝑖 𝑠𝑖
= ∑ 𝑏ℎ,𝑖 𝑇𝑠𝑎,𝑖,ℎ − ∑ 𝑐ℎ,𝑖 𝑇𝑒𝑞,𝑖,ℎ − ∑ 𝑑ℎ,𝑖 𝑇𝑠,𝑖,ℎ −
ℎ𝑐,𝑖
ℎ=0 ℎ=1 ℎ=1

where,

𝑐𝑜,𝑖
𝑐𝑜,𝑖 = −1
ℎ𝑐,𝑖

𝑐ℎ,𝑖
𝑐ℎ,𝑖 = − 𝑑ℎ
ℎ𝑐,𝑖


𝑏ℎ,𝑖
𝑏ℎ,𝑖 =
ℎ𝑐,𝑖
In terms of the nomenclature of Eq. 4.6.1-1:

𝑐𝑜,𝑖
𝑍𝑖,𝑗 = ℎ 𝑓𝑜𝑟 𝑖 ≠ 𝑗 Eq. 4.6.1-10
ℎ𝑐,𝑖 𝑟,𝑖𝑗
∗ 𝑁
𝑐𝑜,𝑖
𝑍𝑖,𝑖 = 1 − ∑ ℎ𝑟,𝑖𝑗 Eq. 4.6.1-11
ℎ𝑐,𝑖
𝑗=1

𝑍𝑖,𝑁+1 = 𝑐𝑜,𝑖 Eq. 4.6.1-12

∗ ∗
𝑐𝑜,𝑖 𝑠𝑖
𝑋𝑖 = ∑ 𝑏ℎ,𝑖 𝑇𝑠𝑎,𝑖,ℎ − ∑ 𝑐ℎ,𝑖 𝑇𝑒𝑞,𝑖,ℎ − ∑ 𝑑ℎ,𝑖 𝑇𝑠,𝑖,ℎ − Eq. 4.6.1-13
ℎ𝑐,𝑖
ℎ=0 ℎ=1 ℎ=1

INTERIOR PARTITION
An interior partition is assumed to be a wall that is exposed to identical conditions at both surfaces. With
this criterion, the wall is adiabatic at the centerline and the heat transfer at the surface is given as

𝑞𝑖 = ∑(𝑏ℎ,𝑖 − 𝑐ℎ,𝑖 )𝑇𝑒𝑞,𝑖,ℎ − ∑ 𝑑ℎ,𝑖 𝑞𝑖,ℎ Eq. 4.6.1-14


ℎ=0 ℎ=1

The heat transfer is also given by Eq. 4.6.1-8. If this expression is substituted into equation Eq. 4.6.1-14,
the result can be rearranged in the form of Eq. 4.6.1-1 such that:
∗ ∗
(𝑐𝑜,𝑖 − 𝑏𝑜,𝑖 )ℎ𝑟,𝑖𝑗
𝑍𝑖𝑗 = 𝑓𝑜𝑟 𝑖 ≠ 𝑗 Eq. 4.6.1-15
ℎ𝑐,𝑖
∗ ∗
(𝑐𝑜,𝑖 − 𝑏𝑜,𝑖 ) ∑ ℎ𝑟,𝑖𝑗
𝑍𝑖,𝑖 = 1 − Eq. 4.6.1-16
ℎ𝑐,𝑖
∗ ∗
𝑍𝑖,𝑁+1 = 𝑐𝑜,𝑖 − 𝑏𝑜,𝑖 Eq. 4.6.1-17


𝑋𝑖 = − ∑ 𝑐ℎ,𝑖 𝑇𝑒𝑞,𝑖,ℎ − ∑ 𝑑ℎ,𝑖 𝑇𝑠,𝑖,ℎ Eq. 4.6.1-18
ℎ=1 ℎ=1

4–365
TRNSYS 18 – Mathematical Reference

If both sides of the wall under consideration are exposed to the inside of zone, then the user should specify
the surface area to include both faces.

WALL BETWEEN ZONES


An interior wall separating two adjacent zones at different temperatures is modeled in the same manner as
an external wall, except that the sol-air temperature is replaced by an equivalent zone temperature. The
equivalent zone temperature, T’eq,i, is the temperature of adjacent zone which, in the absence of all radiation
exchanges, gives the same heat transfer at the inside of adjacent zone surface as actually occurs. Eq.
4.6.1-10 - Eq. 4.6.1-13 apply for an interior wall between zones if Tsa,i is replaced with T’eq,i. The equivalent
zone temperature for any wall is provided as an optional output of the Type19.

CONDUCTION INPUT
Walls or other structures not appropriately modeled using transfer function relationships must appear as
separate components in a simulation. The energy conduction at the inside surface of this wall must be
provided as an Input to the Type19 Zone. The expression for surface heat transfer given in Eq. 4.6.1-8 can
be rearranged in the form of Eq. 4.6.1-1 such that
−ℎ𝑟,𝑖𝑗
𝑍𝑖,𝑗 = 𝑓𝑜𝑟 𝑖 ≠ 𝑗 Eq. 4.6.1-19
ℎ𝑐,𝑖
∑ ℎ𝑟,𝑖𝑗
𝑍𝑖,𝑖 = 1 + Eq. 4.6.1-20
ℎ𝑐,𝑖
𝑍𝑖,𝑁+1 = −1 Eq. 4.6.1-21
𝑄𝑖
+ 𝑠𝑖
𝐴 Eq. 4.6.1-22
𝑋𝑖 = 𝑖
ℎ𝑐,𝑖
The heat transfer, Qi is provided as an Input. The equivalent zone temperature for this wall, T eq,i should be
used as the zone condition for evaluating Qi in the separate wall component. If the actual zone temperature
were used instead, then the effects of the absorption of radiation on the inside surface would not be correctly
accounted for.

WINDOW
There are two window modes. In mode 1, the solar transmission and the thermal heat gain are determined
internally. The solar energy passing through the window is the product of the incident solar radiation and
the transmittance provided as an Input. The thermal conduction through the window from the ambient is
given as
𝑄𝑖 = 𝐴𝑖 𝑈𝑔,𝑜,𝑖 (𝑇𝑎 − 𝑇𝑒𝑞,𝑖 ) Eq. 4.6.1-23

The loss coefficient from the inside to the outside surface of window is an Input. The overall loss coefficient,
Ug,o, is the reciprocal of the sum of the resistances of the window (1/U g), the outside air (1/hc,o) and the
inside air (1/hc,i). The energy transfer is evaluated with the above equation using the last estimate of T eq,i.
With this assumption, (Eq 5.7.3.19) - (Eq 5.7.3.22) are applicable. This procedure allows a variable overall
loss coefficient while retaining the time independence of the Z ij matrix.
In the second window mode, both solar energy transmitted through the wall and the thermal heat gain are
Inputs. These may be calculated using a more detailed window model such as the TYPE 35. (Eq 5.7.3.19)
- (Eq 5.7.3.22) are also applicable in this mode.

RADIATIVE GAINS
Radiation gains to each surface in the room originate from lights, people, and solar radiation entering
windows. Solar radiation passing through windows is assumed to be diffusely reflected. Consider beam
radiation striking a surface k. The diffuse radiation leaving k that strikes surface i is determined using the
total exchange factor from Beckman (5). This factor 𝐹̂𝑘𝑖 , is defined as the fraction of energy striking surface

4–366
TRNSYS 18 – Mathematical Reference

i which diffusely originated at surface k. For an enclosure with N diffusely reflecting surfaces, 𝐹̂𝑘𝑖 is
expressed as:
𝐹̂𝑖𝑗 = 𝐹𝑖𝑗 + 𝐹𝑖𝑙 𝜌1 𝐹̂𝑖𝑗 + ⋯ + 𝐹𝑖𝑖 𝜌𝑖 𝐹̂𝑖𝑗 + ⋯ + 𝐹𝑖𝑗 𝜌𝑖 𝐹̂𝑗𝑗 + ⋯ + 𝐹𝑖𝑁 𝜌𝑁 𝐹̂𝑁𝑗 Eq. 4.6.1-24

The solution to equation (24) can be written in matrix notation as


[𝐹̂𝑖𝑗 ] = [𝛿𝑖𝑗 − 𝐹𝑖𝑗 𝜌𝑖 ][𝐹𝑖𝑗 ] Eq. 4.6.1-25

where:
𝛿𝑖𝑗 = 1 𝑓𝑜𝑟 𝑖 = 𝑗
𝛿𝑖𝑗 = 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Diffuse radiation entering windows is assumed to be isotropic. With this assumption, the fraction of the
diffuse radiation transmitted through a window k that strikes surface is 𝐹̂𝑘𝑖 .
All surfaces are assumed to be black (i.e. perfect absorbers) for radiation from lights and people. Radiation
from these sources is also considered to be isotropic. Radiative gains from people are assumed to be 70%
of their total sensible energy output.

INTERNAL SPACE
An energy balance on the zone air plus any furnishings considered as a lumped system yields
𝑁
𝑇𝑍𝐹 − 𝑇𝑍𝐼
𝐶𝑎𝑝 = ∑ ℎ𝑐,𝑖 𝐴𝑖 (𝑇𝑠,𝑗 − 𝑇𝑧 ) + 𝑄̇𝑣 + 𝑄̇𝑖𝑛𝑓𝑙 + 0.3𝑄̇𝑠𝑝𝑒𝑝𝑙 + 𝑄̇𝑖𝑛𝑡 + 𝑄̇𝑧 Eq. 4.6.1-26
∆𝑡
𝑗=1

In order to arrange the above expression in the form of (Eq 5.7.3.1) while maintaining the time
independence of Zij, it is necessary to make two simplifying assumptions. First of all, the zone temperature
variation is considered to be linear over each simulation timestep. Secondly, the ventilation and infiltration
energy gains are evaluated using the last estimate of the zone temperature. With these assumptions, (Eq
5.7.3.26) can be rearranged such that
𝑍𝑁+1,𝑗 = ℎ𝑐,𝑗 𝐴𝑗 Eq. 4.6.1-27
𝑁 2𝐶𝑎𝑝
∑ ∑ 𝑍𝑁+1,𝑁+1 = ∑ ℎ𝑐,𝑗 𝐴𝑗 − Eq. 4.6.1-28
𝑗=1 ∆𝑡
2𝐶𝑎𝑝
𝑋𝑁+1 = −𝑄𝑧 − 𝑄𝑣 − 𝑄𝑖𝑛𝑓𝑙 − 0.3𝑄𝑠𝑝𝑒𝑝𝑙 − 𝑄𝑖𝑛𝑡 − 𝑇 Eq. 4.6.1-29
∆𝑡 𝑍𝐼
The ventilation and infiltration gains are expressed as
𝑄𝑣 = 𝑚𝑣 𝐶𝑝𝑎 (𝑇𝑣 − 𝑇𝑧 ) Eq. 4.6.1-30

𝑄𝑖𝑛𝑓𝑙 = 𝑚𝑖𝑛𝑓𝑙 𝐶𝑝𝑎 (𝑇𝑎 − 𝑇𝑧 ) Eq. 4.6.1-31

The ventilation flow is an Input, while the infiltration rate is determined to be


𝑚𝑖𝑛𝑓𝑙 = 𝜌𝑎 𝑉𝑎 (𝐾1 + 𝐾2 |𝑇𝑎 − 𝑇𝑧 | + 𝐾3 𝑊) Eq. 4.6.1-32

K1, K2, and K3 are empirical constants. Typical values for different construction qualities from the ASHRAE
Handbook of Fundamentals are given in Table 4.6.1–1 (SI units).
Table 4.6.1–1: Coefficients for Multiple Linear Regression Infiltration, Eq. 5.7.3.32

Construction K1 K2 K3 Description

Tight 0.10 0.011 0.034 New building where special precautions have been
taken to prevent infiltration.

4–367
TRNSYS 18 – Mathematical Reference

Medium 0.10 0.017 0.049 Building constructed using conventional construction


procedures.

Loose 0.10 0.023 0.07 Evidence of poor construction on older buildings where
joints have separated.

The energy convected from people in the space is assumed to be 30% of the total sensible gain from
people. The additional 70% is in the form of radiation to the interior surfaces. The number of people in the
zone at any time is specified as an Input. Both the sensible and latent gain from people depends upon the
level of activity. Table 4.6.1–2 gives the possible activity levels that may be specified. This table was taken
from Chapter 26 of the 1981 ASHRAE Handbook of Fundamentals.
Table 4.6.1–2: Rates of Heat Gain from Occupants of Conditioned Spacesa

Total heat
Sensible Heat Latent Heat
Typical adjustedb
No Degree of Activity
Application
W BTU/h W BTU/h W BTU/h

1 Seated at rest Theatre, movie 100 350 60 210 40 140

2 Seated, very light writing Office, hotels, 120 420 65 230 55 190
apts.

3 Seated, eating Restaurantc 170 580c 75 255 95 325

4 Seated, light work, typing Offices, hotels, 150 510 75 255 75 255
apts.

5 Standing, light work or Retail store, bank 185 640 90 315 95 325
walking slowly

6 Light bench work Factory 230 780 100 345 130 435

7 Walking, 1.3m/s (3mph) Factory 305 1040 100 345 205 695
light machine work

8 Bowlingd Bowling alley 280 960 100 345 180 615

9 Moderate dancing Dance hall 375 1280 120 405 255 875

10 Heavy work, heavy machine Factory 470 1600 165 565 300 1035
work, lifting

11 Heavy work, athletics Gymnasium 525 1800 185 635 340 1165

a Tabulated values are based on 25.5°C (78°F) room dry-bulb temperature. For 26.6°C (80°F) room dry bulb,
the total heat remains the same, but the sensible heat value should be decreased by approximately 8% and
the latent heat values increased accordingly.

b Adjusted total heat gain is based on normal percentage of men, women and children for the application
listed, with the postulate that the gain from an adult femail is 85% of that for an adult male, and that the gain
from a child is 75% of that for an adult male.

c Adjusted total heat value for eating in a restaurant includes 17.6W (60 BTU/h) for food per individual (8.8W
(30BTU/h) sensible and 8.8W (30BTU/h) latent).

4–368
TRNSYS 18 – Mathematical Reference

d For bouling figure one person per alley actually bowling and all others as sitting 117W (400BTU/h) or
standing and walking slowly 231W (790 BTU/h).

All values rounded to nearest 5W or to nearest 10 BTU/h.

Error! Reference source not found. to Error! Reference source not found. apply for a floating room
mperature. This is characteristic of temperature level control or when the room temperature is in the comfort
zone (no load) in energy rate control. If, however, the zone temperature would be above the maximum or
below the minimum limits imposed by the user, then the zone temperature is set equal to the limit and the
following expressions are used.
𝑍𝑁+1,𝑗 = 0 Eq. 4.6.1-33

𝑍𝑁+1,𝑁+1 = 1 Eq. 4.6.1-34

𝑋𝑁+1 = 𝑇𝑧 Eq. 4.6.1-35

The sensible energy required to maintain the set temperature (i.e. the load) in mode 1 is
𝑁
𝐶𝑎𝑝(𝑇𝑍𝐹 − 𝑇𝑍𝐼 )
𝑄𝑠𝑒𝑛𝑠 = 𝑄𝑧 + 𝑄𝑣 + 𝑄𝑖𝑛𝑡 + 0.3𝑄𝑠𝑝𝑒𝑝𝑙 + 𝑄𝑖𝑛𝑓 + ∑ ℎ𝑐,𝑗 𝐴𝑗 (𝑇𝑠,𝑗 − 𝑇𝑧 ) − Eq. 4.6.1-36
∆𝑡
𝑗=1

As described above, ventilation, infiltration and thermal energy gains through windows are calculated using
the most recent estimate of the zone temperature. If the zone temperature is changing rapidly and these
energy quantities represent a significant portion of the energy gain to the space, this may not be adequate.
As a result, the Type19 uses an internal iteration if the energy balance on the zone does not close to within
2%.

LATENT LOADS
A moisture balance on the room air at any instant yields the following differential equation.
𝑑𝜔𝑧
𝜌𝑎 𝑉𝑎 = 𝑚𝑖𝑛𝑓𝑙 (𝜔𝑎 − 𝜔𝑧 ) + 𝑚𝑣 (𝜔𝑣 − 𝜔𝑧 ) + 𝜔𝐼 Eq. 4.6.1-37
𝑑𝑡
Eq. 4.6.1-37 is solved each simulation timestep for the zone humidity ratio. In temperature level control,
the ventilation flowstream or moisture generation should include moisture addition or removal due to heating
or cooling equipment. For this case, the latent load should be calculated external to the Type19, possibly
with a cooling coil model. In energy rate control, the latent load is the energy required to maintain the zone
humidity ratio within the humidity comfort zone (i.e. between minand max). If the zone humidity ratio would
fall outside the limits imposed by the user, then the zone humidity ratio is set equal to the limit and the latent
load is calculated as:
𝑄𝑙𝑎𝑡 = ∆ℎ𝑣𝑎𝑝 (𝑚𝑖𝑛𝑓𝑙 (𝜔𝑎 − 𝜔𝑧 ) + 𝑚𝑣 (𝜔𝑣 − 𝜔𝑧 ) + 𝜔𝐼 ) Eq. 4.6.1-38

Otherwise the latent load is zero. Note that Va (zone parameter number 3) may be artificially increased to
account for the moisture capacitance of furnishings, etc. This will not affect any other calculation.

4.6.1.6. Component Configuration


In order to describe a zone, it is necessary to specify characteristics of the internal space, external weather
conditions, walls, windows, and doors. To facilitate this description, the parameters and inputs for this
component are organized in separate lists according to type. In terms of the component description, the
parameters and inputs may appear as single lists following single parameter and input cards or may be
presented as separate lists, each with an individual parameter and input cards.
The first lists of parameters and inputs for the Type19 pertain to the internal space and external conditions.
These lists must appear first in the component description. For each surface in the zone, another set of

4–369
TRNSYS 18 – Mathematical Reference

parameters and inputs is necessary. There are five possibilities for surface types. They include transfer
function representations for exterior walls, interior partitions, and walls separating zones at different
temperatures. Coefficients for the standard walls, partitions, ceilings, or floors taken from the ASHRAE
Handbook of Fundamentals [1] are in the file ASHRAE.COF (accessed through logical unit 8) and listed at
the end of the component description. The user may choose from these lists or may provide the coefficients
generated by the stand-alone program PREP (see %TRNSYS18%\Documentation\A2-
Type19Supplement.pdf) for other constructions. A wall may also be modeled using a separate TRNSYS
component with conduction through this wall provided as an input to the zone. The fifth type of surface
available is a window. The user must specify the properties of the window, along with specifics concerning
the illumination of the interior surfaces due to beam radiation passing through the window. A door or any
other wall that has negligible thermal capacitance can be considered by specifying a transfer function wall
with one b and c coefficient and no d coefficients. In this case, both bo and co should be set equal to the U
value of the door or wall.
The last parameters that must be supplied define the geometry of the zone for radiation exchange
calculations. There are three principal geometry modes. In the first mode, the program calculates view
factors for a parallelpiped (box) geometry. There is a set of parameters that describe the size of the room
and relative locations of wall surfaces. For each window or door, an additional set of parameters is
necessary to describe its location on a wall. Figure 4.6.1–1 shows the dimensions and definitions of the
zone geometry that are using in specifying the Type19 parameters. In the second geometry mode, the user
specifies the number of entries required. A third geometry mode is 0. In this case, the program uses area
ratios to determine view factors. Although this is not a correct procedure, it may be adequate when the
inside surfaces are close in temperature and infrared energy exchange is not significant. When the
geometry mode is specified as 0, no additional geometry parameters are required.
There are 10 standard outputs of the Type19. Up to 10 additional surface dependent quantities may be
specified as outputs using optional parameters that follow the geometry description. The first parameter
specifies the number of additional outputs that are desired. For each output, two parameters are then
required. The first one specifies the type of output desired as chosen (by number) from Table 4.6.1–2. The
second parameter in this group of two is the surface number for which this quantity is desired. The additional
outputs begin at the eleventh output and may range to the twentieth.

Figure 4.6.1–1: Roof Geometry and Ceiling Cross Section

Table 4.6.1–3: Additional Output Options for Surface i

4–370
TRNSYS 18 – Mathematical Reference

Output Output Name Output Description


Number

1 Ts,i Temperature at inside surface [C]

2 Teq,i Equivalent inside room temperature for surface i [C]

3 Si Absorbed radiative gains from solar, lights, and people for surface i [kJ/m 2.hr]

4 Qc,i Energy convected to room from surface i [kJ/hr]

5 Qr,i Radiative gains to surface i due to infrared exchange [kJ/hr]

4.6.1.7. References
1. ASHRAE, Handbook of Fundamentals, (2001).
2. Madsen, J.M. “Modeling Heat Transfer in Rooms Using Transfere Function Methods,” M.S. Thesis,
University of Wisconsin – Madison (1982).
3. McAdams, W.H., Heat Transmission, 3rd edition, McGraw-Hill, New York, (1954).
4. Beckman, W.A., “The Solution of Heat Transfer Problems on a Digital Computer,” Solar Energy, 13, 3,
(1971).

4–371
TRNSYS 18 – Mathematical Reference

4.6.2. Type 34: Overhang and Wingwall Shading


Buildings directly heated by solar radiation often include a shading device to shield receiver surfaces from
direct radiation in summer months. This component computes the solar radiation on a vertical receiver
shaded by an overhang and/or wingwall. The geometry of a shaded receiver is shown in Figure 4.6.2–1.

4.6.2.1. Parameter / Input / Output Reference


PARAMETERS

1 Mode [-] This parameter tells Type 34 whether or not the view factor to
the sky has already been taken into account in the diffuse
radiation, which depends on the component to which input 4 is
connected
0: Radiation comes from Type15 (or Type16 or Type99). View
factor has NOT been taken into account.
1: Radiation comes from Type67 (mask). View factor has
already been taken into account.
Technical explanation:
The difference is in the view factor of the sky behind the window.
Type34 assumes a vertical orientation for the window. In doing
that, it knows that a window with no overhangs or projections
can only see half the sky so the sky view factor that it calculates
is: ShadedVF = 0.5 - OverhangEffects - WingwallEffects
Type68 allows for the window to be sloped and calculates its sky
view factor accordingly. If the window is vertical and there are no
obstructions in front of the window, then its calculated view
factor is 0.5 and the radiation that has been passed through
Type68 will already be cut down accordingly. If you then want to
include the effect of an overhang using Type34, you have
already accounted for the 0.5 in the ShadedVF equation above,
so you need to use
instead: ShadedVF = 1.0 - OverhangEffects - WingwallEffects
so that you don't account for the fraction of the sky that is behind
the window twice.

2 Receiver height [m] The height of the receiver.

3 Receiver width [m] The width of the receiver.

The length of the overhead projection; measured in the plane of


4 Overhang projection [m]
the overhead projection. Refer to Figure 4.8.4.1 for more details.

The distance between the top of the receiver and the


5 Overhang gap [m] intersection of the overhang with the plane containing the
receiver.

Overhang left The horizontal distance between the left edge of the receiver
6 [m]
extension and theleft edge of the overhang.

Overhang right The horizontal distance between the right edge of the receiver
7 [m]
extension and theright edge of the overhang.

4–372
TRNSYS 18 – Mathematical Reference

The length of the left wingwall projection; measured in the plane


8 Left wingwall projection [m]
ofthe left wingwall.

The horizontal distance between the left edge of the receiver


9 Left wingwall gap [m]
and thestart of the left wingwall.

Left wingwall top The vertical distance between the top of the receiver and the
10 [m]
extension topof the wingwall.

Left wingwall bottom The vertical distance between the bottom of the receiver and the
11 [m]
extension bottom of the left wingwall.

Right wingwall The length of the right wingwall; measured in the plane of the
12 [m]
projection wingwall.

The horizontal distance between the right side of the receiver


13 Right wingwall gap [m]
and the beginning of the right wingwall.

Right wingwall top The vertical distance between the top of the receiver and the top
14 [m]
extension ofthe right wingwall.

Right wingwall bottom The vertical distance between the bottom of the receiver and
15 [m]
extension thebottom of the right wingwall.

The surface azimuth of the receiver. The azimuth is defined as


the angle between the local meridian and the projection of the
16 Receiver azimuth [degrees]
line ofsight of the surface. Zero is facing the equator, west is
positve (90) and east is negative (-90).

INPUTS

The solar zenith angle is the angle between the vertical and the
1 Solar zenith angle [degrees]
projection of the line of sight of the sun.

The solar azimuth angle is the angle between the local meridian
2 Solar azimuth angle [degrees] and the projection of the line of sight of the sun onto the
horizontal plane.

Total horizontal The total radiation (beam + sky difuse + ground reflected diffuse)
3 [kJ/hr.m2]
radiation incident upon a horizontal surface per unit area.

The diffuse radiation incident upon a horizontal surface per unit


Horizontal diffuse area. Note that this model assumes an isotropic sky and that for
4 [kJ/hr.m2]
radiation correct results, the component from which this value is
connected should be set to assume an isotropic sky.

Beam radiation on The beam radiation per unit area incident upon the receiver
5 [kJ/hr.m2]
surface surface.

The reflectance of the ground above which the receiver is


positioned. The reflectance is a ratio of the radiation reflected to
6 Ground reflectance [-] the totalradiation incident upon a surface and therefore must be
between 0 and 1. Typical values are 0.2 for ground not covered
by snow, and 0.7 for snow-covered ground.

Incidence angle of
7 [degrees] Incidence angle of direct radiation on the receiver surface
direct radiation

4–373
TRNSYS 18 – Mathematical Reference

OUTPUTS

Incident receiver The average total solar radiation (beam + sky diffuse + ground
1 [kJ/hr.m2]
radiation reflected diffuse) incident on the shaded receiver per unit area.

Beam radiation on The average beam radiation incident upon the receiver per unit
2 [kJ/hr.m2]
receiver area.

The average sky diffuse radiation incident upon the shaded


3 Sky diffuse on receiver [kJ/hr.m2]
receiver per unit area.

Ground reflected The average ground reflected diffuse radiation incident upon
4 [kJ/hr.m2]
diffuse theshaded receiver per unit area.

The fraction of the receiver surface which is irradiated by direct


5 Direct beam fraction [-]
beam radiation.

6 View factor to sky [-] The view factor from the receiver surface to the sky.

7 View factor to ground [-] The view factor from the receiver to the ground.

View factor to
8 [-] The view factor from the receiver surface to the overhang.
overhang

View factor to left


9 [-] The view factor from the receiver to the left wingwall.
wingwall

View factor to right


10 [-] The view factor from the receiver surface to the right wingwall.
wingwall

This is the fraction of solar shading. This number, in the [0;1]


range, is computed as:FSS = 1 - (Shaded radiation / Total
Fraction of solar radiation)Its value is 0 for a non-shaded surface, 1 for a
11 [-]
shading completely shaded surface.This output can be used as "external
shading factor" in Type56 to approximate shading effects on a
window.

12 Angle of incidence [degrees]

4.6.2.2. Simulation Summary Report Contents


VALUE FIELDS

Receiver height [m] Parameter 2

Receiver width [m] Parameter 3

Overhang projection [m] Parameter 4; Note: this value will not be written if the overhang
extension is 0

Overhang gap [m] Parameter 5; Note: this value will not be written if the overhang
extension is 0

Overhang left [m] Parameter 6; Note: this value will not be written if the overhang
projection extension is 0

4–374
TRNSYS 18 – Mathematical Reference

Overhang right [m] Parameter 7; Note: this value will not be written if the overhang
projection extension is 0

Left wingwall [m] Parameter 8; Note: this value will not be written if the left wingwall
projection extension is 0

[m] Parameter 9; Note: this value will not be written if the left wingwall
Left wingwall gap
extension is 0

Left wingwall top [m] Parameter 10; Note: this value will not be written if the left wingwall
extension extension is 0

Left wingwall bottom [m] Parameter 12; Note: this value will not be written if the left wingwall
extension extension is 0

Right wingwall [m] Parameter 13; Note: this value will not be written if the right wingwall
projection extension is 0

[m] Parameter 14; Note: this value will not be written if the right wingwall
Right wingwall gap
extension is 0

Right wingwall top [m] Parameter 15; Note: this value will not be written if the right wingwall
extension extension is 0

Right wingwall bottom [m] Parameter 16; Note: this value will not be written if the right wingwall
extension extension is 0

View factor to sky [0..1] Output 6

View factor to ground [0..1] Output 7

View factor to [0..1] Output 8


overhang

View factor to left [0..1] Output 9


wingwall

View factor to right [0..1] Output 10


wingwall

MINIMUM/MAXIMUM VALUE FIELDS

Beam irradiated [0..1] Output 5


fraction

Solar shading fraction [0..1] Output 11

4.6.2.3. Hints and Tips


 This model assumes that the diffuse radiation incident on the aperture comes from an isotropic sky
when calculating the reduction in diffuse radiation due to the shading surfaces. For the purposes of
Type34’s calculations it is best to set the radiation processor (Type15 or Type16) to use the isotropic
sky mode. However, doing so may have unintended or undesired consequences for other components.
If an anisotropic sky model is used in the radiation processor and Type34’s wing wall and overhang
lengths are set to zero, Type34 will still calculate some small shading on the aperture as a result.

4–375
TRNSYS 18 – Mathematical Reference

 Type34 assumes that the shaded aperture is vertical. Its view factor for diffuse radiation is therefore
half of the sky dome (i.e. no diffuse radiation comes from behind the receiver aperture). If you are
using another component (such as Type67) to compute the shading effects of faraway objects or
radiation augmentation by reflective surfaces) upstream of Type34 be sure that you do not double
account for the reduction in diffuse radiation visible by the Type34 aperture. Type34 includes a
parameter that allows the user to specify whether the diffuse radiation view factor should or should not
be taken into account by Type34.

4.6.2.4. Nomenclature
A - receiver area
Ai - receiver area irradiated by direct beam
As - receiver area shaded from direct beam
eb - wingwall extension past the bottom of the receiver
el - overhang extension past the left edge of the receiver
er - overhang extension past the right edge of the receiver
et - wingwall extension past the top of the receiver
fi - fraction of the receiver area irradiated by direct beam
FA-G - receiver radiation view factor of the ground
FA-O - receiver radiation view factor of the overhang
FA-S - receiver radiation view factor of the sky
FA-Wl - receiver radiation view factor of the left wingwall
FA-Wr - receiver radiation view factor of the right wingwall
g - gap between the edge of the receiver and the base of the overhang or wingwall
h - receiver height
I - horizontal total solar radiation
IbT - beam component of solar radiation incident on the receiver surface
Id - diffuse component of solar radiation incident on a horizontal surface
(IT)S - average solar radiation incident on a shaded receiver
- overhang or wingwall projection from receiver surface
w - receiver width
s - solar azimuth angle
Z - solar zenith angle
 - receiver azimuth angle
gnd - ground reflectance

4–376
TRNSYS 18 – Mathematical Reference

4.6.2.5. Detailed Description

Figure 4.6.2–1: Shading Geometry


Solar radiation incident on a shaded receiver consists of beam, diffuse and ground reflected components.
(Solar radiation reflected from the overhang or wingwalls onto the receiver is not considered in this model.) :
(𝐼𝑇 )𝑠 = 𝐼𝑏𝑇 𝑓𝑖 + 𝐼𝑑𝑡 𝐹𝐴−𝑆 + 𝐼𝑑 𝜌𝑔𝑛𝑑 𝐹𝐴−𝐺 Eq. 4.6.2-1

(𝑇𝑜𝑡𝑎𝑙) = (𝐵𝑒𝑎𝑚) + (𝐷𝑖𝑓𝑓𝑢𝑠𝑒) + (𝑅𝑒𝑓𝑙𝑒𝑐𝑡𝑒𝑑)


The fraction of the receiver area irradiated by direct beam, fi, is a function of shading geometry and the
position of the sun relative to the receiver. The irradiated fraction is given by:
𝐴𝑖
𝑓𝑖 = Eq. 4.6.2-2
𝐴
An ASHRAE algorithm (1) that determines Ai is used in Type34 to compute fi.
Sky and ground radiation view factors are calculated assuming diffuse and reflected radiation to be
isotropic. For unshaded vertical surfaces, the receiver radiation view factors of the sky and ground are both
equal to one half. These view factors are reduced when wingwalls or an overhang are present. The view
factor between the receiver and the wingwall, F A-W is computed by integrating the differential receiver area
radiation view factor of the wingwall over the receiver area. Figure 5.7.4.2 describes the receiver-wingwall
radiation geometry.

4–377
TRNSYS 18 – Mathematical Reference

C
P

A dA
B1 1

A
2
B2

Figure 4.6.2–2: Radiation Geometry


The receiver radiation view factor of the wingwall is given by:

𝐹𝐴−𝑊 = ∫ 𝐹𝑑𝐴−𝐴1 𝑑𝐴 + ∫ 𝐹𝑑𝐴−𝐴2 𝑑𝐴 Eq. 4.6.2-3


𝐴 𝐴

where FdA-A1 and FdA-A2 are given by Siegel and Howell [2] as:

𝐶
1 𝐵𝑖 𝐵𝑖 1
𝐹𝑑𝐴−𝐴𝑖 = tan−1 ( ) − tan−1 (𝑖 = 1,2) Eq. 4.6.2-4
2𝜋 𝐶 2 2 2 2
√( 𝑃 ) + ( 𝐶 ) √( 𝑃 ) + ( 𝐶 )
[ ( 𝐵𝑖 𝐵𝑖 ) ( 𝐵𝑖 𝐵𝑖 )]

The receiver radiation view factor of the overhang is computed in a similar manner. The total sky and ground
view factors FA-S and FA-G are given by:
1
𝐹𝐴−𝑆 = − 𝐹𝐴−𝑂 − ∫ 𝐹𝑑𝐴−𝐴1 𝑑𝐴 − ∫ 𝐹𝑑𝐴−𝐴1 𝑑𝐴 Eq. 4.6.2-5
2 𝐴 𝐴
left wingwall right wingwall
1
𝐹𝐴−𝐺 = − ∫ 𝐹𝑑𝐴−𝐴2 𝑑𝐴 − ∫ 𝐹𝑑𝐴−𝐴2 𝑑𝐴 Eq. 4.6.2-6
2 𝐴 𝐴

left wingwall right wingwall


Type34 uses numerical integration to compute the receiver radiation view factors once during a simulation.

4.6.2.6. References
1. Sun, Tseng-Yao, 'SHADOW 1', Procedure for Determining Heating and Cooling Loads for
Computerizing Energy Calculations, ASHRAE Task Group on Energy Requirements, 1975, pp. 48-56.
2. Siegel, R. and Howell, J., Thermal Radiation Heat Transfer, McGraw-Hill, 1972, p. 784.

4–378
TRNSYS 18 – Mathematical Reference

4.6.3. Type 36: Glazed Trombe (Thermal Storage) Wall


A thermal storage wall is essentially a high capacitance solar collector directly coupled to the room.
Absorbed solar radiation reaches the room by either of two paths. One path is conduction through the wall.
From the inside wall surface, the energy is convected and radiated into the room. The second path is
convection from the hot outer wall surface to air in the gap. Room air flowing through the gap is heated,
carrying energy into the room. The wall also loses energy by conduction, convection and radiation to the
environment through the glazing covers.
This component offers four modes of operation. In Mode 1, the total solar radiation and glazing
transmittance are Inputs as is the mass flow rate of air in the gap. Mode 2 is the same as Mode 1 except
that the mass flow rate is driven by air temperature differences and is computed internally. In Mode 3, the
mass flow rate of air is Input and the transmittance of beam and diffuse radiation are considered separately.
The transmittance-absorptance product is determined in function subroutine Tau_Alpha, described in the
07-ProgrammersGuide manual. Mode 4 is the same as Mode 3 except that the mass flow rate of air in the
gap is driven by temperature differences and computed internally.

4.6.3.1. Parameter / Input / Output Reference


PARAMETERS

Setting this parameter to 1 indicates to the general thermal


1 Mode [-] storage wall model that the air flow rate and the transmittance
will be set as inputs.

2 Wall height [m] The height of the thermal storage wall.

3 Wall width [m] The width of the thermal storage wall.

4 Wall thickness [m] The thickness of the thermal storage wall.

5 Wall conductivity [kJ/hr.m.K] The effective thermal conductivity of the thermal storage wall.

Wall specific
6 [kJ/m3.K] The product of the wall density and wall specific heat.
capacitance

The solar absorptance of the thermal storage wall. The


absorptance is a ratio of the radiation absorbed by a surface to
7 Wall solar absorptance [-]
the total radiation incident upon the surface, and therefore, must
be between 0 and 1.

The emittance of the outside surface of the thermal storage wall.


The emittance is defined as the ratio of the radiation emitted by
8 Wall emittance [-] a surface to the radiation emitted by a black body (the perfect
emitter) at the same temperature. The emittance must therefore
be between 0 and 1.

The emittance of the glazing material. The emittance is defined


as the ratio of radiation emitted by a surface to the radiation
9 Glazing emittance [-]
emited by a black body (the perfect emitter) at the same
temperature. The emittance must therefore be between 0 and 1.

The number of identical glass covers on the thermal storage


10 Number of glazings [-]
wall.

4–379
TRNSYS 18 – Mathematical Reference

Spacing between wall The distance between the outside surface of the thermal storage
11 [m]
and glazing wall and the first glazing cover.

If Mode (parameter 1) = 2

12 Vent outlet area [m2] The total outlet area of the vent.

Distance between The vertical distance between the inlet and outlet vents in the
13 [m]
vents thermal storage wall.

If Mode (parameter 1) = 3

The product of the extinction coefficient and the glazing


12 Extinction [-] thickness for one of the identical glass covers of the thermal
storage wall (KL product).

The index of refraction of one of the identical glass covers of the


13 Refractive index [-]
thermal storage wall.

If Mode (parameter 1) = 4

The product of the extinction coefficient and the glazing


12 Extinction [-] thickness for one of the identical glass covers of the thermal
storage wall (KL product).

The index of refraction of one of the identical glass covers of the


13 Refractive index [-]
thermal storage wall.

14 Vent outlet area [m2] The total outlet area of the vent.

Distance between The vertical distance between the inlet and outlet vents in the
15 [m]
vents thermal storage wall.

INPUTS

The control function determines whether mass flow of air is


allowed and to what sink the air is exchanged.
If the control signal = 1, the air in the gap is exchanged with air
from the room.
1 Control function [-]
If the control signal = -1, the air in the gap is exchanged with air
from the ambient.
If the control signal is neither 1 nor -1, there is assumed to be no
air flow through the gap.

The temperature of the air in the room to which the thermal


2 Room temperature [C]
storage wall is attached.

3 Ambient temperature [C] The temperature of the ambient air.

The speed of the wind across the outside surface of the thermal
4 Wind speed [m/s]
storage wall.

The overall heat transfer coefficient from the first glazing of the
5 Outside loss coefficient [kJ/hr.m2.K]
thermal storage wall to the ambient.

4–380
TRNSYS 18 – Mathematical Reference

The overall loss coefficient from the inside wall surface to the
6 Inside loss coefficient [kJ/hr.m2.K]
room.

The total solar radiation (beam + sky diffuse + ground reflected


7 Total radiation [kJ/hr.m2]
diffuse) incident upon the thermal storage wall per unit area.

If Mode (parameter 1) = 1

The transmittance of one of the identical glazings covering the


thermal storage wall. The transmittance is defined as the ratio of
8 Glazing transmittance [-] the radiation transmitted through a surface to the total radiation
incident upon the surface and therefore, must be between 0 and
1.

9 Inlet air flow rate [kg/hr] The flow rate of air through the gap in the thermal storage wall.

If Mode (parameter 1) = 1

The transmittance of one of the identical glazings covering the


thermal storage wall. The transmittance is defined as the ratio of
8 Glazing transmittance [-] the radiation transmitted through a surface to the total radiation
incident upon the surface and therefore, must be between 0 and
1.

If Mode (parameter 1) = 3

The beam solar radiation incident upon the thermal storage wall
8 Beam radiation [kJ/hr.m2]
per unit area.

The angle of incidence of beam radiation on the outer glazing of


9 Incidence angle [degrees]
the thermal storage wall.

10 Inlet air flow rate [kg/hr] The flow rate of air through the gap in the thermal storage wall.

If Mode (parameter 1) = 4

The beam solar radiation incident upon the thermal storage wall
8 Beam radiation [kJ/hr.m2]
per unit area.

The angle of incidence of beam radiation on the outer glazing of


9 Incidence angle [degrees]
the thermal storage wall.

OUTPUTS

The rate at which energy is transferred to the room from the


1 Energy flow to room [kJ/hr]
thermal storage wall (includes ventilation and wall heat transfer).

The rate of change of the wall internal energy with respect to


Internal energy change
2 [kJ/hr] time (dU/dt). This output is a rate quantity and should be
rate
integrated if an energy balance is to be done.

The rate at which solar energy is absorbd by the thermal storage


3 Solar absorption rate [kJ/hr]
wall.

The rate at which energy is lost from the thermal storage wall to
4 Thermal losses [kJ/hr]
the ambient.

4–381
TRNSYS 18 – Mathematical Reference

Wall to room heat The rate at which energy is transferred from the inside wall
5 [kJ/hr]
transfer surface to the room.

Glazing to ambient The rate at which energy is transferred from the first glazing to
6 [kJ/hr]
heat transfer the ambient.

The rate at which energy is transferred due to the flow rate of air
7 Ventilation energy flow [kJ/hr]
through the gap.

8 Air flow rate [kg/hr] The flow rate of air through the gap in the thermal storage wall.

The temperature of the air exiting the gap in the thermal storage
9 Outlet air temperature [C]
wall.

Temperature of first
10 [C] The temperature of the first glazing of the thermal storage wall.
glazing

The temperature of the each wall node. Wall node 1 is defined to


be the temperature of the outside surface of the wall. Wall node
Temperature of wall
11 [C] N, where N is the number of wall nodes specified in the
node
derivatives section, is defined to be the temperature of the inside
surface of the wall.

DERIVATIVES

The initial temperature of each wall node. Wall node 1 is defined


Initial temperature of to be the outside surface of the wall. Wall node N, where N is
1 [C]
wall node the total number of wall nodes specified, is defined to be the
inside surface of the wall.

4.6.3.2. Simulation Summary Report Contents


VALUE FIELDS

Wall height [m] Parameter 2

Wall width [m] Parameter 3

Wall thickness [m] Parameter 4

Number of wall nodes [-] The number of isothermal nodes into which the split

Wall thermal [kJ/h.m2.K] Parameter 5


conductivity

Wall specific [kJ/m3.K] Parameter 6


capacitance

Wall solar absorptance [0..1] Parameter 7

Wall emittance [0..1] Parameter 8

Glazing emittance [0..1] Parameter 9

Number of glazings [-] Parameter 10

4–382
TRNSYS 18 – Mathematical Reference

Spacing between wall [m] Parameter 11


and glazing

If Mode (parameter 1) = 2

Vent outlet area [m2] Parameter 12

Distance between Parameter 13


[m]
vents

If Mode (parameter 1) = 3

Extinction [-] Parameter 12

Refractive index [-] Parameter 13

If Mode (parameter 1) = 4

Vent outlet area [m2] Parameter 14

Distance between Parameter 15


[m]
vents

Extinction [-] Parameter 12

Refractive index [-] Parameter 13

TEXT FIELDS

If Mode (parameter 1) = 1

Mode n/a Flow Rate and Transmittance are Inputs

If Mode (parameter 1) = 2

Mode n/a Transmittance is an Input and Flow Rate is Calculated Internally

If Mode (parameter 1) = 3

Mode n/a Flow Rate is an Input and Transmittance is Calculated Internally

If Mode (parameter 1) = 4

Mode n/a Flow Rate and Transmittance are Calculated Internally

INTEGRATED VALUE FIELDS

Energy to room Output 1

Change in stored Output 2


energy

Solar energy absorbed Output 3

4–383
TRNSYS 18 – Mathematical Reference

Thermal loss Output 4

Wall to room energy Output 5

Glazing to ambient Output 6


energy

Ventilation Energy Output 7

MINIMUM/MAXIMUM VALUE FIELDS

Outside loss coefficient [W/m2.K] Input 5

Inside loss coefficient [W/m2.K] Input 6

If Mode (parameter 1) = 1

Glazing transmittance [0..1] Input 8

Ventilation mass flow [kg/h] Input 9


rate

If Mode (parameter 1) = 2

Glazing transmittance [0..1] Input 8

If Mode (parameter 1) = 3

Ventilation mass flow [kg/h] Input 10


rate

4.6.3.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.6.3.4. Nomenclature
A - Wall collector area
Ag - Total cross sectional area of the gap
Av - Total outlet area of the vent
Cpa - Specific heat of air
Cp - Specific heat of wall
C1 - Vent pressure loss coefficient
C2 - Gap pressure loss coefficient
dU
dt - Rate of change of wall internal energy
g - Acceleration of gravity
Gr - Grashof number
h - Wall height
hv - Height between inlet and outlet vents
hc - Gap air heat transfer coefficient
hr - Radiation heat transfer coefficient between wall and glazing
IbT - Incident beam radiation

4–384
TRNSYS 18 – Mathematical Reference

IdT - Incident diffuse and reflected radiation


IT - incident total radiation
k - Air thermal conductivity
kw - Wall thermal conductivity
KL - Product of glazing thickness and extinction coefficient
L - Gap between wall and first glazing
m - Mass flow rate of air in the gap
Ng - Number of covers
N - Number of wall nodes (3  N  10)
Pr - Prandtl number
Q amb - Rate of energy flow from the wall to the environment
Qb - Rate of energy flow from inside wall surface to the room
QR - Rate of energy flow from the wall to the room
Qs - Rate of absorption of solar radiation
Qt - Rate of energy flow through the glazings to the environment
Qv - Rate of energy flow by ventilation of gap air
R - Thermal resistance of air flow to energy transfer
Re - Reynold's number
Ta - Ambient air temperature
Tg - First glazing temperature
Tm - Mean air temperature in the gap
TR - Room air temperature
Ub - Heat transmission coefficient between wall and room
Ut - Heat transmission coefficient between glazing and environment
v - Average air velocity in gap
w - Wall width
W - Wind velocity
X - Wall thickness
 - Solar absorptance of wall
 - Control function
g - Thermal emittance of glazing
w - Thermal emittance of wall
R - Glazing refractive index
 - Angle of incidence of beam radiation
 - Average air density in gap
w - Density of wall
 - Transmittance of glass

4.6.3.5. Detailed Description


The thermal circuit used to model the performance of the thermal storage wall is shown in Figure 4.6.3–1.
Depending on the control strategy used, air in the gap can be exchanged with either the room air or the
environment, or the flow of air through the gap may be stopped. The flow of air may be driven by a fan or
by thermosiphoning. Thermosiphoning is the result of higher air temperatures in the gap than in the room.
This method of moving air is not easily quantified, and the resulting model incorporates several assumptions
as described below. Analytical studies of the thermosiphoning air have been confined to the case of laminar
flow and have neglected pressure losses in the inlet and outlet vents. The only published measurements
of thermosiphon mass flow rates are those of Trombe et. al. [1]. These measurements indicate that most
of the pressure losses are due to expansion, contraction and change of direction of flow, all associated with
the inlet and outlet vents.

4–385
TRNSYS 18 – Mathematical Reference

The thermosiphon mass flow of air in this model has been determined by applying Bernoulli's equation to
the entire air flow system. For simplicity, it is assumed that the density and temperature of the air in the
gap varies linearly with height. Solution of Bernoulli's equation for the mean air velocity in the gap yields:

2𝑔ℎ 𝑇𝑚 − 𝑇𝑠
𝑣̅ = 2
√ 𝐴𝑔 |𝑇𝑚 | Eq. 4.6.3-1
𝐶1 ( ) + 𝐶2
𝐴𝑣

where Ts is either Ta or TR, depending on whether air is exchanged with the environment or the room. The
term (C1(Ag/Av)2 + C2) represents the pressure losses of the system. The ratio (Ag/Av)2 accounts for the
difference between the air velocity in the vents and the air velocity in the gap.

-1 0 1

HT T R
1 m 1
hc hc dX
k
T 1 Tg 1 T1 Ti T 1 T
amb Ut hr N U R
b

Figure 4.6.3–1: TYPE 36 Thermal Circuit Diagram


The thermal resistance to energy flow between the gap and the room when m is finite is given by:
𝑚𝐶𝑝𝑎 2ℎ 𝐴
𝐴 [( ) (𝑒𝑥𝑝 (− 𝑐 ) − 1) − 1]
2ℎ𝑐 𝐴 𝑚𝐶𝑝𝑎
𝑅= Eq. 4.6.3-2
2ℎ 𝐴
𝑚𝐶𝑝𝑎 (𝑒𝑥𝑝 (− 𝑐 ) − 1)
𝑚𝐶𝑝𝑎
If gap air is exchanged with the environment, Ta replaces TR.
The control function,  determines whether mass flow of air is allowed and to what sink the air is exchanged.

MODE 1 AND 3:
If= 1; m = input
𝑄𝑉 = 2𝑚𝐶𝑝𝑎 (𝑇𝑚 − 𝑇𝑅 ) Eq. 4.6.3-3

𝑄𝑅 = 𝑄𝑉 + 𝑄𝑏 Eq. 4.6.3-4

𝑄 = 𝑄𝑡 Eq. 4.6.3-5

If  = -1; m = input
𝑄𝑉 = 2𝑚𝐶𝑝𝑎 (𝑇𝑚 − 𝑇𝑎 ) Eq. 4.6.3-6

𝑄 = 𝑄𝑉 + 𝑄𝑡 Eq. 4.6.3-7

𝑄𝑅 = 𝑄𝑏 Eq. 4.6.3-8

otherwise QV = 0
𝑚=0 Eq. 4.6.3-9

𝑄 = 𝑄𝑡 Eq. 4.6.3-10

𝑄𝑅 = 𝑄𝑏 Eq. 4.6.3-11

4–386
TRNSYS 18 – Mathematical Reference

MODE 2 AND 4:

If  = 1 and Tm > TR
𝑚 = 𝑣̅ 𝜌̅𝐴𝑔 Eq. 4.6.3-12

𝑄𝑉 = 2𝑚𝐶𝑝𝑎 (𝑇𝑚 − 𝑇𝑅 ) Eq. 4.6.3-13

𝑄𝑎𝑚𝑏 = 𝑄𝑡 Eq. 4.6.3-14

𝑄𝑅 = 𝑄𝑉 + 𝑄𝑏 Eq. 4.6.3-15

If  = -1 and Tm > Ta
𝑚 = 𝑣̅ 𝜌̅𝐴𝑔 Eq. 4.6.3-16

𝑄𝑉 = 2𝑚𝐶𝑝𝑎 (𝑇𝑚 − 𝑇𝑎 ) Eq. 4.6.3-17

𝑄𝑎𝑚𝑏 = 𝑄𝑣 + 𝑄𝑡 Eq. 4.6.3-18

𝑄𝑅 = 𝑄𝑏 Eq. 4.6.3-19

otherwise Qv = 0
𝑚=0 Eq. 4.6.3-20

𝑄𝑎𝑚𝑏 = 𝑄𝑡 Eq. 4.6.3-21

𝑄𝑅 = 𝑄𝑏 Eq. 4.6.3-22

The value of hc, the heat transfer coefficient between the gap air and the wall and glazing, depends on
whether or not there is air flow through the gap.
If m = 0 [Reference 2]
𝑘𝑎
ℎ𝑐 = (0.01711(𝐺𝑟 − 𝑃𝑟)0.29 ) Eq. 4.6.3-23
𝐿
If m ≠ 0 and Re > 2000 [Reference 3]
𝑘𝑎
ℎ𝑐 = (0.0158𝑅𝑒 0.8 ) Eq. 4.6.3-24
𝐿
If m ≠ 0 and Re ≤ 2000 [Reference 5]
𝑘𝑎 0.0606(𝑥 ∗ )−1.2
ℎ𝑐 = (4.9 + ) Eq. 4.6.3-25
𝐿 1 + 0.0856(𝑥 ∗ )−0.7
where

𝑥∗ = Eq. 4.6.3-26
𝑅𝑒𝑃𝑟𝐷ℎ
2𝐴𝑔
𝐷ℎ = Eq. 4.6.3-27
1+𝑤
The heat transfer coefficient between the first glazing and the environment, Ut, can be set as in input or can
be determined from a correlation developed by Klein [4] and described in Section Error! Reference source
ot found., page Error! Bookmark not defined.. If the Klein top loss correlation is to be used, the input
value of Ut must be negative. If Ut is zero or positive, the correlation is bypassed. This allows a user to
simulate the application of a night insulating cover and use the loss correlation during the day.

4–387
TRNSYS 18 – Mathematical Reference

4.6.3.6. References
1. Trombe, F., Robert, J.F., Cabanot, M., and Sesolis, B., "Concrete Walls to Collect and Hold Heat",
Solar Age, Vol. 2, No. 8, Aug. 1977, pp. 13-19.
2. Randall, K.R., Mitchell, J.W., and El-Wakil, M.M. "Natural Convection Heat Transfer Characteristics
of Flat-Plate Enclosures," Journal of Heat Transfer, vol. 101, Feb.
1979, pp. 120-125.
3. Kays, W.M., Convective Heat and Mass Transfer, McGraw-Hill Book Co. 1966, p. 180. (Curve fit of
Kays' data by Duffie and Beckman).
4. Klein, S.A., "Calculation of Collector Loss Coefficients," Solar Energy Journal, Vol. 17,
1975, pp. 79-80.
5. Mercer, W.E., Pearce, W.M., Hitchcock, J.E., "Laminar Forced Convection in the
Entrance Region between Parallel Flat Plates." J. Heat Transfer 89, 251-257 (1967).
6. Utzinger, D.M., M.S. Thesis, Mechanical Engineering, University of Wisconsin-Madison (1979).
"Analysis of Building Components Related to Direct Solar Heating of Buildings.”
7. Utzinger, D.M., S.A. Klein, and J.W. Mitchell, Solar Energy, Vol 25, pg 511 (1980), "The Effect of Air
Flow Rate in Collector-Storage Walls.”

4–388
TRNSYS 18 – Mathematical Reference

4.6.4. Type 49: Slab on Grade


This routine models the energy transfer from the floors of a multi-zone building to the soil beneath the
surfaces. The energy transfer from the floors to the soil and within the soil is assumed to be conductive only
and moisture effects are not accounted for in the model. The model relies on a 3-dimensional finite
difference model of the soil and solves the resulting inter-dependent differential equations using a simple
iterative analytical method. This model assumes that the ground surface is flat, that the soil has
homogenous thermal properties, and that the temperature of the ground surface is not affected by the
presence of the building and is instead set from long term averages. Versions of this model which do not
require the assumption of a flat surface (and can model crawlspaces and basements), allow for different
soil materials, and do not impose the assumption of a soil surface temperature unaffected by the building
are available as part of the TESS Libraries for TRNSYS (www.trnsys.com) (as well as models that interface
with simple building models and not with the Type56 multi-zone building model).
The user must provide a “map” of the soil surface in order to use this model. In most cases, this map is
generated with a Sketch-Up ™ plug-in for TRNSYS; although it can be generated by hand. This “map” file
indicates to the model whether the surface of the soil “node” is covered by one of the multi-zone building
floors or whether the surface is exposed to the ambient.
This model calculates the average surface temperature of the soil directly underneath each of the floors of
the multi-zone building. These average surface temperatures are then passed to the Type56 multi-zone
building model as input “Boundary Temperatures” for each of the floors. Based on the boundary floor
temperatures provided to Type 56 by this model, the current air temperatures, sensible and latent gains,
radiation exchange etc., the Type56 multi-zone building model calculates the rate of energy that passes
from the floors of each zone into the soil. With the soil heat transfer for each zone provided by Type56, the
thermal history of the soil field and the properties of the soil known, the temperatures of each of the “nodes”
of the 3-dimensional soil field can be calculated by this model. Based on the calculated soil temperatures
and the zonal heat flows, the average zonal surface temperatures can be calculated and passed back to
Type56. This iterative methodology is then solved with the standard TRNSYS convergence algorithms.

4.6.4.1. Parameter / Input / Output Reference


PARAMETERS

The number of floors that will be modeled in this component


1 Number of Floors [-]
(number of unique soil/building interfaces).

For Each Floor:

The nominal heat loss coefficient for the specified floor. This
value can be found in the Type 56 building file and is shown in
the wall construction window. This value nominally includes
2 U-Value for each floor [kJ/h.m2.K] convective resistances on the inside and outside surfaces.
These resistances will be removed within this model to get the
heat loss coefficient of just the floor materials - you do not need
to remove them yourself.

Logical unit for soil The logical unit which will be assigned to the external data file
3 [-]
noding file which contains the map of the building to the soil nodes.

The resistance to heat transfer (R-Value) of the insulation that is


Resistance of footer located on the edges of the building and extending downwards
4 [h.m2.K/kJ]
insulation into the soil. The depth of the insulation is read from the data
file.

4–389
TRNSYS 18 – Mathematical Reference

Thermal conductivity of
5 [kJ/hr.m.K] The thermal conductivity of the soil located beneath the building.
soil

6 Density of soil [kg/m3] The density of the soil located beneath the building.

7 Specific heat of soil [kJ/kg.K] The specific heat of the soil located beneath the building.

The average annual surface temperature of the soil. This value


Average surface soil
8 [C] is commonly referred to as the deep earth temperature and is
temperature
equal to the annual average air temperature for many locations.

The amplitude of the annual surface temperature profile of the


Amplitude of soil soil. This value can be calculated for many locations as one half
9 [deltaC]
surface temperature of the maximum monthly average air temperature minus one half
of the minimum monthly average air temperature.

The day of the year in which the minimum soil surface


Day of minimum
10 [-] temperature occurs. For most locations in the U.S. this value is
surface temperature
around day 30 to day 35.

Far field boundary The boundary condition at the near-field/far field boundary for
11 [-]
condition: X-axis heat transfer along the x-direction: 0=Adiabatic,1=Conductive.

Far field boundary The boundary condition at the near-field/far field boundary for
12 [-]
condition: Y-axis heat transfer along the y-direction: 0=Adiabatic,1=Conductive.

The boundary condition at the near-field/far field boundary for


Deep earth boundary
13 [-] heat transfer at the deep earth boundary (Z-direction):
condition
0=Adiabatic,1=Conductive.

The logical unit which will be assigned to the external data file
that will contain the soil temperature profile at the end of the
Logical unit number for
14 [-] simulation. This temperature profile may be viewed with the
soil temperature file
external viewing program which was distributed with this
package.

For Each Floor:

Initial surface The initial temperature of the zone in Type 56 in which this
15 [C]
temperature surface is located.

INPUTS

For Each Floor:

The heat transfer into the building through the outside surface of
1 Heat Transfer to Floor [kJ/hr] the specified floor. This input is typically connected to the
QCOMO output from Type 56 for the specified floor.

OUTPUTS

For Each Floor:

Boundary temperature The boundary temperature for the specified floor (the
1 [C] temperature at the interface between the bottom of the floor and
for floor
the soil). This temperature should be conmnected to the input

4–390
TRNSYS 18 – Mathematical Reference

into the building model for the temperature at the outside surface
of the boundary wall.

For Each Floor:

Soil to building heat The rate at which energy is transferred into the building from the
2 [kJ/hr]
transfer for floor soil through the outer surface of the specified floor.

The rate at which energy is stored in the soil during the timestep
3 Energy stored in soil [kJ/hr] (net positive changes in soil temperature are reflected as a
positive value for stored energy).

The rate at which energy is lost to the environment through the


Soil surface heat
4 [kJ/hr] surface of the soil; not including the sections of the ground
transfer
covered by the building.

Deep boundary heat The rate at which energy is lost from the near-field soil volume
5 [kJ/hr]
transfer through the deep earth boundary.

Side boundary heat The rate at which energy is lost to the far-field soil through the
6 [kJ/hr]
transfer vertical edges of the near field soil volume.

4.6.4.2. Simulation Summary Report Contents


INTEGRATED VALUE FIELDS

For Each Floor: Soil to [kJ] Output 2


building heat transfer

Energy stored in soil [kJ] Output 3

Soil surface heat [kJ] Output 4


transfer

Deep boundary heat [kJ] Output 5


transfer

Side boundary heat [kJ] Output 6


transfer

MINIMUM/MAXIMUM VALUE FIELDS

For Each Floor: [C] Output 1


Boundary temperature

4.6.4.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.6.4.4. Nomenclature
Cp,soil [kJ/kg] Specific heat of soil
i [-] Nodal indicator along the length direction

4–391
TRNSYS 18 – Mathematical Reference

j [-] Nodal indicator along the width direction


k [-] Nodal indicator along the depth direction (node 1 is at the surface,
increasing downwards)
ksoil [kJ/hr.m] Thermal conductivity of soil
mi,j,k [kg] Mass of soil node i,j,k
NXtotal [-] The total number of nodes in the x-direction (i)
NYtotal [-] The total number of nodes in the y-direction (j)
NZtotal [-] The total number of nodes in the z-direction (k)
NZfooter [-] The number of nodes in the z-direction from the surface to the bottom of
the footer insulation
N(i,j) [-] The surface number for node i,j (0=exposed soil, 1..n=surface number)

Q in [kJ/hr]
The rate at which energy enters a soil node

QType56, n [kJ/hr] The energy transferred through the floor of zone n into the ground
(calculated by Type56)
Rcond [hr.m2.K/kJ] The conductive heat transfer resistance
𝑇̅boundary,n [ºC] The average surface temperature of the interface between zone n and the
soil
Tcond [ºC] The adjacent temperature for conductive heat transfer
Tdeep earth [ºC] The temperature of the undisturbed soil at the deep earth boundary
Tfarfield(k) [ºC] The temperature of the undisturbed soil at the depth of node k
Ti,j,k [ºC] The temperature of a given soil node
𝑇̅I,j,k [ºC] The average temperature of a given soil node over the timestep
Tsurface,i,j [ºC] The surface temperature of node (i,j)
𝑇̅surface,i,j [ºC] The average surface temperature of soil node (i,j,1) over the timestep
Tsurface,Kasuda [ºC] The undisturbed soil surface temperature according to the Kasuda
correlation
x [m] The distance along the length direction
y [m] The distance along the width direction
Z [m] The depth dimension
ρsoil [kg/m3] Density of soil
Δxi [m] The x direction dimension of soil node i,j,k
Δyj [m] The y direction dimension of soil node i,j,k
Δzk [m] The z direction dimension of soil node i,j,k
ksoil [kJ/hr.m] Thermal conductivity of soil
mi,j,k [kg] Mass of soil node i,j,k

4.6.4.5. Detailed Description


By defining a wall as a boundary wall in Type56, one assumes that there is either a known temperature on
the other (non-zone) side of the wall, or that the air temperature on the non-zone side is identical to the air

4–392
TRNSYS 18 – Mathematical Reference

temperature in the zone. Normally the boundary temperature specified in Type 56 is the temperature of a
zone connected to the back surface of the wall through a pure resistance (such as an air temperature
coupled to the back side of the wall through a convective resistance). However by specifying the convective
resistance of the back side of the boundary wall to a very small, but non-zero value, the Type56 zone model
assumes that the boundary temperature specified is the back-side surface temperature of the boundary
wall – which is exactly what one needs for the interface between the soil storage model and the Type56
zone model to work correctly.
To use Type49, one defines one or more floor surfaces within Type 56 as boundary walls with a “user
defined” temperature as an input (as opposed to as a schedule or a constant value), and with a very small
positive (but non-zero) back-side heat transfer coefficient. The boundary wall should contain all the layers
comprising the wall (carpeting, pad, concrete etc.). Users may have more than one floor type per thermal
zone in Type 56 – even if the floor is comprised of the same materials. Core and perimeter sections of the
floor can therefore be modeled.
This model reads a 2-dimensional “map” of the soil surface that indicates to the model whether the surface
of each soil section is exposed soil (=0) or covered by a specific floor surface (=1,2,3..n). This map is
typically created with a Sketch-Up™ Plug-In specifically written for this model. This plug-in will write the
required map files based on simple surface drawings in Sketch-Up. Users are strongly encouraged to read
the tutorial on using this model with the plug-in that is located in
the %TRNSYS18%\Tools\SoilNoding\ directory. The map file may also be written by hand and should be
saved as a space delimited ASCII text file in order for the file to be read correctly. The format of this file is
shown below:
Line 1: NXtotal NYtotal NZtotal NZfooter
Line 2: Δx1 Δx2 Δx3 . . . . . . ΔxNXtotal
Line 3: Δy1 Δy2 Δy3 . . . . . . ΔyNYtotal
Line 4: Δz1 Δz2 Δz3 . . . . . . ΔxNZtotal
Line 5: N(1,NYtotal) N(2,NYtotal) N(3,NYtotal) . . . N(NXtotal,NYtotal)
Line 6: N(1,NYtotal-1) N(2,NYtotal-1) N(3,NYtotal-1) . . . N(NXtotal,NYtotal-1)
.
.
.
.
Line 4+NYtotal: N(1,1) N(2,1) N(3,1) . . . N(NXtotal,1)
Figure 4.6.4–1: Soil Noding File Format
An example file for a 3-floor model is provided in %TRNSYS18%\Examples\Slab on Grade\.
This model discretizes the soil beneath the surface into cubic sections and subsequently solves for the
temperature of each of the sections at each timestep of the simulation using an implicit finite difference
approach. The higher the level of discretization (and hence the higher the number of nodes), the more
accurate the simulation but the longer the simulation will take to finish.

Figure 4.6.4–2: Soil Node Dimensions

4–393
TRNSYS 18 – Mathematical Reference

An effective technique used to accurately model the heat transfer at reasonable simulation runtimes is to
cluster small nodes near all surface edges and corners and to have the sizes of the nodes “grow” as they
move away from the edges. The higher the growth rate gets, the less accurate the simulation but the
quicker the simulation runtimes. The algorithm that is currently used in the Sketch-Up™ Plug-In is of the
form:
Sizenew = Sizeprevious * Growth Factor Eq. 4.6.4-1

The Growth Factor variable varies from about 1.1 to 2 with 1.3 being a good default value. The size of the
smallest node is usually in the range of 0.01 to 0.1 meters with 0.02 meters being a good default value. As
an example of the differences that can be found in terms of number of nodes let’s study two identical slab
floors that are 10 meters long by 10 meters wide. In the first case we’ll use a smallest node size of 0.1
meters and a growth factor of 2. The resulting sizes of the 12 node starting from one edge of the floor and
working towards the other edge of the floor along one side are then found to be:
0.1 0.2 0.4 0.8 1.6 1.9 1.9 1.6 0.8 0.4 0.2 0.1
This results in 144 horizontal nodes (12 nodes x 12 nodes) for each vertical node for the soil just under the
slab (and does not include the soil exposed to the ambient air). If instead we decrease the smallest node
size to 0.02 meters and reduce the growth factor down to 1.2, the resulting noding pattern requires 44
nodes in each direction or 1936 horizontal nodes for each vertical node for the soil just under the slab – an
increase of 1344%! For this reason, the user should select the noding pattern parameters with care and
try to balance simulation speed with heat transfer accuracy.
The floor is assumed to be sitting on top of the soil and it is assumed that the edge of the floor surface is
adiabatic and that, consequently, no heat transfer occurs between the edges of the slab and the
surroundings. The user has the option of specifying vertical insulation which extends downwards from the
edges of the slab into the soil. This insulation can be used to model insulated footers although the thermal
properties of the footer material itself is not accounted for in this model.
The soil volume surrounding the floors in the x, y and z directions, as shown in Figure 4.6.4–3 below, is
referred to as the near-field. Nodes contained in the near-field can vary in size in all three dimensions,
usually becoming larger as they get farther from the surface. The near field is in turn surrounded by the far
field, which is assumed to be an infinite energy sink/source (energy transfer with the far-field does not result
in a temperature change of the far-field). The far-field boundary in the depth direction is often referred to as
the deep-earth boundary. Users have the option of treating the near-field/far-field boundary as an adiabatic
boundary or as a conductive boundary. The temperature of the far-field soil is set using the Kasuda
correlation (1) which estimates the temperature of the soil at a given depth given the time of year, the soil
properties, the average annual soil surface temperature, the amplitude of the annual soil surface
temperature, and the day of the year at which the minimum annual surface temperature occurs. The
temperature of these far-field nodes will change, but only as a function of depth and time of year.

Figure 4.6.4–3: Near-Field and Far-Field Designations


The Kasuda correlation is also used to set the surface temperature of the near-field as a function of the
time of the year, as well as the intial temperature of the near-field nodes. The temperature of the near field
soil nodes during the simulation depends upon conduction effects from neighboring nodes and from

4–394
TRNSYS 18 – Mathematical Reference

conduction heat transfer from the imposed Kasuda calculated surface temperature or from heat transfer
from the floor surface.
Ignoring the temperature dependence of the thermal properties and moisture impacts, the basic conduction
energy balance on a node contained in the slab or the soil is shown in:
𝑑𝑇𝑖,𝑗,𝑘
𝑚𝑖,𝑗,𝑘 𝐶𝑝𝑠𝑜𝑖𝑙 = ∑ 𝑄̇𝑖𝑛 Eq. 4.6.4-2
𝑑𝑡
In this model, the nodes are assumed to be cubic in shape so we have six unique heat transfers to analyze:

∑ 𝑄̇𝑖𝑛 = 𝑄̇𝑙𝑒𝑓𝑡 + 𝑄̇𝑟𝑖𝑔ℎ𝑡 + 𝑄̇𝑓𝑟𝑜𝑛𝑡 + 𝑄̇𝑏𝑎𝑐𝑘 + 𝑄̇𝑡𝑜𝑝 + 𝑄̇𝑏𝑜𝑡𝑡𝑜𝑚 Eq. 4.6.4-3

Where left is in the direction of decreasing x, right is in the direction of increasing x, front is in the direction
of increasing y, back is in the direction of decreasing y, top is in the direction of decreasing z, and bottom
is in the direction of increasing z.

Figure 4.6.4–4: Component Heat Transfers

Figure 4.6.4–5: Noding Scheme X-Y Plane

4–395
TRNSYS 18 – Mathematical Reference

Figure 4.6.4–6: Noding Scheme X-Z Plane

LEFT-SURFACE HEAT TRANSFER


The basic conduction heat transfer equation for the left surface heat transfer for node i,j,k can be written
as:
𝑇𝑐𝑜𝑛𝑑,𝑙𝑒𝑓𝑡 − 𝑇𝑖,𝑗,𝑘
𝑄̇𝑙𝑒𝑓𝑡 = Eq. 4.6.4-4
𝑅𝑐𝑜𝑛𝑑,𝑙𝑒𝑓𝑡
For soil nodes that border the far-field boundary on the left side (i=1) and have a conductive near-field/far-
field boundary, the conduction terms are as follows:
∆𝑥𝑖
𝑅𝑐𝑜𝑛𝑑,𝑙𝑒𝑓𝑡 = 2 Eq. 4.6.4-5
𝑘𝑠𝑜𝑖𝑙 ∆𝑦𝑗 ∆𝑧𝑘
𝑇𝑐𝑜𝑛𝑑,𝑙𝑒𝑓𝑡 = 𝑇𝑓𝑎𝑟𝑓𝑖𝑒𝑙𝑑 (𝑘) Eq. 4.6.4-6

For soil nodes that border the far-field boundary on the left side (i=1) and have an adiabatic near-field/far-
field boundary, the conduction term is as follows:
𝑄̇𝑙𝑒𝑓𝑡 = 0 Eq. 4.6.4-7

For all soil nodes for which i ≠ 1:


∆𝑥𝑖 ∆𝑥𝑖−1
𝑅𝑐𝑜𝑛𝑑.𝑙𝑒𝑓𝑡 = 2 + 2 Eq. 4.6.4-8
𝑘𝑠𝑜𝑖𝑙 ∆𝑦𝑗 ∆𝑧𝑘 𝑘𝑠𝑜𝑖𝑙 ∆𝑦𝑗 ∆𝑧𝑘
𝑇𝑐𝑜𝑛𝑑,𝑙𝑒𝑓𝑡 = 𝑇̅𝑖−1,𝑗,𝑘 Eq. 4.6.4-9

Eq. 4.6.4-8 is further modified if the soil node in question has vertical perimeter insulation on its left surface:
∆𝑥𝑖 ∆𝑥𝑖−1
𝑅𝑐𝑜𝑛𝑑.𝑙𝑒𝑓𝑡 = 2 + 𝑅𝑓𝑜𝑜𝑡𝑒𝑟 + 2 Eq. 4.6.4-10
𝑘𝑠𝑜𝑖𝑙 ∆𝑦𝑗 ∆𝑧𝑘 𝑘𝑠𝑜𝑖𝑙 ∆𝑦𝑗 ∆𝑧𝑘

RIGHT-SURFACE HEAT TRANSFER


The basic conduction heat transfer equation for the right surface heat transfer for node i,j,k can be written
as:
𝑇𝑐𝑜𝑛𝑑,𝑟𝑖𝑔ℎ𝑡 − 𝑇𝑖,𝑗,𝑘
𝑄̇𝑟𝑖𝑔ℎ𝑡 = Eq. 4.6.4-11
𝑅𝑐𝑜𝑛𝑑,𝑟𝑖𝑔ℎ𝑡
For soil nodes that border the far-field boundary on the right side (i=NXtotal) and have a conductive near-
field/far-field boundary, the conduction terms are as follows:
∆𝑥𝑖
𝑅𝑐𝑜𝑛𝑑,𝑟𝑖𝑔ℎ𝑡 = 2 Eq. 4.6.4-12
𝑘𝑠𝑜𝑖𝑙 ∆𝑦𝑗 ∆𝑧𝑘
𝑇𝑐𝑜𝑛𝑑,𝑟𝑖𝑔ℎ𝑡 = 𝑇𝑓𝑎𝑟𝑓𝑖𝑒𝑙𝑑 (𝑘) Eq. 4.6.4-13

For soil nodes that border the far-field boundary on the right side (i=NXtotal) and have an adiabatic near-
field/far-field boundary, the conduction term is as follows:
𝑄̇𝑟𝑖𝑔ℎ𝑡 = 0 Eq. 4.6.4-14

For all soil nodes for which i ≠ NXtotal:


∆𝑥𝑖 ∆𝑥𝑖+1
𝑅𝑐𝑜𝑛𝑑.𝑟𝑖𝑔ℎ𝑡 = 2 + 2 Eq. 4.6.4-15
𝑘𝑠𝑜𝑖𝑙 ∆𝑦𝑗 ∆𝑧𝑘 𝑘𝑠𝑜𝑖𝑙 ∆𝑦𝑗 ∆𝑧𝑘

4–396
TRNSYS 18 – Mathematical Reference

𝑇𝑐𝑜𝑛𝑑,𝑟𝑖𝑔ℎ𝑡 = 𝑇̅𝑖+1,𝑗,𝑘 Eq. 4.6.4-16

Error! Reference source not found. is further modified if the soil node in question has vertical perimeter
nsulation on its right surface face:
∆𝑥𝑖 ∆𝑥𝑖+1
𝑅𝑐𝑜𝑛𝑑.𝑟𝑖𝑔ℎ𝑡 = 2 + 𝑅𝑐𝑜𝑛𝑑,𝑟𝑖𝑔ℎ𝑡 + 2 Eq. 4.6.4-17
𝑘𝑠𝑜𝑖𝑙 ∆𝑦𝑗 ∆𝑧𝑘 𝑘𝑠𝑜𝑖𝑙 ∆𝑦𝑗 ∆𝑧𝑘

BACK-SURFACE HEAT TRANSFER


The basic conduction heat transfer equation for the back surface heat transfer for node i,j,k can be written
as:
𝑇𝑐𝑜𝑛𝑑,𝑏𝑎𝑐𝑘 − 𝑇𝑖,𝑗,𝑘
𝑄̇𝑏𝑎𝑐𝑘 = Eq. 4.6.4-18
𝑅𝑐𝑜𝑛𝑑,𝑏𝑎𝑐𝑘
For soil nodes that border the far-field boundary on the back side (j=1) and have a conductive near-field/far-
field boundary, the conduction terms are as follows:
∆𝑦𝑗
𝑅𝑐𝑜𝑛𝑑,𝑏𝑎𝑐𝑘 = 2 Eq. 4.6.4-19
𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑧𝑘
𝑇𝑐𝑜𝑛𝑑,𝑏𝑎𝑐𝑘 = 𝑇𝑓𝑎𝑟𝑓𝑖𝑒𝑙𝑑 (𝑘) Eq. 4.6.4-20

For soil nodes that border the far-field boundary on the back side (j=1) and have an adiabatic near-field/far-
field boundary, the conduction term is as follows:
𝑄̇𝑏𝑎𝑐𝑘 = 0 Eq. 4.6.4-21

For all soil nodes for which j ≠ 1:


∆𝑦𝑗 ∆𝑦𝑗−1
𝑅𝑐𝑜𝑛𝑑.𝑏𝑎𝑐𝑘 = 2 + 2 Eq. 4.6.4-22
𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑧𝑘 𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑧𝑘
𝑇𝑐𝑜𝑛𝑑,𝑏𝑎𝑐𝑘 = 𝑇̅𝑖,𝑗−1,𝑘 Eq. 4.6.4-23

Error! Reference source not found. is further modified if the soil node in question has vertical perimeter
nsulation on its back surface face:
∆𝑦𝑗 ∆𝑦𝑗−1
𝑅𝑐𝑜𝑛𝑑.𝑏𝑎𝑐𝑘 = 2 + 𝑅𝑓𝑜𝑜𝑡𝑒𝑟 + 2 Eq. 4.6.4-24
𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑧𝑘 𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑧𝑘

FRONT-SURFACE HEAT TRANSFER


The basic conduction heat transfer equation for the front surface heat transfer for node i,j,k can be written
as:
𝑇𝑐𝑜𝑛𝑑,𝑓𝑟𝑜𝑛𝑡 − 𝑇𝑖,𝑗,𝑘
𝑄̇𝑓𝑟𝑜𝑛𝑡 = Eq. 4.6.4-25
𝑅𝑐𝑜𝑛𝑑,𝑓𝑟𝑜𝑛𝑡
For soil nodes that border the far-field boundary on the front side (j=NYtotal) and have a conductive near-
field/far-field boundary, the conduction terms are as follows:
∆𝑦𝑗
𝑅𝑐𝑜𝑛𝑑,𝑓𝑟𝑜𝑛𝑡 = 2 Eq. 4.6.4-26
𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑧𝑘
𝑇𝑐𝑜𝑛𝑑,𝑓𝑟𝑜𝑛𝑡 = 𝑇𝑓𝑎𝑟𝑓𝑖𝑒𝑙𝑑 (𝑘) Eq. 4.6.4-27

4–397
TRNSYS 18 – Mathematical Reference

For soil nodes that border the far-field boundary on the front side (j=NYtotal) and have an adiabatic near-
field/far-field boundary, the conduction term is as follows:
𝑄̇𝑓𝑟𝑜𝑛𝑡 = 0 Eq. 4.6.4-28

For all soil nodes for which j ≠ 1:


∆𝑦𝑗 ∆𝑦𝑗+1
𝑅𝑐𝑜𝑛𝑑.𝑓𝑟𝑜𝑛𝑡 = 2 + 2 Eq. 4.6.4-29
𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑧𝑘 𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑧𝑘
𝑇𝑐𝑜𝑛𝑑,𝑓𝑟𝑜𝑛𝑡 = 𝑇̅𝑖,𝑗+1,𝑘 Eq. 4.6.4-30

Error! Reference source not found. is further modified if the soil node in question has vertical perimeter
nsulation on its front surface face:
∆𝑦𝑗 ∆𝑦𝑗+1
𝑅𝑐𝑜𝑛𝑑.𝑓𝑟𝑜𝑛𝑡 = 2 + 𝑅𝑓𝑜𝑜𝑡𝑒𝑟 + 2 Eq. 4.6.4-31
𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑧𝑘 𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑧𝑘

BOTTOM-SURFACE HEAT TRANSFER


The basic conduction heat transfer equation for the bottom surface heat transfer for node i,j,k can be written
as:
𝑇𝑐𝑜𝑛𝑑,𝑏𝑜𝑡𝑡𝑜𝑚 − 𝑇𝑖,𝑗,𝑘
𝑄̇𝑏𝑜𝑡𝑡𝑜𝑚 = Eq. 4.6.4-32
𝑅𝑐𝑜𝑛𝑑,𝑏𝑜𝑡𝑡𝑜𝑚
For soil nodes that border the far-field boundary on the bottom side (k=NZtotal) and have a conductive near-
field/far-field boundary, the conduction terms are as follows:
∆𝑧𝑘
𝑅𝑐𝑜𝑛𝑑,𝑏𝑜𝑡𝑡𝑜𝑚 = 2 Eq. 4.6.4-33
𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑦𝑗
𝑇𝑐𝑜𝑛𝑑,𝑏𝑜𝑡𝑡𝑜𝑚 = 𝑇𝐷𝑒𝑒𝑝𝐸𝑎𝑟𝑡ℎ Eq. 4.6.4-34

For soil nodes that border the far-field boundary on the bottom side (k=NZtotal) and have an adiabatic near-
field/far-field boundary, the conduction term is as follows:
𝑄̇𝑏𝑜𝑡𝑡𝑜𝑚 = 0 Eq. 4.6.4-35

For all soil nodes for which k ≠ NZtotal:


∆𝑧𝑘 ∆𝑧𝑘+1
𝑅𝑐𝑜𝑛𝑑.𝑏𝑜𝑡𝑡𝑜𝑚 = 2 + 2 Eq. 4.6.4-36
𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑦𝑗 𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑦𝑗
𝑇𝑐𝑜𝑛𝑑,𝑏𝑜𝑡𝑡𝑜𝑚 = 𝑇̅𝑖,𝑗,𝑘+1 Eq. 4.6.4-37

TOP-SURFACE HEAT TRANSFER


The basic conduction heat transfer equation for the top surface heat transfer for node i,j,k can be written
as:
𝑇𝑐𝑜𝑛𝑑,𝑡𝑜𝑝 − 𝑇𝑖,𝑗,𝑘
𝑄̇𝑡𝑜𝑝 = Eq. 4.6.4-38
𝑅𝑐𝑜𝑛𝑑,𝑡𝑜𝑝
For soil nodes that border the soil surface on the top side (k=1) the conduction terms are as follows:
∆𝑧𝑘
𝑅𝑐𝑜𝑛𝑑,𝑡𝑜𝑝 = 2 Eq. 4.6.4-39
𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑦𝑗

4–398
TRNSYS 18 – Mathematical Reference

𝑇𝑐𝑜𝑛𝑑,𝑡𝑜𝑝 = 𝑇𝑠𝑢𝑟𝑓𝑎𝑐𝑒𝐾𝑎𝑠𝑢𝑑𝑎 Eq. 4.6.4-40

For soil nodes that border one of the floor surfaces on the top side (k= 1) the conduction term is as follows
(where the zone (n) above node (i,j,k) is read from the soil map):
𝑄̇𝑡𝑜𝑝 = 𝑄̇𝑇𝑦𝑝𝑒56,𝑛 Eq. 4.6.4-41

For all soil nodes for which k ≠ 1:


∆𝑧𝑘 ∆𝑧𝑘−1
𝑅𝑐𝑜𝑛𝑑.𝑡𝑜𝑝 = 2 + 2 Eq. 4.6.4-42
𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑦𝑗 𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑦𝑗
𝑇𝑐𝑜𝑛𝑑,𝑡𝑜𝑝 = 𝑇̅𝑖,𝑗,𝑘−1 Eq. 4.6.4-43

The average temperature of the soil surface under each floor must be calculated by the model and passed
back to Type 56. The average surface temperature of node(i,j,1) over the timestep for the nodes under the
floors can then be calculated as:
𝑇̅𝑠𝑢𝑟𝑓𝑎𝑐𝑒,𝑖,𝑗 = 𝑇̅𝑖,𝑗,𝑘 + 𝑄̇𝑡𝑜𝑝 𝑅𝑐𝑜𝑛𝑑,𝑡𝑜𝑝 Eq. 4.6.4-44
∆𝑧𝑘
𝑇̅𝑠𝑢𝑟𝑓𝑎𝑐𝑒,𝑖,𝑗 = 𝑇̅𝑖,𝑗,𝑘 + 2 Eq. 4.6.4-45
𝑘𝑠𝑜𝑖𝑙 ∆𝑥𝑖 ∆𝑦𝑗
The average surface temperature over the timestep for floor n can then be calculated as:
∑ 𝑇̅𝑠𝑢𝑟𝑓𝑎𝑐𝑒,𝑖,𝑗 ∆𝑥𝑖 ∆𝑦𝑗
𝑇̅𝑠𝑢𝑟𝑓𝑎𝑐𝑒,𝑛 = Eq. 4.6.4-46
∑ ∆𝑥𝑖 ∆𝑦𝑗

SOLUTION TECHNIQUE
The solution of this large problem breaks down into the solution of a large set of coupled differential
equations. While there are several other available methods to solve coupled differential equations, we
decided to solve the problem with an approximate analytical solution. The analytical solution has several
inherent advantages over numerical solutions. First, the subroutine solves its own mathematical problem
and does not have to rely on nonstandard numerical recipes that must be attached to the subroutine. In
this way, the subroutine can be imported into any FORTRAN compiler without problems. Secondly, some
of the other solution methods (mainly the numerical solutions) are extremely dependent on the simulation
timestep and may not converge under certain circumstances commonly encountered in multi-zone building
simulations. The analytical solution is timestep independent but does require an iterative solution inside
the subroutine to solve the coupled differential equations.
To solve the differential equations analytically, the equations are placed into the form:
𝑑𝑇
= 𝑎𝑇 + 𝑏 Eq. 4.6.4-47
𝑑𝑡
Where T is the dependent variable, t is time, a is a constant and b may be a function of time or the dependent
variable. If b is a constant, than the solution of this differential equation can be readily solved. If b is not
constant, then a reasonable approximation to the analytical solution can be found by assuming that b is
constant over the timestep and equal to its average value over the timestep.
At any time (for a not equal to zero):
𝑏̅ 𝑏̅
𝑇𝑓𝑖𝑛𝑎𝑙 = (𝑇𝑖𝑛𝑖𝑡𝑖𝑎𝑙 + ) 𝑒 𝛼∆𝑡 − Eq. 4.6.4-48
𝑎 𝑎
where:
𝑏̅ = 𝑏(𝑇̅) Eq. 4.6.4-49

and:

4–399
TRNSYS 18 – Mathematical Reference

𝑏̅
𝑇𝑖𝑛𝑖𝑡𝑖𝑎𝑙 + ̅
𝑇̅ = 𝑎 (𝑒 𝛼∆𝑡 − 1) − 𝑏 Eq. 4.6.4-50
𝛼∆𝑡 𝑎
With this assumption, the problem becomes straightforward to solve. Simply write the differential equations
in the correct form, determine a and 𝑏̅ and solve for Tfinal and 𝑇̅ then recalculate and iterate until the
temperatures converge.
While the assumption that b is constant over the timestep (and equal to its average value) is not technically
correct (b for a soil node is a function of the temperature of adjacent soil nodes for example), it is a
reasonable approximation for the small timesteps we are using in the TRNSYS simulation (maximum
timestep=1 hour).

4.6.4.6. References
[1] Kasuda, T., and Archenbach, P.R. "Earth Temperature and Thermal Diffusivity at Selected Stations in
the United States", ASHRAE Transactions, Vol. 71, Part 1, 1965

4–400
TRNSYS 18 – Mathematical Reference

4.6.5. Type 56: Detailed Multizone Building (Transfer


Function)

Please refer to Volume 05,

Multizone Building (Type 56 – TRNBuild)

4–401
TRNSYS 18 – Mathematical Reference

4.6.6. Type 75: Sherman Grimsrud Simple Infiltration


This model calculates infiltration based on the Sherman Grimsrud equation in ASHRAE Fundamentals 1997
Chapter 25 equation 46 [1]. The equation is semi-empirical, relying on the user to specify not only building
data such as volume, equivalent leakage area, indoor and outdoor conditions but also a local shielding
class that describes the building's nearby surroundings. The Sherman Grimsrud model is ostensibly for a
single zone building. Equivalent leakage area is typically obtained from blower door testing.
The model calculates infiltration air changes as well as volumetric flows. The model either reads the indoor
and outdoor relative humidity inputs and ignores the humidity ratio inputs or vice versa reads the outdoor
humidity ratio inputs and ignores the relative humidity inputs.

4.6.6.1. Parameter / Input / Output Reference


PARAMETERS

1 The mode which indicates which property will be used to set the
Humidity Mode [-] inlet air conditions; 1 = the humidity ratio input will be used, 2 = the
relative humidity input will be used

2 The interior volume of the conditioned space for which infiltration is


Conditioned space
[m3] being calculated. This value is only used in converting the
volume
calculated flow rate of infiltration air into an air change rate.

3 Number of building The number of conditioned stories above ground. This value is
[-]
stories used to look up the ASHRAE wind coefficient and stack coefficient.

4 The ASHRAE shielding class:


1: no obstructions or local shielding.
2: light local shielding; few obstructions, few trees, or small shed.

Shielding class [-] 3: moderate local shielding; some obstructions within two house
heights, thick hedge, solid fence or one neighboring house.
4: heavy local shielding;
5: very heavy shielding; large obstructions surrounding perimeter,
within two house heights, typical downtown shielding.

INPUTS

1 Indoor air temperature [C] The temperature of air inside the zone.

2 Indoor humidity ratio - The humidity ratio of air in the conditioned zone. NOTE: If
[kgH20/kgAir]
not used parameter 1 is set to 2 this input is ignored.

3 The relative humidity of air in the conditioned zone NOTE: If


Indoor relative humidity [%]
parameter 1 is set to 1 this input is ignored.

4 The pressure of air in the conditioned zone. Note that this air
pressure is used in calculating moist air properties. The Sherman
Indoor air pressure [atm]
Grimsrud infiltration model does not directly account for flow due to
indoor / outdoor pressure differences.

5 Outdoor air
[C] The temperature of ambient air
temperature

4–402
TRNSYS 18 – Mathematical Reference

6 The humidity ratio of air outside the conditioned zone. This input is
Outdoor humidity ratio [kgH20/kgAir]
ignored in Humidity Mode 2 (PAR 1 = 2).

7 Outdoor relative The relative humidity of air outside the conditioned zone. This input
[%]
humidity is ignored in Humidity Mode 1 (PAR 1 = 1)

8 The pressure of air outside the conditioned zone. Note that this air
pressure is used in calculating moist air properties. The Sherman
Outdoor air pressure [atm]
Grimsrud infiltration model does not directly account for flow due to
indoor / outdoor pressure differences.

9 Wind speed [m/s] The current wind speed.

10 The effective air leakage area as may be determined by a blower


Leakage area [cm2]
door test.

OUTPUTS

1 The number of times per hour that the entire air volume of the
Infiltration air changes [ach/h]
conditioned space is exchanged with outdoor air.

2 Infiltration air
[m3/s] The volumetric flow rate of air infiltrating the conditioned space.
volumetric flow rate

3 Infiltration air mass


[kg/hr] The mass flow rate of infiltration air into the zone.
flow rate

4 Energy gain [kJ/hr] The amount of sensible energy gained or lost due to infiltration.

5 The airchanges of infiltration that caused a heating load on the


Heating air changes [ach/h]
space.

6 The airchanges of infiltration that caused a cooling load on the


Cooling air changes [ach/h]
space.

4.6.6.2. Simulation Summary Report Contents


VALUE FIELDS

Conditioned Volume [m2] Parameter 2

Number of Stories [-] Parameter 3

TEXT FIELDS

Control Mode n/a Shielding class description

INTEGRATED VALUE FIELDS

Energy Gain [kJ] Output 4

MINIMUM/MAXIMUM VALUE FIELDS

4–403
TRNSYS 18 – Mathematical Reference

Leakage Area [cm2] Input 10

Airchanges of [kgH20/kgAir] Output 1


Infiltration

4.6.6.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.6.6.4. Nomenclature
𝑄̇𝑓 Air flow rate (m 3/s)
𝐶𝑤 Wind coefficient [(L/s)2/[cm4(m/s)2]]
𝑉 Wind speed [m/s]
𝐸𝐿𝐴𝑡𝑜𝑡𝑎𝑙 Equivalent leakage area [cm 2]
𝐶𝑠 Stack coefficient [(L/s)2/[cm4K]]
∆𝑇 Difference between indoor and ambient temperature [C]

4.6.6.5. Detailed Description


Air infiltration is a function of a building’s leakiness and pressure difference across the building envelope.
Such pressure differences are induced by temperature (stack effect) and wind pressure. The Sherman
Grimsrud model [1] describes a simple, empirical method to provide infiltration values to conditioned
spaces. The correlation is:
3600𝐸𝐿𝐴𝑡𝑜𝑡𝑎𝑙
𝑄̇𝑓 = √𝐶𝑠 ∆𝑇 + 𝐶𝑤 𝑉 2 Eq. 4.6.6-1
1000
In the Sherman Grimsrud method, the values Cs and Cw are both empirically derived coefficients that
describe how the overall pressure differential is affected by temperature difference and how it is affected
by wind speed.
The value of Cs depends on the number of floors in the building. It is taken to be 0.000145 for single story
buildings, 0.00029 for two story buildings and 0.000435 for three story buildings.
The value of Cw sepends both on the number of floors in the building and on a shielding class that describes
the surrounding terrain.

Table 4.6.6–1: Wind Coefficient Values

Building Height (Number of Floors)

Shielding Shielding Class Description One Two Three


Class

1 No obstructions or local shielding 0.000 319 0.000 420 0.000 494

2 Light local shielding; few obstructions, few trees, or 0.000 246 0.000 325 0.000 382
small shed

3 Moderate local shielding; some obstructions within 0.000 174 0.000 231 0.000 271
two house heights, thick hedge, solid fence, or one
neighboring house.

4–404
TRNSYS 18 – Mathematical Reference

4 Heavy shielding; obstructions around most of the 0.000 104 0.000 137 0.000 161
perimeter, buildings or trees within 10 m in most
directions; typical suburban shielding

5 Very heavy shielding; large obstructions surrounding 0.000 032 0.000 042 0.000 049
perimeter within two house heights; typical
downtown shielding.

4.6.6.6. References
1. ASHRAE, Handbook of Fundamentals, (1997).

4–405
TRNSYS 18 – Mathematical Reference

4.6.7. Type 88: Single Zone (Lumped Capacitance)


This component models a simple lumped capacitance single zone structure subject to internal gains. It
neglects solar gains and assumes an overall U value for the entire structure (including both walls and
windows). Its usefulness comes from the speed with which a building heating and/or cooling load can be
added to a system simulation.

4.6.7.1. Parameter / Input / Output Reference


PARAMETERS

1 Building loss coefficient [kJ/hr.m2.K] The coefficient for energy loss from the zone - per unit area.

2 Building capacitance [kJ/K] The thermal capacitance of the building.

3 Specific heat of [kJ/kg.K] The specific heat of zone air.


building air

4 Density of building air [kg/m3] The density of building air.

5 Building surface area [m2] The total outside surface area from which thermal losses occur.

6 Building volume [m3] The volume of the building.

7 Humidity ratio multiplier [-] A multiplier on the zone air’s moisture capacity to account for the
zone’s contents to absorb and desorb more moisture than can the
air itself.

8 Initial temperature [C] The initial temperature of the building and its air volume.

9 Initial humidity ratio [kgH20/kgAir] The initial absolute humidity ratio of the building and its air volume.

10 Latent heat of [kJ/kg] The amount of energy required to vaporize one kilogram of water.
vaporization

INPUTS

1 Temperature of
[C] The temperature at which ventilation air is provided to the zone.
ventilation air

2 Humidity ratio of
[kgH20/kgAir] The humidity ratio at which ventilation air is provided to the zone.
ventilation air

3 Ventilation mass flow


[kg/hr] The mass flow rate of ventilation air.
rate

4 Ambient temperature [C] The dry bulb temperature of ambient air.

5 Ambient humidity ratio [kgH20/kgAir] The absolute humidity ratio of ambient air.

6 Mass flow rate of


[kg/hr] The mass flow rate at which ambient air infiltrates the zone.
infiltration air

7 Rate of energy gain


[kJ/hr] The rate at which sensible energy is added to the zone from lights.
from lights

4–406
TRNSYS 18 – Mathematical Reference

8 Rate of energy from The rate at which sensible energy is added to the space from
[kJ/hr]
equipment equipment.

9 Rate of sensible
The rate at which sensible energy is added to the space from its
energy gain from [kJ/hr]
occupants.
people

10 Rate of humidity gain [kg/hr] The rate at which moisture is added to the space from latent gains.

OUTPUTS

1 Zone temperature [C] The temperature of the zone and its air volume.

2 Zone humidity ratio [kgH20/kgAir] The absolute humidity ratio of the zone and its air volume.

3 Mass flow rate of


[kg/hr] The mass flow rate of ventilation air.
ventilation rate

4 Mass flow rate of


[kg/hr] The flow rate of infiltration air.
infiltration air

5 Sensible energy gain The sensible energy gain to (+ve) or loss from (-ve) the space due
[kJ/hr]
from infiltration to infiltration.

6 Latent energy gain The latent energy gain to (+ve) or loss from (-ve) the space due to
[kJ/hr]
from infiltration infiltration.

7 Sensible energy gain The sensible energy gain to (+ve) or loss from (-ve) the space due
[kJ/hr]
from ventilation to ventilation.

8 Latent energy gain The latent energy gain to (+ve) or loss from (-ve) the space due to
[kJ/hr]
from ventilation ventilation.

9 The amount of energy contained in the condensation assumed to


Condensation Energy [kJ/hr] drain from the zone if the calculated humidity ratio is greater than
the saturation humidity ratio.

4.6.7.2. Simulation Summary Report Contents


VALUE FIELDS

U-value [kJ/h.m2.K] Parameter 1

R-value [m2.K/W] 1/Parameter 1

Capacitance [kJ/K] Parameter 2

Surface Area [m2] Parameter 5

Volume [m3] Parameter 6

INTEGRATED VALUE FIELDS

4–407
TRNSYS 18 – Mathematical Reference

Sensible Energy Gain [kJ] Output 5


from Infiltration

Latent Energy Gain [kJ] Output 6


from Infiltration

Sensible Energy Gain [kJ] Output 7


from Ventilation

Latent Energy Gain [kJ] Output 8


from Ventilation

Condensation Energy [kJ] Output 9

Sensible Energy Gain [kJ] Input 7


from Lighting

Sensible Energy Gain [kJ] Input 8


from Equipment

Sensible Energy Gain [kJ] Input 9


from Occupants

Humidity Gain [kg] Input 10

MINIMUM/MAXIMUM VALUE FIELDS

Zone Temperature [C] Output 1

Zone Humidity [kgH20/kgAir] Output 2

4.6.7.3. Hints and Tips


 The consequence of the “lumped capacitance” building is that the envelope, interior air and interior
structure are all taken to be at a single temperature. While the model accounts for the overall
thermal capacitance of the structure the model is too simplistic to show the impact on zone air
temperature of energy storage within the structure.

4.6.7.4. Nomenclature
U building loss coefficient (kJ/hr-m2-C)
Cap building capacitance (kJ/C)
Cpair specific heat of building air (kJ/kg-C)
air  density of building air (kg/m3)
Area building surface area (m 2)
Vol building volume (m 3)
mult  humidity ratio multiplier ( - )
Tinitial initial temperature (C)
initial  initial humidity ratio ( - )
hfg latent heat of vaporization (kJ/kg)

4–408
TRNSYS 18 – Mathematical Reference

Tvent temperature of ventilation air ( C )


vent  humidity ratio of ventilation air ( - )
mvent ventilation air mass flow rate (kg/hr)
Tamb ambient temperature ( C )
amb  ambient humidity ratio ( - )
minf mass flow rate of infiltration air (kg/hr)
Qlights rate of energy gain from lights (kJ/hr)
Qequip rate of energy gain from equipment (kJ/hr)
Qpeop rate of sensible energy gain from people (kJ/hr)
gain  rate of humidity gain (kg/hr)
Tzone zone temperature ( C )
zone  zone humidity ratio ( - )
mvent mass flow rate of ventilation air (kg/hr)
minfil mass flow rate of infiltration air (kg/hr)
Qinfls sensible energy gain from infiltration (kJ/hr)
Qinfll latent energy gain from infiltration (kJ/hr)
Qvents sensible energy gain from ventilation (kJ/hr)
Qventl latent energy gain from ventilation (kJ/hr)

4.6.7.5. Detailed Description


The component is governed by two balance equations: an energy balance that predicts the zone
temperature and a moisture balance that predicts the humidity content of the zone.
The energy balance for the zone is:
𝑑𝑇 𝑈𝐴 𝑚̇𝑣𝑒𝑛𝑡 𝐶𝑝𝑎𝑖𝑟 𝑚̇𝑖𝑛𝑓 𝐶𝑝𝑎𝑖𝑟
= (𝑇𝑎𝑚𝑏 − 𝑇) + (𝑇𝑣𝑒𝑛𝑡 − 𝑇) + (𝑇𝑖𝑛𝑓 − 𝑇) + ∑ 𝑄𝑔𝑎𝑖𝑛𝑠 Eq. 4.6.7-1
𝑑𝑡 𝑐𝑎𝑝 𝑐𝑎𝑝 𝑐𝑎𝑝
with internal sensible gains coming from people, equipment and lights.
The moisture balance equation is similar in form to the energy balance:
𝑑𝜔 𝑚̇𝑖𝑛𝑓 𝑚̇𝑣𝑒𝑛𝑡 ∑ 𝜔𝑔𝑎𝑖𝑛𝑠
= (𝜔𝑖𝑛𝑓 − 𝜔) + (𝜔𝑣𝑒𝑛𝑡 − 𝜔) + Eq. 4.6.7-2
𝑑𝑡 𝜌𝑉 𝜌𝑉 𝜌𝑉
with internal moisture gains coming from people and equipment.

4–409
TRNSYS 18 – Mathematical Reference

4.6.8. Type 149: National Institute of Standards and


Technology (NIST) Simple Infiltration
Based on work done at the National Institute of Standards and Technology [1] this component offers a
simple model of infiltration based on the physical characteristics of the building and the windspeed. While
the model does not give as accurate an infiltration calculation as bulk-airflow modeling, it does provide an
estimate of the infiltration based on actual conditions.

4.6.8.1. Parameter/Input/Output Reference


PARAMETERS

1 Number of Zones [-] The number of zones for which the component will calculate the
infiltration rate.

For each zone:

2 Design Infiltration Rate [ach] The design infiltration rate for the zone. This is the base value that
will be modified based on the windspeed.

3 Height [m The height of the zone.

4 Volume [m3] The interior volume of the zone.

5 Surface Area [m2] The surface area of exterior walls in the zone.

6 Net Flow [l/s] The net airflow into the zone from the HVAC system (supply airflow
– return airflow).

INPUTS

1 Ambient Temperature [C] The ambient drybulb temperature.

2 Windspeed [m/s] The velocity of the air exterior to the zone.

For each zone:

3 HVAC System On [0/1] A signal for whether the HVAC system is on (=1) or off (=0) for the
Function zone at that timestep.

4 Zone Temperature [C] The temperature of the zone.

OUTPUTS

For each zone:

1 Infiltration Rate [ach] The rate of infiltration into the zone.

4.6.8.2. Simulation Summary Report


For each zone:

4–410
TRNSYS 18 – Mathematical Reference

1 Design Infiltration [ach] value Parameter 2

2 Height [m] value Parameter 3

3 Volume [m3] value Parameter 4

4 Surface Area [m2] value Parameter 5

5 Net Flow [l/s] value Parameter 6

6 Infiltration Rate [ach] min/max Minimum and maximum of Output 1

4.6.8.3. Hints and Tips


 While this component is set-up to calculate the infiltration rate for multiple zones, because it is a
simpified model, it would be best practice to treat the building as a single zone with one infiltration rate.
To do this simply enter the full building physical parameters rather than individual zone parameters.
 A typical design infiltration rate is 0.00136 m 3/s m2 which can be converted to ach by using the zone
volume and surface area.

4.6.8.4. Detailed Description


The calculations are performed identically for each zone, so they will be described here as for a single
zone. The equation for the infiltration rate is
𝐼 = 𝐼𝑑𝑒𝑠𝑖𝑔𝑛 (𝐴 + 𝐵|𝑇𝑧𝑜𝑛𝑒 − 𝑇𝑎𝑚𝑏𝑒𝑖𝑛𝑡 | + 𝐷𝑊𝑖𝑛𝑑𝑠𝑝𝑒𝑒𝑑 2 ) Eq. 4.6.8-1

The coefficients A, B and D depend on the physical charactieristics of the zone and whether the HVAC
system is on or off.
If the HVAC system is off, then
𝐴=0 Eq. 4.6.8-2
𝑆𝑢𝑟𝑓𝑎𝑐𝑒 𝐴𝑟𝑒𝑎
𝐵 = 0.002𝐻𝑒𝑖𝑔ℎ𝑡 + 0.043 Eq. 4.6.8-3
𝑉𝑜𝑙𝑢𝑚𝑒
𝑆𝑢𝑟𝑓𝑎𝑐𝑒 𝐴𝑟𝑒𝑎
𝐷 = −0.00002𝐻𝑒𝑖𝑔ℎ𝑡 + 0.211 Eq. 4.6.8-4
𝑉𝑜𝑙𝑢𝑚𝑒
If the HVAC system is on, then
𝑆𝑢𝑟𝑓𝑎𝑐𝑒 𝐴𝑟𝑒𝑎 𝑁𝑒𝑡 𝐹𝑙𝑜𝑤
𝐴 = 0.0001𝐻𝑒𝑖𝑔ℎ𝑡 + 0.933 − 47 Eq. 4.6.8-5
𝑉𝑜𝑙𝑢𝑚𝑒 1000 ∙ 𝑆𝑢𝑟𝑓𝑎𝑐𝑒 𝐴𝑟𝑒𝑎
𝑆𝑢𝑟𝑓𝑎𝑐𝑒 𝐴𝑟𝑒𝑎 𝑁𝑒𝑡 𝐹𝑙𝑜𝑤
𝐵 = 0.0002𝐻𝑒𝑖𝑔ℎ𝑡 + 0.0245 −5 Eq. 4.6.8-6
𝑉𝑜𝑙𝑢𝑚𝑒 1000 ∙ 𝑆𝑢𝑟𝑓𝑎𝑐𝑒 𝐴𝑟𝑒𝑎
𝑆𝑢𝑟𝑓𝑎𝑐𝑒 𝐴𝑟𝑒𝑎 𝑁𝑒𝑡 𝐹𝑙𝑜𝑤
𝐷 = 0.00008𝐻𝑒𝑖𝑔ℎ𝑡 + 0.1312 − 28 Eq. 4.6.8-7
𝑉𝑜𝑙𝑢𝑚𝑒 1000 ∙ 𝑆𝑢𝑟𝑓𝑎𝑐𝑒 𝐴𝑟𝑒𝑎

4.6.8.5. References
1. Ng, Lisa, Andrew Persily and Steven Emmerich “Improved Infiltration Modeling in Commercial
Building Energy Models”; National Institute of Standards and Technology.

4–411
TRNSYS 18 – Mathematical Reference

4.6.9. Type 168: Simple Natural Ventilation Model


Natural airflows through openings are depending on the pressure difference between outdoor and indoor
and the effective opening area. The Type 168 models natural ventilation through openings like operable
windows. It considers infiltration, controlled ventilation and flushing events and provide two models to
determine the maximum volume flow through the opening. Note that both models don’t consider any
influence by wind pressure.

4.6.9.1. Parameter/Input/Output Reference


PARAMETERS

1 [-] 1: Ruscheweyh Model


Mode
2: Stack Effect Model

2 [m3] Volume of the airnode for calculating the air change rate from the
Zone volume
volume flow

3 Ventilation factor [-] Ruscheweyh factor used in Ruscheweyh Model

4 Stack equation [-] Stack effect efficiency used in the Stack Effect Model
efficiency

5 [-] The number of control oscillations allowed in one timestep before


the controller is "stuck" so that the calculations can be solved.
Number of oscillations
This parameter should be set to an odd number so that short-term
results are not biased.

INPUTS

1 Ambient temperature [C] Ambient temperature

2 Room air temperature [C] Room air temperature

3 Schedule of controlled ventilation;

Ventilation schedule [-] This schedule is additionally used for differentiation between day
and night. Dayflushing controls are used when, Input 3 > 0,
Nightflushing controls are used when Input 3 = 0.

4 controled air change Desired airflow for purposes other than cooling, usually the
[ach]
rate hygenic air change rate

5 infiltration [ach] Infiltration

6 max. air change rate [ach] Limit the maximum air change rate

7 upper opening [m^2] The upper opening area

8 lower opening [m^2] The lower opening area

9 height [m] Height between upper and lower opening

10 on/off ventilation (day) [-] Switch to turn on/off flushing during operation time

4–412
TRNSYS 18 – Mathematical Reference

11 on/off ventilation (night) [-] Switch to turn on/off flushing during non-operation time

12 upper room air Room air temperature when flushing should be activated (see
temperature treshhold [deltaC] hysterses control) during operation time
(day)

13 lower room air Room air temperature when flushing should be deactivated (see
temperature threshold [deltaC] hysterses control) during operation time
(day)

14 upper temperature Temperature difference between room air temperature and


difference threshhold [deltaC] ambient temperature when flushing should be activated (see
(day) hysterses control) during operation time

15 lower temperature Temperature difference between room air temperature and


difference threshhold [deltaC] ambient temperature when flushing should be deactivated (see
(day) hysterses control) during operation time

16 upper room air Room air temperature when flushing should be activated (see
temperature treshhold [deltaC] hysterses control) during non-operation time
(night)

17 lower room air Room air temperature when flushing during operation time should
temperature threshold [deltaC] be deactivated (see hysterses control) during non-operation time
(night)

18 upper temperature Temperature difference between room air temperature and


difference threshhold [deltaC] ambient temperature when flushing should be activated (see
(night) hysterses control) during non-operation time

19 lower temperature Temperature difference between room air temperature and


difference threshhold [deltaC] ambient temperature when flushing should be deactivated (see
(night) hysterses control) during non-operation time

OUTPUTS

1 Air Change [-] Air change rate

2 Volumetric Flow Rate [m3/h] Volume flow

3 [-] Control Signal


Control signal 0: flushing is deactivated
1: flushing is activated

4.6.9.2. Simulation Summary Report Contents


This component does not produce an entry in the simulation summary report (*.ssr)

4.6.9.3. Hints and Tips


This component was developed to be connected to TYPE 56 and study the effects of using the free cooling
potential of outdoor air to cool spaces. The simplest buildup of a connection between the two types is
illustrated below.

4–413
TRNSYS 18 – Mathematical Reference

4.6.9.4. Nomenclature
𝐴𝑏𝑜𝑡 [m²] Lower opening area

𝐴𝑡𝑜𝑝 [m²] Upper opening area

𝐴𝐶𝑅 [ach] Resulting air change

𝐴𝐶𝑅𝑐𝑜𝑛 [ach] Controlled air change

𝐴𝐶𝑅𝑚𝑎𝑥,𝑝𝑜𝑡 [ach] Maximum potential air change

𝐴𝐶𝑅𝑚𝑎𝑥,𝑙𝑖𝑚 [ach] Maximum allowed air change set by the user

𝐴𝐶𝑅𝑚𝑖𝑛 [ach] Minimum air change due to infiltration

𝐹𝑉 [-] Ventilation factor for simple model

𝐻 [m] Height difference between the openings

𝑇𝑎𝑖𝑟,𝑟𝑜𝑜𝑚 [°C] Room air temperature

𝑇𝑠𝑒𝑡 [°C] Set point temperature

𝑇𝑎𝑚𝑏 [°C] Ambient temperature

𝑉 [m³] Volume of airnode

𝜂 [-] Stack effect efficiency

4.6.9.5. Detailed Description


The implemtation in Type168 consists of a controlling section and the calculation of the maximum volume
flow according to the Ruscheweyh or Stack Effect Model.
There are three possible states of the controller.

4–414
TRNSYS 18 – Mathematical Reference

1. Only Infiltration: if the schedule given as Input 3 is 0, and flushing control signal is 0, the air change
is only infiltration given as input 5.
2. Controlled ventilation: the controlled ventilation is active if the schedule given as Input 3 is greater
than zero. The air change is calculated by multiplying the schedule value with Input 4. If the
maximum possible volume flow is sufficient, the calculated air change rate is applied, otherwise the
maximum possible volume flow is used.
3. Flushing: Flushing is used to benefit from free cooling potential of outdoor air. If the general flushing
switch is activated (Input 10,11) the inputs 11-14 for operation time and the inputs 15-19 for non-
operation time, determine, if flushing is applied. Two hysteresis controller are used to generate the
flushing signal depending on the Room air temperature (above setpoint?) and the temperature
difference between indoor and outdoor air temperature (is there free cooling potential?). The
maximum possible air change rate is calculated according to Ruscheweyh or the Stack effect
model. There is an additional value (input 6) to limit the air change during the flushing event.

Infiltration Controlled Ventilation Flushing

ACRmin = constant air change 1.2

1
𝑇𝑎𝑖𝑟,𝑟𝑜𝑜𝑚 > 𝑇𝑆𝑒𝑡
0.8

and
0.6

0.4

0.2

𝑇𝑎𝑚𝑏 > 𝑇𝑎𝑖𝑟,𝑟𝑜𝑜𝑚


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

ACRcon= x m³/h * schedule

no
Flush?

no
ACR=ACRmin ACRcon>ACRmin
yes
yes
no
ACRcon<ACRmax ACR=ACRmax

yes

ACR=ACRcon

SIMPLE MODEL
A simple model without considering opening areas. This model is useful in early stages, when the opening
areas and their positions are unknown.

𝐴𝐶𝑅𝑚𝑎𝑥,𝑝𝑜𝑡 = 𝐹𝑉 √|𝑇𝑎𝑖𝑟,𝑟𝑜𝑜𝑚 − 𝑇𝑎𝑚𝑏 | Eq. 4.6.9-1

STACK EFFECT MODEL


This model only considers the buoyancy-driven ventilation. It arises due to density difference between
indoor and outdoor air. The density of warmer air is lower than the density of colder air; therefore, warm air
tends to rise above colder air. [1]

4–415
TRNSYS 18 – Mathematical Reference

𝐴𝑡𝑜𝑝 |𝑇𝑎𝑖𝑟,𝑟𝑜𝑜𝑚 − 𝑇𝑎𝑚𝑏 | 𝐴𝑡𝑜𝑝 2 + 𝐴𝑏𝑜𝑡 2


𝐴𝐶𝑅𝑚𝑎𝑥,𝑝𝑜𝑡 = 𝜂 9.81 H √( )( ) Eq. 4.6.9-2
𝑉 𝑇𝑎𝑚𝑏 + 273.15 𝐴𝑏𝑜𝑡 2

4.6.9.6. References
1. Recknagel, H., Sprenger, E., Schramek, E., "Taschenbuch für Heizung und Klimatechnik"
Oldenbourg Industrieverlag, München, 75.Edition, 2011

4–416
TRNSYS 18 – Mathematical Reference

4.7. Output

4–417
TRNSYS 18 – Mathematical Reference

4.7.1. Type 25: Output Printer


The printer component is used to output (or print) selected system variables at specified intervals of time
to a text file.
The maximum number of variables per Type 25 has been set to 500 and there is no specific limit on the
number of Type 25 units that can be used in a simulation. It is important to remember that the number of
variables per printer is also limited by the maximum line length (or file width) in TRNSYS (See Volume 07,
Programmer's Guide, for a reference on TRNSYS global constants).

4.7.1.1. Parameter / Input / Output Reference


PARAMETERS

1 Printing interval hr The time interval at which printing is to occur. If the time interval is
less than zero, then the print interval will be measured in the
absolute value of this parameter expressed in months. If parameter
6 is set to 2, this parameter gives the time of day when printing is to
occur. Examples: 1: print every hour; -1: print every month; STEP:
print every simulation time step

2 Start time hr The time of the year in hours at which printing is to start. The
default value (START) is a TRNSYS parameter equal to the
simulation start time

3 Stop time hr The time of the year in hours at which printing is to stop. The
default value (STOP) is a TRNSYS parameter equal to the
simulation stop time

4 Logical unit - This parameter sets the Fortran Logical Unit (File reference
number) of the output file. It is used internally by TRNSYS to refer
to the file. This parameter will automatically be assigned to a
unique value by the TRNSYS Studio

5 Units printing mode - This parameter can have the following values: 0: do not print units;
1: user-supplied units are printed to the output file (you have to
provide those units in the "special cards" tab). Also note that when
generating an output file that will be used as an EES lookup table
EES requires that you enter the units in square braquets. Please
do so when you specify the units of your inputs: e.g., [h] [kJ/h]; 2:
TRNSYS-supplied units are printed to the output file

6 Relative or absolute - This parameter controls whether the print intervals are relative or
start time absolute. 0: print at time intervals relative to the simulation start
time; 1: print at absolute time intervals; 2: print at a certain time of
the day specified by parameter 1. For example, if the simulation
start time is 0.5, the simulation time step is 0.25 and the printing
time step is 1: If this parameter is set to 0, printing will occur at 0.5,
1.5, 2.5, etc. If this parameter is set to 1, printing will occur at 1, 2,
3, etc. If this parameter is set to 2, printing will occur at the time
specified by parameter 1.

7 Overwrite or Append - This parameter determines whether the file is appended to or


overwritten: -1: Overwrite the output file; 1: Append to the output
file

4–418
TRNSYS 18 – Mathematical Reference

8 Print header - This parameters determines whether or not a header with input file
information will be printed to the output file or not -1: Do not print
header; 1: Print header

9 Delimiter - This parameter controls the delimiter used in the output file: 0: use
tabs to delimit columns; 1: use spaces to delimit columns; 2: use
commas to delimit columns

10 Print labels - This parameter decides whether or not labels (variable descriptors)
should be printed as column headers: -1: Do not print descriptors;
1: Print descriptors

INPUTS

This component’s inputs are repeated once for each variable.

1 Summary input [any] The specified input to be printed

4.7.1.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr)

4.7.1.3. Hints and Tips


 Type 25 has one parameter that controls whether the print intervals are relative or absolute: for
example, if the simulation start time is 0.5, the simulation time step is 0.25 and the printing time step
is 1: if this parameter is set to 0, printing will occur at 0.5, 1.5, 2.5, etc. If this parameter is set to 1,
printing will occur at 1, 2, 3, etc.
 Type 25 is also capable to append to the output file instead of re-creating it, which can be very useful
for parametric runs (all parametric runs can write to the same file).
 The 2nd data card following the INPUTS control card must contain an identifying label, or variable
descriptor, for each of the INPUTS rather than initial values as for most other components. (The
INPUTS are printed beneath their identifying labels.) Each descriptor consists of up to
maxDescripLength (25) characters. Labels must be separated from one another by a comma or one
or more blanks.
 If the 5th parameter is specified as 1, the user must supply the entire set of variable units in a manner
similar to the identifying labels previously described. The units are printed below the identifying labels.
Each unit consists of up to maxVarUnitLength (20) characters. Variable units must be separated from
one another by a comma or one or more blanks.
 If the 8th paramerter is specified as 2, the printer will write a special header that allows EES to open
the date file and recognize it as a lookup table. Units can be specified in the labels, and they must be
in square braquets for EES to recognize them.
 If the parameter 6 is set to 2, the printer allows for printing at a specific time of the day.

4.7.1.4. Nomenclature
Lunit - the logical unit number on which printer output is to occur
t - the TRNSYS simulation time step
tp - the time interval at which the INPUTS to the printer are to be printed out
ton - the time in the simulation at which the printer is to begin printing

4–419
TRNSYS 18 – Mathematical Reference

toff - the time at which the printer is to stop printing


TIME - the current value of time in the simulation
Xi - the value of the ith INPUT to be printed

4.7.1.5. Detailed Description


 if tp = 0 or not specified, printing occurs only at the end of the simulation.
 if 0 < tp ≤ t, printing will occur at intervals of t (every time step).
 if tp > t, printing will occur every N time steps where N must be a positive integer and N = tp/t.
 if ton is <=0, printing begins at the start of the simulation. Otherwise, printing begins when TIME ≥
ton.
 if toff is >= tend, printing stops at the end of the simulation. Otherwise, printing stops when TIME > t off.
 if Lunit ≤ 0 or not specified, the standard logical unit number for the Listing File (6) is used.
if Lunit > 0, the number is used as the logical unit number for printer output. This allows the output of
the printer to be written onto a separate file.
 if UNITS = 1, user-supplied units are printed to the supplied logical unit. If UNITS = 2, TRNSYS-
supplied units are printed to the designated logical unit

FORMATTING
There are two sets of proformas for Type25: formatted and unformatted. The difference is that the
unformatted versions print the information in engineering formatting, for example:
+1.0000000000000000E+00
The formatted versions of Type 25 allow you to specify the format in which the information will be written to
the text file. The format statement must be specified in the tab ‘Special cards’, and it uses the Fortran
convention for reading and writing information to external files. For example, the format
(F8.2,1X,F8.2)
will write the information as
1.00 1.00
Please go to a Fortran reference textbook or online resource for more information regarding the format
statement.

4–420
TRNSYS 18 – Mathematical Reference

4.7.2. Type 28: Simulation Summary


Type 28 integrates its inputs over the time interval of the summary, performs user specified arithmetic
operations on the integrals, and prints the results to an external text file.
Type 28 can be used to generate daily, weekly, monthly or seasonal summaries of information computed
in a simulation. It is especially useful for obtaining "derived" quantities, arithmetically reduced from "raw"
TRNSYS output. Efficiencies, fraction run time, time averages, and energy balances are examples of the
types of information obtainable from Type 28. A single instance of Type28 can be used to replace a set of
equations, an integrator and a printer. It can also be used to reduce the need for post processing outputs.
Type28 is not recommended for beginning users.
Type 28 can handle up to 10 inputs (for backwards compatibility reasons) and an unlimited number of
outputs. There is no specific limit on the number of Type 28 units that can be used in a simulation.

4.7.2.1. Parameter / Input / Output Reference


PARAMETERS

1 Summary interval hr The time interval after which the summaries will printed and reset.
Specifiying a negative parameter indicates that the absolute value
of the parameter will be used to specify the rest time in months.

2 Summary start time hr The hour of the year at which the summary is to begin.

3 Summary stop time hr The hour of the year at which the summary is to stop.

4 Logical unit for the - This parameter sets the Fortran Logical Unit (File reference
output file number) of the output file. It is used internally by TRNSYS to refer
to the file. This parameter will automatically be assigned to a
unique value by the TRNSYS Studio

5 Output mode - The output mode for the simulation summary component: 1: Table
with heading for the whole simulation (external file) or Individual
tables for each summary (Lst file) 2: Table with a single heading for
every 12 sets of summaries (best adapted to monthly summaries)

The next parameter is repeated once for each each operation code specified in the Type28 proforma

6 Operation code - The reverse polish operation code that will be used to manipulate
the parameters and inputs to produce the outputs. The parameter
list may also contain constants to be used in the summary. If this is
the first operation code, either enter the number of inputs that
should not be integrated, or use an operation code <= 0 to put an
input on parameter on the stack.

INPUTS

This component’s inputs are repeated once for each variable.

1 Summary input [any] The specified input to be used in the simulation summary.

4.7.2.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr)

4–421
TRNSYS 18 – Mathematical Reference

4.7.2.3. Detailed Description


The first 5 parameters specify the summary interval, start time, and end time, the Fortran logical unit number
for output, and an output mode. A Fortran logical unit is an integer used by the TRNSYS kernel to uniquely
identify a particular input or output file. The TRNSYS Simulation Studio automatically assigns logical unit
numbers to the various files referenced by a simulation. Type 28 typically outputs its results to an external
file, but it can also be configured to print to the listing file, which is not recommended and may be
unsupported in future versions.
There are two modes for output. In Mode 1, one table with a heading is produced for the whole simulation.
For example, running the "Shading" example for a year with monthly summaries produces the following
output:
Time Quseful-unshaded Quseful-shaded
0.7440000000000000E+0003 0.2691661730332975E+0006 0.6801398991703584E+0005
0.1416000000000000E+0004 0.3346451047390851E+0006 0.9986525629429739E+0005

0.7296000000000000E+0004 0.3494940883789239E+0006 0.1187033571959028E+0006
0.8016000000000000E+0004 0.2472546177407783E+0006 0.6366422903990559E+0005
0.8760000000000000E+0004 0.2470276724538152E+0006 0.5797111710341804E+0005
0.8760000000000000E+0004 0.4433211959658687E+0007 0.2429448716222191E+0007

In Mode 2, a table with a single heading is produced for every 12 sets of summaries (this is best adapted
to monthly summaries, in which case Type 28 also print the month name). With the same example, the
result is:
Simulation Summary in intervals of 1.000000 month
-----------------------------------------------------------------------------------
Month Time Quseful-unshaded Quseful-shaded
Jan 0.7440000000000000E+0003 0.2691661730332975E+0006 0.6801398991703584E+0005
Feb 0.1416000000000000E+0004 0.3346451047390851E+0006 0.9986525629429739E+0005

Oct 0.7296000000000000E+0004 0.3494940883789239E+0006 0.1187033571959028E+0006
Nov 0.8016000000000000E+0004 0.2472546177407783E+0006 0.6366422903990559E+0005
Dec 0.8760000000000000E+0004 0.2470276724538152E+0006 0.5797111710341804E+0005
Sum 0.8760000000000000E+0004 0.4433211959658687E+0007 0.2429448716222191E+0007

Like Type 25, Type 28 can be set to append to the output file rather than re-creating it (add 10 to the mode,
e.g. 11 instead of 1).

When Type 28 prints the results to the listing file, the first characters are the unit number corresponding to
the instance that wrote to the listing file. This may help understanding to which unit corresponds to the
outputs printed in the listing file.

LABELS
A special control statement called a LABELS statement is required for use of Type 28. Unlike Type 25, the
number of printed Outputs is not necessarily equal to the number of Inputs so Labels (variable descriptors)
cannot be specified on the initial values line following the Inputs line. Instead, the user must specify 2 lines
of the form:
Labels n
label1 label2 label3 … labeln
after the Unit X Type 28 line. (n) is the number of Outputs of Type 28 and labeln is the LABEL used to
identify the nth Output.

ENERGY BALANCES
The relative accuracy of a simulation can often be estimated by comparing the energy flows across a system
or subsystem boundary with the change in system internal energy. If the energy flows between several

4–422
TRNSYS 18 – Mathematical Reference

components balance, then the timestep and convergence tolerances are adequate. If an energy balance
does not close, then the system model or simulation parameters have not been specified properly.
To facilitate checking system energy balances, an energy balance checking routine is included in TRNSYS.
A control statement, called a CHECK statement, is used to specify an energy balance between several
quantities printed by the simulation summary component. If the energy balance does not close within the
tolerance given on the CHECK statement, a warning will be issued in the *.lst and *.log files.
All TRNSYS Units can have check statements. However, Type 28 is best adapted to use
check statements because of its ability to integrate some (or all) of its inputs.
The use of the CHECK statement is best illustrated with an example:
Suppose a Type 28 calculates and prints out QU, the energy supplied by the collector to the tank; DE, the
change in internal energy of the tank; QLOSS, the loss from the tank; and QLOAD, the energy supplied to
the load from the tank. Allowing for moderate error, we can say that the energy added to the tank (QU)
should be within 2% of the energy drawn from the tank (QLOSS + QLOAD) plus the change in internal
energy (DE). Output 1 minus outputs 2 through 4 should be close to 0. The line
CHECK .02 1, -2, -3, -4
will cause QCHECK = QU-DE-QLOSS-QLOAD to be calculated. If QCHECK is greater than 2% of (|QU| +
|DE| + |QLOSS| + |QLOAD|)/2, then a warning will be written to the *.lst and *.log files. As with other
TRNSYS tolerances, a positive number following the word CHECK is treated as a relative tolerance and a
negative number as an absolute tolerance.

OPERATION CODES
Type 28 Parameters 6 and higher are the operation codes. These codes enter integrated Inputs,
Parameters, and Time into an operational stack (in reverse Polish notation), command operations on these
values, and place results into the OUT array so they may be printed. (Note that the operations are
performed after the Inputs have been integrated). The operation codes are explained here below:
All operations are performed on the value on the top of the stack for unary operations, or on the top two
values in the stack for binary operations. The Parameters are processed sequentially and the values
determine what operations to perform on the Inputs.
In the following,
 Pj is parameter j (i.e. the parameter being processed)
 Sk is variable number k in the stack (starting from the top)
 Xi is the ith input (i is incremented when an input is accessed, it starts at 1)
 Yj is the jth input (j is incremented when an output is accessed, it starts at 1)
 Ri is the register (memory spot) i

Operations that add variables to the stack


Pi Interpretation
-2 put (Elapsed Time since last summary) on top of stack (Sk = Elasped Time).
-1 the value of the next Parameter is placed on top of the stack as a constant.
(j = j + 1, Sk = Pj)
0 the value of the next Input is placed on top of the stack. (i = i + 1, Sk = Xi)

Binary Operations
Pi Interpretation
1 the two values on top of the stack are replaced with their product. (Sk-1 = Sk1*Sk)

4–423
TRNSYS 18 – Mathematical Reference

2 the two values on top of the stack are replaced by the result of the division of the second value from
the top of the stack by the value on top of the stack. (Sk-1 = Sk-1/Sk)
3 the two values on top of the stack are replaced by their sum. (Sk-1 = Sk-1 + Sk)
4 the two values on top of the stack are replaced by their difference. The top value on the stack is
subtracted from the second value from the top of the stack. (S k-1 = Sk-1 - Sk)
5 the two values on top of the stack are replaced by the second value from the top of the stack raised
to the power of the top value in the stack. (Sk-1 = Sk-1^Sk)

Unary Operations
Pi Interpretation
6 the top value in the stack is replaced by the log10 of the top value in the stack. (Sk = log10Sk)

7 the top value in the stack is negated (Sk = -Sk)


8 the top value in the stack is left unchanged unless it is negative, in which case it is replaced by 0. (Sk
= Sk if Sk ≥ 0, Sk = 0 if Sk < 0).

Functions using logical relationships


Some of the functions here below take their name from the case where all inputs are either 0 or 1 (Boolean
variables). If inputs are outside that range, no error is generated, the same equations are applied.
Pi Interpretation
9 the two values on top of the stack are replaced with 1 if the second value is greater than or equal to
the top value, and 0 otherwise. (Sk-1 = 1 if Sk-1  Sk, Sk-1 = 0 if Sk-1 < Sk).
10 the top value in the stack is NOT'ed (Sk = 1 - Sk)
11 the two values on top of the stack are replaced by their Boolean AND (Sk-1 = min(Sk-1,Sk))
12 the two values on top of the stack are replaced by their Boolean OR (Sk-1 = max(Sk-1,Sk))

Unary operators (2)


Pi Interpretation
13 The top value in the stack is replaced by the loge of the top value in the stack (Sk = ln(Sk)).
14 The top value in the stack is replaced by e to the power of the top value in the stack
(Sk = exp(SZ)).

15 The top value in the stack is replaced by the sine of the top value in the stac (Sk=sin(Sk)) [Sk must be
in degrees]
16 The top value in the stack is replaced by the cosine of the top value in the stack
(Sk = cos(Sk)) [Sk must be in degrees]
17 The top value in the stack is replaced by the arcsine of the top value in the stack (S k = arcsin(Sk))
[in degrees]
18 The top value in the stack is replaced by the arccosine of the top value in the stack (S k = arccos(Sk))
[in degrees]
19 The top value in the stack is replaced by the arctangent of the top value in the stack (Sk = arctan(Sk))
[in degrees]

Outputs

4–424
TRNSYS 18 – Mathematical Reference

Pi Interpretation
-3 the value on the top of the stack is set as the next Output (j = j + 1, Yj = Sk).
-4 like -3, but top value of the stack is removed from stack (j = j + 1, Yj = Sk, Sk = Sk-1).

Other functions
Pi Interpretation
-5 decrement top of stack "pointer" (Sk = Sk-1)
-6 increment top of stack "pointer" (Sk-1 = Sk).
-7 switch top two values on stack (Temp = Sk, Sk = Sk-1, Sk-1 = Temp).
-11 place the 1st Input on top of the stack (Sk = X1).
-12 place the 2nd Input on top of the stack (Sk = X2).
-20 place the 10th Input on top of the stack (Sk = X10).
-(20+i) set register i to the value on the top of the stack; 1 ≤ i ≤ 10 (R i = Sk, k = k- 1)
-(30+i) place the value in register i on the top of the stack; 1 ≤ i ≤ 10 (k = k + 1, Sk = Ri)

4–425
TRNSYS 18 – Mathematical Reference

4.7.3. Type 46: Printegrator (Combined Integrator and


Printer)
This component combines the features of an integrator and the features of a printer that generates a text-
based output file at the end of the simulation.

4.7.3.1. Parameter / Input / Output Reference


PARAMETERS

1 Logical unit [-] This parameter sets the Logical Unit (file reference) number of the
output file. The number is used internally by TRNSYS to refer to
the file. This parameter will automatically be assigned to a unique
value by the TRNSYS Studio

2 Logical unit for monthly [-] This parameter may either be set to -1 or to the logical unit number
summaries of a monthly summary file that will be automatically generated by
the component. This parameter will automatically be assigned to a
unique value by the TRNSYS Studio

3 Relative or absolute [-] This parameter controls whether the print intervals are relative or
start time absolute. 0: print at time intervals relative to the simulation start
time; 1: print at absolute time intervals.
For example, if the simulation start time is 0.5, the simulation time
step is 0.25 and the printing time step is 1. If this parameter is set
to 0 (relative intervals), printing will occur at 0.5, 1.5, 2.5, etc. If this
parameter is set to 1 (absolute intervals), printing will occur at 1, 2,
3, etc.
This parameter is ignored if the reset time is set to monthly
integrations.

4 Printing & integrating [hr] The time interval at which printing is to occur. If the time interval is
interval less than zero, then the print interval will be set to monthly
integrations. Examples: 1: print every hour; -1: print every month;
STEP print every simulation time step.

5 Number of inputs to [-] The number of inputs that should NOT be integrated and instead
avoid integration should have their values printed at the same time as the integrated
values.

The next parameter is repeated once for each input that is NOT integrated.

6 Non-integrated input [-] The index number of the input that should NOT be integrated and
number instead should have its value printed at the same time as the other
integrated values. This parameter is repeated once for each value
parameter 5.

INPUTS

This component’s inputs are repeated once for each variable.

1 Left axis variable [any] The input to be integrated and/or printed

4–426
TRNSYS 18 – Mathematical Reference

4.7.3.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr)

4.7.3.3. Hints and Tips


 Like Type 25, Type 46 has one parameter that controls whether the print intervals are relative or
absolute: for example, if the simulation start time is 0.5, the simulation time step is 0.25 and the printing
time step is 1: if this parameter is set to 0, printing will occur at 0.5, 1.5, 2.5, etc. If this parameter is
set to 1, printing will occur at 1, 2, 3, etc.
 The 2nd data card following the INPUTS control card must contain an identifying label, or variable
descriptor, for each of the INPUTS rather than initial values as for most other components. (The
INPUTS are printed beneath their identifying labels.) Each descriptor consists of up to
maxDescripLength (25) characters. Labels must be separated from one another by a comma or one
or more blanks.
 If the parameter 6 is set to 2, the printer allows for printing at a specific time of the day.

4.7.3.4. Nomenclature
Xi [-] the ith quantity or rate to be integrated and printed.
Yi [-] the time integral of Xi
LUuser [-] the logical unit number to which the user-period printer output is to be written.
LUauto [-] the logical unit number to which the automatic (monthly) printer output is to be
written.
t [hr] the TRNSYS simulation time step.
tp [hr] the time interval at which the INPUTS to the printer are to be printed out
ton [hr] the time in the simulation at which the printer is to begin printing
toff [hr] the time in the simulation at which the printer is to stop printing
TIME [hr] the current value of time in the simulation.

4.7.3.5. Detailed Description


The integrator portion of Type46 operates as follows:

𝑚̇𝑜𝑢𝑡 = 𝑚̇𝑖𝑛.1 + 𝑚̇𝑖𝑛,2 Eq. 4.7.3-1

Some general rules for printing behavior follow:


 if tp = 0 or is not specified, printing occurs only at the end of the simulation.
 if 0 < tp ≤ t, printing will occur at intervals of t (every time step).
 if tp > t, printing will occur every N time steps where N must be a positive integer and N = tp/t.
 if ton is <=0, printing begins at the start of the simulation. Otherwise, printing begins when TIME ≥
ton.
 if toff is >= tend, printing stops at the end of the simulation. Otherwise, printing stops when TIME > t off.
 The instantaneous and integrated maximum and minimum values (and the times at which they ocurr)
are recorded and reported at the end of the output file(s).

4–427
TRNSYS 18 – Mathematical Reference

 The sum of each input (summed over the entire simulation period) is reported at the end of the output
file(s). Note that the sum for inputs that were set to avoid integration will be set to zero.

FORMATTING
There are two sets of proformas for Type 46: formatted and unformatted. The difference is that the
unformatted versions print the information in engineering formatting, for example:
+1.0000000000000000E+00
The formatted versions of Type 46 allow you to specify the format in which the information will be written to
the text file. The format statement must be specified in the tab ‘Special cards’, and it uses the Fortran
convention for reading and writing information to external files. For example, the format
(F8.2,1X,F8.2)
will write the information as
1.00 1.00

You will need to specify one more value in the format statement than the number of inputs being printed.
This is because the value of time is automatically printed and needs to be formatted as well.

Please refer to a Fortran reference textbook for more information regarding the format statement.

4–428
TRNSYS 18 – Mathematical Reference

4.7.4. Type 65: Online Plotter


The online graphics component is used to display selected system variables at specified intervals of time
while the simulation is progressing. This component is highly recommended and widely used since it
provides valuable variable information and allows users to immediately see if the system is not performing
as desired. The selected variables will be displayed in a separate plot window on the screen.
If Parameter 10 is positive, a file containing the values of all the printed variables will be created during the
simulation.
The online plotter can be disabled without removing the Type declaration from the input file by setting
parameter 9 to -1. If all online plotters in a simulation are disabled, the default progress bar will be displayed
instead. Note that if the online plotter is configured to produce an output file at the same time, that output
file will still be generated if the online plotter is disabled. Plotting takes a fair amount of time; disabling the
online plot will make simulations run more quickly.

4.7.4.1. Parameter / Input / Output Reference


PARAMETERS

Number of left-axis The number of variables that will be plotted using the left Y-axis for
1 [-]
variables scaling purposes.

Number of right-axis The number of variables that will be plotted using the right axis for
2 [-]
variables scaling purposes.

3 Left axis minimum [-] The minimum value for the left Y-axis.

4 Left axis maximum [-] The maximum value for the left Y-axis.

5 Right axis minimum [-] The minimum value for the right Y-axis.

6 Right axis maximum [-] The maximum value for the right Y-axis.

Number of plots per


7 [-] Number of plots per simulation. Use -1 for monthly plots.
simulation

8 X-axis gridpoints [-] The number of grid points that the X-axis (time) will be divided into.

This parameter can be used to shut off the ONLINE without


Shut off Online without
9 [-] removing from the assembly panel / input file, according to the
removing
following rules: -1 : don't display online; >=0 : display online

This parameter sets the Fortran Logical Unit (File reference


number) of the output file. It is used internally by TRNSYS to refer
Logical Unit for output
10 [-] to the file. This parameter will automatically be assigned to a
file
unique value by the TRNSYS Studio. If this value is set to -1 then
an output file will not be produced.

This parameter controls the way variable units are printed: 0: do


not print any units; 1: units will be provided by the user on the
11 Output file units [-]
Type’s “special cards” tab; 2: printed units will be the default units
provided by TRNSYS.

This parameter controls the delimiter used in the output file: 0: use
12 Output file delimiter [-] tabs to delimit columns; 1: use spaces to delimit columns; 2: use
commas to delimit columns

4–429
TRNSYS 18 – Mathematical Reference

INPUTS

This component’s inputs are repeated once for each variable defined by parameters 1 and 2.

The specified variable which is to be plotted using the left Y-axis for
1 Left axis variable any scaling purposes. This input is repeated for each left axis variable
defined by parameter 1

The specified variable which is to be plotted using the right Y-axis


2 Right axis variable any for scaling purposes. This input is repeated for each right axis
variable defined by parameter 2

4.7.4.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr)

4.7.4.3. Hints and Tips


The following points should be noted carefully because a Type 65 component differs from most other
component types in several ways.
 There is no limit as to the number of Type65s that can be added to a simulation. However, only the
first 10 instances of Type65 can be plotted during a given simulation run. The user can set the value
of the “shut off online without removing” parameter to determine which plots will be generated during
a run.
 A Type 65 component may have between 1 and 20 inputs. (up to 10 on left axis and up to 10 on right
axis)
 The 2nd data card following the INPUTS control card (the “input initial value” field in other Types) must
contain an identifying label for each of the INPUTS rather than initial values as for most other
components. Each label consists of up to maxDescripLength (25) characters. Labels must be
separated from one another by a comma or one or more blanks. Labels cannot contain spaces or else
they will be interpreted as more than one label.
 A LABELS card is required in order to supply the variable units for the two plots as well as the plot
titles. Type 65 always requires 3 labels in TRNSYS 16 and beyond. The first line beneath the LABELS
card must contain the title for the left y-axis. The second line is the title for the right y-axis. The third
line below the LABELS card must contain the text that will appear in the online plot identifying tab ("plot
title").
 The number of inputs is equal to the sum of the first two parameters.

4.7.4.4. Detailed Description


If at least one "online plotter" component is present in the simulation, an online plot will be displayed during
the simulation. The online plotter offers several features that will help you analyze the simulation results
while it is running and after it is done.

STOP/RESUME THE SIMULATION


You can interrupt / resume the simulation while it is running by right-clicking anywhere in the plot, by using
the "F7" and "F8" keys, or using the "Calculation/Stop" and "Calculation/Resume" menu entries. The "Pause
at…" command is also very useful when you want to diagnose some problems occurring at a given time in
a simulation.

CHANGING SOME PLOT OPTIONS

4–430
TRNSYS 18 – Mathematical Reference

When the simulation is stopped, you can use the "Plot options" menu to change the plot background or line
thickness. You can also change the left and right Y-axis limits by clicking on the axes themselves, which
will display a dialog box (see Figure 4.7.4–1). Please note that changes to those limits will be lost if you re-
run the simulation. You should change the online plotter parameters in the input file or Studio project if you
want changes to be permanent.

Figure 4.7.4–1: The online plotter window


You can hide or show any variable in the plot by clicking on its name in the legend fields. For example
clicking in the red circle in Figure 4.7.4–1 would hide/show the QAux plot.

4–431
TRNSYS 18 – Mathematical Reference

ANALYZING THE SIMULATION: ZOOMING AND DISPLAYING NUMERICAL VALUES


You can zoom on part of the plot to have a more detailed view of a shorter time interval. Just click on the
upper-left corner of the area you want to zoom in and drag the mouse pointer to the lower-right corner, then
release the mouse button. In the zoom window, you can adjust the Y-axis limits but also the X-axis (time)
limits by clicking on the axes. This is very useful when you want to study such a short period of time that it
is hard to zoom on that period right away.
You can display the numerical value of any variable at any point in time in both the "normal" and the "zoom"
windows. Press the SHIFT key and mover the mouse over the graph. The variable labels will be replaced
with their value (and "time" will be replaced with the simulation time). This is shown in Figure 4.7.4–2 for
the zoom window.

Figure 4.7.4–2: Displaying numerical values in the online plotter

Note: By pressing SHIFT and moving the mouse over the plot, you will display the values
plotted by the online plotter, which are interpolated between TRNSYS time steps. If you
want to see only the actual simulation time steps, pres CTRL-SHIFT when moving the
mouse. This can be useful to study control signal switching from 0 to 1, for example, since
the online plotter will draw a continuous line between those 2 states and it will show
interpolated values that do not correspond to any simulated values.

ANALYZING THE SIMULATION: COMPARING PLOTS


Normally, each online plot in your simulation is identified by a tab along the bottom of the online plot window;
you are able to switch between plots by clicking on the various tabs. With the release of TRNSYS 17, you
can display two online plots in the same window by selecting “Create double online” in the “Plot Options”
menu. You will be asked to select two existing plots and you are given the opportunity to name your double
plot. Once you click “okay” a new plot window appears, simaultaneously displaying the traces from both
individual plots. You will notice, however, that the trace labels from only one of the two plots appears. Click
in one or the other plot areas to change the active plot (and therefore change which trace labels appear).
Holding down the SHIFT or CTRL-SHIFT keys affects only the active plot. Make sure that your mouse is
hovering over the active plot as you move it. You will notice, however, that the vertical line extends through
both plots to make comparison easier.
Changes that you make to the individual plots will automatically be reflected in the double plot.
To delete a double plot, choose “delete double online” from the “Plot Options” menu.

END OF THE SIMULATION

4–432
TRNSYS 18 – Mathematical Reference

At the end of the simulation, TRNSYS will display a dialog box asking if you want to leave the online plotter
open.

Figure 4.7.4–3: Dialog box at the end of the simulation


You can click "No" if you want to keep analyzing the simulation results. It is important to realize that if you
do that, the TRNSYS simulation is actually not completed. The very last call (identified by the
“getIsLastCallofSimulation() function returning “true” see Volume 07 Programmer's Guide) only occurs after
you close the online plotter. This means that some files might be locked (including the TRNSYS DLL,
TRNDll.dll).

4–433
TRNSYS 18 – Mathematical Reference

4.7.5. Type 76: Scopes


This component provides an alternative way of visualizing outputs while the simulation progresses. Where
the Type65 Online Plotter generates a graph of output variables as the simulation runs, Type76 allows the
user to define a number of dials, gauges, bar charts, and binary state indicators generically refered to as
“scopes.” Scopes are placed on the Assembly Panel and which appear as icons within the simulated
system.

4.7.5.1. Parameter / Input / Output Reference


PARAMETERS

1 Number of actors [-] The number of variables that should be plotted by this scope. It is
recommended to leave this value set to 1 and to implement
multiple scopes.

2 Scope type [-] The display mode:


1 = text mode (values are written as numbers)
2 = curves (a sort of mini-online)
3 = switches (useful to represent binary (on/off) values)
4 = color shades from blue (low value) to red (high value)
5 = colored bars
6 = gauges
7 = calendar

3 Minimum [-] The minimum value expected to be plotted by this scope.

4 Maximum [-] The maximum value expected to be plotted by this scope.

5 Update rate [-] Draw component every Update Rate timesteps only (avoids
flickering).

INPUTS

The inputs are repeated (cycled) based on the value of parameter 1

1 Actor [-] The input value which will pilot the component’s image.

4.7.5.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr)

4.7.5.3. Hints and Tips


 While the component is capable of plotting multiple values it is recommended to leave the value of the
first parameter set to 1 and to implement an instance of Type76 for each variable that the user would
like to monitor.

4–434
TRNSYS 18 – Mathematical Reference

4.7.5.4. Detailed Description


The scope component can be used in one of seven modes as an alternative to the online plotter. The modes
are briefly described in the table below.

Icon Mode Description

Text Each input will be displayed as a text value

A miniature version of the online plot will be generated for each input
Curve
value.

The line between the terminals will be open when the input value is 0 and
Switch will link the terminals when the input value is 1. Note that the “min” and
“max” parameters are not used in this mode.

The color of the box will appear blue when the input value is at or near the
Color minimum value (set as a parameter) and will tend towards red when the
input value is at or near the maximum value (also set as a parameter).

The bar extends farther to the right as the input value(s) increase from the
Colored Bars
minimum to the maximum value (set as parameters)

The needle on the dial moves clockwise as the input value(s) increase
Guage
from the minimum to the maximum value (set as parameters)

It is recommended that the built-in variable “TIME” be set as an input to


Calendar this scope. The icon of the sun rotes around the scope. At night, the
hemisphere appears black.

4.7.5.5. References
This component was written by W. Kielholz of CSTB.

4–435
TRNSYS 18 – Mathematical Reference

4.7.6. Type 125: Trnsys3D Result Visualizer for SketchUp™


Type 125 is a version of the eso Printer that is used to visualize simulation results in the Trnsys3d Plugin
for SketchUp.

4.7.6.1. Parameter / Input / Output Reference


PARAMETERS

1 Not used [-]

2 Start time [hr] The hour of the year at which values should start being printed to
the result file.

3 Stop time [hr] The hour of the year at which values should stop being printed to
the result file.

4 Logical unit [-] An integer value assigned as a reference index to the file produced
by this component.

INPUTS

This component’s inputs are repeated once for each variable that is to be printed.

1 Input value [any] The value of the input to be printed

4.7.6.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr)

4.7.6.3. Hints and Tips


 Because the information in the data file will be interpreted by SketchUp and laid over the wire frame
model of the building is is important that you include only one kind of information in each file produced
by Type125. The type of information produced by one instance of Type125 might be air temperatures,
operative temperatures, relative humidity, etc. Do not, however include data for both temperature and
relative humidity in the same instance of Type125.

4.7.6.4. Detailed Description


Viewing Results
Trnsys3d can be used to view Trnsys3d results. But first, the Trnsys3d requires results to be printed from
the Trnsys3d Printer (Type 125), which is retrieved from the Direct Access Toolbar in the TRNSYS
Simulation Studio.

4–436
TRNSYS 18 – Mathematical Reference

Figure 4.7.6–1: Location of the Type125 proforma


The Trnsys3d Printer will generate *.eso files that can be read by the Trnsys3d plugin to visualize results
in SketchUp. The Trnsys3d printer can be configured in two different ways.
1) Print Surface Outputs: the SurfacesID’s (corresponding to the ID’s in TRNBuild) are required as initial
values.

Figure 4.7.6–2: Print Surface Outputs Settings


2) Print Airnode Outputs: the AIRNODE Names (corresponding to the names in TRNBUILD) are required
as initial value. Initial value must be defined as variable name. CAPITAL LETTERS, NO SPACES!

Figure 4.7.6–3: Print Airnode Outputs Settings

The information from the surfaces and zones can now be linked to Type125.

4–437
TRNSYS 18 – Mathematical Reference

Figure 4.7.6–4: Connections


After linking the surfaces and airnodes, the ***.idf model can be reloaded into Trnsys3d. First, go to the
main SketchUp menu and chose Plugins ‐> Trnsys3d ‐> Renderings ‐> Settings . This will open the
rendering settings dialog box.

Figure 4.7.6–5: Renderings Settings


Set the data path by browsing to the directory where you saved your IDF file. There should now be an ESO
file generated by the Simulation Studio during the simulation. Choose the ESO file for the data path. The
run period will automatically be filled once the ESO file is selected. Set the rest of the Rendering settings
as shown above and click ‘OK’. The dialog box will close and nothing will appear to change. We now need

4–438
TRNSYS 18 – Mathematical Reference

to set Trnsys3d to render by data value instead of by surface class. To do this go to the main SketchUp
menu and chose Plugins ‐> Trnsys3d ‐> Renderings ‐> By Data Value .
If any portion of model appears white, it indicates that no data results are available from the TRNSYS
simulation for the selected date for that zone. The model should be colored based on the zone air
temperature, as shown below.

Figure 4.7.6–6: Colorized Rendering


Try matching the simulation run period in Trnsys3d with the Trnsys Simulation Studio results by setting it
to the first week of January. In the SketchUp main menu, choose Plugins ‐> Trnsys3d ‐> Animation ‐>
Settings. This will open the Animation Settings dialog box.

Figure 4.7.6–7: Animation Settings


Check the ‘Match simulation run period’ and the ‘Repeat when finished’ checkboxes as shown above and
hit ‘OK’. Lastly we need to reset the time to the beginning of the run period. In the SketchUp main menu,
chose Plugins ‐> Trnsys3d ‐> Animation ‐> Reverse to Marker. Make sure that the bottom left corner of the
screen indicates January 01. If it says January 08, choose Plugins ‐> Trnsys3d ‐> Animation ‐> Reverse to
Marker again. Now the bottom left corner of the screen should say January 01. Also, turn on shadows to
see the position of the sun by going to View ‐> Shadows from the main SketchUp Window.

4–439
TRNSYS 18 – Mathematical Reference

Figure 4.7.6–8: Displaying Shadows


Now that we have reset the time and have shadows on, we are finally ready to view the animation. To begin
the animations go to the SketchUp main menu and chose Plugins ‐> Trnsys3d ‐> Animation ‐> Play. At the
bottom left of the screen you will see the time and date as the animation progresses. Notice that the zones
are all slightly different colors, meaning that their temperature is different because of their construction,
occupation, etc.
While the simulation is running we can view the temperature scale by going to the main SketchUp menu
and chose Plugins ‐> Trnsys3d ‐> Renderings ‐> Color Scale . Stop the animation the same way you
started it, by going to the SketchUp main menu and chose Plugins ‐> Trnsys3d ‐> Animation ‐> Play .
Once the date passes the end of our run period the model will turn white because there is no data for it to
display. The animation can begin from the beginning by first halting playback by going to the SketchUp
main menu and choose Plugins ‐> Trnsys3d ‐> Animation ‐> Play and then resetting the time by going to
the SketchUp main menu and chose Plugins ‐> Trnsys3d ‐> Animation ‐> Reverse to Marker.

4–440
TRNSYS 18 – Mathematical Reference

4.8. Physical Phenomena

4–441
TRNSYS 18 – Mathematical Reference

4.8.1. Type 16: Solar Radiation Processing


Insolation data is generally recorded at one hour intervals and on a horizontal surface. In most TRNSYS
simulations estimates of radiation at time intervals other than one hour are required. Type16 interpolates
radiation data, calculates several quantities related to the position of the sun, and estimates insolation on
a number of surfaces of either fixed or variable orientation.
In TRNSYS versions 16.x and earlier, Type16 was the main solar radiation processing component. By the
end of the TRNSYS 16 version cycle, a number of other components had been written which combined
data reading with solar radiation processing. In TRNSYS versions 17 and later, solar radiation processing
functionality was moved from Type16 to a kernel utility subroutine called getIncidentRadiation. For
information about this routine, refer to the 07-Programmer’s Guide manual.
Because solar radiation data can still be read by Type9, Type16 is retained for solar radiation processing
when non-standard file formats are used. In this case, Type16 acts much like Type33 in that it makes a call
to the kernel’s getIncidentRadiation routine.

4.8.1.1. Parameter / Input / Output Reference


PARAMETERS

1 Horizontal radiation [-] The radiation processor may be supplied with one of five
mode combinations of inputs; this parameter specifies to the
component which set of inputs will be provided. Use the correct
proforma for the desired mode, and do not change this
parameter.

2 Tracking mode [-] Specifies if (or how) the surface receiving the radiation tracks
the sun. 1 = Fixed surface, no tracking; 2 = Single axis tracking,
vertical axis (fixed slope, variable azimuth); 3 = Single axis
tracking, axis parallel to surface; 4 = Two-axis tracking.

3 Tilted surface mode [-] Specifies the model used to process radiation on a tilted surface.
1 = Isotropic sky model; 2 = Hay and Davies model; 3 = Reindl
model; 4 = Perez 1988 model; 5 = Perez 1999 model.

4 Starting day [day] The day of the year corresponding to the simulation start time.

5 Latitude [°] The latitude of the location being investigated.

6 Solar constant [kJ/hr-m2] The mean solar irradiance per unit area that would be incident
on a plane perpendicular to the rays, at a distance of one
astronomical unit from the Sun.

7 Shift in solar time [°] The difference between the standard meridian for the local time
zone and the longitude of the location in question. Longitude
angles are positive towards West, negative towards East. This
parameter is ignored if true solar time is used (see parameter 9).

8 Not used [-] This parameter is no longer used by the radiation processor; it is
preserved to maintain compatibility with previous versions of the
Type. Do not change the default value.

9 Solar time [-] If the radiation data is at even intervals of solar time (as the TMY
data is), set this parameter to a negative number; if the data is at
even intervals of local time, set this value to a positive number.
This parameter determines whether or not parameter 7 is used.

4–442
TRNSYS 18 – Mathematical Reference

INPUTS

If Mode (parameter 1) = 1

1 Radiation on [kJ/hr-m2] The total radiation on a horizontal surface.


horizontal

If Mode (parameter 1) = 2

1 Radiation on [kJ/hr-m2] The total radiation on a horizontal surface.


horizontal

2 Ambient temperature [C] The ambient air temperature.

3 Relative humidity [%] The relative humidity of the air.

If Mode (parameter 1) = 3

1 Beam radiation on [kJ/hr-m2] The beam radiation on a horizontal surface.


horizontal

2 Diffuse radiation on [kJ/hr-m2] The diffuse radiation on a horizontal surface.


horizontal

If Mode (parameter 1) = 4

1 Radiation on [kJ/hr-m2] The total radiation on a horizontal surface.


horizontal

2 Direct normal beam [kJ/hr-m2] Beam radiation on a surface oriented towards the sun.
radiation

If Mode (parameter 1) = 5

1 Radiation on [kJ/hr-m2] The total radiation on a horizontal surface.


horizontal

2 Diffuse radiation on [kJ/hr-m2] The diffuse radiation on a horizontal surface.


horizontal

In the following table entries, n = 1 for Mode 1, n = 3 for Mode 2 and n = 2 for Modes 3 through 5

n+1 Time of last data read [hr] The time of the last reading of the external file containing the
weather data.

n+2 Time of next data [hr] The time of the next reading of the external file containing the
read weather data.

n+3 Ground reflectance [-] The reflectance of the ground above which the surface is
located. Typical values are 0.2 for ground not covered by snow
and 0.7 for ground covered by snow.

The next two inputs are cycled based on the number of surfaces on which Type16 is computing solar radiation. In
the following table entries, m=4 for mode 1, m=6 for mode 2, and m=5 for mode 3.

m+1 Slope of surface [°] The slope of the surface or tracking axis. The slope is positive
when tilted in the direction of the azimuth. 0 = Horizontal ; 90 =

4–443
TRNSYS 18 – Mathematical Reference

Vertical facing toward azimuth. This input may be ignored,


depending on the tracking mode selected. This input is cycled
with the number of surfaces to be evaluated.

m+2 Azimuth of surface [°] The angle between the local meridian and the projection of the
line of sight of the sun onto the horizontal plane. 0 = Facing
equator; 90 = Facing West; 180 (or -180) = Facing away from
the equator; -90 (or 270) = Facing East. This input may be
ignored, depending on the tracking mode selected. This input is
cycled with the number of surfaces to be evaluated.

OUTPUTS

1 Extraterrestrial on [kJ/hr-m2] The extraterrestrial radiation on a horizontal surface.


horizontal

2 Solar zenith angle [°] The angle between the vertical and the line of sight of the sun.

3 Solar azimuth angle [°] The angle between the local meridian and the projection of the
line of sight of the sun onto the horizontal plane.

4 Total horizontal [kJ/hr-m2] The total radiation incident on a horizontal surface. The total
radiation radiation is equal to the beam radiation + sky diffuse radiation +
ground reflected diffuse radiation.

5 Beam radiation on [kJ/hr-m2] The beam radiation on a horizontal surface.


horizontal

6 Horizontal diffuse [kJ/hr-m2] The diffuse radiation (sky only) on a horizontal surface.
radiation

The remaining outputs are cycled as a group for each surface.

C1 Total radiation on [kJ/hr-m2] The total radiation on the tilted surface (beam + sky diffuse +
surface ground reflected diffuse). This output is cycled with the number
of surfaces to be evaluated (up to 8 are allowed).

C2 Beam radiation on [kJ/hr-m2] The beam radiation incident on the surface. This output is cycled
surface with the number of surfaces to be evaluated (up to 8 are
allowed).

C3 Sky diffuse radiation on [kJ/hr-m2] The sky diffuse radiation incident on the surface. This output is
surface cycled with the number of surfaces to be evaluated (up to 8 are
allowed).

C4 Incidence angle for [°] The angle of incidence of the beam radiation on the surface.
surface This output is cycled with the number of surfaces to be
evaluated (up to 8 are allowed).

C5 Slope for surface [°] The slope of the surface. This will equal the input surface slope
if tracking mode 1 (fixed surface) is selected. This output is
cycled with the number of surfaces to be evaluated (up to 8 are
allowed).

4.8.1.2. Simulation Summary Report Contents


VALUE FIELDS

4–444
TRNSYS 18 – Mathematical Reference

Simulation Start Day [day] The day of the year on which the simulation begins.

Latitude [°] The latitude of the location of the radiation data.

Solar shift [°] The difference between the standard meridian for the local time zone
and the longitude of the location in question. This field is blank if true
solar time is used.

TEXT FIELDS

Tilted Radiation Mode [-] One of the following five means of calculating radiation (and
beam/diffuse split) on a tilted surface: Isotropic sky model, Hay and
Davies sky model, Reindl sky model, Perez 1988 sky model, Perez
1999 sky model.

Surface Tracking [-] One of the following four ways in which the surface(s) may track the
Mode position of the sun throughout the day: Fixed surface (no tracking),
single-axis tracking with vertical axis, fixed slope, variable azimuth;
single-axis tracking with axis parallel to surface, or two-axis tracking
surfaces.

Solar Radiation Data [-] Either solar time or local (clock) time

INTEGRATED VALUE FIELDS

None for this Type

MINIMUM/MAXIMUM VALUE FIELDS

Surface (or Axis) Slope [°] Input corresponding to surface slope; cycles for as many surfaces as
are specified in the proforma (up to 8).

Surface (or Axis) [°] Input corresponding to surface azimuth; cycles for as many surfaces as
Azimuth are specified in the proforma (up to 8).

4.8.1.3. Hints and Tips


 Setting the Starting Day: The starting day specified for Type 16 must agree with the starting hour of
the simulation. Therefore, every time the simulation start time is changed, the starting day must be
changed, or else the radiation calculations will be inaccurate. To prevent any discontinuity between
these two values, a commonly used workaround is to add the following equation to an EQUATION
block
STARTDAY=INT(START/24)+1
(START is a built-in TRNSYS variable for the starting hour of the simulation)
You can then set the Type of Parameter 4 to "variable" and type in STARTDAY for the value.

4.8.1.4. Detailed Description


This Type is a quite simple shell that calls the TRNSYS kernel utility subroutine getIncidentRadiation(). For
more information about this subroutine, its assumptions and algorithms see the documentation for
getIncidentRadiation() in the 07-Programmer’s Guide manual.

4–445
TRNSYS 18 – Mathematical Reference

4.8.2. Type 30: Thermal Solar Collector Array Shading


This component determines incident radiation upon an array of collectors that shade one another. There
are two possible modes. MODE 1 considers fixed collectors in a sloped field (a common configuration for
flat plate collector arrays). Incident total, beam, and diffuse radiation are output. MODE 2 considers
collectors with a fixed azimuth and single-axis, north-south tracking such that the incidence angle is
minimized (a common configuration for parabolic trough collector arrays). MODE 2 utilizes beam radiation
only.

4.8.2.1. Parameter / Input / Output Reference


PARAMETERS

1 Flat plate or parabolic [-] A value of 1 indicates that the shading is to be calculated for a flat-
trough mode plate collector array, whereas a value of 2 indicates that the
shading is to be calculated for a single-axis tracking parabolic
trough array. Use proforma 30a for flat plate arrays and 30b for
parabolic trough arrays. Do not change this value.

If Mode (parameter 1) = 1

2 Collector height [m] The height of one of the identical solar collectors in the array. The
height specified here should be independent of the collector slope
(the true height of the collector).

3 Collector row length [m] The length of one row of the solar collector array.

4 Collector slope [°] The slope between the collector array surface and the horizontal.
The slope must be between 0 and 90 degrees and must be greater
than the slope of the collector field.

5 Collector row [m] The distance between rows of the flat-plate solar collector array
separation (measured on the horizontal plane).

6 Number of rows [-] The number of identical rows of solar collectors in the array.

7 Collector array azimuth [°] The collector array surface azimuth. The surface azimuth is
defined as the angle between the local meridian and the line of
sight of the collector surface onto the horizontal plane. Zero
surface azimuth is facing the equator, west is positive (90), east is
negative (-90).

8 Slope of collector field [°] The slope between the field (or mounting surface) on which the
collector array is situated and the horizontal. The slope must be
between 0 and 90 degrees and must be less than the slope of the
collector array surface.

If Mode (parameter 1) = 2

2 Axis orientation [-] This parameter is no longer used; it is maintained only for
backwards compatibility. Do not change this value.

3 Collector axes [m] The distance between axes of the rows of parabolic troughs
separation (measured on the horizontal plane).

4 Aperture width [m] The width of one of the identical parabolic troughs in the array.

4–446
TRNSYS 18 – Mathematical Reference

5 Number of rows [-] The number of identical rows of parabolic troughs in the array.

6 Slope of axes plane [°] The slope of the field on which the trough array is situated. Slope is
positive when the surface is tilted toward the azimuth, negative
otherwise.

INPUTS

If Mode (parameter 1) = 1

1 Tilted surface radiation [kJ/hr-m2] The total radiation (beam + sky diffuse + ground reflected diffuse)
incident upon the unshaded collector surface per unit area.

2 Incident beam radiation [kJ/hr-m2] The beam radiation incident upon the unshaded collector surface
per unit area.

3 Solar zenith angle [°] The solar zenith angle is the angle between the vertical and the line
of sight of the sun. This is 90 minus the angle between the sun
and the horizontal (solar altitude angle).

4 Solar azimuth angle [°] The solar azimuth angle is the angle between the local meridian
and the projection of the line of sight of the sun onto the horizontal
plane. Zero solar azimuth is facing the equator, west is positive
(90) while east is negative (-90).

5 Total horizontal [kJ/hr-m2] The total radiation (beam + sky diffuse + ground reflected diffuse)
radiation incident on a horizontal surface per unit area.

6 Horizontal diffuse [kJ/hr-m2] The diffuse radiation incident upon a horizontal surface per unit
radiation area.

7 Beam radiation on field [kJ/hr-m2] The beam radiation per unit area incident upon a surface with the
slope of the field on which the collector array is situated.

8 Ground reflectance [-] The reflectance of the ground above which the solar collector array
is situated. The reflectance is a ratio of the amount of radiation
reflected by the surface to the total radiation incident upon the
surface and therefore must be between 0 and 1. Typical values are
0.2 for ground not covered by snow and 0.7 for snow-covered
ground.

If Mode (parameter 1) = 2

1 Incident beam radiation [kJ/hr-m2] The beam radiation incident upon the unshaded trough aperture
per unit area

2 Collector slope [°] The slope of the trough aperture. Slope is positive when the
aperture is tilted toward the azimuth, negative otherwise.

OUTPUTS

If Mode (parameter 1) = 1

1 Total shaded radiation [kJ/hr-m2] The total solar radiation (beam + sky diffuse + ground reflected
diffuse) incident upon the shaded collector surface per unit area,
including the effects of shading.

4–447
TRNSYS 18 – Mathematical Reference

2 Shaded beam radiation [kJ/hr-m2] The beam radiation incident upon the shaded collector surface per
unit area, including the effects of shading.

3 Shaded diffuse [kJ/hr-m2] The diffuse radiation incident upon the shaded collector surface per
radiation, total unit area, including the effects of shading. This includes both
radiation diffused through the sky and radiation reflected from the
ground.

4 Shaded diffuse [kJ/hr-m2] The radiation diffused through the sky and incident upon the
radiation, sky portion shaded collector surface per unit area, including the effects of
shading.

5 Shaded diffuse [kJ/hr-m2] The diffuse radiation reflected from the ground and incident upon
radiation, ground- the shaded collector surface per unit area, including the effects of
reflected portion shading.

If Mode (parameter 1) = 2

1 Shaded beam radiation [kJ/hr-m2] The beam radiation incident upon the shaded trough aperture per
unit area, including the effects of shading.

2 Shading fraction [-] The fraction of the unshaded beam radiation (from Input 1) that is
received by the troughs.

4.8.2.2. Simulation Summary Report Contents


VALUE FIELDS

If Mode (Parameter 1) = 1

Row Height [m] The height of one of the identical solar collectors in the array.

Row Length [m] The length of one row of the solar collector array.

Row Slope [°] The slope between the collector array surface and the horizontal.

Row Separation [m] The distance between rows of the flat-plate solar collector array
(measured on the horizontal plane).

Number of Rows [-] The number of identical rows of solar collectors in the array.

Row Azimuth [°] The collector array surface azimuth.

Field Slope [°] The slope between the field (or mounting surface) on which the collector
array is situated and the horizontal.

If Mode (Parameter 1) = 2

Distance Between [m] The distance between axes of the rows of parabolic troughs (measured
Axes on the horizontal plane).

Collector Aperture [m] The width of one of the identical parabolic troughs in the array.

Number of Rows [-] The number of identical rows of parabolic troughs in the array.

4–448
TRNSYS 18 – Mathematical Reference

Field Slope [°] The slope of the field on which the trough array is situated.

TEXT FIELDS

Mode [-] Either flat plate collectors or parabolic trough collectors.

INTEGRATED VALUE FIELDS

Unshaded Beam [kJ/hr] Input 1


Radiation

Shaded Beam [kJ/hr] Output 1


Radiation

MINIMUM/MAXIMUM VALUE FIELDS

Shaded Fraction [-] Ratio of effective radiation on the array (after shading) to radiation
without shading effects, or 0 when there is no radiation on the array.

4.8.2.3. Hints and Tips


 Obtaining Inputs: If a standard weather file (such as TMY3, EPW, etc.) will be used for the model, all
inputs may be linked from Type15 (Weather Data Generator). If measured radiation values will be read
in through Type 9 (Data Reader), use of Type 16 (Radiation Processor) is highly recommended for
radiation processing. Type 16 will properly interpolate radiation values between data points, as well as
calculate sun angles and any remaining unknown radiation values (see documentation of Type 16 for
more information).
 Defining Slope of Axes Plane And Collector Slope: In both Mode 1 and Mode 2, the model assumes
both the collectors and the field on which the collectors are located (the axes plane) are sloped in the
direction of the array azimuth. Mode 2 assumes the collectors are oriented at a fixed azimuth and track
north-south to minimize the angle of incidence on the collectors. Collectors that track east-west
(varying the azimuth angle) are not supported by this Type.
 Continuity Checking: For continuity, make sure the collector height (or aperture width) x row length
x number of rows of Type 30 matches the total collector area specified in the collector model (Type 1
or other).
 Use of Outputs: Outputs of Type 30a are generally linked to Type 1 or to another flat plate collector
model for modeling the performance of an array of collectors. The exact outputs required for the
collector model will depend on the Type; not all outputs may be used. For Type 1, the standard library
flat-plate solar collector, only the total incident radiation is connected from Type 30 to the respective
input of Type 1; the other radiation inputs required by Type 1 (total horizontal radiation and horizontal
diffuse radiation) are obtained from Type 15 or another source. For Type 539, the TESS Library flat
plate collector model, the shaded beam radiation, shaded sky diffuse radiation, and shaded ground-
reflected diffuse radiation are all connected from Type 30 to the respective inputs of Type 539. Other
collector models may require a different combination of inputs.
 Diffuse Sky Model: This Type performs some internal computations to determine sky view factor and
diffuse radiation incident on non-front rows. The algorithms that it uses assume an isotropic sky. In
order to get consistent results in and out of Type30, the upstream component that processes solar
radiation data (usually Type15) should be set to the isotropic sky model. However, doing so may have
unintended or undesired consequences for other components. If you choose instead to leave the
radiation processing component in an anisotropic sky mode then Type30 will report a small degree of
shading even if the collector rows are separated by a significant distance.

4–449
TRNSYS 18 – Mathematical Reference

4.8.2.4. Nomenclature
Da - distance between tracking axes of single axis tracking collectors
DR - distance between rows of flat plate collectors in a field
fbs - fraction of total array area that is shaded from beam radiation
f'bs - fraction of ground area between rows of collectors that is shaded from beam radiation
(fbs)1 - fraction of area of a single row of collectors that is shaded by an adjacent row
Fgnd - overall view factor from the collector array to the ground in front of the array
Fg-s - overall view factor from the ground between rows of collectors to the sky
Fsky - overall view factor from the collector array to the sky
F'gnd - overall view factor from the collector array to the ground between rows
Hc - height of each collector row
I - total unshaded horizontal radiation per unit area
IbT - unshaded incident beam radiation per unit area
IdT - unshaded incident diffuse radiation per unit area
IT - unshaded total incident radiation per unit area
I'bT - unshaded incident beam radiation per unit area on the field slope on which collectors
are mounted
I'dT - unshaded incident diffuse radiation per unit area on the field of slope F on which
collectors are mounted
(IbT)s - incident beam radiation per unit area including shading effects
(IdT)s - diffuse incident radiation per unit area including shading effects
(IT)s - total incident radiation per unit area including shading effects
NR - number of rows of collectors
P - distance between planes that contain sun and each axis of a single axis tracking
system
Wa - width of collector aperture
WR - width of row of collectors
 - collector surface slope
a - slope of plane containing the tracking axes
F - slope of field on which collector array is situated
 - azimuth of collector surface; angle between the projection of the normal into the
horizontal plane and the local meridian. Zero azimuth facing the equator, west
positive, east negative
a - azimuth angle of the plane containing the tracking axes.
s - solar azimuth; angle between the projection of the line of sight to the sun into the
horizontal plan and the local meridian
g - ground reflectance to the plane
p - angle between a plane containing the sun and an axis and a plane that is
perpendicular containing all the collector axes
z - solar zenith angle

4.8.2.5. Detailed Description


MODE 1
This mode calculates incident radiation on a rectangular field of collectors that shade one another. The
collector arrangement and pertinent dimensions are shown in Figure 4.8.2–1. The field on which the
collectors are located is assumed to be sloped in the direction of the array azimuth.
The incident radiation for this array is:

(𝐼𝑇 )𝑠 = (1 − 𝑓𝑏𝑠 )𝐼𝑏𝑇 + 𝐹𝑠𝑘𝑦 𝐼𝑑𝑇 + 𝑟𝑔 𝐹𝑔𝑛𝑑 𝐼 + 𝑟𝑔 ((1 − 𝑓′𝑏𝑠 )𝐹′𝑔𝑛𝑑 𝐼′𝑏𝑇 + 𝐹𝑔−𝑠 𝐹′𝑔𝑛𝑑 𝐼′𝑑𝑇 ) Eq. 4.8.2-1

4–450
TRNSYS 18 – Mathematical Reference

The first term in Eq. 4.8.2-1 is the shaded incident beam radiation. IbT is the incident beam radiation on an
unshaded surface, while fbs is the fraction of the collector array area that is shaded from direct beam
radiation. The second and third terms in the above equation are the diffuse radiation that strikes the collector
side view Rows of Colle ct ors
surface originating from the sky and the ground in front of the array. I dT and I are the diffuse and total
radiation on a horizontal surface. Fsky and Fgnd are the view factors from the collector to the sky and ground
considering the obstructed view due to adjacent rows of collectors. The ground reflectance is g. The final
term is the incident diffuse radiation resulting from beam and diffuse radiation striking the area between
rows of collectors. I’bT and I’dT are the beam and diffuse radiation incident upon the sloped ground Wa on which

the array is located. F’bs is the fraction of the area between rows that isFshaded from beam radiation. F g-s is
the view factor from the ground between rows to the sky and F’ gnd is the view factor from the collector array
hor izont al DR
to the ground between rows.
t op vie w
side view Rows of Colle ct ors
Sout h

W
R

Wa


F
hor izont al DR

Rows of Colle ct ors


t op vie w
Figure 4.8.2–1: Flat Plate Collectors
Sout h
MODE 2 
Mode 2 determines the effect of shading on the incident beam radiation over surfaces with a fixed azimuth
W
R
that track north-south about a single axis. For the case of parabolic collectors, where the main objective is
to take advantage of the beam radiation, shading can be characterized by the fraction of the collector area
that is blocked by a neighboring collector row in the direction of the sun. Figure 4.8.2–2 shows the
geometrical parameters that are defined for two adjacent surfaces whose slope is set in order to track the
position of the sun. In this figure, Wa is the width of the parabolic collector, Da is the distance between axes,
 is the slope of the collectors and ap is the slope of the plane that contains the collector axes. In order to
maximize beam radiation, it is necessary that
Rows of Colle the sun be in a plane that is perpendicular to the collector
ct ors
aperture and that contain the receiver axes. For a single row of collectors, the fraction of the aperture area
shaded by an adjacent row of collectors neglecting edge effects, is given by:
𝑃
𝑓𝑏𝑠,1 = 𝑚𝑎𝑥 ((1 − ) , 0) Eq. 4.8.2-2
𝑊𝑎

where P is the distance between the collector axes on a projection that is normal to a line from a collecto
axis to the sun. If p is the angle between a plane containing the sun and an axis and a plane that is
perpendicular to the plane which contains the collector axes, P is found from:
𝑃 = 𝐷𝑎 cos 𝜃𝑝 Eq. 4.8.2-3

From geometry, it is possible to derive the following expression to calculate the angle p:
𝜃𝑝 = 𝛽 − 𝛽𝑎𝑝 Eq. 4.8.2-4

4–451
TRNSYS 18 – Mathematical Reference

Figure 4.8.2–2: Shading of incident beam radiation.


The overall fraction of array area that is shaded at any point in time is given in terms of the shaded fraction
for a single row of collectors and the number of rows, NR, as:
𝑁𝑅 − 1
𝑓𝑏𝑠 = 𝑓𝑏𝑠,1 Eq. 4.8.2-5
𝑁𝑅
The incident beam radiation is then:
𝐼𝑏𝑇,𝑠 = (1 − 𝑓𝑏𝑠 )𝐼𝑏𝑇 Eq. 4.8.2-6

where IbT is the incident beam radiation on an unshaded surface.

4–452
TRNSYS 18 – Mathematical Reference

4.8.3. Type 33: Thermodynamic Properties of Wet Air


(Psychrometrics)
This component takes two independent properties of moist air as inputs and returns the remaining moist
air properties as outputs, based on the state point defined by the two given inputs. In most modes, Type33
takes as Input the dry bulb temperature of the air and one of the following additional air properties,
depending on the mode: wet bulb temperature, relative humidity, dew point temperature, humidity ratio, or
enthalpy. It may also take humidity ratio and enthalpy as its two independent properties, or it may take
relative humidity and either enthalpy, absolute humidity ratio, or dew point temperature. Type33 then calls
the MoistAirProperties() kernel utility subroutine (see Manual 07:Programmer’s Guide for additional
information) to calculate humidity ratio, wet bulb temperature, enthalpy, density of the air-water mixture,
density of dry air only, relative humidity (as percentage), dry bulb temperature and dew point temperature.

4.8.3.1. Parameter / Input / Output Reference


PARAMETERS

1 Psychrometrics mode [-] This mode indicates to the general psychrometrics routine which
two properties will be used to calculate the remaining moist air
properties. Modes are preset for each proforma. Do not change
this value.

2 Wet bulb mode [-] 0 = Do not calculate the wet bulb temperature; 1 = Calculate the
wet bulb temperature (if it is not supplied as an input). If the wet
bulb temperature is not required as an output, this parameter
should be set to zero to reduce the required computational
effort.

3 Error mode [-] The error mode indicates the error handling procedure to the
general psychrometrics routine. 1 = Only one warning condition
will be printed throughout the simulation. 2 = Warnings will be
printed at every timestep that warning conditions occur.

INPUTS

If Mode (Parameter 1) = 6 (Proforma 33a, absolute humidity ratio and enthalpy known)
*Note: in this mode, if saturated conditions occur, enthalpy is set to the saturation enthalpy at the given humidity
ratio.

1 Absolute humidity ratio [-] The absolute humidity ratio of the moist air (kg's H2O / kg dry
air).

2 Enthalpy of air [kJ/kg] The enthalpy of the moist air.

If Mode (Parameter 1) = 5 (Proforma 33b, dry bulb and enthalpy known)

1 Dry bulb temperature [C] The dry bulb temperature of the air.

2 Enthalpy of air [kJ/kg] The enthalpy of the moist air.

If Mode (Parameter 1) = 4 (Proforma 33c, dry bulb and humidity ratio known)

1 Dry bulb temperature [C] The dry bulb temperature of the air.

4–453
TRNSYS 18 – Mathematical Reference

2 Absolute humidity ratio [-] The absolute humidity ratio of the moist air (kg's H2O / kg dry
air).

If Mode (Parameter 1) = 3 (Proforma 33d, dry bulb and dew point temperature known)

1 Dry bulb temperature [C] The dry bulb temperature of the air.

2 Dew point temperature [C] The dew point temperature of the air.

If Mode (Parameter 1) = 2 (Proforma 33e, dry bulb and relative humidity known)

1 Dry bulb temperature [C] The dry bulb temperature of the air.

2 Percent relative [%] The percent relative humidity of the moist air.
humidity

If Mode (Parameter 1) = 1 (Proforma 33f, dry bulb and wet bulb known)

1 Dry bulb temperature [C] The dry bulb temperature of the air.

2 Wet bulb temperature [C] The wet bulb temperature of the air.

If Mode (Parameter 1) = 7 (Proforma 33g, absolute humidity ratio and enthalpy known)
*In this mode, if saturated conditions occur, humidity ratio is set to the saturation humidity ratio at the given
enthalpy.

1 Absolute humidity ratio [-] The absolute humidity ratio of the moist air (kg's H2O / kg dry
air).

2 Enthalpy of air [kJ/kg] The enthalpy of the moist air.

If Mode (Parameter 1) = 8 (Proforma 33h, relative humidity and enthalpy known)

1 Percent relative [%] The percent relative humidity of the moist air.
humidity

2 Enthalpy of air [kJ/kg] The enthalpy of the moist air.

If Mode (Parameter 1) = 9 (Proforma 33i, relative humidity and humidity ratio known)

1 Percent relative [%] The percent relative humidity of the moist air.
humidity

2 Absolute humidity ratio [-] The absolute humidity ratio of the moist air (kg's H2O / kg dry
air).

If Mode (Parameter 1) = 10 (Proforma 33j, relative humidity and dew point temperature known)

1 Percent relative [%] The percent relative humidity of the moist air.
humidity

2 Dew point temperature [C] The dew point temperature of the air.

For all modes

4–454
TRNSYS 18 – Mathematical Reference

3 Pressure [atm] The total pressure of the moist air system. This will be
atmospheric pressure for ambient conditions.

OUTPUTS

1 Humidity ratio [-] The absolute humidity ratio of the moist air.

2 Wet bulb temperature [C] The wet bulb temperature of the moist air.

3 Enthalpy [kJ/kg] The enthalpy of the moist air.

4 Density of mixture [kg/m3] The density of the air-water mixture.

5 Density of dry air [kg/m3] The density of the dry air only.

6 Percent relative [%] The percent relative humidity of the moist air.
humidity

7 Dry bulb temperature [C] The dry bulb temperature of the moist air.

8 Dew point temperature [C] The dew point temperature of the moist air.

9 Status [-] A warning flag indicating improper conditions input to this unit
(See Hints and Tips for more information).

10 Atmospheric pressure [atm] Total atmospheric pressure.

4.8.3.2. Simulation Summary Report Contents


This component does not create an entry in the Simulation Summary (*.ssr) report.

4.8.3.3. Hints and Tips


 The model’s first parameter determines which two properties will be provided as Inputs to the model.
 The second parameter determines whether the wet bulb temperature should or should not be
calculated. The calculation of wet bulb temperature requires an iterative process that can be quite time
consuming. If the wet bulb temperature is not needed, the second parameter should be set to 0. Please
note also that in TRNSYS 15.x and below, the second parameter was the atmospheric pressure, not
the wet bulb calculation mode. With the release of TRNSYS version 16 and later atmospheric pressure
was made a time dependent Input to the model.
 The third parameter to Type33 is the “error mode.” If set to 1, only one warning per error condition will
be reported. If set to 2, a warning will be printed at each iteration that an error condition occurs. The
error conditions range from 1 to 14 and are reported to the TRNSYS *lst and *.log files by the
MoistAirProperties() routine. If Type33 reports an error look in the *.log file for associated errors
reported by MoistAirProperties().

4.8.3.4. Detailed Description


Type33 is a shell that calls the TRNSYS kernel utility subroutine MoistAirProperties() to calculate properties
of moist air. For more information about this subroutine, its algorithms and assumptions see the
documentation for MoistAirProperties in the 07-Programmer’s Guide manual.

4–455
TRNSYS 18 – Mathematical Reference

4.8.4. Type 54: Weather Data Generator


This component generates hourly weather data given the monthly average values of solar radiation, dry
bulb temperature, humidity ratio, and wind speed (optional). The data are generated in a manner such that
their associated statistics are approximately equal to the long-term statistics at the specified location. The
purpose of this method is to generate a single year of typical data similar to a Typical Meteorological Year.
The model is based on algorithms developed by Knight et al. [1,2], Graham et al. [3,4], Degelman [5,6], and
Gansler [10-12]. This component allows TRNSYS to be used for any location for which standard monthly
average weather statistics are known. It is important to note, however that many of the correlations used in
the model were developed from temperate climate data. For other climates, e.g., tropical climates, the
generated data are less accurate and the user may wish to make some modifications. For a more detailed
discussion, see reference 1.

4.8.4.1. Parameter / Input / Output Reference


PARAMETERS

1 Weather file units [-] An indicator to the weather generator model of the units
contained in the external file of monthly averages. 1=SI units,
2=English units. SI units must be used if either of the default
monthly average files are used (WDATA.DAT or NREL.DAT).

2 Logical Unit [-] The logical unit through which the external weather data file will
be accessed (if used). Each file that TRNSYS writes to or reads
from must be assigned a unique logical unit in the TRNSYS
input file. This parameter is not used if no external file is used.

3 City number [-] The identification number (listed in the weather data file, if
used) given to the city for which the weather will be generated.
See Detailed Description for city identification numbers. This
parameter is not used if no external file is used.

4 Temperature model [-] The type of temperature model to be used in the generation of
the weather. 1= Stochastic model, 2 = Cosine model. See the
Detailed Description below for more details on the appropriate
choice of temperature model for your simulation.

5 Hourly radiation correction [-] Should the calculated values of solar radiation be
autocorrelated? 1=Yes, 2=No. See the Detailed Description
below for more details on the autocorrelation of radiation
values.

6 Use default seeds? [-] 1= use default random number seeds, 2=use user-supplied
random number seeds.

If Parameter 6 = 2

7 Starting random seed 1 [-] The first random number seed for the starting positions in the
sequences.

8 Starting random seed 2 [-] The second random number seed for the starting positions in
the sequences.

9 Hourly radiation seed 1 [-] The first random number seed for the generation of the hourly
radiation values.

4–456
TRNSYS 18 – Mathematical Reference

10 Hourly radiation seed 2 [-] The second random number seed for the generation of the
hourly radiation values.

11 Hourly temperature seed 1 [-] The first random number seed for the generation of the hourly
dry bulb temperatures.

12 Hourly temperature seed 2 [-] The second random number seed for the generation of the
hourly dry bulb temperatures.

13 Hourly wind speed seed 1 [-] The first random number seed for the generation of the hourly
wind speed data.

14 Hourly wind speed seed 2 [-] The second random number seed for the generation of the
hourly wind speed data.

N = 7 if Parameter 6 = 1, N=15 if Parameter 6 = 2

N– Average windspeed for [m/s] The average windspeed by month for each month of the year,
N+11 each month, January January through December (12 parameters total). Use default
through December values if windspeed data are not available.

N+12 Altitude [m] The altitude of the city for which the weather will be generated.
A default value of 0 (sea level) should be used if no data is
available.

If weather data will not come from an external file

N+13 Latitude [°] The latitude of the location. North of the equator is taken as
positive, south as negative.

N+14 Average daily solar for The amount of solar radiation (total) incident on the horizontal
– each month, January during the average day of the month for each month of the
N+25 through December year, January through December (12 parameters total).

N+26 Average humidity ratio for [-] The average humidity ratio each month of the year, January
– each month, January through December (12 parameters total).
N+37 through December

N+38 Average temperature for [C] The average air temperature each month of the year, January
– each month, January through December (12 parameters total).
N+49 through December

OUTPUTS

1 Month of the year [-] The number corresponding to the month of the year (1 =
January, 12 = December) at the current timestep.

2 Day of the month [day] The number corresponding to the day of the year (1 = January 1,
365 = December 31) at the current timestep.

3 Hour [hr] The hour of the year at the current timestep.

4 Dry bulb temperature [C] The dry bulb air temperature (interpolated at timesteps less than
1 hour).

5 Dew point temperature [C] The dew point temperature of the ambient air (interpolated at
timesteps less than 1 hour).

4–457
TRNSYS 18 – Mathematical Reference

6 Percent relative [%] The relative humidity of the ambient air, expressed as a
humidity percentage (interpolated at timesteps less than 1 hour).

7 Global horizontal [kJ/hr-m2] The global solar radiation on a horizontal surface integrated over
radiation the previous hour. (Not interpolated at timesteps less than one
hour - use radiation processor to interpolate solar radiation)

8 Direct normal radiation [kJ/hr-m2] The direct normal solar radiation integrated over the previous
hour. (Not interpolated at timesteps less than 1 hour - use
radiation processor to interpolate solar radiation)

9 Diffuse radiation [kJ/hr-m2] The diffuse solar radiation integrated over the previous hour.
(Not interpolated at timesteps less than 1 hour - use radiation
processor to interpolate solar radiation)

10 Wind velocity [m/s] The velocity of the wind. (Interpolated at timesteps of less than
one hour)

11 - Not used [-] These outputs are not used.


98

99 Time of last read [hr] The time at which the last values were read from the data file.
This output is to be used strictly with the TYPE 16 radiation
processor.

100 Time of next read [hr] Thetime at which the next values will be read from the data file.
This output is to be strictly used with the radiation processor.

101 Month of the year at [-] The month of the year at the next timestep.
next timestep

102 Day of the month at [day] The day of the month corresponding to the next timestep (not
next timestep interpolated at timesteps less than 1 hour).

103 Hour at next timestep [hr] The hour of the year at the next timestep.

104 Dry bulb temperature [C] The dry bulb (ambient) temperature at the next timestep.
at next timestep

105 Dew point temperature [C] The dew point temperature of the ambient air at the next
at next timestep timestep (interpolated at timesteps of less than 1 hour).

106 Percent relative [%] The percent relative humidity of the ambient air at the next
humidity at next timestep (interpolated at timesteps of less than 1 hour).
timestep

107 Global horizontal [kJ/hr-m2] Global horizontal surface radiation at the next timestep. Used
radiation at next with the smoothing option in he radiation processor.
timestep

108 Direct normal radiation [kJ/hr-m2] Direct normal solar radiation at the next timestep. Used with the
at next timestep radiation smoothing option in the radiation processor
component.

109 Diffuse radiation at [kJ/hr-m2] The diffuse solar radiation at the next timestep. This output is
next timestep typically used with the radiation smoothing option in the radiation
processor component.

4–458
TRNSYS 18 – Mathematical Reference

110 Wind velocity at next [m/s] The wind velocity at the next timestep.
timestep

4.8.4.2. Simulation Summary Report Contents


TEXT FIELDS

City Weather File [-] Weather file number (if using a weather file)

INTEGRATED VALUE FIELDS

Global Horizontal [kJ/m2] Output 7


Radiation

Direct Normal [kJ/m2] Output 8


Radiation

Diffuse Radiation [kJ/m2] Output 9

MINIMUM/MAXIMUM VALUE FIELDS

Dry Bulb Air [C] Output 4


Temperature

Dew Point Air [C] Output 5


Temperature

Wind Velocity [m/s] Output 10

4.8.4.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.8.4.4. Nomenclature
kt [-] hourly clearness index (total radiation over extraterrestrial global radiation for an hour)
Kt [-] daily clearness index (total radiation over extraterrestrial global radiation for a day)
Kt [-] monthly clearness index (total radiation over extraterrestrial global radiation for a month)
(or Kt(bar))

4.8.4.5. Detailed Description


DATA BASE
Type54 requires an external data file containing the monthly average radiation, humidity, and temperature.
This data file, as described in Table 4.8.4–1, can contain data for many different locations.
The user can develop his or her own data file or use the example weather data file called "Type54-
WeatherGenerator.dat", located in "%TRNSYS18%\Examples\Data Files". Alternatively the user can add
data for specific locations to the end of the existing file. The file contains monthly average weather data for
329 locations. The data are taken from the publication Input Data for Solar Systems, by Cinquemani,

4–459
TRNSYS 18 – Mathematical Reference

Owenby, and Baldwin, published by the U.S. National Oceanic and Atmospheric Administration, Asheville,
NC. Data for 96 Canadian locations is also included.
Table 4.8.4–1: Weather Data File Format
line 1: NLOC
line 2: LOCATION 1 LATITUDE
line 3: I1 I2 I3 . . . I12
line 4: w1*10000 w2*10000 w3*10000 . . . w12*10000
line 5: TEMP1 TEMP2 TEMP3 . . . TEMP12
line 6: LOCATION 2 LATITUDE
line 7: I1 I2 I3 . . . I12
ETC.
where:
NLOC the number of locations in the data base
LOCATION is the name of the location, maximum of 32 characters
LATITUDE between -90.0 and 90.0 , number must start in column 33
I1-I12 Monthly average daily global horizontal solar radiation (kJ/m2)
w1-w12 Monthly average humidity ratio times 10,000 (kg water/kg air)
TEMP1-TEMP12 is the monthly average temperature (C)

From one to as many locations as desired can be entered into the data file. If locations are added to the
end of wdata.dat; the first line, which contains NLOC, must be changed.
Additionally, the National Renewable Energy Lab has created a new set of monthly average weather data
for the same 239 US sites listed in wdata.dat. The National Renewable Energy Laboratory (NREL) is in the
process of creating new TMY data. The new TMY data is yet to be released however they have already
released new monthly average data in the National Solar Radiation Data Base (NSRDB). This data was
first included with TRNSYS 14.1 in a file called NREL.DAT. These data should be more accurate and more
current than the data in wdata.dat. It is based on 30 years during the period 1961 through 1990. We suggest
that you use the new data from NREL.DAT.

ALGORITHMS
The following is a brief description of the weather data generation model; a more detailed description can
be found in Knight et al. [1,2].
Radiation is often described in a dimensionless form called the clearness index, which is simply the ratio of
the total radiation on a horizontal surface to the extraterrestrial global solar radiation on a horizontal surface
at the same time. The instantaneous values can be integrated over any time period; commonly used
quantities are hourly (kt)), daily (Kt)), and monthly (Kt(bar)) clearness indices.
Kt values for each day of the month are calculated in TYPE 54 from the daily clearness index cumulative
distribution function. A correlation is used to approximate the distribution as a function of K t(bar). To
determine the order in which the days should occur, a "sequence" is used. Specifically, the integers 1 to
31 are assigned to the 31 Kt values obtained from the distribution, with 1 corresponding to the smallest K t
value and 31 to the largest. The "sequence" consists of the integers 1 to 31, ordered such that when the Kt
values corresponding to the integers are placed in that order, the approximate lag one daily K t
autocorrelation is reproduced. A similar process is used for the other weather variables, and likewise, there
are "sequences" for the other variables [5,6].
The long-term mean kt value for each hour (k tm) is estimated from a correlation. The deviations from this
long-term average value are generated from a first order autoregressive model (which introduces some
randomness); the autoregressive model parameter is a function of Kt [1, 2, 3, 4]. Diffuse radiation values
are computed from the diffuse fraction correlation of Erbs et al. [7].

4–460
TRNSYS 18 – Mathematical Reference

When the hourly radiation values are summed, the daily total of the generated radiation is not necessarily
equal to the original 'target' daily radiation value. Over a month, these discrepancies tend to average out;
as an alternative, TYPE 54 can scale the hourly values (by multiplying them by the ratio of the 'target' K t
value to the generated Kt value) such that the 'target' Kt values are matched exactly. The effect of this
correction on the diurnal variation is insignificant, however, the hourly lag one autocorrelation is affected.
For systems sensitive to the hourly autocorrelation of radiation, no correction to the radiation values should
be made, i.e., PAR. 5 = 2. For systems in which the daily autocorrelation has more of an effect (most
systems), the radiation correction should be made, i.e., PAR. 5 = 1.
There are two models for dry bulb temperature; the first is a stochastic model (PAR. 4 = 1) in which the
hourly values are determined from a second order autoregressive model (some randomness is introduced);
the second is a deterministic hourly model (PAR. 4 = 2).
In the stochastic hourly temperature model (PAR. 4 = 1), 24 hourly monthly-average dry bulb temperature
values are computed, and the hourly deviations from these average values are then calculated with a
second order autoregressive (AR2) model. The coefficients in the AR2 model have constant values
determined from data for Albuquerque, NM, Madison, WI, and Miami, FL. To ensure the correct monthly-
average dry bulb temperature value, the entire month's hourly values are generated on the first hour of the
month. A monthly-average value is computed from the hourly values and compared to the Input monthly-
average value; the hourly values are then adjusted by adding the difference to each hourly temperature
[1,2].
The deterministic hourly dry bulb temperature model (PAR. 4 = 2) is similar to the radiation model. Daily
average values and daily maximum values are obtained from normal distributions where the means and
standard deviations are either Input or estimated from correlations [8]; the daily average and daily maximum
dry bulb temperatures are then each ordered with a "sequence". The daily average temperature value is
assumed to be both the mean and the median value; the time at which the minimum and maximum
temperatures occur are taken to be sunrise and 3 p.m., respectively. Hourly values are calculated by a
cosine interpolation between the daily minimums and maximums [5, 6].
The stochastic model (PAR. 4 = 1) better represents the hourly autocorrelation structure of the dry bulb
temperatures, however, it does not always generate temperature data with the correct daily autocorrelation
and daily distribution. The deterministic model (PAR. 4 = 2) consistently reproduces the daily structure but
neglects the variation and autocorrelation of the hourly sequence. Studies by Hollands et al. [9] indicate
that for some systems, the error in solar fraction when neglecting the random component of the hourly
temperatures is very small (on the order of 1%). The user should decide whether the hourly or daily structure
would have a greater effect upon the simulation and select the appropriate model; often the deterministic
model (PAR. 4 = 2) will be more appropriate.
The relative humidity model is actually a dewpoint temperature model. The Input humidity ratios are
converted to monthly-average dewpoint temperatures. Daily-average dewpoint temperatures are obtained
from a normal distribution (with the mean equal to the monthly-average dewpoint temperature and the
standard deviation equal to the standard deviation of the daily maximum dry bulb temperature) and ordered
according to a "sequence". An algorithm is used to determine the dewpoint depressions at the hours
corresponding to the maximum and minimum dry bulb temperature each day. Hourly dewpoint depressions
are computed by linearly interpolating between the dewpoint depressions at the minimum and maximum
dry bulb temperatures. Dewpoint temperatures and relative humidities are calculated from the dewpoint
depressions [8, 5, 6].
The monthly-average windspeed is assumed equal to 9 mph (4 m/s) unless other values are Input by the
user. Daily values are computed from a normal distribution with the mean equal to the monthly-average
value and the standard deviation equal to 0.31 times the mean; the daily values are then ordered by a
"sequence". Hourly values are randomly selected from a normal distribution with the mean equal to the
daily-average value and the standard deviation equal to 0.35 times the mean [5, 6].
Cross-correlations are not directly reproduced by Type54; this is perhaps the most serious shortcoming,
and further research in this area is necessary. For comparison of the generated data with 22 years of
recorded data and Typical Meteorological Year data, see Knight et al. [1, 2].
Some features of Type54 are listed here below:

4–461
TRNSYS 18 – Mathematical Reference

 Users may start the simulation at any hour of the year.


 The weather variables for a specified day remain unchanged as the simulation start time is changed.
 New algorithms eliminate zero radiation hours during the day and provide better match of long term
clearness indices.
With the release of TRNSYS 16, other features were added to Type54 in order to increase its flexibility,
especially when used in a TRNSED simulation.
 Location latitude may now be entered as a PARAMETER to the model (following the TRNSYS 15
PARAMETERS). If provided, this value supercedes that read from the data file.
Monthly average values of integrated daily solar radiation values, monthly average humidity ratios, and
monthly average dry bulb temperatures may be entered as PARAMETERS to the model.

4.8.4.6. References
1. Knight, K.M., Klein, S.A., and Duffie, J.A., "A Methodology for the Synthesis of Hourly Weather Data,"
Solar Energy, (1991).
2. Knight , K.M., "Development and Validation of a Weather Data Generation Model," M.S. Thesis, 1988,
University of Wisconsin - Madison, Solar Energy Laboratory.
3. Graham, V.A., "Stochastic Synthesis of the Solar Atmospheric Transmittance," Ph.D. Thesis in
Mechanical Engineering, University of Waterloo (1985).
4. Graham, V.A., Hollands, K.G.T., and Unny, T.E., "Stochastic Variation of Hourly Solar Radiation Over
the Day," Advances in Solar Energy Technology, Vol. 4, ISES Proceedings, Hamburg, Germany,
September 13-18, (1987).
5. Degelman , L.O., "A Weather Simulation Model for Building Energy Analysis," ASHRAE Transactions,
Symposium on Weather Data, Seattle, WA, Annual Meeting, June 1976, pp. 435-447.
6. Degelman, L.O., "Monte Carlo Simulation of Solar Radiation and Dry Bulb Temperatures for Air
Conditioning Purposes," Report No. 70-9, sponsored by the National Science Foundation under Grant
No. GK-2204, Department of Architectural Engineering, The Pennsylvania State University, September,
(1970).
7. Erbs, D.G., Klein, S.A., and Duffie, J.A., "Estimation of the Diffuse Radiation Fraction of Hourly, Daily,
and Monthly-Average Global Radiation," Solar Energy, Vol. 28, pp. 293-302, (1982).
8. Erbs, D.G., "Models and Applications for Weather Statistics Related to Building Heating and Cooling
Loads," Ph.D. Thesis, University of Wisconsin-Madison, (1984).
9. Hollands, K.G.T., D'Andrea, L.T., and Morrison, I.D., "Effect of Random Fluctuations in Ambient Air
Temperature on Solar System Performance," Solar Energy, Vol. 42, pp. 335-338, (1989).
10. Gansler, R.A., “Assessment of Generated Meterological Data for Use in Solar Energy Simulations”, M.S.
Thesis, 1993, University of Wisconsin - Madison, Solar Energy Laboratory
11. Gansler, R.A., Klein S.A., “Assessment of the Accuracy of Generated Meteorological Data for Use in
Solar Energy Simulation Studies”, Proceedings of the 1993 ASME International Solar Energy
Conference, April 1993, Washington D.C., pp. 59-66
12. Gansler, R.A., Klein S. A., Beckman W. A., “ Investigation of Minute Solar Radiation Data”, Proceedings
of the 1994 Annual Conference of the American Solar Energy Society, June 1994, San Jose CA, pp.
344-348

4–462
TRNSYS 18 – Mathematical Reference

4.8.5. Type 58: Thermodynamic Properties of Refrigerants


(including steam)
This component takes as Input two unique independent state properties of a refrigerant and calculates the
remaining state properties. It calls the Fluid_Properties() subroutine and the Steam_Properties() subroutine
(see Volume 07: Programmer’s Guide) to calculate the thermodynamic properties.
The available refrigerants for this routine are as follows: R-11, R-12, R-13, R-14, R-22, R-114A, R-134A,
R-500, R-502, ammonia (R-717) and steam (R-718).

4.8.5.1. Parameter / Input / Output Reference


PARAMETERS

The three parameters are cycled as a group so as to be able to provide properties for multiple fluids or for multiple
states without the use of multiple instances of the component

1 Refrigerant for state [-] The identification number of the refrigerant for the specified
state. Generally, this is the number following the R in the
refrigerant’s numerical designation (e.g. enter 11 as parameter 1
for R-11). Recognized refrigerants include R-11, R-12, R-13, R-
14, R-22, R-114,R-134a(enter 134 as parameter 1), R-500, R-
502, Ammonia (enter 717 as parameter 1), and Steam (enter
718 as parameter 1). These parameters cycle with the number
of refrigerant state points specified.

2 1st property type for [-] The number of the first property corresponding to the specified
state state. 1 = Input #1 is a temperature (C); 2 = Input #1 is a
pressure (kPa); 3 = Input #1 is an enthalpy (kJ/kg); 4 = Input #1
is an entropy (kJ/kg.K); 5 = Input #1 is a quality (0 to 1); 6 =
Input #1 is a specific volume (m3/kg); 7 = Input #1 is an internal
energy (kJ/kg). Two unique properties (ie temperature and
enthalpy) must be supplied in order to calculate the state of the
fluid. These parameters cycle with the number of refrigerant
state points specified.

3 2nd property type for [-] The number of the second property corresponding to the
state specified state. 1 = Input #2 is a temperature (C); 2 = Input #2 is
a pressure (kPa); 3 = Input #2 is an enthalpy (kJ/kg); 4 = Input
#2 is an entropy (kJ/kg.K); 5 = Input #2 is a quality (0 to 1); 6 =
Input #2 is a specific volume (m3/kg); 7 = Input #2 is an internal
energy (kJ/kg). Two unique properties (ie temperature and
enthalpy) must be supplied in order to calculate the state of the
fluid. These parameters cycle with the number of refrigerant
state points specified.

INPUTS

The two inputs are cycled as a group so as to be able to provide properties for multiple fluids or for multiple states
without the use of multiple instances of the component

1 1st property for state [Varies – see The value of the first property required to calculate the remaining
Parameter 2] state properties of the fluid. For example, for the first fluid state
specified, if parameter 2 is set to 1 (temperature), then this input
must be the temperature of the fluid. These inputs cycle with the
number of refrigerant states specified.

4–463
TRNSYS 18 – Mathematical Reference

2 2nd property for state [Varies – see The value of the second property required to calculate the
Parameter 3] remaining state properties of the fluid. For example, for the first
fluid state specified, if parameter 3 is set to 3 (enthalpy) then this
input must be the enthalpy of the fluid. These inputs cycle with
the number of refrigerant states specified.

OUTPUTS

The seven outputs are cycled as a group so as to be able to provide properties for multiple fluids or for multiple
states without the use of multiple instances of the component

1 Temperature [C] The temperature of the fluid. These outputs cycle with the
number of refrigerant state points specified.

2 Pressure [kPa] The pressure of the fluid. These outputs cycle with the number
of refrigerant state points specified.

3 Enthalpy [kJ/kg] The enthalpy of the fluid. These outputs cycle with the number of
refrigerant state points specified.

4 Entropy [kJ/kg-K] The entropy of the fluid. These outputs cycle with the number of
refrigerant state points specified.

5 Quality [-] The quality of the fluid. These outputs cycle with the number of
refrigerant state points specified.

6 Specific volume [m3/kg] The specific volume of the fluid. These outputs cycle with the
number of refrigerant state points specified.

7 Internal energy [kJ/kg] The internal energy of the fluid. These outputs cycle with the
number of refrigerant state points specified.

4.8.5.2. Simulation Summary Report Contents


MINIMUM/MAXIMUM VALUE FIELDS

Temperature of [C] Output (7*N-6), where N is refrigerant state point N.


[Refrigerant for state N]

Pressure of [kPa] Output (7*N-5), where N is refrigerant state point N.


[Refrigerant for state N]

Enthalpy of [Refrigerant [kJ/kg] Output (7*N-4), where N is refrigerant state point N.


for state N]

Entropy of [Refrigerant [kJ/kg-K] Output (7*N-3), where N is refrigerant state point N.


for state N]

Quality of [Refrigerant [-] Output (7*N-2), where N is refrigerant state point N.


for state N]

Specific volume of [m3/kg] Output (7*N-1), where N is refrigerant state point N.


[Refrigerant for state N]

4–464
TRNSYS 18 – Mathematical Reference

Internal energy of [kJ/kg] Output (7*N), where N is refrigerant state point N.


[Refrigerant for state N]

4.8.5.3. Hints and Tips


 Maximum Allowable Number of State Points: A maximum of 10 states per unit can be calculated
by Type58.
 Keeping Parameters, Outputs Consistent with Inputs: The required number of parameters will
always equal to the number of inputs supplied multiplied by three. The number of outputs will always
be seven times the number of inputs.
 Special Considerations for Saturated Fluids: Be careful when specifying state properties of
saturated refrigerants; temperature and pressure are not independent properties in the saturated
region!
 Subcooled Properties: Subcooled properties are not calculated by the Type58 routine. If
subcooled propertied are supplied, saturated liquid values will be computed and returned by the
Type58 routine.
 Reference States: The reference state for ammonia and R134A is: enthalpy = 0 kJ/kg at -40C.
The reference state for all other fluids is: enthalpy = 0 kJ/kg at 0°C.

4.8.5.4. Nomenclature
Please see the documentation for the Fluid_Properties and Steam_Properties utility subroutines in the 07-
Programmer’s Guide manual.

4.8.5.5. Detailed Description


Type58 is a shell that calls the TRNSYS kernel utility subroutines Fluid_Properties() and
Steam_Properties() to calculate properties. For more information about this subroutine, its algorithms and
assumptions see the documentation for Fluid_Properties() and Steam_Properties() in the 07-Programmer’s
Guide manual.

4–465
TRNSYS 18 – Mathematical Reference

4.8.6. Type 59: General Lumped Capacitance


Type 59 represents the dynamic thermal behavior of a body using a lumped capacitance assumption. The
assumption is that there is no appreciable temperature gradient through the material of the body (even
during a temperature change) and that its surface temperature and core temperature are essentially the
same. As a result the model assumes that the behavior of the body’s temperature can be approximated by
a first order differential equation.

4.8.6.1. Parameter / Input / Output Reference


PARAMETERS

1 Mode [-] This is a placeholder for future development on this Type. Do


not change this parameter.

2 Density [kg/m3] The density of the object modeled.

3 Volume [m3] The volume of the object modeled.

4 Specific heat [kJ/kg-K] The specific heat of the object modeled.

5 Surface area [m2] The surface area of the object modeled.

6 Initial temperature [C] The temperature of the object modeled at the beginning of the
simulation.

INPUTS

1 Temperature of the [C] The temperature of the surroundings of the object modeled.
surroundings Assume the object is fully surrounded by fluid (air or liquid) at
this temperature.

2 Energy input [kJ/hr] Energy gained to (or lost from) the object by means other than
thermal losses to the surrounding fluid (such as radiation
exchange, internal energy generation, and so forth). Positive
values are gains to the object, negative values are losses from
the object. Set this input to zero if the object has no energy input
other than thermal losses to (or gains from) the surrounding
fluid.

3 Heat transfer [kJ/hr-m2-K] The overall heat transfer coefficient between the surface of the
coefficient object and the surrounding fluid. Note that, in order to prevent
division by zero, this value cannot be zero (small values very
close to zero are allowed).

OUTPUTS

1 Temperature [C] The temperature of the lumped capacitance object.

2 Heat transfer to [kJ/hr] The average rate of heat transfer over the timestep between the
surroundings lumped capacitance object and the surrounding fluid. Positive
values indicate transfer from the object to the surrounding fluid,
while negative values indicate transfer from the surrounding fluid
to the object.

4–466
TRNSYS 18 – Mathematical Reference

4.8.6.2. Simulation Summary Report Contents


VALUE FIELDS

Density [kg/m3] The density of the object modeled.

Volume [m3] The volume of the object modeled.

Specific Heat [kJ/kg-K] The specific heat of the object modeled.

Surface Area [m2] The surface area of the object modeled.

INTEGRATED VALUE FIELDS

Energy Input [kJ/hr] Input 2

Heat Transfer to [kJ/hr] Output 2


Surroundings

MINIMUM/MAXIMUM VALUE FIELDS

Temperature of Object [C] Output 1

4.8.6.3. Hints and Tips


 Obtaining Inputs: Determining the external convection coefficient of the object (Input 3) is left as an
exercise for the user. In some cases Type 80 may be suitable for obtaining a convection coefficient
for use with this lumped capacitance model.
 Examples: Type 59 may be used to determine the temperature and heat transfer rates of any object
for which lumped capacitance modeling is valid (i.e. any object for which the temperature of the solid
may be considered spatially uniform throughout the transient process). Some examples include the
following:
 Heating of an object in an oven (and subsequent cooling, once the oven is off)
 Rapid heating or cooling of objects in water or oil baths.
 Thermal energy storage systems, such as packed beds or slabs.
 Batch heating processes in chemical and pharmaceutical operations.
 Electronic devices can often be modeled as isothermal objects with internal heat generation and
an external convection resistance.

4.8.6.4. Nomenclature
 [kg/m3] density of object
V [m3] volume of the object
A [m2] surface area of the object
C [kJ/kg-K] specific heat of the object
𝑇∞ [C] temperature of the surrounding fluid
h [kJ/hr-m2-K] external convection coefficient of the object
𝐸̇𝑖𝑛 [kJ/hr] thermal energy generation and/or radiation gains of the object
T [C] temperature of the object
t [hr] time

4–467
TRNSYS 18 – Mathematical Reference

4.8.6.5. Detailed Description


Type 59 solves the ordinary differential equation that represents the thermal behaviour of a body whose
temperature is assumed to be uniform, given by:
𝑑𝑇
𝜌𝐶𝑉 = 𝐸̇𝑖𝑛 − ℎ𝐴(𝑇 − 𝑇∞ ) Eq. 4.8.6-1
𝑑𝑡

where  is the density of the body with volume V, area A and specific heat C. The energy balance
represented this equation takes into account an energy input and convective heat transfer to the
surroundings, at a temperature 𝑇∞ with a heat transfer coefficient h. The energy input may be used to
represent radiation on the surface or thermal energy generation within the body. The solution of the
differential equation uses the routine SolveDiffEq().

4.8.6.6. References
[1] Incropera, F.P., and DeWitt, D.P., “Fundamentals of Heat and Mass Transfer”. John Wiley and Sons,
5th ed., 2002.

4–468
TRNSYS 18 – Mathematical Reference

4.8.7. Type 64: Simple Horizon Shading Mask


Type64 is a special case of Type67 in which all of the defined orientations use the same information of
angular heights of obstructions. It reads a data file containing the angular heights of obstructions seen from
a location and outputs numbers that describe the time dependent shading for all defined orientations.
Please refer to to Section 4.8.8 for a description of the mathematics that underlies both this component and
Type67.

4.8.7.1. Parameter / Input / Output Reference


PARAMETERS

1 Logical unit for data file [-] The integer that is assigned to the file containing the mask data.

2 Number of openings in [-] The total number of openings for which incident radiation inputs
file have been provided.

3 Number of surface [-] The number of surface angles for which obstruction heights are
angles provided in the external data file.

INPUTS

1 Solar azimuth angle [degrees] The solar azimuth angle is the angle between the local meridian
and the projection of the line of sight of the sun onto the
horizontal plane. The reference is as follows:

2 Solar zenith angle [degrees] The zenith angle is the angle between the vertical and the line of
sight of the sun.

3 Total radiation on [kJ/hr.m2] The total solar radiation (beam+diffuse) incident on a horizontal
horizontal surface.

4 Diffuse radiation on [kJ/hr.m2] The amount of diffuse radiation incident on a horizontal surface
horizontal

The next four inputs are cycled, once for each opening in the data file.

5 Beam radiation for [kJ/hr.m2] Beam (or direct) radiation corresponding to the orientation of the
opening opening.

6 Diffuse radiation for [kJ/hr.m2] Diffuse radiation corresponding to the orientation of the opening.
opening

The angle formed by the horizontal plane and the plane of the
7 Slope of opening degrees
wall containing the opening.

The direction that the opening faces. This follows the standard
8 Azimuth of opening degrees convention (0: towards the equator, 180: away from the equator,
-90: east, 90: west)

OUTPUTS

1 Solar altitude angle [degrees] Angular height of the direct line between the opening's center
and the sun versus the horizontal.

4–469
TRNSYS 18 – Mathematical Reference

The remaining outputs are cycled based on the number of openings in the data file.

2 Fraction of beam [-] Flag = 1 if beam radiation is visisble for this opening, otherwise
visible for surf. = 0.

3 Shaded beam rad. for [kJ/hr.m2] Beam radiation for this surface, taking shading into account.
surf.

4 Fraction of diffuse [-] Number between 0 and 1 which gives the fraction of diffuse
visible for surf. radiation visible from the opening. 0 indicates no diffuse
radiation is visible and 1 indicates that all the shading has no
influence (i.e., all the diffuse radiation normally visible by the
window is indeed visible).

5 Shaded diffuse rad. on [kJ/hr.m2] Diffuse radiation for this surface, taking shading into account.
surf.

6 Shaded total rad. for [kJ/hr.m2] Total radiation for this opening, taking shading into account.
surf.

7 Fraction of beam [-] Flag = 1 if beam radiation is visisble for this opening, otherwise
visible on horiz. for = 0.
mask

8 Shaded beam rad. on [kJ/hr.m2] Beam radiation on the horizontal taking shading by this
horiz. for mask opening's mask into account.

9 Fraction of diffuse [-] Number between 0 and 1 which gives the fraction of diffuse
visible on horiz. for radiation visible from the horizontal given this opening's mask. 0
mask indicates no diffuse radiation is visible and 1 indicates that all the
shading has no influence. (i.e., all the diffuse radiation normally
visible by the window is indeed visible).

10 Shaded diffuse rad. on [kJ/hr.m2] Diffuse radiation on the horizontal taking shading by this
horiz. for mask opening's mask into account.

11 Shaded total rad. on [kJ/hr.m2] Total radiation on the horizontal taking shading by this opening's
horiz. for mask mask into account.

4.8.7.2. Simulation Summary Report Contents


INTEGRATED VALUE FIELDS

The two integrated value report variables are cycled, once for each opening.

Shaded beam [kJ/h.m2] Output 3


radiation

Shaded diffuse [kJ/h.m2] Output 5


radiation

MINIMUM/MAXIMUM VALUE FIELDS

The two min/max report variables are cycled, once for each opening.

4–470
TRNSYS 18 – Mathematical Reference

Fraction of beam [0..1] Output 2


visible on opening

Fraction of diffuse [0..1] Output 4


visible on opening

4.8.7.3. Hints and Tips


 Type64 reads a file containing the angular heights of obstructions that shade openings. Two types of
angle are needed. Surface angles (alpha) are measured in the same coordinates as the TRNSYS
standard for solar angles. Thus in the Northern Hemisphere South = 0, North = -180, East = -90 and
West = 90 (in the Southern hemisphere, South. Obstruction anglular heights (beta) are given for each
surface angle. The diagram in Figure 4.8.8–1 may help clarify.
 The maximum line length is set by the variable maxFileWidth in the TrnsysConstants.f90 routine.
Longer lines will be truncated with unpredictable results
 The azimuth angles (alpha) for which obstruction angles are given are absolute angles. They are NOT
specified relative to the opening's azimuth.
 Type64 takes two inputs which give the angle of the sun and returns two outputs for each opening in
the file.
 The first ouput is the fraction of diffuse radation that is visible from the opening.
 The second output for each opening is a flag which has a value of 1 if the beam radiation is visible
from the opening and 0 if it is not.

4.8.7.4. Detailed Description


Type64 reads the information of the angular heights () of obstructions stored in a data file, and uses it for
calculating the shading on all of the defined orientations. This is the fundamental difference with Type67,
which requires individual angular heights for each of the orientations. Therefore, the data file for Type64
does not contain information about the orientation of the openings.
The Type makes use of a call to the TRNSYS Data Reading subroutine and therefore there are certain
restrictions placed on the Type. The maximum number of characters on a single line that can be read by
TRNSYS in either the Input file or an external file is set in the TrnsysConstants.f90 file located in the
TRNSYS Source Code Kernel directory. The default line length is 1000 characters. Modification of this
value necessitates that the TRNDll.dll file be recompiled and relinked.
A few notes on file format may help avoid problems:
 The surface angles for which angular obstruction heights () are provided correspond to absolute
azimuths.
 Surface angles in the data file MUST cover the entire range of possible surface angles. In other words,
the first surface angle should always be –180. Surface angles must also have an equal step size
between them; it is not possible to add more precision to part of the surface angle range.
The file format should be as follows:
Alpha1 Alpha2 alpha3 … AlphaN (equally spaced, must cover whole range)
 for OPEN_ID1 at  = Alpha1 (Alpha 1 is ALWAYS -180)
 for OPEN_ID1 at  = Alpha2

 for OPEN_ID1 at  = AlphaN (AlphaN is ALWAYS 180-step where step is the
 for OPEN_ID2 at  = Alpha1 increment used between Alpha values)
 for OPEN_ID2 at  = Alpha2

 for OPEN_ID2 at  = AlphaN

4–471
TRNSYS 18 – Mathematical Reference


 for OPEN_IDn at  = Alpha1
 for OPEN_IDn at  = Alpha2

 for OPEN_IDn at  = AlphaN

EXAMPLE
See the files in \%Trnsys18%\Examples\Data Files\Type64*.* for a data file example.

-180.0 -157.5 -135.0 … -22.5 0.0 22.5 … 112.5 135.0 157.5 ! View angles - ALWAYS (-180:step:180-step)
10.000 ! Obstruction height for opening 1, view angle 1 (i.e. between -180 and -157.5)
30.000 ! Obstruction height for opening 1, view angle 2 (i.e. between -157.5 and -135 )
20.000 ! Obstruction height for opening 1, view angle 3 (i.e. between -135 and -112.5)

50.000 ! Obstruction height for opening 1, view angle 15 (i.e. between 135 and 157.5)
10.000 ! Obstruction height for opening 1, view angle 16 (i.e. between 157.5 and 180 )
10.000 ! Obstruction height for opening 2, view angle 1 (i.e. between -180 and -157.5)
60.000 ! Obstruction height for opening 2, view angle 2 (i.e. between -157.5 and -135 )

30.000 ! Obstruction height for opening 2, view angle 15 (i.e. between 135 and 157.5)
20.000 ! Obstruction height for opening 2, view angle 16 (i.e. between 157.5 and 180 )

4–472
TRNSYS 18 – Mathematical Reference

4.8.8. Type 67: Detailed Horizon Shading Mask


Type67 reads a data file containing the angular heights of obstructions seen from an arbitrary opening and
outputs numbers that describe the time dependent shading of the opening.
Among the outputs is a 0 or a 1 corresponding to whether beam radiation is blocked or visible and a number
between 0 and 1 which gives the fraction of diffuse radiation visible from the opening. A 0 indicates that no
diffuse radiation is visible and a 1 indicates that all the diffuse radiation normally visible by the window is
indeed visible.
The beam radiation calculation is made simply by deciding whether the sun is obstructed by an object at
any given time. The diffuse fraction calculation is made by integrating the shading effects seen by the
window and dividing by the view from the opening were there no shading objects present. With these
dimensionless numbers, the radiation normally incident on the opening can be adjusted to account for
shading.
Type67 also takes unshaded radiation values and internally multiplies these values by the calculated
shading factors, outputting not only the shading factors described above but also the shaded radiation
values.
For each opening, Type67 calculates the shaded beam and diffuse radiation on a horizontal surface
affected by the corresponding shading. Having these values on a horizontal surface makes it easier to
calculate the shading effect of external objects (Type67) and wingwalls and overhangs (Type34).

4.8.8.1. Parameter / Input / Output Reference


PARAMETERS

1 Logical unit for data file [-] The integer that is assigned to the file containing the mask data.

2 Number of openings in [-] The total number of openings for which incident radiation inputs
file have been provided.

3 Number of surface [-] The number of surface angles for which obstruction heights are
angles provided in the external data file.

INPUTS

1 Solar azimuth angle [degrees] The solar azimuth angle is the angle between the local meridian
and the projection of the line of sight of the sun onto the
horizontal plane. The reference is as follows:

2 Solar zenith angle [degrees] The zenith angle is the angle between the vertical and the line of
sight of the sun.

3 Total radiation on [kJ/hr.m2] The total solar radiation (beam+diffuse) incident on a horizontal
horizontal surface.

4 Diffuse radiation on [kJ/hr.m2] The amount of diffuse radiation incident on a horizontal surface
horizontal

The next two inputs are cycled, once for each opening in the data file.

5 Beam radiation for [kJ/hr.m2] Beam (or direct) radiation corresponding to the orientation of the
opening opening.

4–473
TRNSYS 18 – Mathematical Reference

6 Diffuse radiation for [kJ/hr.m2] Diffuse radiation corresponding to the orientation of the opening.
opening

OUTPUTS

1 Solar altitude angle [degrees] Angular height of the direct line between the opening's center
and the sun versus the horizontal.

The remaining outputs are cycled based on the number of openings in the data file.

2 Fraction of beam [-] Flag = 1 if beam radiation is visisble for this opening, otherwise
visible for surf. = 0.

3 Shaded beam rad. for [kJ/hr.m2] Beam radiation for this surface, taking shading into account.
surf.

4 Fraction of diffuse [-] Number between 0 and 1 which gives the fraction of diffuse
visible for surf. radiation visible from the opening. 0 indicates no diffuse
radiation is visible and 1 indicates that all the shading has no
influence (i.e., all the diffuse radiation normally visible by the
window is indeed visible).

5 Shaded diffuse rad. on [kJ/hr.m2] Diffuse radiation for this surface, taking shading into account.
surf.

6 Shaded total rad. for [kJ/hr.m2] Total radiation for this opening, taking shading into account.
surf.

7 Fraction of beam [-] Flag = 1 if beam radiation is visisble for this opening, otherwise
visible on horiz. for = 0.
mask

8 Shaded beam rad. on [kJ/hr.m2] Beam radiation on the horizontal taking shading by this
horiz. for mask opening's mask into account.

9 Fraction of diffuse [-] Number between 0 and 1 which gives the fraction of diffuse
visible on horiz. for radiation visible from the horizontal given this opening's mask. 0
mask indicates no diffuse radiation is visible and 1 indicates that all the
shading has no influence. (i.e., all the diffuse radiation normally
visible by the window is indeed visible).

10 Shaded diffuse rad. on [kJ/hr.m2] Diffuse radiation on the horizontal taking shading by this
horiz. for mask opening's mask into account.

11 Shaded total rad. on [kJ/hr.m2] Total radiation on the horizontal taking shading by this opening's
horiz. for mask mask into account.

4.8.8.2. Simulation Summary Report Contents


INTEGRATED VALUE FIELDS

The two integrated value report variables are cycled, once for each opening.

Shaded beam [kJ/h.m2] Output 3


radiation

4–474
TRNSYS 18 – Mathematical Reference

Shaded diffuse [kJ/h.m2] Output 5


radiation

MINIMUM/MAXIMUM VALUE FIELDS

The two min/max report variables are cycled, once for each opening.

Fraction of beam [0..1] Output 2


visible on opening

Fraction of diffuse [0..1] Output 4


visible on opening

4.8.8.3. Hints and Tips


 Type67 reads a file containing the angular heights of obstructions that shade openings. Two types of
angle are needed. Surface angles (alpha) are measured in the same coordinates as the TRNSYS
standard for solar angles. Thus in the Northern Hemisphere South = 0, North = -180, East = -90 and
West = 90 (in the Southern hemisphere, South. Obstruction anglular heights (beta) are given for each
surface angle.
 The maximum line length is set by the variable maxFileWidth in the TrnsysConstants.f90 routine.
Longer lines will be truncated with unpredictable results
 Opening ID's should be integer numbers in ascending order
 The azimuth angles (alpha) for which obstruction angles are given are absolute angles. They are NOT
specified relative to the opening's azimuth.
 Type67 takes two inputs which give the angle of the sun and returns two outputs for each opening in
the file.
 The first ouput is the fraction of diffuse radation that is visible from the opening.
 The second output for each opening is a flag which has a value of 1 if the beam radiation is visible
from the opening and 0 if it is not.

4.8.8.4. Nomenclature
 - Surface angle measured in TRNSYS coordinates (for the northern hemisphere
South = 0, East = -90, West = 90, North = ±180)
 - the slope of the plane containing an opening
 - The angular height of an obstruction
i, j, k - Unit normal vectors in x, y and z respectively
S - The plane of an opening
nS - The unit normal vector for S
v - A vector representation of a surface angle
p - The projection of a surface angle vector in the plane S
 - The angle between nS and p
h1 - The height of a spherical zone
h2 - The height of a spherical cap

4–475
TRNSYS 18 – Mathematical Reference

S1 - The surface area of a segment of the spherical zone defined by the plane of
the diameter, a height h1 and an angle 
S2 - The surface area of a segment of the spherical cap defined by a height h2 and

NOTE: Underlined letters indicate a vector. Vectors appearing in equations have an arrow over their letter
representation.

4.8.8.5. Detailed Description


For any given opening (described by a slope and an azimuth) it is necessary to calculate two numbers. The
first is a 0 or a 1 corresponding to whether beam radiation is blocked or visible. The second is a number
between 0 and 1 which gives the fraction of diffuse radiation visible from the opening. A 0 indicates that no
diffuse radiation is visible and a 1 indicates that all the diffuse radiation normally visible by the window is
indeed visible. The fraction is fairly easy to calculate for a vertical or horizontal openings but becomes quite
difficult if sloped openings are allowed. A vertical opening has a viewing angle of 180 degrees and a
horizontal opening has a view angle of 360 degrees. It is less evident what the viewing angle for an
arbitrarily sloped opening is. Consequently, it was decided that all openings would be defined as having a
360 degree view angle and that the plane containing the opening would be considered an obstruction
shading the opening.
Obstructions are defined by an angular height as viewed from the opening. Surface angles () are defined
in an absolute co-ordinate system (as opposed to relative to the opening) and for each one, an angular
obstruction height  is required Figure 4.8.8–1.

Figure 4.8.8–1: Definition of surface angles () and obstruction height angles ()

For the case of a vertical opening, the plane containing the opening forms  angles of 90° for all  angles
departing to the rear of the window. In the case of a sloped plane, the  angles departing toward the rear
of the opening are not always 90° but follow the function described by Eq. 4.8.8-12. The angle departing
directly behind the window forms an angle equal to the slope of the opening (Figure 4.8.8–2)

4–476
TRNSYS 18 – Mathematical Reference

Figure 4.8.8–2: Apparent Obstruction Angles Created by the Plane of a Sloped Opening

CALCULATION OF VISIBLE DIFFUSE RADIATION FRACTION


The overall goal of this calculation is to come up with the fraction of diffuse radiation normally visible from
the opening that is still visible, given the effects of shading objects. The numerator of the fraction is the
amount of sky visible with shading objects. It is found using a call to the TRNSYS Data Reading subroutine.
For each opening identification number and for each direction (), an angular obstruction height () is
provided. The format of the data file and an example can be found at the end of the mathematical
description.
The denominator of the fraction is the amount of sky normally visible from the opening. A horizontal opening
sees the entire sky. A vertical opening sees half the sky, and a tilted opening sees some fraction in between.
Instead of trying to calculate how much of the sky is visible, a series of apparent obstruction angles
representing the plane of the opening are computed.
For a wall tilted at an angle , find an expression for the angle between wall and ground for a given surface
angle .
For simplicity sake, we will pretend for now that the plane of the wall faces due south. It can therefore be
described by the equation 0X + tan  Y + Z = 1. We will call the plane, as shown in Figure 4.8.8–3, S.

Figure 4.8.8–3: Coordinate System for the Plane Containing an Opening

The normal vector for plane S has the direction nS{0,tan,1}


The length of the normal vector is given by the determinant of the vector nS as:
|𝑛⃗𝑆| = √02 + (tan 𝛽)2 + 12 = √1 + (tan 𝛽)2 Eq. 4.8.8-1

The unit normal vector to S is thus:


1
𝑛⃗𝑆 = (tan ⃗⃗⃗⃗ ⃗)
𝛽𝑗 + 𝑘 Eq. 4.8.8-2
√1 + (𝑡𝑎𝑛𝛽)2
A vector v representing each surface angle  is projected onto plane S by the following formula in which p
is the resulting vector in S and in which k is a constant. :
𝑝 = 𝑣 − 𝑘𝑛⃗𝑆 Eq. 4.8.8-3

To find k, we dot both sides of the equation with nS. Since p and nS are perpendicular, their dot product is
0. nS dotted with itself is unity. Consequently, the formula for k is:

4–477
TRNSYS 18 – Mathematical Reference

𝑘 = 𝑣 ∙ 𝑛⃗𝑆 Eq. 4.8.8-4

The vector v exists in the plane of the horizontal so it only has x and y components. The formula for v comes
directly from the definition of the tangent in a right triangle:
𝑣 = tan 𝛼𝑖 + 𝑗 Eq. 4.8.8-5

solving for k gives:


tan 𝛽 tan 𝛽
𝑘 = (tan 𝛼)(0) + (1) ( ) + (0)(1) = Eq. 4.8.8-6
√1 + (𝑡𝑎𝑛𝛽)2 √1 + (tan 𝛽)2
Now we can write and simplify a vector for p:
tan 𝛽 1
𝑝 = (tan 𝛼𝑖 + 𝑗) − ( )( ⃗)
) (tan 𝛽𝑗 + 𝑘 Eq. 4.8.8-7
√1 + (tan 𝛽)2 √1 + (tan 𝛽)2
tan 𝛽
𝑝 = (tan 𝛼𝑖 + 𝑗) − ( ⃗)
) (tan 𝛽𝑗 + 𝑘 Eq. 4.8.8-8
1 + (tan 𝛽)2
(tan 𝛽)2 tan 𝛽
𝑝 = tan 𝛼𝑖 + (1 − )𝑗 + ⃗
𝑘 Eq. 4.8.8-9
1 + (tan 𝛽)2 1 + (tan 𝛽)2
The next step is to find the angle that the projection vector p makes with the plane of the horizontal. The
angle is found by taking the dot product of p and the unit normal of the horizontal plane.
The unit normal vector to the horizontal is {0,0,1}:
𝑛⃗𝐻 ∙ 𝑝 = |𝑛⃗𝐻||𝑝| cos 𝜎 Eq. 4.8.8-10

expanding gives:
(tan 𝛽)2 tan 𝛽
{0,0,1} ∙ {tan 𝛼 , 1 − , }
1 + (tan 𝛽)2 1 + (tan 𝛽)2
2 2
Eq. 4.8.8-11
(tan 𝛽)2 tan 𝛽
= √02 + 02 + 12 √(tan 𝛼)2 + (1 − ) + ( ) cos 𝜎
1 + (tan 𝛽)2 1 + (tan 𝛽)2

which can be simplified to:


2 2
tan 𝛽 (tan 𝛽)2 tan 𝛽
= √(tan 𝛼)2 + (1 − ) + ( ) cos 𝜎 Eq. 4.8.8-12
1 + (tan 𝛽)2 1 + (tan 𝛽)2 1 + (tan 𝛽)2

Eq. 4.8.8-12 can be solved for the angle between the projection of a surface angle  in S and a vertical line
(the normal to the horizontal plane). The angle  is subtracted from 90 to arrive at the angle that the
projection makes with the horizontal plane. The result is called At this stage, we have a set of apparent
obstruction height angles for the plane of the opening. This set is compared with the data provided in the
file for each surface angle .
There is of course one more complication. Simply comparing two obstruction heights and dividing them to
find the fraction of sky that remains visible for that surface angle does not take into account the fact that
each surface angle in reality represents a wedge of sky; an obstruction angle height of  = 45° does not
mean that for the given , half the sky is visible. Instead, we need to compare the two surface areas S1
and S2 as shown in Figure 4.8.8–4.

4–478
TRNSYS 18 – Mathematical Reference

Figure 4.8.8–4: Segment Areas

The fraction of sky visible for a given  is:


𝑆2
𝑓= Eq. 4.8.8-13
𝑆2 + 𝑆1
Because we are working with a sphere, we can write that:
ℎ1 + ℎ2 = 𝑟 Eq. 4.8.8-14

Furthermore, a right triangle is formed by the vertical axis of the sphere, a radius and the plane containing
the base of the segment S2. Consequently, it can be written that:
ℎ1 = 𝑟 cos(2𝜋 − 𝜃) Eq. 4.8.8-15

in which  is in radians.
The areas S1 (a segment of a spherical zone) and S2 (a segment of a spherical cap) both have the same
basic formula.  is measured in radians. :
𝑆1 = 𝛾𝑟ℎ1
Eq. 4.8.8-16
𝑆2 = 𝛾𝑟ℎ2
Using the results of equations Eq. 4.8.8-14, Eq. 4.8.8-15 and Eq. 4.8.8-16, Eq. 4.8.8-13 can be rewritten
as:
𝑓 = 1 − 𝑐𝑜𝑠(2𝜋 − 𝜃) Eq. 4.8.8-17

 is again in radians
Now that all the math is in place, two  sums over the set of surface angles () are made and divided. The
numerator contains the set  angles from the data file as applied to equation Eq. 4.8.8-17. The denominator
contains the set of  angles found using Eq. 4.8.8-12 as applied to equation Eq. 4.8.8-17:
∑𝜋𝛼=−𝜋 1 − cos(2𝜋 − 𝜃𝑠ℎ𝑎𝑑𝑒𝑑 )𝛼
𝑓= Eq. 4.8.8-18
∑𝜋𝛼=−𝜋 1 − cos(2𝜋 − 𝜃𝑢𝑛𝑠ℎ𝑎𝑑𝑒𝑑 )𝛼

CALCULATION OF VISIBLE BEAM RADIATION


To detect whether the beam radiation is behind an obstruction, Type67 takes the sun’s position (solar
azimuth angle and solar altitude angle), and compares them to the information in the data file. If, for a given
a, the solar altitude angle is less than the corresponding obstruction height angle, beam radiation is said to
be blocked.

EXTERNAL DATA FILE


Type67 centers around a data file that contains the angular heights () of obstructions seen from an
opening. The Type makes use of a call to the TRNSYS Data Reading subroutine and therefore there are
certain restrictions placed on the Type; the entire list of opening ID numbers, the entire list of opening

4–479
TRNSYS 18 – Mathematical Reference

slopes, the entire list of opening azimuths, and the entire list of surface angles must each fit on its own line
in the external data file.
The maximum number of characters on a single line that can be read by TRNSYS in either the Input file or
an external file is set in the TrnsysConstants.f90 file located in the TRNSYS Source Code Kernel directory.
The default line length is 1000 characters. Modification of this value necessitates that the TRNDll.dll file be
recompiled and relinked.
A few notes on file format may help avoid problems:
 The surface angles for which angular obstruction heights () are provided correspond to absolute
azimuths; they are NOT specified relative to the azimuth of the opening.
 Surface angles in the data file MUST cover the entire range of possible surface angles. In other words,
the first surface angle should always be –180. Surface angles must also have an equal step size
between them; it is not possible to add more precision to part of the surface angle range.
 Opening ID numbers should be in increasing order.
The file format should be as follows:
OPEN_ID1 OPEN_ID2 … OPEN_Idn
SLP1 SLP2 … SLPn
AZ1 AZ2 … Azn
Alpha1 Alpha2 alpha3 … AlphaN (equally spaced, must cover whole range)
 for OPEN_ID1 at  = Alpha1 (Alpha 1 is ALWAYS -180)
 for OPEN_ID1 at  = Alpha2

 for OPEN_ID1 at  = AlphaN (AlphaN is ALWAYS 180-step where step is the
 for OPEN_ID2 at  = Alpha1 increment used between Alpha values)
 for OPEN_ID2 at  = Alpha2

 for OPEN_ID2 at  = AlphaN

 for OPEN_IDn at  = Alpha1
 for OPEN_IDn at  = Alpha2

 for OPEN_IDn at  = AlphaN

Example
See the files in ..\Examples\Data Files\Type67*.* for full examples with more openings (or orientations).
In the example here below line 4 is shortened by replacing a few actual values with "…" In the real file all
values need to be specified

001 002 ! Opening (or "orientation") unique ID


090 045 ! Opening slope
0.0 -45.0 ! Opening azimuth (0 = facing Equator, East is negative)
-180.0 -157.5 -135.0 … -22.5 0.0 22.5 … 112.5 135.0 157.5 ! View angles - ALWAYS (-180:step:180-step)
10.000 ! Obstruction height for opening 1, view angle 1 (i.e. between -180 and -157.5)
30.000 ! Obstruction height for opening 1, view angle 2 (i.e. between -157.5 and -135 )
20.000 ! Obstruction height for opening 1, view angle 3 (i.e. between -135 and -112.5)

50.000 ! Obstruction height for opening 1, view angle 15 (i.e. between 135 and 157.5)
10.000 ! Obstruction height for opening 1, view angle 16 (i.e. between 157.5 and 180 )
10.000 ! Obstruction height for opening 2, view angle 1 (i.e. between -180 and -157.5)
60.000 ! Obstruction height for opening 2, view angle 2 (i.e. between -157.5 and -135 )

30.000 ! Obstruction height for opening 2, view angle 15 (i.e. between 135 and 157.5)
20.000 ! Obstruction height for opening 2, view angle 16 (i.e. between 157.5 and 180 )

4–480
TRNSYS 18 – Mathematical Reference

4.8.9. Type 69: Sky Temperature


This component determines an effective sky temperature. With this effective sky temperature, the long-
wave radiation exchange from external surfaces of a building to the atmosphere can be calculated.

4.8.9.1. Parameter / Input / Output Reference


PARAMETERS

1 Mode for cloudiness [-] Specify 0 if the cloudiness factor should be calculated within the
factor Type (based on ratio of diffuse to global radiation), or specify 1 if
the cloudiness factor is to be provided as an input to the model.
This parameter should be locked to 1 for Proforma 69a and to 0 for
Proforma 69b.

2 Height over sea level [m] The altitude of the location (0 = sea level).

INPUTS

1 Ambient temperature [C] The ambient temperature of the location.

2 Dew point temperature [C] The dew point temperature at the location.
at ambient conditions

3 Beam radiation on the [kJ/hr-m2] The beam radiation per unit area on the horizontal plane at the
horizontal location.

4 Diffuse radiation on the [kJ/hr-m2] The diffuse radiation per unit area on the horizontal plane at the
horizontal location.

If Mode (parameter 1) = 0

5 Cloudiness factor – sky [-] The fraction of the sky that is covered by clouds. 0 = clear sky, 1 =
fully cloud-covered sky.

OUTPUTS

1 Fictive sky temperature [C] An approximate or equivalent ‘sky temperature’ useful for
calculating long-wave radiation losses from buildings, solar
collectors, and other objects, especially at nighttime.

2 Cloudiness factor of [-] For Type 69b, this is the value calculated internally for the
the sky cloudiness factor of the sky, as a function of the ratio of diffuse to
global radiation. 0 = clear sky, 1 = fully cloud-covered sky. For
Type 69a, this is simply Input 5.

4.8.9.2. Simulation Summary Report Contents


TEXT FIELDS

Cloudiness Factor [-] Whether the cloudiness factor of the sky is read from a data file or
Calculation calculated within the Type

MINIMUM/MAXIMUM VALUE FIELDS

4–481
TRNSYS 18 – Mathematical Reference

Sky Temperature [C] Output 1

Cloudiness Factor [-] Output 2

4.8.9.3. Hints and Tips


 Obtaining Inputs: If a standard weather file (such as TMY3, EPW, etc.) is being used in a simulation,
then Type15 (the component that reads such files) computes effective sky temperature as an output
using the same methodology as does Type69. If weather data is being read by the more generic Type
9 (Data Reader) and the solar radiation data is being processed by Type16 (Radiation Processor) then
Type69 should be used to compute the effective sky temperature
 Use of Outputs: The effective sky temperature is typically used as the ‘sky temperature’ for unglazed
solar thermal collector models. The sky temperature may be required by any component that
exchanges long-wave radiation with the sky. The cloudiness factor of the sky is used primarily for
reality/sensibility checking when the factor is calculated internally.

4.8.9.4. Nomenclature
CCover [0..1] cloudiness factor of the sky
EDif [kJ/hr.m2] diffuse radiation on the horizontal
EDir [kJ/hr.m2] beam radiation on the horizontal
EGlob,h [kJ/hr.m2] total radiation on the horizontal
g [m/s2] gravitational acceleration
h [m] elevation above sea level
patm [atm] atmospheric pressure
p0 [atm] atmospheric pressure at the height ho
0 [kg/m3] air density at the height ho
0 [0..1] emittance of the clear sky
Tamb [°C] ambient temperature
Tsat [°C] dew point temperature at ambient conditions
Tsky [°C] sky temperature

4.8.9.5. Detailed Description


An effective sky temperature is used for calculating the long-wave radiation exchange from external
surfaces to the atmosphere. For this calculation, the sky is assumed to be an ideal black surface. The actual
emittance of the clear and the clouded sky must be known. Thus, the effective sky temperature is a function
of the ambient temperature, air humidity, cloudiness factor of the sky, and the local air pressure
If the weather data do not include the cloudiness factor of the sky, the cloudiness factor can be determined
according to the following equation [2]:
0.5
𝐸𝑑𝑖𝑓
𝐶𝑐𝑜𝑣𝑒𝑟 = (1.4286 − 0.3) Eq. 4.8.9-1
𝐸𝑔𝑙𝑜𝑏,ℎ
For the night cloudiness factor, an averaged factor over the afternoon is used.

4–482
TRNSYS 18 – Mathematical Reference

The atmospheric pressure at the user-specified elevation is determined according the barometric height
formula for the location in question:
𝑔𝜌0 ℎ
𝑝𝑎𝑡𝑚 = 𝑝0 𝑒 𝑝0 Eq. 4.8.9-2

Note that if the atmospheric pressure being given to the model as an input is already corrected for elevation
(i.e. is the elevation at the site) then the elevation parameter should be set to zero to avoid a double
correction. The emittance of the clear sky can be derived by the saturation temperature (T sat) corresponding
the ambient conditions (temperature and air humidity) [1]:
𝑇𝑑𝑝 𝑇𝑑𝑝 2 𝑡𝑖𝑚𝑒
𝜀0 = 0.711 + 0.005 ( ) + 7.3𝑥10−5 ( ) + 0.013 cos (2𝜋 ) + 12𝑥10−5 (𝑝𝑎𝑡𝑚 − 𝑝0 ) Eq. 4.8.9-3
100 100 24
where the variable time corresponds to the hour of the day.
The effective sky temperature can then be determined by [1]:
𝑇𝑠𝑘𝑦 = 𝑇𝑎𝑚𝑏 (𝜀0 + 0.8(1 − 𝜀0 )𝐶𝑐𝑜𝑣𝑒𝑟 )0.25 Eq. 4.8.9-4

4.8.9.6. References
[1] M. Martin, P. Berdahl, Characteristics of Infrared Sky Radiation in the United States, Lawrence Berkeley
Laboratory, University of California - Berkeley, Solar Energy Vol. 33, No. 3/4, pp. 321-336, 1984.
[2] Kasten Czeplak, Solar Energy Vol. 24, S. 177 - 189, Pergamon Press Ltd.

4–483
TRNSYS 18 – Mathematical Reference

4.8.10. Type 77: Simple Ground Temperature Model


This subroutine models the vertical temperature distribution of the ground given the mean ground surface
temperature for the year, the amplitude of the ground surface temperature for the year, the time difference
between the beginning of the calendar year and the occurrence of the minimum surface temperature, and
the thermal diffusivity of the soil. These values may be found in a variety of sources including the ASHRAE
Handbooks (refer to soil temperature) [1].

4.8.10.1. Parameter / Input / Output Reference


PARAMETERS

1 Number of temperature [-] The number of temperatures that will be output from the model.
nodes For each output temperature desired, the user has to specify the
depth at which the output temperature should be calculated. These
depths should be entered in parameters 8 to 7 + N, where N is the
number of temperature nodes (this parameter).

2 Mean surface [C] The mean (average) surface temperature of the ground during the
temperature year. The temperature of the ground at an infinite depth will be this
temperature. This temperature is typically the average annual air
temperature for the given location.

3 Amplitude of surface [deltaC] The amplitude of the surface temperature function throughout the
temperature year. The maximum temperature of the surface will be TMEAN
(Parameter 2) +TAMPL (this parameter).

4 Time shift [day(s)] The time difference (in days) between the beginning of the
calendar year and the occurrence of the minimum surface
temperature. For example, if the coldest day of the typical year is
February 20, this parameter would be 50 (31 days in January + 20
days in February - 1 for the first of the year).

5 Soil thermal [kJ/hr-m-K] The thermal conductivity of the soil for which the temperature is
conductivity being calculated. The Type assumes uniform properties throughout
the soil.

6 Soil density [kg/m3] The density of the soil for which the temperature is being
calculated. The Type assumes uniform properties throughout the
soil.

7 Soil specific heat [kJ/kg-K] The specific heat of the soil for which the temperature is being
calculated. The Type assumes uniform properties throughout the
soil.

The next parameter is cycled based on the value of parameter 1

8 Depth at point (N) [m] The depth of the soil at which the temperature for this node should
be evaluated. 0=Surface.

OUTPUTS

The outputs are cycled based on the value of parameter 1

1 Soil temperature at [C] The soil temperature at the specified depth for this node.
node (N)

4–484
TRNSYS 18 – Mathematical Reference

4.8.10.2. Simulation Summary Report Contents


VALUE FIELDS

Depth at Point [m] The depth of the soil at which the temperature should be evaluated.
0=Surface. This field cycles for as many soil depths as are specified.

MINIMUM/MAXIMUM VALUE FIELDS

Temperature at Soil [C] Output corresponding to soil layer (Output 1 is 1st soil depth, Output 2 is
Depth 2nd soil depth, and so forth). This field cycles for as many soil depths as
are specified.

4.8.10.3. Hints and Tips


 Obtaining Parameters: Type15 (Weather Data) provides both annual and monthly average air
temperatures, minimum air temperatures, and air maximum temperatures amongst its outputs. A
common practice is to use the annual average air temperature for the site for Parameter 2 and half the
difference between the maximum and minimum monthly average temperatures over the year as the
amplitude (Parameter 3). Note that if using Type15 to obtain these parameters, the outputs from
Type15 must be obtained from another simulation, then manually entered into Type77; Type15 cannot
be directly linked to Type77 (connections may only be drawn between outputs and inputs, not between
outputs and parameters).
 Use of Outputs: The soil temperature at various depths may be required for components buried in
the ground that interact thermally with the soil, such as Type49 (in the Standard Library). This Type is
use useful as a first approximation in such cases but the interaction is only one-way. The soil
temperature may affect the component but the temperature of the component will not in turn affect the
soil temperature.
 Limitations of This Model: Note that this Type is based on the Kusuda model; it does not consider
the influence of any buried components (pipes, wells, building basements, etc) in its results. If using
this Type to provide soil temperatures for buried components, the user assumes the ground is large
and buried component relatively small and/or of relatively similar temperature to the soil, such that the
thermal influence of the buried object on the temperature fluctuations in the ground is small. More
detailed soil temperature modeling is available through other components such as Type49 (slab on
grade) or Type1267 (detailed ground coupling).

4.8.10.4. Nomenclature
T [ºC] Temperature
Tmean [ºC] Mean surface temperature (average air temperature)
Amplitude of surface temperature (maximum air temperature minus mean air
Tamp [ºC]
temperature)
Depth [m] Depth below surface
 [m2/day] Thermal diffusivity of the ground (soil)
tnow [day] Current day of the year
tshift [day Day of the year corresponding to the minimum surface temperature
Tinitial [ºC] initial temperature

4–485
TRNSYS 18 – Mathematical Reference

4.8.10.5. Detailed Description


Kasuda [2] found that the temperature of the undisturbed ground is a function of the time of year and the
depth below the surface and could be described by the following correlation:

𝜋 0.5 2𝜋 𝑑𝑒𝑝𝑡ℎ 365 0.5


𝑇 = 𝑇𝑚𝑒𝑎𝑛 − 𝑇𝑎𝑚𝑝 𝑒𝑥𝑝 (−𝑑𝑒𝑝𝑡ℎ ( ) ) cos ( (𝑡𝑛𝑜𝑤 − 𝑡𝑠ℎ𝑖𝑓𝑡 − ( ) )) Eq. 4.8.10-1
365𝛼 365 2 𝜋𝛼

In the above equation  is the thermal diffusivity of the soil. It is computed inside the model using:
𝑘
𝛼= Eq. 4.8.10-2
𝜌𝐶𝑝
in which k is the soil’s thermal conductivity, rho is the soil density and Cp is the soil specific heat.
In absence of a measured value, Tmean (the mean surface temperature) may be taken as the average annual
air temperature.
The Kasuda equation results in a distribution of temperature with respect to time for different values of soil
depth and for a given climate as shown in Figure 4.8.10–1

30

Depth=0
28

26 Depth=1
Ground Temperature

24

22 Depth=3

Depth=50
20

18

16

14

12

10
0 52 104 156 209 261 313 365
Day of the Year
Figure 4.8.10–1: Temperature Profiles as a Function of Depth
The range of temperatures generated by this equation are shown in Figure 4.8.10–2. Line WI shows one
extreme that the temperature profile assumes during the winter season. Line SU shows the other extreme
that the temperature profile assumes during the summer. In between the summer and winter extremes,
the ground temperature profile will lie between the two extremes. In the shoulder seasons (spring (SP) and
fall (FA)), the surface is heated and cooled more quickly than the lower depths; resulting in the 'humped'
distributions shown in Figure 4.8.10–2

4–486
TRNSYS 18 – Mathematical Reference

SP FA

WI SU

Tmean-Tamp Tmean Tmean+Tamp

Increasing
depth
Figure 4.8.10–2: Seasonal Temperature Distributions as a Function of Depth

4.8.10.6. References
[1] ASHRAE. Chapter 31- Geothermal Energy. In: ASHRAE Handbook: Heating, Ventilating and Air-
Conditioning APPLICATIONS. 1999.
[2] Kasuda, T., and Archenbach, P.R. "Earth Temperature and Thermal Diffusivity at Selected Stations in
the United States", ASHRAE Transactions, Vol. 71, Part 1, 1965

4–487
TRNSYS 18 – Mathematical Reference

4.8.11. Type 80: Convection Coefficient Calculator


This routine calculates the external convective heat transfer coefficient for up to 10 surfaces. The surfaces
may be either horizontal or vertical. Type80 is of particular use for cases where the surface temperature is
likely to vary beyond the usual range for which constant coefficients are acceptable, e.g. floor heating or
radiant cooling/heating in general. Multiple units of Types80 may be used.

4.8.11.1. Parameter / Input / Output Reference


PARAMETERS

1 Surface Type [-] 1 = Horizontal surface, 2 = Vertical surface. Value is positive if the
default constants and exponents should be used in the Nusselt
number correlations, negative if the user will supply the coefficients
for these equations. Use the correct proforma for the surface type
and coefficient values desired, and do not change this parameter.

2 Number of surfaces [-] The number of surfaces for which convection coefficients should be
calculated.

If SurfaceType (Parameter 1) = -1

3 Constant for floor [-] The constant K1 in the equation conv = K1 (Tsurf – Tair)e1 ,
warmer than air where conv is the convection coefficient and Tsurf and Tair are
the surface and air temperatures, respectively. This constant will be
used for floors when the floor surface is warmer than the air.

4 Exponent for floor [-] The exponent e1 in the equation conv = K1 (Tsurf – Tair)e1 ,
warmer than air where conv is the convection coefficient and Tsurf and Tair are
the surface and air temperatures, respectively. This exponent will
be used for floors when the floor surface is warmer than the air.

5 Constant for ceiling [-] The constant K1 in the equation conv = K1 (Tsurf – Tair)e1 ,
warmer than air where conv is the convection coefficient and Tsurf and Tair are
the surface and air temperatures, respectively. This constant will be
used for ceilings where the ceiling surface is warmer than the air.

6 Exponent for ceiling [-] The exponent e1 in the equation conv = K1 (Tsurf – Tair)e1 ,
warmer than air where conv is the convection coefficient and Tsurf and Tair are
the surface and air temperatures, respectively. This constant will be
used for ceilings where the ceiling surface is warmer than the air.

7 Constant for floor [-] The constant K1 in the equation conv = K1 (Tsurf – Tair)e1 ,
cooler than air where conv is the convection coefficient and Tsurf and Tair are
the surface and air temperatures, respectively. This constant will be
used for floors when the floor surface is cooler than the air.

8 Exponent for floor [-] The exponent e1 in the equation conv = K1 (Tsurf – Tair)e1 ,
cooler than air where conv is the convection coefficient and Tsurf and Tair are
the surface and air temperatures, respectively. This exponent will
be used for floors when the floor surface is cooler than the air.

4–488
TRNSYS 18 – Mathematical Reference

9 Constant for ceiling [-] The constant K1 in the equation conv = K1 (Tsurf – Tair)e1 ,
cooler than air where conv is the convection coefficient and Tsurf and Tair are
the surface and air temperatures, respectively. This constant will be
used for ceilings where the ceiling surface is cooler than the air.

10 Exponent for ceiling [-] The exponent e1 in the equation conv = K1 (Tsurf – Tair)e1 ,
cooler than air where conv is the convection coefficient and Tsurf and Tair are
the surface and air temperatures, respectively. This constant will be
used for ceilings where the ceiling surface is cooler than the air.

If SurfaceType (Parameter 1) = -2

3 Constant for [-] The constant Kv1 in the equation conv,vertical = Kv1
alpha_conv calculation, (Tsurfvertical –Tairvertical)ev1 , where conv,vertical is the
vertical surface
convection coefficient for the vertical surface and Tsurf,vertical and
Tair,vertical are the vertical surface temperature and air
temperature in the vicinity of the vertical surface, respectively.

4 Exponent for [-] The exponent ev1 in the equation conv,vertical = Kv1
alpha_conv calculation, (Tsurfvertical –Tairvertical)ev1 , where conv,vertical is the
vertical surface
convection coefficient for the vertical surface and Tsurf,vertical and
Tair,vertical are the vertical surface temperature and air
temperature in the vicinity of the vertical surface, respectively.

INPUTS

If SurfaceType (Parameter 1) = 1 or -1 (horizontal surface)

Cycle (based Air temperature near [C] The temperature of the ambient air near the surface (if the
on PAR 2) floor surface surface is a floor). This input cycles for as many surfaces
as are specified.

Cycle (based Air temperature near [C] The temperature of the ambient air near the surface (if the
on PAR 2) ceiling surface surface is a ceiling). This input cycles for as many
surfaces as are specified.

Cycle (based Temperature of floor [C] The temperature of the surface (if the surface is a floor).
on PAR 2) surface This input cycles for as many surfaces as are specified.

Cycle (based Temperature of ceiling [C] The temperature of the surface (if the surface is a ceiling).
on PAR 2) surface This input cycles for as many surfaces as are specified.

If SurfaceType (Parameter 1) = 2 or -2 (vertical surface)

Cycle (based Air temperature in front [C] The temperature of the ambient air in front of the vertical
on PAR 2) of vertical surface surface. This input cycles for as many surfaces as are
specified.

Cycle (based Air temperature behind [C] The temperature of the ambient air behind the vertical
on PAR 2) vertical surface surface. This input cycles for as many surfaces as are
specified.

Cycle (based Temperature of front of [C] The temperature of the front of the surface. This input
on PAR 2) vertical surface cycles for as many surfaces as are specified.

4–489
TRNSYS 18 – Mathematical Reference

Cycle (based Temperature of back of [C] The temperature of the back of the surface. This input
on PAR 2) vertical surface cycles for as many surfaces as are specified.

OUTPUTS

If SurfaceType (Parameter 1) = 1 or -1 (horizontal surface)

Cycle (based Convective coefficient [kJ/hr-m2-K] The convective coefficient for the floor surface, per unit
on PAR 2) for floor surface area. This output cycles for as many surfaces as are
specified.

Cycle (based Convective coefficient [kJ/hr-m2-K] The convective coefficient for the ceiling surface, per unit
on PAR 2) for ceiling surface area. This output cycles for as many surfaces as are
specified.

If SurfaceType (Parameter 1) = 2 or -2 (vertical surface)

Cycle (based Convective coefficient [kJ/hr-m2-K] The convective coefficient for the front side of the vertical
on PAR 2) for front side of surface surface, per unit area. This output cycles for as many
surfaces as are specified.

Cycle (based Convective coefficient [kJ/hr-m2-K] The convective coefficient for the back side of the vertical
on PAR 2) for back side of surface surface, per unit area. This output cycles for as many
surfaces as are specified.

4.8.11.2. Simulation Summary Report Contents


TEXT FIELDS

Surface Orientation [-] Either horizontal or vertical

Coefficients [-] Either default or user-defined

MINIMUM/MAXIMUM VALUE FIELDS

If SurfaceType (Parameter 1) = 1 or -1 (horizontal surface)

Convective coefficient [kJ/hr-m2-K] 1st Output corresponding to the given surface. This field cycles for as
for floor surface many surfaces as are specified.

Convective coefficient [kJ/hr-m2-K] 2nd Output corresponding to the given surface. This field cycles for as
for ceiling surface many surfaces as are specified.

If SurfaceType (Parameter 1) = 2 or -2 (vertical surface)

Convective coefficient [kJ/hr-m2-K] 1st Output corresponding to the given surface. This field cycles for as
for front side of surface many surfaces as are specified.

Convective coefficient [kJ/hr-m2-K] 2nd Output corresponding to the given surface. This field cycles for as
for back side of surface many surfaces as are specified.

4–490
TRNSYS 18 – Mathematical Reference

4.8.11.3. Hints and Tips


 Convection Coefficient Units: If using user-defined coefficients, the coefficients supplied must
produce a convection coefficient in units of [W/m2.K]. The equations within the Type calculate
convection coefficient in units of [W/m2.K]. The units are then converted to standard TRNSYS units
[kJ/hr.m2.K] as the output from the Type.

4.8.11.4. Nomenclature
conv [W/m2.K]* convective heat transfer coefficient
Tsurf [C] surface temperature
Tair [C] air temperature
K [-] correlation coefficient
e [-] correlation exponent
*Note: while equations for convection coefficient in the Detailed Description below are in units of [W/m 2-
K], the outputs of the Type will be in the default TRNSYS units of [kJ/hr-m2-K].

4.8.11.5. Detailed Description


For horizontal surfaces, the convective heat transfer coefficient due to the difference between the surface
temperature and the temperature of the air right near the surface is calculated as follows [1]:
0.31
𝛼𝑐𝑜𝑛𝑣 = 2.11(𝑇𝑠𝑢𝑟𝑓 − 𝑇𝑎𝑖𝑟 ) Eq. 4.8.11-1

The above relationship is valid assuming that the surface temperature is higher than the surrounding air
temperature. If this is not the case, then the relationship given below is used [1]:
0.25
𝛼𝑐𝑜𝑛𝑣 = 1.87(𝑇𝑠𝑢𝑟𝑓 − 𝑇𝑎𝑖𝑟 ) Eq. 4.8.11-2

There are, of course, many alternative correlations possible to calculate the heat transfer coefficients. The
user can choose any alternative by setting PARAMETER 1 to –1. In this case, eight additional
PARAMETERS are needed in order to define the convection coefficient (K1, e1, K2, and e2 are required
for both ceiling and floor surfaces). If the temperature difference is positive, the correlation is:
𝑒1
𝛼𝑐𝑜𝑛𝑣 = 𝐾1 (𝑇𝑠𝑢𝑟𝑓 − 𝑇𝑎𝑖𝑟 ) Eq. 4.8.11-3

If the temperature difference is negative, the following equation will be used:


𝑒2
𝛼𝑐𝑜𝑛𝑣 = 𝐾2 (𝑇𝑠𝑢𝑟𝑓 − 𝑇𝑎𝑖𝑟 ) Eq. 4.8.11-4

For vertical surfaces the routine uses the following default equation [1]:
0.25
𝛼𝑐𝑜𝑛𝑣,𝑣𝑒𝑟𝑡𝑖𝑐𝑎𝑙 = 1.5(𝑇𝑠𝑢𝑟𝑓,𝑣𝑒𝑟𝑡𝑖𝑐𝑎𝑙 − 𝑇𝑎𝑖𝑟,𝑣𝑒𝑟𝑡𝑖𝑐𝑎𝑙 ) Eq. 4.8.11-5

If, however, PAR(1) is set to –2, 2 additional PARAMETERS have to be defined, resulting in the following :
𝑒𝑣1
𝛼𝑐𝑜𝑛𝑣,𝑣𝑒𝑟𝑡𝑖𝑐𝑎𝑙 = 𝐾𝑣1 (𝑇𝑠𝑢𝑟𝑓,𝑣𝑒𝑟𝑡𝑖𝑐𝑎𝑙 − 𝑇𝑎𝑖𝑟,𝑣𝑒𝑟𝑡𝑖𝑐𝑎𝑙 ) Eq. 4.8.11-6

The user is able to use coefficients that can be found in literature or by measurements.

4.8.11.6. References
[1] Glück, Bernd. Waermetechnisches Raummodell. C.F.Mueller-Verlag 1997. pages 66-67.

4–491
TRNSYS 18 – Mathematical Reference

4.9. Solar (Thermal)


This section contains components that model different types of solar collectors. For flat plate collector
modeling, choose the model that best complements the information available regarding the collector’s
performance (efficiency equation, performance data, or physical characteristics); for all other types of
collectors, choose the model that best matches the collector type (evacuated tube, concentrating, or
thermosyphon system). Capacitance (thermal storage) effects are not accounted for in any of the Solar
Types in the TRNSYS Standard library, with the exception of the thermosyphon model.
Type 1 models a flat plate collector using a quadratic efficiency equation generalized from the well-known
Hottel-Whillier equation. Five options are available to model the incidence angle modifiers (IAMs); the IAMs
may be neglected, they may be calculated as a quadratic function of incidence angle with user-supplied
coefficients, they may be interpolated from a user-supplied look-up table based on incidence angle (or, for
collectors with asymmetry, as the product of the modifers for each of the longitudinal and transverse
incidence angles), or they may be calculated from the properties of the glazing(s). Type 1 is recommended
when collector test reports are available that follow ASHRAE or EU performance testing standards (or
similar standards).
Type 45 models a combined thermosyphon collector and storage system. The model accounts for the
performance of the collector, the storage tank, and the natural convection flow between the collector and
the storage tank.
Type 50 models a combined photovoltaic and thermal (PVT) solar collector by adding a PV module to the
standard flat-plate collector. It incorporates the analysis and work of Florschuetz for flat plate collectors
operated at peak power and makes use of the I-V curves of the cells (or array) in solving for peak power or
for current output at some imposed voltage.
Type 71 models evacuated tube collectors. The incidence angle modifier for this Type must be interpolated
from a two-dimensional lookup table based on both longitudinal and transverse incidence angles; the model
is otherwise identical to Type 1.
Type 72 models a flat-plate collector using a performance map. The collector efficiency must be provided
through lookup tables at different combinations of solar radiation, ambient temperature, and wind speed.
This model allows performance to be a function of wind speed (not available to Type 1); it also allows the
user to model a more general (non-quadratic or non-linear) efficiency dependency on the collector versus
ambient temperature differential per unit radiation (T/IT). Type 72 offers the same five optical modes for
calculating incidence angle modifiers that are available in Type 1.
Type 73 models a flat-plate collector using theoretical performance equations. The steady-state Hottel-
Whillier analysis is used. Collector design data (loss coefficients, fin efficiency, and so forth) are entered as
parameters. Incidence angle modifiers are calculated from the optical and physical properties of the
glazing(s).
Type 74 models a Compound Parabolic Concentrating (CPC) Collector. The thermal performance model is
identical to that of Type 1, but the optical model takes into account the special characteristics of CPC's.

4–492
TRNSYS 18 – Mathematical Reference

4.9.1. Type 1: Flat Plate Collector, Quadratic Efficiency


Performance Model
This component models the thermal performance of a flat-plate solar collector using a standard quadratic
(or linear) efficiency equation. The user must provide the coefficients of the efficiency equation. These
coefficients are available from standard collector performance tests which plot efficiency versus a ratio of
temperature differential to radiation (T/IT). The temperature differential is the difference between fluid
temperature and ambient temperature; the fluid temperature may be an inlet, average, or outlet
temperature. This component assumes that the efficiency vs. T/IT curve can be modeled as a quadratic
equation. Corrections are applied to the slope, intercept, and curvature parameters to account for identical
collectors (or collector modules) in series and/or flow rates other than those at test conditions (the flow rate
at test conditions must be provided as well).
There are five options for considering the effects of off-normal solar incidence (incidence angle modifiers,
or IAMs). If the optical mode is set to 1, no off-normal incidence effects are considered. Optical mode 2 will
calculate IAMs as a quadratic function of incidence angle, using user-supplied coefficients for the IAM
versus incidence angle equation. Optical mode 3 will interpolate IAMs from a user-supplied look-up table
based on incidence angle. Optical mode 4 will calculate IAMs based on the optical and physical properties
of the cover(s) (or glazings). Optical mode 5 also interpolates from a user-supplied look-up table, but the
table must contain independent IAM values for each incidence direction (transverse incidence versus
longitudinal incidence); the product of the modifers for each of the longitudinal and transverse incidence
angles will be the IAM used at that instance. This is an approximate way of calculating IAMs for
asymmetrical surfaces, such as tubes; see Type 71 for interpolating true bi-axial incidence angle modifier
data.

4.9.1.1. Parameter / Input / Output Reference


PARAMETERS

1 Number in series [-] Specifies how many collectors are connected in a series
arrangement (outlet of first collector = inlet of second collector etc.).
Set this parameter to 1 if all collectors in the array are in parallel
(fed from a common manifold). The model assumes each parallel
chain of collectors (if any) has the same number of collectors in
series.

2 Collector area [m2] The total area of the solar collector array, consistent with the
supplied efficiency parameters (typically efficiency values are
calculated based on gross area, not net area).

3 Fluid specific heat [kJ/kg-K] The specific heat of the collector fluid.
1= the efficiency parameters are given as a function of the inlet
4 Efficiency mode [-]
temperature; 2= the efficiency parameters are given as a function
of the average temperature; 3= the efficiency parameters are given
as a function of the outlet temperature. Parameters are commonly
given as a function of inlet temperature in the United States and as
a function of average temperature in Europe.

5 Tested flow rate [kg/hr-m2] The flow rate (per unit collector area) at which the collector
efficiency test was performed.
The y-intercept (a0) of the following collector efficiency equation:
6 Intercept efficiency [-]
Efficiency = a0 - a1*(T-Tamb)/I_T- a2 * ((T-Tamb)2)/I_T , where
I_T = Insolation per unit area;
T_amb = ambient air temperature;

4–493
TRNSYS 18 – Mathematical Reference

T=T_inlet (if Parameter 4, the efficiency mode, = 1), T_average (if


Parameter 4 = 2), or T_outlet (if Parameter 4 = 3).
a0 may also be called FrTan when the equation is a function of
collector inlet temperature.
The slope (a1) of the following collector efficiency equation:
7 Efficiency slope [kJ/hr-m2-K]
Efficiency = a0 - a1*(T-Tamb)/I_T- a2 * ((T-Tamb)2)/I_T , where
I_T = Insolation per unit area;
T_amb = ambient air temperature;
T=T_inlet (if Parameter 4, the efficiency mode, = 1), T_average (if
Parameter 4 = 2), or T_outlet (if Parameter 4 = 3).
a1 may also be called FrUl when the equation is a function of
collector inlet temperature.
The curvature (a2) of the following collector efficiency equation:
8 Efficiency curvature [kJ/hr-m2-K2]
Efficiency = a0 - a1*(T-Tamb)/I_T - a2 * ((T-Tamb)2)/I_T, where
I_T = Insolation per unit area;
T_amb = ambient air temperature;
T=T_inlet (if Parameter 4, the efficiency mode, = 1), T_average (if
Parameter 4 = 2), or T_outlet (if Parameter 4 = 3).
a2 may also be called FrUl/T when the equation is a function of
collector inlet temperature

9 Optical mode [-] Sets how the incidence angle modifier (IAM) will be calculated by
the component. 1= no incidence angle modification; 2=incidence
angle modifiers will be determined by 2nd order equation as
function of incidence angle; 3= incidence angle modifiers are to be
interpolated from an external data file as a function of incidence
angle; 4=incidence angle modifiers will be calculated from
properties of collector cover(s); 5= Biaxial (transverse and
longitudinal) incidence angle modifiers are to be interpolated from
an external data file as a function of incidence angle.

If Optical mode (parameter 9) = 2

10 1st order IAM [-] This parameter is b0 in the equation IAM = 1 - b0 * S - b1 * S2,
where S = (1/cos(incidence angle)-1).

11 2nd order IAM [-] This parameter is b1 in the equation IAM = 1 - b0 * S - b1 * S2,
where S = (1/cos(incidence angle)-1).

If Optical mode (parameter 9) = 3

10 Logical unit of data file [-] The logical unit through which the incidence angle modifier data
will be read. This number is automatically assigned and should not
be changed unless by advanced TRNSYS users.

11 Number of rows in file [-] The number of values of incidence angle, with associated IAM's,
contained in the data file (must be between 2 and 10).

If Optical mode (parameter 9) = 4

10 Plate absorptance [-] The absorptance of the collector absorber plate, or the ratio of
absorbed radiation to total radiation on the plate. Typical values of
plate absorptance can be found from: Solar Engineering of
Thermal Processes, Duffie and Beckman, Wiley-Interscience, New
York, 1980.

4–494
TRNSYS 18 – Mathematical Reference

11 Number of identical [-] The number of identical glazings (or covers – typically glass or
covers plastic) on the solar collector; used to calculate the transmittance-
absorptance product.

12 Index of refraction [-] Index of refraction of one glazing covering the solar collector

13 Extinction coefficient- [-] The product of the extinction coefficient and cover thickness for
thickness product one glazing covering the solar collector

If Optical mode (parameter 9) = 5

10 Logical unit of data file [-] The logical unit through which the incidence angle modifier data
will be read. This number is automatically assigned and should not
be changed unless by advanced TRNSYS users.

11 Number of rows in file [-] The number of values of incidence angle, with their associated
biaxial modifier data, contained in the external data file (must be
between 2 and 10).

INPUTS

1 Inlet temperature [°C] The temperature of the fluid entering the solar collector

2 Inlet flowrate [kg/hr] The mass flow rate of the fluid entering the solar collector array.
Note that this is the flowrate to the entire array, not the flowrate to
an individual collector. Flow will be equally divided amongst parallel
collectors (or chains of collectors).

3 Ambient temperature [°C] The temperature of the ambient air surrounding the collector

4 Incident radiation [kJ/hr-m2] The total (beam + diffuse) radiation incident on the plane of the
solar collector, per unit area

If Optical mode (parameter 9) = 2, 3, or 4

5 Total horizontal [kJ/hr-m2] The total radiation (beam + diffuse) on a horizontal surface, per unit
radiation area.

6 Horizontal diffuse [kJ/hr-m2] The diffuse radiation on a horizontal surface, per unit area
radiation

7 Ground reflectance [-] The reflectance of the surface above which the solar collector is
positioned. Typical values are 0.2 for ground not covered by snow
and 0.7 for snow-covered ground. The reflectance is the ratio of
reflected radiation to total incident radiation and therefore must be
between 0 and 1.

8 Incidence angle [degrees] Angle of incidence of beam radiation on surface

9 Collector slope [degrees] The slope of the collector surface. The slope is defined as the
angle between the surface and the horizontal.0° = horizontal
surface, 90° = vertical surface. Slope is positive when surface is
tilted in the direction of the surface azimuth. As a general rule,
performance is somewhat optimized when the collector slope is set
to the latitude.

If Optical mode (parameter 9) = 5

4–495
TRNSYS 18 – Mathematical Reference

5 Total diffuse radiation [kJ/hr-m2] The total (sky + ground-reflected) radiation incident on the plane of
the solar collector, per unit area

6 Incidence angle [degrees] Angle of incidence of beam radiation on surface.

7 Zenith angle [degrees] The angle between the vertical and the line to the sun; the angle of
incidence of beam radiation on a horizontal surface.

8 Solar azimuth [degrees] The angular displacement from south of the projection of beam
radiation on the horizontal plane, with east negative and west
positive. 0° = from due south; -90° = from due east; 90° = from due
west.

9 Collector slope [degrees] The slope of the collector surface. The slope is defined as the
angle between the surface and the horizontal.0° = horizontal
surface, 90° = vertical surface. Slope is positive when surface is
tilted in the direction of the surface azimuth. As a general rule,
performance is somewhat optimized when the collector slope is set
to the latitude.

10 Collector azimuth [degrees] The deviation of the collector surface from the local meridian, with
zero due south, east negative, and west positive. 0° = facing due
south; -90° = facing due east; 90° = facing due west.

DERIVATIVES

There are no derivatives used by this Type.

OUTPUTS

1 Outlet temperature [°C] The temperature of the fluid exiting the solar collector array

2 Outlet flowrate [kg/hr] The flowrate of the fluid exiting the solar collector array. In this
component, the outgoing flow rate will always equal the incoming
flowrate.

3 Useful energy gain [kJ/hr] The rate of useful energy gain by the solar collector fluid:
Qu = mdot * Cp * (Tout - Tin)

4 Collector efficiency [-] The ratio of the collector’s useful energy gain (Output 3) to the total
incident radiation (beam + diffuse) on the surface of the collector

5 Incidence angle [-] The ratio of the transmittance-absorptance product of the collector
modifier (overall) at the given incidence angle over the transmittance-absorptance
product at normal incidence; the ratio of the total absorbed
radiation to the radiation that would have been absorbed if the
beam radiation were normal to the collector surface.

4.9.1.2. Simulation Summary Report Contents


VALUE FIELDS

Collector Array Area [m2] Parameter 2

4–496
TRNSYS 18 – Mathematical Reference

Number of Collectors [-] Parameter 1


in Series

TEXT FIELDS

Incidence Angle [-] If Parameter 9 = 1, “No Incidence Angle Modifier”


Modifier Mode
If Parameter 9 = 2, “Second Order Incidence Angle Modifier”
If Parameter 9 = 3, “Incidence Angle Modifiers from a Data File”
If Parameter 9 = 4, “Incidence Angle Modifiers from Cover and Absorber
Properties”
If Parameter 9 = 5, “Biaxial Incidence Angle Modifiers”

INTEGRATED VALUE FIELDS

Energy Gain [kJ] Output 3

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Temperature [°C] Output 1

4.9.1.3. Hints and Tips


 Changing the Number of Collectors in Series: If the number of collectors in series changes, it is
generally advisable to change the flow rate to the collector array as well. Many users are surprised to
find that, upon changing the number of collectors in series (and leaving all else the same), the
efficiency and temperature out of the array are unaffected.
Consider an array of four collectors, each 2 m 2 with efficiency rated at 100 kg/hr (or 50 kg/hr-m2). With
all four collectors in parallel (Nseries = 1) and 200 kg/hr of flow to the array, the flow rate per collector
is (200/4 = 50) kg/hr. If the array is re-configured as two parallel sets of two collectors in series (Nseries
= 2) and all else remains the same, each branch of fluid will travel twice the collector length of the
previous example, but the flow rate per branch will be (200/2 = 100) kg/hr; these effects cancel each
other out, and the net result from the array will be the same as the previous example. Reduce the
array flowrate by half (from 200 kg/hr to 100 kg/hr) to see a comparison to the all-parallel case in which
the arrays receive the same flow rate per collector in both cases.
 Specifying Parameters: An index of several certified glazed flat-plate collector ratings may be found
on the website of the Solar Ratings and Certification Corporation (SRCC)2. When using an SRCC
Certification sheet to supply efficiency and other parameters, note the following.
 Efficiency equation parameters are listed under “Technical Information.” The equation (η = …)
shows the quadratic form of the efficiency equation, in both SI units and IP units. Intercept, slope,
and curvature coefficients (Parameters 6, 7, and 8, respectively) may be obtained from this
equation. Note that the SI units are W/m2-C and W/m2-C2 on the sheet; multiply the slope and
curvature coefficients provided by 3.6 to obtain units of kJ/hr-m2-K and kJ/hr-m2-K2.
 The y-intercept and slope of the linear form of the efficiency equation are also given. Either the
quadratic or linear equation may be used (set Parameter 8 = 0 to specify a linear equation).
 The technical information should specify which area measurement (gross or net) and temperature
difference (Tinlet-Tambient or Taverage-Tambient) were used for the efficiency equation. In most
cases, gross area and Tinlet-Tambient are specified here.

4–497
TRNSYS 18 – Mathematical Reference

 The incidence angle modifier (or Kτα) versus incidence angle (θ) values may be easily entered into
and read from a data file (Optical Mode 3); if the values don’t extend to 90°, add a value of 0 at 90°
to prevent warnings at incidence angles greater than the largest angle specified.
 Note the tested mass flow rate provided must be divided by collector area to obtain tested flow per
unit area (Parameter 5).
 For theoretical calculation of incidence angle modifiers (Optical Mode 4): Typical values of plate
absorptance, extinction coefficient, and other optical properties for common collector materials can be
found from Solar Engineering of Thermal Processes1.
 Continuity Checking: Make sure the specific heat specified for the collector fluid is the same as that
specified for any pipes, pumps, or storage tanks connected to the collector.
 Limitations of This Model: Type 1 is a steady-state model; there is no capacitance accounted for in
the collector. There is also no accounting for phase change of the fluid (boiling) in this model; constant
fluid properties are assumed.
Comparison to Other Standard Collector Models: This model is best suited for collectors with a known
equation of efficiency vs. temperature difference/radiation ratio. To model a collector without a known
efficiency equation, but with known physical parameters (insulation thickness and properties, glazing
thickness and properties, etc.), see Type 73.

4.9.1.4. Nomenclature
A [m²] Total collector array aperture or gross area (consistent with
FR(), FRUL, FRUL/T and Gtest)

a0 [-] Intercept (maximum) of the collector efficiency


a1 [kJ/h-m²-K] Negative of the first-order coefficient in collector efficiency
equation
a2 [kJ/h-m²-K²] Negative of the second-order coefficient in collector efficiency
equation
b0 [-] Negative of the 1st-order coefficient in the Incident Angle Modifier
(IAM) curve fit equation
b1 [-] Negative of the 2nd-order coefficient in the IAM curve fit equation
Cpf [kJ/kg-K] Specific heat of collector fluid
FR [-] Overall collector heat removal efficiency factor
Fav [-] Modified value of FR when efficiency is given in terms of T av, not
Ti
Fo [-] Modified value of FR when efficiency is given in terms of T o, not Ti
I [kJ/h-m²] Global (total) horizontal radiation
Id [kJ/h-m²] Diffuse horizontal radiation
IT [kJ/h-m²] Global radiation incident on the solar collector (Tilted surface)
IbT [kJ/h-m²] Beam radiation incident on the solar collector

m [kg/h] Flowrate at use conditions
 test
m [kg/h] Flowrate in test conditions

NS [-] Number of identical collectors in series


Ta [°C] Ambient (air) temperature

4–498
TRNSYS 18 – Mathematical Reference

Tav [°C] Average collector fluid temperature


Ti [°C] Inlet temperature of fluid to collector

4.9.1.5. Detailed Description


A general equation for solar thermal collector efficiency can be obtained from the Hottel-Whillier equation1:
 Cpf To  Ti 
m T  Ta 
 FR n  FR UL i
Qu
  Eq. 4.9.1-1
A IT A IT IT

The loss coefficient UL is not exactly constant with respect to temperature, so a better expression is obtained
by taking into account a linear dependency of UL versus (Ti-Ta) :


Qu T  Ta   F U Ti  Ta 
 FR  n  FR UL i
2
Eq. 4.9.1-2
R L/T
A IT IT IT

The equation above can be rewritten as:

  a 0  a1
T   a T 2 Eq. 4.9.1-3
2
IT IT

This is the general solar collector thermal efficiency equation used in Type 1. The thermal efficiency is
defined by three parameters: a0, a1 and a2. These three parameters are available for collectors tested
according to ASHRAE standards and rated by the Solar Rating and Certification Corporation (SRCC) 2, as
well as for collectors tested according to the European Standards on solar collectors (CEN) 3.
Note: It is important to make sure that collector area entered as a parameter matches the
area used when determining the values of a0, a1 and a2. Typically, efficiency curves are
provided for gross area in the US and aperture area in Europe
In the Hottel-Willier equation, T is equal to the difference between the collect inlet temperature (T i) and
the ambient temperature (Ta). Collector test reports sometimes provide the efficiency curve using either the
collector average temperature (Tav = (Ti+To)/2) or the collector outlet temperature (To) :

Ti  Ti  Ta

T  Tav  Tav  Ta Eq. 4.9.1-4
 T  T  T
 o o a

The 1st formulation is usually preferred in the US, while the 2 nd one is used in most European documents.
Type 1 can use any of these definitions of the temperature difference, and the user can specify the a 0, a1
and a2 coefficients using any of the definitions. The TRNSYS subroutine FPRIME (distributed as a DLL)
calculates the fin efficiency factor for the collector, taking into account the number of collectors in series,
whether the efficiency equation is defined in terms of inlet, average, or outlet temperature, and changes in
fluid specific heat and flowrate between the rated conditions and the use conditions.

4–499
TRNSYS 18 – Mathematical Reference

Incidence Angle Modifiers (IAMs)


Collector tests are generally performed on clear days at normal incidence so that the transmittance -
absorptance product () is nearly the normal incidence value for beam radiation, ()n. The intercept
efficiency, FR ()n, is corrected for non-normal solar incidence by the factor ()/()n. A general expression
for ()/()n is:

 
I bT
 b  I 1cos   d  
 n d 2  n g
I 
1cos 
2   
g

  Eq. 4.9.1-5
 n
 n IT

TYPE 1 OPTICAL MODES


Five optical modes are available to input the IAM data. Each of the five options are explained in detail
below.
Optical mode 1
No incidence angle modification (or perfect IAMs). The incidence angle modifier ()/()n=1 for any
incidence angle.
Optical mode 2
With optical mode 2, the user specifies the values of b0 and b1 in the equation below:

 b  1  b  1  1  b  1  12
0  1  Eq. 4.9.1-6
 n  cos   cos 
Note: Some collector tests only provide the IAM value at one incidence angle, typically 50°. In such a case,
the recommended approach is to use Optical Mode 2, set b1 = 0, and calculate b0 using the equation above.
Optical mode 3
Values of ()b/()n versus incidence angle ( are supplied in an external data file. Mode 3 is for a collector
with a cover that is symmetrical in both longitudinal and transverse directions (such as a flat plate), so only
one incidence direction needs to be provided in the data file. The data consist of between 2 and 10 values
of incidence angles and modifiers.
The data file format is as follows (2  Na  10):
<Incidence angle 1> <Incidence angle 2> etc. Na values [0;90]
<IAM 1> IAM for angle 1
<IAM 2> IAM for angle 1
...
<IAM Na> IAM for angle Na
The first line gives the values of the independent variable (incidence angle) that will be used in the IAM
map. Then, the dependent variable (IAM) is provided for all values of the independent variable. Data are
read in free format. These data are read and interpolated by subroutine DYNAMICDATA (see the
Programmer's Guide for more information).
An example is shown below. An example is also provided in the main %TRNSYS18% directory, in the
Examples -> Data Files sub-directory.
Example
0 10 20 30 40 50 60 70 80 90 ! Angle values
1.000 ! IAM for incident angle 1 ( 0)
0.997 ! IAM for incident angle 2 (10)
0.988 ! IAM for incident angle 3 (20)
...
0.644 ! IAM for incident angle 8 (70)

4–500
TRNSYS 18 – Mathematical Reference

0.120 ! IAM for incident angle 9 (80)


0.000 ! IAM for incident angle 10 (90)

Optical mode 4
The TRNSYS function routine Tau_Alpha (see the Programmer’s Guide) is used to calculate incidence
angle modifiers for beam radiation in terms of angle of incidence and cover properties. The methodology
is derived from Solar Engineering of Thermal Processes1. See the Programmer’s Guide for further
elaboration on the procedure.
Optical mode 5
Values of (τα)b/(τα)n versus incidence angle (θ) are supplied in an external data file for both the
longitudinal (θL) and transverse (θT) directions. The incidence angle modifier used in the model is the
product of the modifiers in each direction. This approach allows for approximating incidence angle
modifiers for asymmetrical covers, such as tubes. Note that this mode only offers an approximation of
IAMs for these surfaces; see Type 71 for interpolating true bi-axial incidence angle modifier data
The data file format is as follows (2  Na  10):
<Incidence angle 1> <Incidence angle 2> etc. Na values [0;90]
<Longitudinal IAM 1> <Transverse IAM 1> IAMs for angle 1
<Longitudinal IAM 2> <Transverse IAM 2> IAMs for angle 2
...
<Longitudinal IAM Na> <Transverse IAM Na> IAMs for angle Na
The first line gives the values of the independent variable (incidence angle) that will be used in the IAM
map. Then, the dependent variables (longitudinal IAM, transverse IAM) are provided for all values of the
independent variable. Data are read in free format. These data are read and interpolated by subroutine
DYNAMICDATA (see the Programmer's Guide for more information).
An example is shown below. An example is also provided in the main %TRNSYS18% directory, in the
Examples -> Data Files sub-directory. (Note: these values are intended only to illustrate the use of Type 1;
they are not intended as typical or representative values).
Example
0 15 30 45 60 75 90 ! Angle values
1.00 1.00 ! Longitudinal and transverse IAMs for incidence angle 1 ( 0)
1.00 1.01 ! Longitudinal and transverse IAMs for incidence angle 2 (15)
0.98 1.03 ! Longitudinal and transverse IAMs for incidence angle 3 (30)
...
0.90 1.04 ! Longitudinal and transverse IAMs for incidence angle 8 (60)
0.71 1.02 ! Longitudinal and transverse IAMs for incidence angle 9 (75)
0.00 0.00 ! Longitudinal and transverse IAMs for incidence angle 10 (90)

IAMs for Diffuse Radiation


The incidence angle modifiers for both diffuse sky radiation, ()s/()n, and ground reflected diffuse
radiation, ()g/()n, are determined in all modes by integrating beam IAMs over the sky dome and over
the ground projected onto the collector surface, respectively: Isotropic diffuse radiation is assumed for this
analysis. See the integration equation below for integrating sky diffuse incidence angle modifiers over the
sky dome:
 / 2   / 2    /2 sin (cot  / tan )  
1

 ds  0  / 2  bn ( )  cos  sin  dd   / 2  / 2 b
( )  cos  sin  dd
 n Eq. 4.9.1-7
 n  / 2   /2  /2 sin 1 (cot  / tan )

0 
 /2
cos  sin  dd  
 / 2  
 /2
cos  sin  dd

For the ground-reflected diffuse radiation incidence angle modifiers, which are integrated over the surface
area of the ground projected onto the collector:

4–501
TRNSYS 18 – Mathematical Reference

 /2  /2  b ( )  cos( )  sin( ) dd


 dg  / 2   sin 1
(cot  / tan )  
 n Eq. 4.9.1-8
 n  /2
 
 /2
cos( )  sin( ) dd
/ 2  sin 1 (cot  / tan )

These integrations are performed numerically, using the user-supplied IAM data for ()b/()n.

4.9.1.6. References
1. Beckman, W.A., and Duffie, J. A. Solar Engineering of Thermal Processes. Second Edition. New
York: John Wiley & Sons, Inc, 1991.
2. Solar Ratings and Certification Corporation (Website). Available at https://secure.solar-
rating.org/Certification/Ratings/RatingsSummaryPage.aspx Last accessed August 2015. Last accessed
August 2015.

4–502
TRNSYS 18 – Mathematical Reference

4.9.2. Type 45: Thermosyphon Collector with Integral


Collector Storage
This component models a thermosyphon system consisting of a flat-plate solar collector, a stratified storage
tank (either vertical or horizontal cylinder), and some piping between the two components. The natural
convection of warmer, more buoyant fluid drives the flow from the top of the collector to the storage tank
and from the bottom of the storage tank to the collector; a check valve prevents reverse flow between the
components. Water is the working fluid in the system. Flow in the collector is assumed to be steady-state.
The system is analyzed by dividing the thermosyphon loop into a number of segments normal to the flow
direction and applying Bernoulli's equation for incompressible flow to each segment. The flow rate is
obtained by numerical solution of the resulting set of equations. The stratification in the storage tank is
modeled using a subroutine based on the Type 38 plug-flow tank model. The advantage of the Type 38
model over fixed node models (such as Type158) is flexibility in suitable simulation time steps; a longer
time step in the Type 38 tank model will be sufficient for many stratified tank systems, whereas simulation
time steps of a few minutes are necessary in a Type158 model with a large number of fixed nodes.

4.9.2.1. Parameter / Input / Output Reference


PARAMETERS

1 Collector area [m2] The area of the solar collector, consistent with the supplied
efficiency parameters (typically efficiency values are calculated
based on gross area, not net area).
The y-intercept (a0) of the following collector efficiency equation:
2 Intercept efficiency [-]
Efficiency = a0 - a1*(T-Tamb)/I_T, where
I_T = Insolation per unit area;
T_amb = ambient air temperature;
T=T_inlet.
a0 may also be called FrTan. NOTE: Unlike Type 1, Type 45 does
*not* allow the user to specify efficiency as a function of average or
outlet collector temperature.
The slope (a1) of the following collector efficiency equation:
3 Efficiency slope [kJ/hr-m2-K]
Efficiency = a0 - a1*(T-Tamb)/I_T, where
I_T = Insolation per unit area;
T_amb = ambient air temperature;
T=T_inlet
a1 may also be called FrUl. NOTE: Unlike Type 1, Type 45 does
*not* allow the user to specify efficiency as a function of average or
outlet collector temperature.

4 Tested flow rate [kg/hr-m2] The flow rate (per unit collector area) at which the collector
efficiency test was performed.

5 Incidence angle [-] This parameter is b0 in the equation IAM = 1 - b0 * S, where S =


modifier constant (1/cos(incidence angle)-1).

6 Collector slope [degrees] The slope of the collector surface. The slope is defined as the
angle between the surface and the horizontal.0° = horizontal
surface, 90° = vertical surface. Slope is positive when surface is
tilted in the direction of the surface azimuth. As a general rule,
performance is somewhat optimized when the collector slope is set
to the latitude.

If Parameter 7 >0 (logical unit)

4–503
TRNSYS 18 – Mathematical Reference

The logical unit number of the file which contains the collector head
7 Logical unit [-]
vs. flowrate data (head is in meters of water). Every external file
that TRNSYS reads from or writes to must be assigned a unique
logical unit number in the TRNSYS input file. This number is
automatically assigned and should not be changed unless by
advanced TRNSYS users.

8 Number of data points [-] The number of data points of collector head vs. flowrate that are
contained in the external data file (must be between 2 and 10).

If Parameter 7 <0 (internal pressure drop calculation)

7 Internal pressure drop [-] When set < 0, this parameter indicates to the component
calculation subroutine that the presure drop should be calculated internally.
Do not change this parameter; use the other proforma for Type 45
if head pressure vs flowrate data will be supplied through a data
file.

8 Number of parallel [-] The number of parallel collector risers; used for flow vs head
collector risers calculations.

The following parameters apply for all proformas

9 Riser diameter [m] The diameter of the collector risers.

10 Header diameter [m] The diameter of the collector headers.

11 Header length [m] The length of the collector headers.

12 Number of collector [-] The number of equally-sized nodes that the collector will be divided
nodes into for the thermal head calculations.

13 Collector inlet to outlet [m] The vertical distance between the collector inlet and the collector
distance outlet.

14 Collector inlet to tank [m] The vertical distance between the outlet of the tank and the inlet of
outlet distance the collector.

15 Collector inlet diameter [m] The diameter of the inlet pipe of the collector.

16 Length of collector inlet [m] The length of the collector inlet pipe.

17 Number of inlet bends [-] The number of equivalent right-angle bends in the collector inlet
pipe.

18 Inlet pipe loss [kJ/hr-m2-K] The loss coefficient of the collector inlet pipe (including its
coefficient insulation).

19 Collector outlet [m] The diameter of the collector outlet pipe.


diameter

20 Length of collector [m] The length of the collector outlet piping.


outlet

21 Number of outlet [-] The number of equivalent right-angle bends in the collector outlet
bends piping.

4–504
TRNSYS 18 – Mathematical Reference

22 Outlet pipe loss [kJ/hr-m2-K] The loss coefficient of the collector outlet piping (including its
coefficient insulation).

23 Inlet position mode [-] Mode 1 = hot water enters the tank in a fixed location; the incoming
segment mixes with adjacent segments if the temperature is within
1/2 degree.
Mode 2 = the tank has variable inlet positions; new segments are
inserted at levels which produce no temperature inversions. This
mode allows for a maximum degree of stratification.

24 Tank volume [m3] The actual volume of the storage tank (not the nominal value).

25 Tank height [m] The height of the storage tank (if the tank is vertical), or the
diameter of the storage tank (if the tank is horizontal).

26 Height of collector [m] The vertical distance between the bottom of the storage tank and
return the inlet of the collector.

27 Fluid specific heat [kJ/kg-K] The specific heat of the fluid contained in the system.

28 Fluid density [kg/m3] The density of the fluid contained in the system.

29 Thermal conductivity [kJ/hr-m-K] The effective thermal conductivity of the fluid and the walls of the
storage tank (0 = no conduction between adjacent fluid nodes).

30 Tank configuration [-] 1 = Vertical cylinder ;


2 = Horizontal cylinder

31 Overall loss coefficient [kJ/hr-K] The overall loss coefficient (UA) for the storage tank.

32 Insulation ratio [-] The ratio of the thickness of the top insulation to the side insulation
for vertical tanks, or the ratio of the insulation thickness of the top
insulation to the bottom insulation of a horizontal cylindrical tank
(set this ratio to 1 if the tank has a concentric insulation jacket).

33 Initial temperature [°C] The initial temperature of the storage tank.

34 Maximum heating rate [kJ/hr] The maximum rate at which energy can be added to the thermal
storage tank from the auxiliary heating element. If there is no
heating element in the tank, set this parameter to 0.

35 Auxiliary height [m] The height of the auxiliary heater element above the bottom of the
storage tank.

36 Thermostat height [m] The height of the thermostat for the auxiliary heater above the
bottom of the storage tank.

37 Set point temperature [°C] The set point temperature for the auxiliary heating element. The
thermostat will enable the heating element when the temperature
of the node containing the thermostat falls below (Tsetpoint –
Tdeadband), and it will continue to heat the fluid until it reaches the
set point temperature.

38 Temperature [°C] The dead band temperature difference for the auxiliary heating
deadband element. The thermostat will enable the heating element when the
temperature of the node containing the thermostat falls below

4–505
TRNSYS 18 – Mathematical Reference

(Tsetpoint – Tdeadband), and it will continue to heat the fluid until it


reaches the set point temperature.

39 Flue loss coefficient [kJ/hr-K] The overall loss coefficient (UA) for heat loss to the flue when the
auxiliary heater is off. This parameter is used to model gas heated
storage tanks and should be set to zero if there is no flue.

INPUTS

1 Total incident radiation [kJ/hr-m2] The total (beam + diffuse) radiation incident on the plane of the
solar collector, per unit area

2 Total horizontal [kJ/hr-m2] The total horizontal radiation (beam + diffuse) per unit area.
radiation

3 Horizontal diffuse [kJ/hr-m2] The diffuse radiation (both from the sky and ground-reflected) on a
radiation horizontal surface, per unit area.

4 Incidence angle [degrees] Angle of incidence of beam radiation on the collector surface.

5 Ground reflectance [-] The reflectance of the surface above which the solar collector is
positioned. Typical values are 0.2 for ground not covered by snow
and 0.7 for snow-covered ground. The reflectance is the ratio of
reflected radiation to total incident radiation and therefore must be
between 0 and 1.

6 Ambient temperature [°C] The temperature of the ambient air surrounding the collector. Note
this may be different from the environment surrounding the storage
tank (Input 9 below).

7 Replacement [°C] The temperature of the replacement fluid flowing into the bottom of
temperature the storage tank (temperature of the fluid displacing the load
flowrate, Input 8 below).

8 Load flowrate [kg/hr] The flowrate of replacement fluid flowing into the bottom of the
storage tank. An equal amount of fluid is assumed to flow from the
top of the tank to meet the load.

9 Environment [°C] The temperature of the environment in which the storage tank is
temperature located. If the storage tank is outside (with the solar collector),
connect the same input as used for Input 6 above.

10 Control signal [-] The control signal for the auxiliary heating element. The available
power for the heating element will be this input multiplied by the
maximum power for the element. If an auxiliary heater is not
desired for the simulation, set this input to a constant of 0.0 or set
the maximum power for the element to 0.0

DERIVATIVES

There are no derivatives used by this Type.

OUTPUTS

1 Temperature to tank [°C] The temperature of the fluid exiting the solar collector and entering
the storage tank.

4–506
TRNSYS 18 – Mathematical Reference

2 Useful energy from [kJ/hr] The rate of useful energy gain by the solar collector fluid:
collector
Quseful = mdot,collector * Cp * (Tout,collector – Tin,collector).
(Note, useful gain does not include pipe thermal gains or losses).

3 Temperature to [°C] The temperature of the fluid exiting the bottom of the storage tank
collector and returning to the collector; the temperature of the bottom node
of the storage tank.

4 Flowrate through [kg/hr] The flowrate of the fluid exiting the solar collector and entering the
collector storage tank; or, the flow rate of fluid exiting the bottom of the
storage tank to return to the collector.

5 Temperature to load [°C] The temperature of the fluid exiting the top of the storage tank and
delivered to the service load; the temperature of the top node of the
storage tank.

6 Flowrate to load [kg/hr] The flow rate of fluid exiting the tank at the top to meet the service
load. Same as input load flowrate (Input 8).

7 Thermal losses [kJ/hr] The rate of thermal energy loss to the environment from the
storage tank (not including the piping to and from the tank or the
losses from the collector).

8 Energy rate to load [kJ/hr] The rate at which energy is removed from the tank to supply the
load:
Qload = mdot,load * Cp * (Ttop,tank - Treplacement)

9 Internal energy change [kJ] The internal energy change of the tank, relative to its initial
condition. Note: this output should not be integrated, as it is an
energy quantity (not an energy rate).

10 Auxiliary heating rate [kJ/hr] The rate at which energy is added to the thermal storage tank by
the auxiliary heater.

11 Energy rate from heat [kJ/hr] The rate of energy transfer from the collector to the storage tank:
source
Qin = mdot,collector * Cp * (Ttank,top – Ttank,bottom)

12 Average tank [°C] The average temperature of the fluid in the storage tank over the
temperature timestep.

13 Incidence angle [-] The ratio of the transmittance-absorptance product of the collector
modifier (overall) at the given incidence angle over the transmittance-absorptance
product at normal incidence; the ratio of the total absorbed
radiation to the radiation that would have been absorbed if the
beam radiation were normal to the collector surface.

4.9.2.2. Simulation Summary Report Contents


VALUE FIELDS

Collector Area [m2] Parameter 1

Tank Volume [m3] Parameter 24

4–507
TRNSYS 18 – Mathematical Reference

Setpoint Temperature [°C] Parameter 37

TEXT FIELDS

There are no text fields reported by this Type.

INTEGRATED VALUE FIELDS

Delivered Energy [kJ] Output 2

Thermal Losses [kJ] Output 7

Auxiliary Energy [kJ] Output 10

MINIMUM/MAXIMUM VALUE FIELDS

Temperature to Tank [°C] Output 1

Temperature to [°C] Output 3


Collector

Temperature to Load [°C] Output 5

Average Tank [°C] Output 12


Temperature

Stored Energy (since [kJ] Output 9


start)

4.9.2.3. Hints and Tips


 Updates for TRNSYS18: As of the release of TRNSYS18, Type 45 now allows for multiple instances
of the Type within a simulation.
 Specifying Collector Parameters: An index of certified glazed flat-plate collector ratings may be
found on the website of the Solar Ratings and Certification Corporation (SRCC) 2.
 The efficiency equation is listed under “Technical Information.” The y-intercept and slope of the
linear form of the efficiency equation are given to the right of the quadratic equation; Parameters 2
and 3 may be obtained from this equation. Note that the SI units are W/m 2-C on the SRCC
certification sheet; multiply the slope coefficient by 3.6 to obtain units of kJ/hr-m2-K.
 The incidence angle modifier (or Kτα) versus incidence angle (θ) values may be plotted versus S
(1/cos(θ)-1) and a curve fit applied to obtain the incidence angle modifier constant (Parameter 5).
 Note the tested mass flow rate provided must be divided by collector area to obtain tested flow per
unit area (Parameter 4).
 Obtaining Inputs: If a standard weather file (such as TMY3, EPW, etc.) will be used for the model,
the ambient temperature and incident radiation inputs may be linked from Type15 (Weather Data
Generator). If measured radiation values will be read in through Type 9 (Data Reader), use of Type
16 (Radiation Processor) is highly recommended for radiation processing. Type 16 will properly
interpolate radiation values between data points; see documentation of Type 16 for more information.
 Limitations of This Model: The collector model of Type 45 is a steady-state model; there is no
capacitance accounted for in the collector. As such, the model is better suited for modeling standard
flat-plate collectors paired with a storage tank than for modeling integrated collector storage (ICS)

4–508
TRNSYS 18 – Mathematical Reference

systems in which the bulk of the mass of the fluid is held in the collector itself. There is also no
accounting for phase change of the fluid (boiling) in this model.

4.9.2.4. Nomenclature
A Collector area
bo Incidence angle modifier constant from ASHRAE 93-77 test result
Cp Specific heat of working fluid
di, do Diameter of collector inlet and outlet pipes
dH Diameter of collector headers
dR Diameter of collector risers
f Friction factor for flow in pipes
F'UL Product of the collector efficiency factor, F', and heat loss coefficient, UL
FRUL Slope of the collector efficiency versus (Tci - Ta)/IT curve
FR()n Intercept of the collector efficiency versus (Tci - Ta)/IT curve
FR() Intercept efficiency corrected for non-normal incidence
g Gravitational constant
G Collector flowrate per unit area
Gtest Collector flowrate per unit area during efficiency test
Hc Vertical distance between outlet and inlet of collectors
Ha Height of auxiliary heating element above bottom of tank
Ho Vertical distance between outlet of tank and inlet to collector
HR Height of collector return above bottom of tank
Ht Height of tank
Hth Height of auxiliary thermostat above bottom of tank
hLi Frictional head loss in the piping
I Horizontal total radiation per unit area
IbT Beam radiation per unit area
Id Horizontal diffuse radiation per unit area
Ig Diffuse reflected ground radiation per unit area
IT Total incident radiation per unit area
kw Effective thermal conductivity of water and tank
k i, k o Number of velocity heads lost by flow in bends, tees, and restrictions of inlet
and outlet
Li, Lo Length of inlet and outlet piping
Lh Length of collector headers
LU Fortran logical unit containing collector frictional head loss data
m Thermosyphon flowrate
mL Load flowrate
NB1,NB2 Number of equivalent right angle bends in inlet and outlet connecting pipes
NDATA Number of lines of data in LU
NR Number of parallel collector risers
Nx Number of equal sized collector nodes
Q AUX Rate of auxiliary energy Input to tank

Q env Rate of energy loss from tank

Q in Rate of energy Input to tank by solar

Q sup Rate of energy supply to load by tank

4–509
TRNSYS 18 – Mathematical Reference

Q he Maximum rate at which auxiliary heater can supply energy

Qu Rate of useful energy collection


ri Ratio of insulation thickness (see Parameter 33 description)
Ratio of collector heat removal efficiency factor, FR, to the value at test
r
conditions
Re Reynolds number for flow in pipes
Ta Ambient temperature
Tenv Environmental temperature for losses from storage
Tci Collector inlet temperature
Tck Temperature of kth node in collector
Tco Collector outlet temperature
Th Temperature of hot fluid entering tank
Ti Temperature of ith tank segment
Tp Average temperature of fluid in a pipe
Tpi Temperature of inlet fluid to pipe
Tpo Pipe outlet fluid temperature
TL Temperature of load flowstream entering tank
Tset Set temperature for tank auxiliary heater thermostat
Ui, Uo Loss coefficients for inlet and outlet pipes (based on pipe surface area)
UA Overall UA value for tank
(UA)f Conductance for heat loss from tank to auxiliary heater flue
(UA)p Conductance for heat loss from pipes
v Velocity of fluid in pipes
Vh Velocity of fluid at entry to inlet header and at exit of outlet header
Vt Volume of storage medium
hi Height of the ith node
Tdb Thermostat temperature deadband
Ph Pressure change across collector inlet and outlet headers
Pi Change in pressure across the ith node
E Change in internal energy of storage since beginning of simulation
 Collector slope measured from horizontal
htr Control signal for auxiliary heater (0 or 1) that disables or enables auxiliary
heater
i Density of ith node
g Ground reflectance
s Density of working fluid at standard conditions
 Solar incidence angle
  b  s  g incidence angle modifiers for total, beam, sky diffuse and ground diffuse
, , ,
 n  n  n  n radiation

4.9.2.5. Detailed Description


Application of Bernoulli's equation to any node, i, in the thermosyphon loop results in the following
expression for pressure drop:
Pi = ighi + ighLi Eq. 4.9.2-1

At any instant of time, the sum of the pressure changes around the loop must equal zero:

4–510
TRNSYS 18 – Mathematical Reference

i N i N
 i hi   i hLi Eq. 4.9.2-2
i1 i1

The thermosiphon model involves the numerical solution for the flow rate that satisfies the above equation.
The density of the fluid is evaluated at the local temperature using a correlation for water. Temperatures
and frictional head losses in each node of the collector and pipes are determined as described below.
The collector inlet and outlet pipes are each considered to be single nodes, with negligible thermal
capacitance.
A first law analysis yields the following expressions for average and outlet temperatures of these pipes:
mCp UA p
Tp = Ta + Tpi - Ta   1-exp - Eq. 4.9.2-3
UA p mCp
UA p
Tpo = Ta + (Tpi - Ta) . exp - Eq. 4.9.2-4
mCp

FRICTION HEAD LOSS


Frictional head loss in either pipe is given as:
2 2
H p = fLv + kv Eq. 4.9.2-5
2d 2
where the friction factor, f, is
f = 64/ Re for Re  2000
f = 0.032 for Re > 2000
A correction is also applied to allow for the additional friction due to developing flow in the connecting pipes.
The program can evaluate the collector pressure drop, or pressure drop versus flow rate for the collector
can be entered as a data file. Pressure drop versus flow rate data entered by the user is not adjusted to
allow for the variation of water viscosity with temperature. The friction head in each section of the
thermosyphon loop is evaluated as follows:
1. Entry from tank to connecting pipe to collector
k =0 .5
2. Developing flow in the connecting pipes (and collector risers, if collector pressure drop versus flow
rate data is not specified)
f = f[1 + .038/(L/Re/d).964]
3. Losses due to bends in connecting pipes
a. right angle (90°) bend
equivalent length of pipe increased by 30 diameters for Re ≤ 2000
or k = 1.0 for Re ≥ 2000
b. 45° bend
equivalent length at pipe increased by 20 diameters for Re ≤ 2000
or k = 0.6 for Re > 2000
4. Cross section change at junction of connecting pipes and header (and riser entry and exit to header,
if collector friction data is not specified):
a. Sudden Expansion
k = .667 (D1/D2)4 - 2.667 (D1/D2)2 + 2.0

4–511
TRNSYS 18 – Mathematical Reference

b. Sudden Contraction
k = -.3259 (D2/D1)4 -.1784 (D2/D1)2 + 0.5
where D1 = inlet diameter, D2 = outlet diameter
5. Collector header pressure drop (if collector friction data is not specified) - average of pressure
change along inlet and outlet headers for equal mass flow in each riser:

NR
NR  i  1
S1   Eq. 4.9.2-6
i1 NR2
NR
NR  i  1
S2   Eq. 4.9.2-7
i1 NR2
f LhV2h
A11 = Eq. 4.9.2-8
2 dh
where f = 64/Re with Re based on inlet header velocity and temperature

A12 = A11 with f = 64/Re

Based on outlet header, velocity and temperature:


Ph = (-S1 A11 + 2 (S2A2) + S1 A12)/2 Eq. 4.9.2-9
V2
A2 = h Eq. 4.9.2-10
2

6. Loss at entry of flow into tank


k=1
Friction head loss in the tank is neglected. If pressure drop versus flow rate data for the collector is entered
via an external file, the program only evaluates friction loss in the connecting pipes, connections to the tank,
and bends.
If pressure drop versus flow rate data are supplied, they are read and interpolated by subroutine
DYNAMICDATA (see the Programmer's Guide). The data consist of between 2 and 10 values of flow rate
and head loss (measured in meters of water). All values of flow rate are listed first, in increasing order,
followed by values of pressure drop (free format) loss in meters of water. For numerical stability, the first
data line should correspond to zero head loss at zero flow rate.

THERMOSIPHON HEAD
The net weight of fluid in the collector is found by dividing the collector into Nx (user specified) equally sized
nodes. The thermal performance is modeled according to the Hottel-Whillier equation (Morrison and
Ranatunga, 1980). The temperature at the midpoint of any collector node, k, is:
I F () I F () k - 1/2
Tck = Ta + T R + Tci - Ta - T R  exp F'U L  Eq. 4.9.2-11
FRUL FR UL G  Cp Nx
The collector parameter F'UL is calculated from the value of FRUL and G at test conditions:

F'U L = -Gt est  Cp ln 1 - FRUL Eq. 4.9.2-12


Gt estCp

4–512
TRNSYS 18 – Mathematical Reference

This procedure neglects changes in F' and UL due to changes in the fluid heat transfer coefficient. The
parameter FR() is determined from the intercept efficiency at normal incidence F R()n, using an
incidence angle modifier, ()/()n. In general:

 b 1+cos  s 1-cos   g
IbT + Id + Ig
  n 2  n 2  n Eq. 4.9.2-13
=
 n IT
The incidence angle modifier for beam radiation is given in terms of incidence angle and a user specified
constant, bo, (ASHRAE 93 test result) as:

 b
= 1 - bo 1 - 1 Eq. 4.9.2-14
 n cos
The incidence angle modifiers for both diffuse sky radiation, ()s/()n, and ground reflected diffuse
radiation, ()g/()n, are determined in all modes by integrating beam IAMs over the sky dome and over
the ground projected onto the collector surface, respectively: Isotropic diffuse radiation is assumed for this
analysis. See the integration equation below for integrating sky diffuse incidence angle modifiers over the
sky dome:
 / 2   / 2  b  /2 sin 1 (cot  / tan )  b ( )  cos  sin  dd
 ds 
0     ( )  cos  sin  dd  
 /2 / 2  
 /2  n
 n Eq. 4.9.2-15
 n    / 2 /2  /2 sin 1 (cot  / tan )
   cos  sin  dd  
0  /2 / 2  
 /2
cos  sin  dd

For the ground-reflected diffuse radiation incidence angle modifiers, which are integrated over the surface
area of the ground projected onto the collector:
 /2  /2  b ( )  cos( )  sin( ) dd
 dg  / 2   sin 1
(cot  / tan )  
 n Eq. 4.9.2-16
 n  /2
 
 /2
cos( )  sin( ) dd
/ 2  sin 1 (cot  / tan )

These integrations are performed numerically, using the user-supplied IAM data for ()b/()n.
The overall useful energy collection is:
Qu = r Ac (FR() IT - FRUL (Tci - Ta)) Eq. 4.9.2-17

Where:

G 1-exp - F'U L
F use GC p
r= R = Eq. 4.9.2-18
F R test G test 1-exp - F'U L
G te st Cp
From a simple energy balance, the collector outlet temperature is:
Tco = Qu/ m Cp + Tci Eq. 4.9.2-19

4.9.2.6. References
1. Beckman, W.A., and Duffie, J. A. Solar Engineering of Thermal Processes. Second Edition. New
York: John Wiley & Sons, Inc, 1991.

4–513
TRNSYS 18 – Mathematical Reference

2. Solar Ratings and Certification Corporation (Website). Available at https://secure.solar-


rating.org/Certification/Ratings/RatingsSummaryPage.aspx Last accessed August 2015. Last accessed
August 2015.

4–514
TRNSYS 18 – Mathematical Reference

4.9.3. Type 50: Photovoltaic-Thermal Collector


Type 50 models a combined photovoltaic and thermal (PVT) solar collector by adding a PV module to the
standard flat-plate collector. It incorporates the analysis and work of Florschuetz for flat plate collectors
operated at peak power and makes use of the I-V curves of the cells (or array) in solving for peak power or
for current output at some imposed voltage. Modes 1, 2, 3 and 4 of the modified collector are essentially
similar to, respectively, Types 1, 72, 73, and 74 of the TRNSYS Standard Solar Library, only the work of
Florschuetz is included with each model.

4.9.3.1. Parameter / Input / Output Reference


PARAMETERS

1 Mode [-] 1 = Flat plate collector, constant losses, constant cover


transmittance
2 = Flat plate collector, losses as a function of temperature,
windspeed, and geometry, constant cover transmittance
3 = Flat plate collector, constant losses, cover transmittance a
function of incidence angle
4 = Flat plate collector, losses as a function of temperature,
windspeed, and geometry, cover transmittance a function of
incidence angle
5 = Concentrating collector, constant losses, constant cover
transmittance
6 = Concentrating collector, losses as a function of temperature,
windspeed, and geometry, constant cover transmittance
7 = Concentrating collector, constant losses, cover transmittance a
function of incidence angle
8 = Concentrating collector, losses as a function of temperature,
windspeed, and geometry, cover transmittance a function of
incidence angle
The Mode should be set automatically based on the proforma
chosen. Do not change this value! Replace the proforma in the
simulation if another Mode is desired.

2 Collector area [m2] The total area of the solar collector array, consistent with the fin
efficiency and loss coefficients provided (Parameters 3 and 6,
respectively).
The ratio of the actual useful energy gain to the useful gain that
3 Collector fin efficiency [-]
factor (or collector would result if the collector absorbing surface were at the local fluid
efficiency factor) temperature, or (heat transfer from fluid to air)/(heat transfer from
absorber to air). For a flat absorber, it is the heat transfer from the
fin over the maximum possible heat transfer from the fin.
Refer to: ASHRAE Standard 93-77 for details on the fin efficiency

4 Fluid specific heat (or [kJ/kg-K] The specific heat of the collector fluid.
thermal capacitance
per unit mass)

5 Collector plate [-] The absorptance of the absorber surface of the collector (visible
absorptance wavelength range). The absorptance is a ratio of the amount of
radiation absorbed by a surface to the total radiation incident on
the surface.

4–515
TRNSYS 18 – Mathematical Reference

If mode (Parameter 1)=1 (flat plate collector, constant losses, constant transmittance)

6 Overall loss coefficient [kJ/hr-m2-K] The overall loss coefficient from the solar collector absorber to the
ambient air, per unit collector area (using the area specified in
Parameter 2).

7 Cover transmittance [-] Ratio of radiation transmitted through the collector cover(s) to the
total radiation incident on the collector. Must be between 0 and 1.
Must be a constant for this proforma (for transmittance as a
function of incidence angle, see modes 3 or 4).

8 Temperature [K-1] Temperature coefficient [C] of solar cell efficiency:


coefficient of solar cell
efficiency Eff (T) = Eff(TRef) * (1-C*(T-TRef)).

9 Reference temperature [°C] Reference temperature [Tref] for cell efficiency:


for cell efficiency
Eff (T) = Eff(TRef) * (1-C*(T-TRef)).

10 Packing factor [-] Ratio of PV cell area to absorber area.

If mode =2 (flat plate collector, losses as a function of temperature, wind, and geometry, constant transmittance)

6 Number of glass [-] The number of covers (or glazings) over the collector surface
covers

7 Collector plate [-] Ratio of radiation emitted by the collector plate to that which would
emittance be emitted by a blackbody. Must be between 0 and 1.

8 Loss coefficient from [kJ/hr-m2-K] Thermal loss coefficient (per unit top surface area) for thermal
bottom and edges (per losses from the edges and bottom of the collector
unit area in Parameter
2)

9 Collector slope [degrees] The slope of the collector surface. The slope is defined as the
angle between the surface and the horizontal.0° = horizontal
surface, 90° = vertical surface. Slope is positive when surface is
tilted in the direction of the surface azimuth. As a general rule,
performance is somewhat optimized when the collector slope is set
to the latitude.

10 Cover transmittance [-] Ratio of radiation transmitted through the collector cover(s) to the
total radiation incident on the collector. Must be between 0 and 1.
Must be a constant for this proforma (for transmittance as a
function of incidence angle, see modes 3 or 4).

11 Temperature [K-1] Temperature coefficient [C] of solar cell efficiency:


coefficient of solar cell
efficiency Eff (T) = Eff(TRef) * (1-C*(T-TRef)).

12 Reference temperature [°C] Reference temperature [Tref] for cell efficiency:


for cell efficiency
Eff (T) = Eff(TRef) * (1-C*(T-TRef)).

13 Packing factor [-] Ratio of PV cell area to absorber area.

If mode = 3 (flat plate collector, constant losses, angular dependence on transmittance)

4–516
TRNSYS 18 – Mathematical Reference

6 Number of glass [-] The number of covers (or glazings) over the collector surface
covers

7 Overall loss coefficient [kJ/hr-m2-K] The overall loss coefficient from the solar collector absorber to the
ambient air, per unit collector area (using the area specified in
Parameter 2).

8 Extinction coefficient- [-] The product of the extinction coefficient and cover thickness for
thickness product of a one glazing covering the solar collector
single cover

9 Temperature [K-1] Temperature coefficient [C] of solar cell efficiency:


coefficient of solar cell
efficiency Eff (T) = Eff(TRef) * (1-C*(T-TRef)).

10 Reference temperature [°C] Reference temperature [Tref] for cell efficiency:


for cell efficiency
Eff (T) = Eff(TRef) * (1-C*(T-TRef)).

11 Packing factor [-] Ratio of PV cell area to absorber area.

if mode = 4 (flat plate collector, losses as a function of temperature, windspeed, and geometry, angular dependence
on transmittance)

6 Number of glass [-] The number of covers (or glazings) over the collector surface
covers

7 Collector plate [-] Ratio of radiation emitted by the collector plate to that which would
emittance be emitted by a blackbody. Must be between 0 and 1.

8 Loss coefficient from [kJ/hr-m2-K] Thermal loss coefficient (per unit top surface area) for thermal
bottom and edges (per losses from the edges and bottom of the collector
unit area in Parameter
2)

9 Collector slope [degrees] The slope of the collector surface. The slope is defined as the
angle between the surface and the horizontal.0° = horizontal
surface, 90° = vertical surface. Slope is positive when surface is
tilted in the direction of the surface azimuth. As a general rule,
performance is somewhat optimized when the collector slope is set
to the latitude.

10 Extinction coefficient- [-] The product of the extinction coefficient and cover thickness for
thickness product of a one glazing covering the solar collector
single cover

11 Temperature [K-1] Temperature coefficient [C] of solar cell efficiency (see eqn below):
coefficient of solar cell
efficiency Eff (T) = Eff(TRef) * (1-C*(T-TRef)).

12 Reference temperature [°C] Reference temperature [Tref] for cell efficiency (see eqn below):
for cell efficiency
Eff (T) = Eff(TRef) * (1-C*(T-TRef)).

13 Packing factor [-] Ratio of PV cell area to absorber area.

If mode = 5 or higher (concentrating collector)

4–517
TRNSYS 18 – Mathematical Reference

6 Fin efficiency area ratio [-] The heat transfer coefficient uf (parameter 9 of this model) is
modified by the fin efficiency area ratio (fe) according to:
uf = uf *(1.+fe)

7 Back loss coefficient [kJ/hr-m2-K] Thermal loss coefficient (per unit top surface area) for thermal
for no-flow condition losses from the bottom and sides of the collector

8 Thermal conductance [kJ/hr-K] This parameter accounts for contact resistance between the PV
between cells and cells and the collector absorber plate. Set this value high to
absorber indicate good thermal conductivity between the two.

9 Heat transfer [kJ/hr-m2-K] The heat transfer coefficient between the collector plate and the
coefficient working fluid.

10 Cover plate [-] Ratio of radiation transmitted through the collector cover(s) to the
transmittance total radiation incident on the collector. Must be between 0 and 1.
Must be a constant for concentrating collectors modeled by this
Type.

If mode = 5 or 7 (concentrating collector, constant losses)

11 Front loss coefficient [kJ/hr-m2-K] The total heat loss coefficient for thermal losses from the front of
for cells the collector.

12 Logical unit for [-] The integer assigned to the external data file containing PV cell
SOLCEL data file data.This is automatically assigned by TRNSYS and should not be
changed unless by an advanced TRNSYS user.

If mode =6 or 8 (concentrating collector, losses a function of temperature and windspeed, no cell operating voltage)

11 Number of glass [-] The number of covers (or glazings) over the collector surface
covers

12 Absorber plate [-] Ratio of radiation emitted by the absorber plate to that which would
emittance be emitted by a blackbody. Must be between 0 and 1.

13 Logical unit for [-] The integer assigned to the external data file containing PV cell
SOLCEL data file data.This is automatically assigned by TRNSYS and should not be
changed unless by an advanced TRNSYS user.

INPUTS

1 Inlet fluid temperature [°C] The temperature of the fluid entering the solar collector

2 Fluid mass flow rate [kg/hr] The mass flow rate of the fluid entering the solar collector

3 Ambient temperature [°C] The temperature of the ambient air surrounding the collector

4 Incident radiation [kJ/hr-m2] The total (beam + diffuse) radiation incident on the plane of the
solar collector, per unit area

If mode = 1

5 Cell efficiency [-] Photovoltaic cell efficiency, [0-1] scale.

If mode = 2

4–518
TRNSYS 18 – Mathematical Reference

5 Windspeed [m/s] The speed of the wind over the collector surface

6 Cell efficiency [-] Photovoltaic cell efficiency, [0-1] scale.

If mode = 3

5 Incident diffuse [kJ/hr-m2] The total (sky + ground-reflected) radiation incident on the plane of
radiation the solar collector per unit area.

6 Incidence angle of [degrees] Angle of incidence of beam radiation on surface.


beam radiation

7 Cell efficiency at [-] The rate at which the PV section of the collector converts solar
reference conditions radiation to electrical energy at a known cell temperature, 0-1 scale

If mode = 4

5 Incident diffuse [kJ/hr-m2] The total (sky + ground-reflected) radiation incident on the plane of
radiation the solar collector per unit area.

6 Incidence angle of [degrees] Angle of incidence of beam radiation on surface.


beam radiation

7 Windspeed [m/s] The speed of the wind over the collector surface

8 Cell efficiency at [-] The rate at which the PV section of the collector converts solar
reference conditions radiation to electrical energy at a known cell temperature, 0-1 scale

If mode = 6

5 Windspeed [m/s] The speed of the wind over the collector surface

6 Collector slope [degrees] The slope of the collector's absorbing surface measured from the
horizontal.

If mode = 7

5 Voltage applied to [V] The load voltage on the array


array

If mode = 8

5 Windspeed [m/s] The speed of the wind over the collector surface

6 Voltage applied to [V] The load voltage on the array


array

7 Collector slope [degrees] The slope of the collector's absorbing surface measured from the
horizontal.

DERIVATIVES

There are no derivatives used by this Type.

OUTPUTS

4–519
TRNSYS 18 – Mathematical Reference

1 Outlet temperature [°C] The temperature of the fluid exiting the solar collector array.

2 Fluid flowrate [kg/hr] The flowrate of the fluid exiting the solar collector array. In this
model, the outgoing flow rate will always equal the incoming
flowrate.

3 Useful energy gain [kJ/hr] The rate of useful energy gain by the solar collector fluid:
Qu = mdot * Cp * (Tout - Tin)

4 Collector loss [kJ/hr-m2-K] The total thermal energy loss coefficient for the collector. This
coefficient value does not account for the electrical energy generated by the
panel, which does not go into the fluid stream.

5 Transmittance- [-] The product of the collector cover's transmittance and absorbtance.
absorptance product

6 Electrical power output [kJ/hr] The rate at which electrical energy is generated by the photovoltaic
section of the collector.

7 Average cell [°C] The operating cell temperature.


temperature

8 Apparent thermal loss [kJ/hr-m2-K] The total thermal loss coefficient, accounting for the electrical
coefficient energy generated by the PV section of the collector, which does
not go into the fluid stream.

If mode = 5 or higher

9 Array voltage [V] The voltage at which the PV array is currently operating.

10 Array current [Amp] The current generated by the PV section of the collector.

11 Cell temperature at [°C] The PV cell temperature in the vicinity of the collector fluid inlet.
collector inlet

4.9.3.2. Simulation Summary Report Contents


VALUE FIELDS

Collector Area [m2] Parameter 2

If mode = 5 or higher

Concentration Ratio [-] Parameter 3

TEXT FIELDS

Collector Type [-] If Parameter 1 <= 4, “Flat Plate”


If Parameter 1 >= 5, “Concentrator”

Loss Correlation [-] If Parameter 1 = 1, 3, 5, or 7: “Constant”


If Parameter 1 = 2 or 4: “Function of Windspeed, Temperature, and
Geometry”

4–520
TRNSYS 18 – Mathematical Reference

If Parameter 1 = 6 or 8: “Function of Windspeed and Temperature”

INTEGRATED VALUE FIELDS

Thermal Energy Gain [kJ] Output 3

Electrical Energy [kWh] Output 6 / 3600

MINIMUM/MAXIMUM VALUE FIELDS

Collector Loss [kJ/hr-m2-K] Output 4


Coefficient

Transmittance- [-] Output 5


Absorptance Product

4.9.3.3. Hints and Tips


 The PV performance in Type50 is defined in an external file whose format is explained in the
SolarCellPerformance() section of the Programmer’s Guide manual.

4.9.3.4. Nomenclature
Ncover [-] Number of covers (or glazings) over the absorber
[-] transmittance; ratio of radiation transmitted through the cover(s) to total
τ
radiation incident on the collector surface
KL [-] product of extinction coefficient and length (thickness) of collector cover
[degrees] angle of incidence between the solar beam radiation and the collector
θ
surface
n [-] refractive index of cover material (automatically set at 1.526)
Hbt [kJ/hr-m2] beam radiation on the tilted surface
Hdt [kJ/hr-m2] diffuse radiation on the tilted surface
Hr [kJ/hr-m2] total radiation on the tilted surface
hwind [W/m2-K] heat transfer coefficient due to wind
β [degrees] collector slope
[°C] Mean collector temperature (if followed by [K] = mean collector temperature
Tm
in degrees Kelvin)
[°C] Ambient air temperature (if followed by [K] = ambient air temperature in
Ta
degrees Kelvin)
εp [-] emittance of absorber plate
εg [-] emittance of cover glass
[kJ/hr-m2-K] Overall loss coefficient as provided in Parameters (before adjusting for
UL,ref
transmittance and cell temperature)
[kJ/hr-m2-K] Loss coefficient from back and edges of collector, per unit area collector
Ube
surface
PF [-] Packing factor; ratio of PV cell area to total absorber area
ηref [-] PV cell efficiency at the reference conditions

4–521
TRNSYS 18 – Mathematical Reference

Tref [°C] Reference temperature for PV cell efficiency (see Parameters)


Aratio [-] Ratio of aperture area to absorber area

4.9.3.5. Detailed Description


Transmittance-Absorptance Product (τα)
For Modes 1 and 2 of the flat plate collector model, as well as all modes of the concentrating collector model
(Modes 5 – 8), the transmittance-absorptance product is constant; it is the product of the transmittance of
the cover plate (Parameter 9) and the plate absorptance (Parameter 5).
For Modes 3 and 4 of the flat plate collector model, if the incidence angle is 40° or less, the starting
transmittance value is a function of the number of covers over the collector:

𝜏1 = 0.920 𝑖𝑓 𝑁𝑐𝑜𝑣𝑒𝑟 = 1
𝜏1 = 0.845 𝑖𝑓 𝑁𝑐𝑜𝑣𝑒𝑟 = 2
𝜏1 = 0.785 𝑖𝑓 𝑁𝑐𝑜𝑣𝑒𝑟 = 3

If the incidence angle is greater than 40°, the starting transmittance becomes a function of both the number
of covers over the collector and the angle of incidence of beam radiation on the collector:

𝜏1 = 1 − 𝑒 ((−2.9868+(−3.7360+4.3541∙cos 𝜃) cos 𝜃) cos 𝜃) 𝑖𝑓 𝑁𝑐𝑜𝑣𝑒𝑟 = 1


𝜏1 = 1 − 𝑒 ((−1.4214+(−5.7356+5.7723∙cos 𝜃) cos 𝜃) cos 𝜃) 𝑖𝑓 𝑁𝑐𝑜𝑣𝑒𝑟 = 2
𝜏1 = 1 − 𝑒 ((−0.74816+(−6.5262+6.3769∙cos 𝜃) cos 𝜃) cos 𝜃) 𝑖𝑓 𝑁𝑐𝑜𝑣𝑒𝑟 = 3

The value τ1 is further manipulated as follows below to obtain the beam transmittance:

−𝑁𝑐𝑜𝑣𝑒𝑟∙𝐾𝐿
( )
𝜏𝑏𝑒𝑎𝑚 = 𝜏1 ∙ 𝑒 cos 𝜃2
Eq. 4.9.3-1

sin 𝜃
where 𝜃2 = sin−1 ( )
𝑛

The diffuse transmittance is assumed equal to the beam transmittance at an angle of incidence of 60°:
𝜏𝑑𝑖𝑓𝑓 = 𝑒 (−1.21453∙𝑁𝑐𝑜𝑣𝑒𝑟∙𝐾𝐿) (𝜏1(60°)) Eq. 4.9.3-2

The overall transmittance is the weighted average of the beam and diffuse transmittance values:
𝐻𝑏𝑡 𝐻𝑑𝑡
𝜏= 𝜏𝑏𝑒𝑎𝑚 + 𝜏𝑑𝑖𝑓𝑓 Eq. 4.9.3-3
𝐻𝑟 𝐻𝑟
The transmittance-absorptance product is the product of this transmittance and the plate absorptance
(Parameter 5).
Thermal Losses
In modes 2 and 4, the wind coefficient is a linear function of the windspeed:
ℎ𝑤𝑖𝑛𝑑 = 5.7 + 3.8 ∙ 𝑤𝑖𝑛𝑑 Eq. 4.9.3-4

The factors C and F are calculated based on the windspeed coefficient and the collector slope, respectively:
2
𝐹 = (1 − 0.04ℎ𝑤𝑖𝑛𝑑 + 0.0005ℎ𝑤𝑖𝑛𝑑 )(1 + 0.091𝑁𝑐𝑜𝑣𝑒𝑟) Eq. 4.9.3-5
𝐶 = 365.9(1 − 0.00883𝛽 + 0.0001298𝛽 2 ) Eq. 4.9.3-6

Contributions to the overall loss coefficient due to convection and radiation from the top of the collector
(STF1 and STF2, respectively), are calculated from these factors as:

4–522
TRNSYS 18 – Mathematical Reference

−1

𝑁𝑐𝑜𝑣𝑒𝑟 1
𝑆𝑇𝐹1 = 1 + Eq. 4.9.3-7
ℎ𝑤𝑖𝑛𝑑 3
𝐶 𝑇 [𝐾] − 𝑇𝑎 [𝐾]
( ( 𝑚 ))
( 𝑇𝑚 [𝐾] 𝑁𝑐𝑜𝑣𝑒𝑟 + 𝐹 )
𝜎(𝑇𝑚 [𝐾]2 + 𝑇𝑎 [𝐾]2 )(𝑇𝑚 [𝐾] + 𝑇𝑎 [𝐾])
𝑆𝑇𝐹2 =
1 (2𝑁𝑐𝑜𝑣𝑒𝑟 + 𝐹 − 1) Eq. 4.9.3-8
⁄(𝜀 + 0.05𝑁𝑐𝑜𝑣𝑒𝑟(1 − 𝜀 )) + ⁄𝜀𝑔 − 𝑁𝑐𝑜𝑣𝑒𝑟
𝑝 𝑝

The overall loss coefficient is the sum of these contributions (converted from W to kJ/hr) plus the loss
coefficient from the back and edges of the collector:

𝑈𝐿,𝑟𝑒𝑓 = (𝑆𝑇𝐹1 + 𝑆𝑇𝐹2) ∙ 3.6 + 𝑈𝑏𝑒


Eq. 4.9.3-9

For flat plate collectors, the reference overall loss coefficient is adjusted for both the transmittance and the
cell temperature:

1
𝑈𝐿 = 𝑈𝐿,𝑟𝑒𝑓 − 𝜏𝐻𝑟(𝜂𝑟𝑒𝑓 𝑃𝐹) (1 − 𝐶𝑐𝑒𝑙𝑙𝑡𝑒𝑚𝑝 (𝑇𝑎 − 𝑇𝑟𝑒𝑓 ))
𝑇𝑐 − 𝑇𝑎 Eq. 4.9.3-10

1
where 𝑇𝑐 = 𝑇𝑟𝑒𝑓 +
𝐶𝑐𝑒𝑙𝑙𝑡𝑒𝑚𝑝

Solar Gains
For concentrating collectors, solar gain is calculated from the total solar intensity, the transmittance-
absorptance product, and the aperture to absorber ratio:

𝑆 = 𝐻𝑟(𝜏𝛼)𝐴𝑟𝑎𝑡𝑖𝑜
Eq. 4.9.3-11

The initial reference cell temperature is calculated for collectors with flow as:
𝑈𝑓 (𝑇𝑝 −𝑇𝑖𝑛 )
𝑇𝑐𝑒𝑙𝑙,𝑟𝑒𝑓,𝑖𝑛𝑖𝑡 = + 𝑇𝑝 Eq. 4.9.3-12
𝐶𝑏

𝐶𝑏
𝑇𝑝 = Eq. 4.9.3-13
(𝑈𝑇 (𝐶𝑏 +𝑈𝑓 ) + 𝐶𝑏 𝑈𝑓 )
For collectors without flow (stagnant), the initial reference cell temperature is calculated as:
𝐶𝑏 𝑈𝑏
(𝑆 + 𝑇𝑎 (𝑈𝑇 + ))
𝐶𝑏 +𝑈𝑏 Eq. 4.9.3-14
𝑇𝑐𝑒𝑙𝑙,𝑟𝑒𝑓,𝑖𝑛𝑖𝑡 =
𝑈𝑇 + 𝐶𝑏 − 𝐶𝑏2 /(𝐶𝑏 +𝑈𝑏 )
From here, the collector model largely follows the Hottel-Willier analysis model for flat-plate and
concentrating collectors.
PV Performance
Modes 5 and 6 use the I-V curves through calls to the TRNSYS subroutine SolarCellPerformance() to
calculate solar cell performance at the peak power point. Therefore, data on the cells must be entered as
called for by SolarCellPerformance(). See the Programmer’s Guide manual for more information about

4–523
TRNSYS 18 – Mathematical Reference

SolarCellPerformance() and about the format of the data file required by Type50. Modes 7 and 8 allow a
cell operating voltage to be specified as an input, such as may be imposed by a battery.

4.9.3.6. References
1. Florschuetz L.W., "Extension of the Hottel-Whillier-Bliss Model to the analysis of Combined
Photovoltaic/Thermal Flat Plate Collectors," Sharing the Sun Joint Conference Proceedings,Vol. 6, pg.
79, Winnipeg, (1976).
2. "Combined Photovoltaic/Thermal System Studies," Report ERC-R-78017, Arizona State University,
Tempe, AZ (1978)

4–524
TRNSYS 18 – Mathematical Reference

4.9.4. Type 71: Evacuated Tube Solar Collector


This component models the performance of an evacuated tube solar collector using a standard quadratic
(or linear) efficiency equation. The thermal model is identical to that of Type 1, while the optical model is
designed to account for the asymmetry of evacuated tubes.
As with Type 1, the user must provide the coefficients of the efficiency equation. These coefficients are
available from standard collector performance tests, which plot efficiency versus a ratio of fluid temperature
minus ambient temperature to radiation (T/IT). The fluid temperature may be an inlet, average, or outlet
temperature. The model assumes that the efficiency vs. T/IT curve can be modeled as a quadratic (or
linear) equation. Corrections are applied to the slope, intercept, and curvature parameters to account for
identical collectors (or collector modules) in series and/or flow rates other than those at test conditions (the
flow rate at test conditions must be provided as well).
Unlike Type 1, Type 71 requires that the user provide bi-axial incidence angle modifier data in the form of
a two-dimensional lookup table. The incidence angle modifier will be interpolated from the table based on
both the longitudinal and transversal angles of incidence of the beam radiation on the evacuated tubes.
More information about the format of the data file is available in the Detailed Description section of the
documentation.

4.9.4.1. Parameter / Input / Output Reference


PARAMETERS

1 Number in series [-] Specifies how many collectors are connected in a series
arrangement (outlet of first collector = inlet of second collector etc.).
Set this parameter to 1 if all collectors in the array are in parallel
(fed from a common manifold). The model assumes each parallel
chain of collectors (if any) has the same number of collectors in
series.

2 Collector area [m2] The total area of the solar collector array, consistent with the
supplied efficiency parameters (typically efficiency values are
calculated based on gross area, not net area).

3 Fluid specific heat [kJ/kg-K] The specific heat of the collector fluid.
1= the efficiency parameters are given as a function of the inlet
4 Efficiency mode [-]
temperature; 2= the efficiency parameters are given as a function
of the average temperature; 3= the efficiency parameters are given
as a function of the outlet temperature. Parameters are commonly
given as a function of inlet temperature in the United States and as
a function of average temperature in Europe.

5 Tested flow rate [kg/hr-m2] The flow rate (per unit collector area) at which the collector
efficiency test was performed.
The y-intercept (a0) of the following collector efficiency equation:
6 Intercept efficiency [-]
Efficiency = a0 - a1*(T-Tamb)/I_T- a2 * ((T-Tamb)2)/I_T , where
I_T = Insolation per unit area;
T_amb = ambient air temperature;
T=T_inlet (if Parameter 4, the efficiency mode, = 1), T_average (if
Parameter 4 = 2), or T_outlet (if Parameter 4 = 3).
a0 may also be called FrTan when the equation is a function of
collector inlet temperature.
The slope (a1) of the following collector efficiency equation:
7 Efficiency slope [kJ/hr-m2-K]
Efficiency = a0 - a1*(T-Tamb)/I_T- a2 * ((T-Tamb)2)/I_T , where

4–525
TRNSYS 18 – Mathematical Reference

I_T = Insolation per unit area;


T_amb = ambient air temperature;
T=T_inlet (if Parameter 4, the efficiency mode, = 1), T_average (if
Parameter 4 = 2), or T_outlet (if Parameter 4 = 3).
a1 may also be called FrUl when the equation is a function of
collector inlet temperature.
The curvature (a2) of the following collector efficiency equation:
8 Efficiency curvature [kJ/hr-m2-K2]
Efficiency = a0 - a1*(T-Tamb)/I_T - a2 * ((T-Tamb)2)/I_T, where
I_T = Insolation per unit area;
T_amb = ambient air temperature;
T=T_inlet (if Parameter 4, the efficiency mode, = 1), T_average (if
Parameter 4 = 2), or T_outlet (if Parameter 4 = 3).
a2 may also be called FrUl/T when the equation is a function of
collector inlet temperature

9 Logical unit of file [-] The logical unit unit through which the biaxial incidence angle
containing biaxial IAM modifier data will be read. This number is automatically assigned
data and should not be changed unless by advanced TRNSYS users.

10 Number of longitudinal [-] Number of data points provided for incidence angle modifiers in the
angles for which IAMs longitudinal direction (see Detailed Description for the definitions of
are provided longitudinal and transverse directions).

11 Number of transverse [-] Number of data points provided for incidence angle modifiers in the
angles for which IAMs transverse direction (see Detailed Description for the definitions of
are provided longitudinal and transverse directions).

INPUTS

1 Inlet temperature [°C] The temperature of the fluid entering the solar collector

2 Inlet flowrate [kg/hr] The mass flow rate of the fluid entering the solar collector

3 Ambient temperature [°C] The temperature of the ambient air surrounding the collector

4 Incident radiation [kJ/hr-m2] The total (beam + diffuse) radiation incident on the plane of the
solar collector, per unit area

5 Incident diffuse [kJ/hr-m2] The total (sky + ground-reflected) radiation incident on the plane of
radiation the solar collector per unit area.

6 Incidence angle [degrees] Angle of incidence of beam radiation on surface.

7 Solar zenith angle [degrees] The angle between the vertical and the line to the sun; the angle of
incidence of beam radiation on a horizontal surface.

8 Solar azimuth angle [degrees] The angular displacement from south of the projection of beam
radiation on the horizontal plane, with east negative and west
positive. 0° = from due south; -90° = from due east; 90° = from due
west.

9 Collector slope [degrees] The slope of the collector surface. The slope is defined as the
angle between the surface and the horizontal.0° = horizontal
surface, 90° = vertical surface. Slope is positive when surface is
tilted in the direction of the surface azimuth. As a general rule,
performance is somewhat optimized when the collector slope is set
to the latitude.

4–526
TRNSYS 18 – Mathematical Reference

10 Collector azimuth [degrees] The deviation of the collector surface from the local meridian, with
zero due south, east negative, and west positive. 0° = facing due
south; -90° = facing due east; 90° = facing due west.

DERIVATIVES

There are no derivatives used by this Type.

OUTPUTS

1 Outlet temperature [°C] The temperature of the fluid exiting the solar collector array.

2 Outlet flowrate [kg/hr] The flowrate of the fluid exiting the solar collector array. In this
model, the outgoing flow rate will always equal the incoming
flowrate.

3 Useful energy gain [kJ/hr] The rate of useful energy gain by the solar collector fluid:
Qu = mdot * Cp * (Tout - Tin)

4 Collector efficiency [-] The ratio of the collector’s useful energy gain (Output 3) to the total
incident radiation (beam + diffuse) on the surface of the collector

5 Incidence angle [-] The ratio of the transmittance-absorptance product of the collector
modifier (overall) at the given incidence angle over the transmittance-absorptance
product at normal incidence; the ratio of the total absorbed
radiation to the radiation that would have been absorbed if the
beam radiation were normal to the collector surface.

4.9.4.2. Simulation Summary Report Contents


VALUE FIELDS

Collector Array Area [m2] Parameter 2

Number of Collectors [-] Parameter 1


in Series

TEXT FIELDS

There are no text fields reported by this Type.

INTEGRATED VALUE FIELDS

Energy Gain [kJ] Output 3

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Temperature [°C] Output 1

4–527
TRNSYS 18 – Mathematical Reference

4.9.4.3. Hints and Tips


 Changing the Number of Collectors In Series: If the number of collectors in series changes, it is
generally advisable to change the flow rate to the collector array as well. Many users are surprised to
find that, upon changing the number of collectors in series (and leaving all else the same), the
efficiency and temperature out of the array are unaffected.
Consider an array of four collectors, each 2 m 2 with efficiency rated at 100 kg/hr (or 50 kg/hr-m2). With
all four collectors in parallel (Nseries = 1) and 200 kg/hr of flow to the array, the flow rate per collector
is (200/4 = 50) kg/hr. If the array is re-configured as two parallel sets of two collectors in series (Nseries
= 2) and all else remains the same, each branch of fluid will travel twice the collector length of the
previous example, but the flow rate per branch will be (200/2 = 100) kg/hr; these effects cancel each
other out, and the net result from the array will be the same as the previous example. Reduce the
array flowrate by half (from 200 kg/hr to 100 kg/hr) to see a comparison to the all-parallel case in which
the arrays receive the same flow rate per collector in both cases.
 Specifying Parameters: An index of certified evacuated tube (or tubular) collector ratings may be
found on the website of the Solar Ratings and Certification Corporation (SRCC)2. When using an
SRCC Certification sheet to supply efficiency and other parameters, note the following.
 Efficiency equation parameters are listed under “Technical Information.” The equation (η = …)
shows the quadratic form of the efficiency equation, in both SI units (1st line) and IP units (2nd line).
Intercept, slope, and curvature coefficients (Parameters 6, 7, and 8, respectively) may be obtained
from this equation. Note that the SI units are W/m 2-C and W/m2-C2 on the SRCC certification sheet;
multiply the slope and curvature coefficients provided by 3.6 to obtain units of kJ/hr-m2-K and kJ/hr-
m2-K2.
 To the right of the efficiency equation, the y-intercept and slope of the linear form of the efficiency
equation are given. Either the quadratic or linear form of the equation may be used (set Parameter
8 = 0 to specify a linear equation).
 The technical information should specify which area measurement (gross or net) and temperature
difference (Tinlet-Tambient or Taverage-Tambient) were used for the efficiency equation. In most
cases, gross area and Tinlet-Tambient are specified here.
 For tubular collectors, the incidence angle modifier (or Kτα) versus transverse incidence angle (θ)
values at 10° increments between 0° and 70° are typically provided, as well as the incidence angle
modifier at at least one longitudinal incidence angle (typically 50°). These values may be easily
entered into and read from a data file (see formatting in the Detailed Description section). If the
values don’t extend to 90°, add a value at 90° to prevent warnings at incidence angles greater than
the largest angle specified.
 Note the tested mass flow rate provided must be divided by collector area to obtain tested flow per
unit area (Parameter 5).
 Continuity Checking: Make sure the specific heat specified for the collector fluid is the same as that
specified for any pipes, pumps, or storage tanks connected to the collector.
 Limitations of This Model: Type 71 is a steady-state model; there is no capacitance accounted for
in the collector. There is also no accounting for phase change of the fluid (boiling) in this model;
constant fluid properties are assumed.
 Comparison to Other Standard Collector Models: This model is best suited for collectors with a
known equation of efficiency vs. temperature difference/radiation ratio and with asymmetrical optical
properties, such as evacuated tube (or other tubular) collectors. To model a collector with symmetrical
optical properties (such as a flat-plate collector), see Type 1. Note this is the only collector model in
the standard TRNSYS Solar library that accommodates true bi-axial incidence angle modifiers (Type
1, optical mode 5, only allows for an approximation of bi-axial effects, based on symmetrical values).

4–528
TRNSYS 18 – Mathematical Reference

4.9.4.4. Nomenclature
I [kJ/h-m²] Global (total) horizontal radiation
Id [kJ/h-m²] Diffuse horizontal radiation
IT [kJ/h-m²] Global radiation incident on the solar collector (Tilted surface)
IbT [kJ/h-m²] Beam radiation incident on the solar collector
 [°] Collector slope above the horizontal plane
 [°] Incidence angle for beam radiation
l [°] Incidence angle in the longitudinal direction
t [°] Incidence angle in the transverse direction
g [-] Ground reflectance
 [-] Short-wave transmittance of the collector cover(s)
() [-] Product of the cover transmittance and the absorber absorptance
()b [-] () for beam radiation (depends on the incidence angle )
()n [-] () at normal incidence
()s [-] () for sky diffuse radiation
()g [-] () for ground reflected radiation

4.9.4.5. Detailed Description


Thermal Efficiency
The thermal portion of the Type is identical to Type 1 – see documentation of Type 1 for thermal efficiency
description.
Optical Efficiency
Collector tests are generally performed on clear days at normal incidence so that the transmittance -
absorptance product () is nearly the normal incidence value for beam radiation, ()n. The intercept
efficiency, FR ()n, is corrected for non-normal solar incidence by the factor ()/()n. By definition, () is
the ratio of the total absorbed radiation to the incident radiation. Thus, a general expression for ()/()n
is:

 
I bT
 b  I 1cos   d  
 n d 2  n g
I 
1cos 
2   
g

  Eq. 4.9.4-1
 n
 n IT

IAM FOR BEAM RADIATION


Evacuated tube collectors are optically non-symmetric. Type 71 requires biaxial Incidence Angle Modifiers
()b/()n to be provided in an external data file (see the section External Data File for this Type).
The following figure shows a graphical representation of the longitudinal and transversal directions:
 The longitudinal incidence angle is measured in a plane that is perpendicular to the collector plane
and contains the collector azimuth. The corresponding IAM is referred to as the longitudinal IAM, or
altitude modifier.

4–529
TRNSYS 18 – Mathematical Reference

 The transversal incidence angle is measured in a plane that is perpendicular to both the collector
aperture and the longitudinal plane. The corresponding IAM is referred to as the transversal IAM, or
azimuthal modifier.

Transversal
Plane

e a l
an in
Pl itud
ng
t

Lo

l
Sun Transversal
Direction

Collector
Plane

Longitudinal
Direction
Figure 4.9.4–1: Transversal and Longitudinal Directions

Note: The collector tube represented above is in the most common orientation, along a
North-South axis (assuming the collector faces due South). If the collector was tested in a
different configuration, or if it is mounted with the tubes along an East-West axis, the IAM
data obtained from a collector test may have to be adapted (by switching the longitudinal
and transversal directions). In TRNSYS, "longitudinal" and "transversal" always refer to the
plane of the collector and the sun as described here below, not to the tubes.
In most cases, collector test reports provide the transversal IAM for different transversal incidence angle
values (and longitudinal angle = 0) and longitudinal IAM for different longitudinal incident angles (and
transversal angle = 0). The data file requires the IAM for non-zero longitudinal and transversal angles. The
IAM for any l and t can be approximated by multiplying IAM(l,0) and IAM(0, t).

IAM FOR BEAM RADIATION


Type 71 reads the biaxial incidence angle modifier (IAM) data from an external data file. These data are
read and interpolated by subroutine DYNAMICDATA (see the Programmer's Guide). The data consists of
at least 2 values of incidence angles (in both directions) and modifiers.
The data file format is as follows (2  Nt and 2  Nl):
<Transversal angle 1> <Transversal angle 2> etc. Nt values [0;90]
<Longitudinal angle 1> <Longitudinal angle 1> etc. Nl values [0;90]
<IAM 1 1> IAM for transv. angle 1, long. angle 1
<IAM 1 2> IAM for transv. Angle 1, long. angle 2
...
<IAM 1 Nl> IAM for transv. angle 1, long. angle Nl
<IAM 2 1> IAM for transv. angle 2, long. angle 1
<IAM 2 2> IAM for transv. angle 2, long. angle 2
...
<IAM 2 Nl> IAM for transv. angle 2, long. angle Nl
<IAM 3 1> IAM for transv. angle 3, long. angle 1
...
<IAM Nt Nl> IAM for transv. angle Nt, long. angle Nl

The principle of the data file is that the first line gives the values of the 2 independent variables (Transversal
and longitudinal incident angles) that will be used in the "IAM map". Then the dependent variable (IAM) is
provided for all values of the independent variables. The values of the last independent variable

4–530
TRNSYS 18 – Mathematical Reference

(Longitudinal angle) are first cycled through, then the 1st independent variable (Transversal angle). Data
are read in free format. The data are interpolated by the generic DYNAMICDATA routine, which does not
have any knowledge about IAM's. It is recommended to include values for angle = 0 (IAM=1) and angle =
90° (IAM=0) in the data.
Note: Typical test data give the IAM for transversal angle i and longitudinal angle =0 on one hand, and the
IAM for transversal angle = 0 and longitudinal angle j on the other hand. As discussed here above, IAM (i,j)
can be approximated by IAM (i,0) * IAM (0,j)
An example is provided below. This file includes IAM data for a hypothetical collector for which the following
data is available:
Direction | 0° | 15° | 30° | 45° | 60° | 75° | 90° |
-------------------------------------------------------------------
Transversal IAM | 1.00 | 1.01 | 1.03 | 1.05 | 1.04 | 1.02 | 0.00 |
Longitudinal IAM | 1.00 | 1.00 | 0.98 | 0.96 | 0.90 | 0.71 | 0.00 |
The value for both incidence angles different from zero may be obtained by multiplication (if not available
from direct measure), as explained here above. The file contents are:
0 15 30 45 60 75 90 ! 7 Incidence angle values (transversal)
0 15 30 45 60 75 90 ! 7 Incidence angle values (longitudinal)
1.00 ! IAM for ThetaT 1, ThetaL 1
1.00 ! IAM for ThetaT 1, ThetaL 2
0.98 ! IAM for ThetaT 1, ThetaL 3 ( 1.00 * 0.98 = 0.98)
...
0.00 ! IAM for ThetaT 1, ThetaL 7 ( 1.00 * 0.00 = 0.00)
1.01 ! IAM for ThetaT 2, ThetaL 1 ( 1.01 * 1.00 = 1.01)
1.01 ! IAM for ThetaT 2, ThetaL 2 ( 1.01 * 1.00 = 1.01)
0.99 ! IAM for ThetaT 2, ThetaL 3 ( 1.01 * 0.98 = 0.99)
...
0.00 ! IAM for ThetaT 2, ThetaL 7 ( 1.01 * 0.00 = 0.00)
1.03 ! IAM for ThetaT 3, ThetaL 1 ( 1.03 * 1.00 = 0.00)
...
0.00 ! IAM for ThetaT 7, ThetaL 1 ( 0.00 * 1.00 = 0.00)
0.00 ! IAM for ThetaT 7, ThetaL 2 ( 0.00 * 1.00 = 0.00)
...
There is also an example data file in the TRNSYS18 directory, in the Examples -> Data Files sub-directory.

IAM FOR DIFFUSE RADIATION


The incidence angle modifiers for both diffuse sky radiation, ()s/()n, and ground reflected diffuse
radiation, ()g/()n, are determined in all modes by integrating beam IAMs over the sky dome and over
the ground projected onto the collector surface, respectively: Isotropic diffuse radiation is assumed for this
analysis. See the integration equation below for integrating sky diffuse incidence angle modifiers over the
sky dome:
 / 2   / 2    /2 sin (cot  / tan )  
1

 ds  0  / 2  bn ( )  cos  sin  dd   / 2  / 2 b
( )  cos  sin  dd
 n Eq. 4.9.4-2
 n  / 2   /2  /2 sin 1 (cot  / tan )
0 
 /2
cos  sin  dd  
 / 2  
 /2
cos  sin  dd

For the ground-reflected diffuse radiation incidence angle modifiers, which are integrated over the surface
area of the ground projected onto the collector:
 /2  /2  b ( )  cos( )  sin( ) dd
 dg  / 2   sin 1
(cot  / tan )  
 n Eq. 4.9.4-3
 n  /2
 
 /2
cos( )  sin( ) dd
/ 2  sin 1 (cot  / tan )

These integrations are performed numerically, using the user-supplied IAM data for ()b/()n.

4–531
TRNSYS 18 – Mathematical Reference

4.9.4.6. References
1. Beckman, W.A., and Duffie, J. A. Solar Engineering of Thermal Processes. Second Edition. New
York: John Wiley & Sons, Inc, 1991.
2. Solar Ratings and Certification Corporation (Website). Available at https://secure.solar-
rating.org/Certification/Ratings/RatingsSummaryPage.aspx Last accessed August 2015. Last accessed
August 2015.

4–532
TRNSYS 18 – Mathematical Reference

4.9.5. Type 72: Performance Map Solar Collector


This component models the thermal performance of a solar collector using performance data. The user
must enter a performance map of collector efficiency as a function of T/IT, radiation, and wind speed. The
fluid temperature may be an inlet, average, or outlet temperature. Type 72 is useful and preferable over
other collector Types for collectors with non-linear (and non-quadratic) efficiency vs. T/IT relationships,
concentrating collectors whose performance may depend strongly upon the level of radiation, or coverless
collectors that are sensitive to wind speed. If imaging collectors (which use only beam radiation) are
considered, then only beam radiation should be provided as an Input to this component.
There are five options for considering the effects of off-normal solar incidence (incidence angle modifiers,
or IAMs). If the optical mode is set to 1, no off-normal incidence effects are considered. Optical mode 2 will
calculate IAMs as a quadratic function of incidence angle, using user-supplied coefficients for the IAM
versus incidence angle equation. Optical mode 3 will interpolate IAMs from a user-supplied look-up table
based on incidence angle. Optical mode 4 will calculate IAMs based on the optical and physical properties
of the glazing(s). Optical mode 5 also interpolates from a user-supplied look-up table, but the table must
contain independent IAMs values for each direction (transverse incidence versus longitudinal incidence);
the product of the modifers for each of the longitudinal and transverse incidence angles will be the IAM
used at that instance. This is an approximate way of calculating IAMs for asymmetrical surfaces, such as
tubes; see Type 71 for interpolating true bi-axial incidence angle modifier data.

4.9.5.1. Parameter / Input / Output Reference


PARAMETERS

1 Number in series [-] Specifies how many collectors are connected in a series
arrangement (outlet of first collector = inlet of second collector etc.).
Set this parameter to 1 if all collectors in the array are in parallel
(fed from a common manifold). The model assumes each parallel
chain of collectors (if any) has the same number of collectors in
series.

2 Collector area [m2] The total area of the solar collector array, consistent with the
supplied efficiency parameters (typically efficiency values are
calculated based on gross area, not net area).

3 Fluid specific heat [kJ/kg-K] The specific heat of the collector fluid.
1= the performance map data are given as a function of the
4 Efficiency mode [-]
collector inlet temperature; 2= the performance map data are given
as a function of the collector average temperature; 3= the
performance map data are given as a function of the collector
outlet temperature.

5 Logical unit [-] The logical unit through which the performance map data will be
read. This number is automatically assigned and should not be
changed unless by advanced TRNSYS users.

6 Number of T/IT points [-] The number of values of T/IT contained in the data file. (must be
in the data file between 1 and 10). T is defined as Tinlet – Tambient, Taverage –
Tambient, or Toutlet – Tambient, depending on the mode chosen
using Parameter 4.

7 Number of radiation [-] The number of values of radiation (IT) contained in the data file.
points in the data file (must be between 1 and 5).

4–533
TRNSYS 18 – Mathematical Reference

8 Number of windspeed [-] The number of values of windspeed contained in the data file.
points in the data file (must be between 1 and 5).

9 Optical mode [-] Sets how the incidence angle modifier (IAM) will be calculated by
the component. 1= no incidence angle modification; 2=incidence
angle modifiers will be determined by 2nd order equation as
function of collector slope; 3= incidence angle modifiers are to be
interpolated from an external data file as a function of incidence
angle; 4=incidence angle modifiers will be calculated from
properties of collector cover; 5= Biaxial (transverse and
longitudinal) incidence angle modifiers are each to be interpolated
from an external data file as a function of incidence angle; the
product of the transverse and longitudinal modifiers is
approximately the incidence angle modifier at each combination.

If Optical mode (parameter 9) = 2

10 1st order IAM [-] This parameter is b0 in the equation IAM = 1 – b0 * S – b1 * S2,
where S = (1/cos(incidence angle)-1).

11 2nd order IAM [-] This parameter is b1 in the equation IAM = 1 – b0 * S – b1 * S2,
where S = (1/cos(incidence angle)-1).

If Optical mode (parameter 9) = 3

10 Logical unit of data file [-] The logical unit through which the incidence angle modifier data
will be read. This number is automatically assigned and should not
be changed unless by advanced TRNSYS users.

11 Number of rows in file [-] The number of values of incidence angle, with associated IAM’s,
contained in the data file (must be between 2 and 10).

If Optical mode (parameter 9) = 4

10 Plate absorptance [-] The absorptance of the collector absorber plate, or the ratio of
absorbed radiation to total radiation on the plate. Typical values of
plate absorptance can be found from: Solar Engineering of
Thermal Processes, Duffie and Beckman, Wiley-Interscience, New
York, 1980.

11 Number of identical [-] The number of identical glazings (or covers – typically glass or
covers plastic) on the solar collector; used to calculate the transmittance-
absorptance product.

12 Index of refraction [-] Index of refraction of one glazing covering the solar collector

13 Extinction [-] The product of the extinction coefficient and cover thickness for
one glazing covering the solar collector

If Optical mode (parameter 9) = 5

10 Logical unit of data file [-] The logical unit through which the incidence angle modifier data
will be read. This number is automatically assigned and should not
be changed unless by advanced TRNSYS users.

11 Number of rows in file [-] The number of values of incidence angle, with their associated
biaxial modifier data, contained in the external data file (must be
between 2 and 10).

4–534
TRNSYS 18 – Mathematical Reference

INPUTS

1 Inlet temperature [°C] The temperature of the fluid entering the solar collector

2 Inlet flowrate [kg/hr] The mass flow rate of the fluid entering the solar collector

3 Ambient temperature [°C] The temperature of the ambient air surrounding the collector

4 Incident radiation [kJ/hr-m2] The total (beam + diffuse) radiation incident on the plane of the
solar collector, per unit area

5 Windspeed [m/s] The windspeed over the collector array.

If Optical mode (parameter 9) = 2, 3, or 4

6 Total horizontal [kJ/hr-m2] The total horizontal radiation (beam + diffuse) per unit area. This
radiation input is typically hooked to the fourth output of the TYPE 16
radiation processor.

7 Horizontal diffuse [kJ/hr-m2] The horizontal diffuse radiation. This input is typically hooked up to
radiation the fifth output of the TYPE 16 solar radiation processor.

8 Ground reflectance [-] The reflectance of the surface above which the solar collector is
positioned. Typical values are 0.2 for ground not covered by snow
and 0.7 for snow-covered ground. The reflectance is the ratio of
reflected radiation to total incident radiation and therefore must be
between 0 and 1.

9 Incidence angle [degrees] Angle of incidence of beam radiation on surface.

10 Collector slope [degrees] The slope of the collector surface. The slope is defined as the
angle between the surface and the horizontal.0° = horizontal
surface, 90° = vertical surface. Slope is positive when surface is
tilted in the direction of the surface azimuth. As a general rule,
performance is somewhat optimized when the collector slope is set
to the latitude.

If Optical mode (parameter 9) = 5

6 Total diffuse radiation [kJ/hr-m2] The total (sky + ground-reflected) radiation incident on the plane of
the solar collector per unit area.This input is commonly connected
to the TYPE 16 "total diffuse radiation on surface 1" output.

7 Incidence angle [degrees] Angle of incidence of beam radiation on surface.

8 Zenith angle [degrees] The angle between the vertical and the line to the sun; the angle of
incidence of beam radiation on a horizontal surface.

9 Solar azimuth [degrees] The angular displacement from south of the projection of beam
radiation on the horizontal plane, with east negative and west
positive. 0° = from due south; -90° = from due east; 90° = from due
west.

10 Collector slope [degrees] The slope of the collector surface. The slope is defined as the
angle between the surface and the horizontal.0° = horizontal
surface, 90° = vertical surface. Slope is positive when surface is
tilted in the direction of the surface azimuth. As a general rule,

4–535
TRNSYS 18 – Mathematical Reference

performance is somewhat optimized when the collector slope is set


to the latitude.

11 Collector azimuth [degrees] The deviation of the collector surface from the local meridian, with
zero due south, east negative, and west positive. 0° = facing due
south; -90° = facing due east; 90° = facing due west.

DERIVATIVES

There are no derivatives used by this Type.

OUTPUTS

1 Outlet temperature [°C] The temperature of the fluid exiting the solar collector array.

2 Outlet flowrate [kg/hr] The flowrate of the fluid exiting the solar collector array. In this
model, the outgoing flow rate will always equal the incoming
flowrate.

3 Useful energy gain [kJ/hr] The rate of useful energy gain by the solar collector fluid:
Qu = mdot * Cp * (Tout - Tin)

4 Collector efficiency [-] The ratio of the collector’s useful energy gain (Output 3) to the total
incident radiation (beam + diffuse) on the surface of the collector

5 Incidence angle [-] The ratio of the transmittance-absorptance product of the collector
modifier (overall) at the given incidence angle over the transmittance-absorptance
product at normal incidence; the ratio of the total absorbed
radiation to the radiation that would have been absorbed if the
beam radiation were normal to the collector surface.

4.9.5.2. Simulation Summary Report Contents


VALUE FIELDS

Collector Array Area [m2] Parameter 2

Number of Collectors [-] Parameter 1


in Series

TEXT FIELDS

Incidence Angle [-] If Parameter 9 = 1, “No Incidence Angle Modifier”


Modifier Mode
If Parameter 9 = 2, “Second Order Incidence Angle Modifier”
If Parameter 9 = 3, “Incidence Angle Modifiers from a Data File”
If Parameter 9 = 4, “Incidence Angle Modifiers from Cover and Absorber
Properties”
If Parameter 9 = 5, “Biaxial Incidence Angle Modifiers”

INTEGRATED VALUE FIELDS

4–536
TRNSYS 18 – Mathematical Reference

Energy Gain [kJ] Output 3

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Temperature [°C] Output 1

4.9.5.3. Hints and Tips


 Writing the Performance Data File: See the Detailed Description for a thorough explanation of the
format of the data file required for this Type. There is also a sample data file available, which may be
found in the Examples -> Data Files subdirectory within the main TRNSYS18 directory. Note that the
data file must contain a value for collector efficiency at each combination of T/IT, radiation, and
windspeed. For example, if the data file contains eight T/IT points, two radiation points, and two
windspeed points, the data file must contain (8 x 2 x 2 = 32) efficiency values total. Try to cover as
much of the actual operating range of the collector as possible; TRNSYS will write a warning to the log
file each time an attempt is made to interpolate outside of the range of values supplied to the file.
 Updating the Performance Data File: Users commonly start from the default performance data file,
then edit the file to use their unique data points. Make sure the numbers of T/IT, radiation, and
windspeed points in the data file match the values specified in Parameters 6 – 8! Every time the data
file is updated, Parameters 6 – 8 should be checked and updated as well.
 Continuity Checking: Make sure the specific heat specified for the collector fluid is the same as that
specified for any pipes, pumps, or storage tanks connected to the collector.
 Limitations of This Model: Type 72 is a steady-state model; there is no capacitance accounted for
in the collector. There is also no accounting for phase change of the fluid (boiling) in this model;
constant fluid properties are assumed.
 Comparison to Other Standard Collector Models: This model is best suited for collectors with non-
linear (and non-quadratic) efficiency vs. T/IT relationships, concentrating collectors whose
performance may depend strongly upon the level of radiation, or coverless collectors that are sensitive
to wind speed.

4.9.5.4. Nomenclature
A [m²] Total collector array aperture or gross area (consistent with FR(),
FRUL, FRUL/T and Gtest)

Aa [m²] Aperture area of a single collector module


Ar [m²] Absorber area of a single collector module
Cpf [kJ/kg-K] Specific heat of collector fluid
I [kJ/h-m²] Global (total) horizontal radiation
Id [kJ/h-m²] Diffuse horizontal radiation
IT [kJ/h-m²] Global radiation incident on the solar collector (Tilted surface)
IbT [kJ/h-m²] Beam radiation incident on the solar collector

m [kg/h] Flowrate at use conditions
 test
m [kg/h] Flowrate in test conditions

NS [-] Number of identical collectors in series


Ta [°C] Ambient (air) temperature

4–537
TRNSYS 18 – Mathematical Reference

Tav [°C] Average collector fluid temperature


Ti [°C] Inlet temperature of fluid to collector
To [°C] Outlet temperature of fluid from collector
UL [kJ/h-m²-K] Overall thermal loss coefficient of the collector per unit area
 [-] Short-wave absorptance of the absorber plate
 [°] Collector slope above the horizontal plane
 [-] Collector thermal efficiency for entire array
j [-] Collector thermal efficiency for module j
n [-] Collector thermal efficiency at normal incidence
0 [-] Collector thermal efficiency when T/IT = 0
 [°] Incidence angle for beam radiation
g [-] Ground reflectance
 [-] Short-wave transmittance of the collector cover(s)
() [-] Product of the cover transmittance and the absorber absorptance
()b [-] () for beam radiation (depends on the incidence angle )
()n [-] () at normal incidence
()s [-] () for sky diffuse radiation

4.9.5.5. Detailed Description


The energy collection for Ns collector modules mounted in series is modeled as:
NS
AI
Q u  T
NS

j 1
j Eq. 4.9.5-1

The efficiency of an individual module (or set of collectors in parallel) is determined from user supplied data
and a correction for off-normal incidence as follows:

   
 j   j ,n   j ,n,0 1  
 
Eq. 4.9.5-2
  n 

j,n is the efficiency at normal incidence at the current meteorological conditions and fluid temperature. j,n,o
is the efficiency at normal incidence for T/IT equal 0. The second term in the above equation represents
the difference between the efficiency at normal incidence and that at off-normal incidence.
As with Type 1, there are five options for determining the incidence modifier, )n. Please see
documentation of Type 1 for more information on supplying IAM data and/or data files.
In order to evaluate the efficiency for each module, the outlet temperature of one module is used as the
inlet to the next. In general:
A IT  j
To, j  Eq. 4.9.5-3
 c C pf
Ns m

4–538
TRNSYS 18 – Mathematical Reference

If the efficiency data is based upon average or outlet temperature, an iterative solution for the fluid
temperature is required.
A complete thermal performance map of the collector consists of efficiency versus T/IT data for different
levels of radiation and wind speed. Explanations for data input for three possible cases follows.
Note: In the following, T refers to one of the 3 definitions described in the Type 1
description. Be careful to select the Efficiency Mode that matches the performance map!
This is also true for the collector area (which can be gross, aperture or absorber area).

EFFICIENCY VERSUS T/IT ONLY


In this case NIT and NW should be set to 1 in the parameter list. Performance will be a function of T/IT
only. The first NT numbers in the data file should be increasing values of T/IT. The second NT numbers
are efficiencies corresponding to the values of T/IT. Note that it is recommended to use Type 1 if possible.

DEPENDENCE ON IT OR W
In this situation, efficiency vs. T/IT data is to be provided for different levels of radiation or wind speed, but
not both. Either NIT or NW should be set to l in the parameter list. The first set of NIT or NW (whichever is
greater than 1) numbers in the data file should be the levels of radiation or wind speed for which efficiency
vs. T/IT data is provided. The second NT numbers should be increasing values of T/IT. For each value
of radiation or wind speed NT values of efficiency at the corresponding T/IT must follow.

DEPENDENCE ON BOTH IT AND W


This means both NIT and NW are greater than one and efficiency vs. T/IT data must be provided for each
combination of radiation and wind speed. In all NT * NIT * NW efficiency points are required. The first NW
values are wind speeds in increasing order. This is followed by NI T increasing levels of radiation and NT
values of T/IT in increasing order. The next NT values are efficiencies as a function of T/IT for the lowest
IT and W specified. The next NT numbers are for the second level of radiation, but lowest wind speed. NI T
sets of NT efficiencies are required for each wind speed.

COLLECTOR THERMAL PERFORMANCE: THE EXTERNAL DATA FILE


This section presents the data file format required to model a collector for which values of the efficiency
versus T/IT are available for different values of IT and different wind speeds, which is the most general
case. In practice, Type 72 is most often used to simulate unglazed collectors for which the wind speed
dependency is important, but only one value of IT is generally required.
The data are read and interpolated by subroutine DYNAMICDATA (see the Programmer's Guide). The data
file format is as follows (2  NW  5, 2  NIT  5 and 2  NDT/IT  10):
<Wind speed 1> <Wind speed 2> etc. NW values
<Sol rad 1> <Sol Rad 2> etc. NIT values
<DT/IT 1> <DT/IT 2> <DT/IT 3> etc. NDT/IT values
<Efficiency 1 1 1> Efficiency for Wind speed 1, IT 1, DT/IT 1
<Efficiency 1 1 2> Efficiency for Wind speed 1, IT 1, DT/IT 2
...
<Efficiency 1 1 NDT/IT> Efficiency for Wind speed 1, IT 1, last DT/IT
<Efficiency 1 2 1> Efficiency for Wind speed 1, IT 2, DT/IT 1
<Efficiency 1 2 2> Efficiency for Wind speed 1, IT 2, DT/IT 2
...
<Efficiency 1 2 NDT/IT> Efficiency for Wind speed 1, IT 2, last DT/IT
...
<Efficiency 1 NIT 1> Efficiency for Wind speed 1, last IT, DT/IT 1
...
<Efficiency 1 NIT NDT/IT> Efficiency for Wind speed 1, last IT, last DT/IT
...
<Efficiency 2 1 1> Efficiency for Wind speed 2, IT 1, DT/IT 1

4–539
TRNSYS 18 – Mathematical Reference

...
...
<Efficiency NW NIT NDT/IT> Efficiency for last Wind speed, last IT, last DT/IT

The principle of the data file is that the first lines give the values of the 3 independent variables that will be
used in the performance map. Then the dependent variable (Efficiency) is provided for all values of the
independent variables. The values of the last independent variable (T/IT) are first cycled through, then the
2nd independent variable (IT) and finally the values of the 1st independent variable (Wind speed). Data are
read in free format.
An example file is provided below. An example file is also available in the main TRNSYS18 directory, in the
Examples ->Data Files sub-directory. Note that this example serves only to illustrate the format and use of
Type 72; it is not intended to serve as typical values.

EXAMPLE
0.0 3.0 ! 2 Wind speed values, [m/s]
2880.0 3600.0 ! 2 Solar radiation values, [kJ/h-m²]
0.000 0.005 0.010 0.015 0.016 0.020 0.025 0.030 ! 8 dT/IT [K-h-m²/kJ]
0.959 ! Efficiency for Wind Speed 1, Radiation 1, dT/IT 1
0.799 ! Efficiency for Wind Speed 1, Radiation 1, dT/IT 2
0.638 ! Efficiency for Wind Speed 1, Radiation 1, dT/IT 3
0.478 ! Efficiency for Wind Speed 1, Radiation 1, dT/IT 4
0.446 ! Efficiency for Wind Speed 1, Radiation 1, dT/IT 5
0.317 ! Efficiency for Wind Speed 1, Radiation 1, dT/IT 6
0.157 ! Efficiency for Wind Speed 1, Radiation 1, dT/IT 7
0.000 ! Efficiency for Wind Speed 1, Radiation 1, dT/IT 8
0.959 ! Efficiency for Wind Speed 1, Radiation 2, dT/IT 1
0.799 ! Efficiency for Wind Speed 1, Radiation 2, dT/IT 2
0.638 ! Efficiency for Wind Speed 1, Radiation 2, dT/IT 3
0.478 ! Efficiency for Wind Speed 1, Radiation 2, dT/IT 4
0.446 ! Efficiency for Wind Speed 1, Radiation 2, dT/IT 5
0.317 ! Efficiency for Wind Speed 1, Radiation 2, dT/IT 6
0.157 ! Efficiency for Wind Speed 1, Radiation 2, dT/IT 7
0.000 ! Efficiency for Wind Speed 1, Radiation 2, dT/IT 8
0.937 ! Efficiency for Wind Speed 2, Radiation 1, dT/IT 1
0.655 ! Efficiency for Wind Speed 2, Radiation 1, dT/IT 2
0.374 ! Efficiency for Wind Speed 2, Radiation 1, dT/IT 3
0.092 ! Efficiency for Wind Speed 2, Radiation 1, dT/IT 4
0.000 ! Efficiency for Wind Speed 2, Radiation 1, dT/IT 5
0.000 ! Efficiency for Wind Speed 2, Radiation 1, dT/IT 6
0.000 ! Efficiency for Wind Speed 2, Radiation 1, dT/IT 7
0.000 ! Efficiency for Wind Speed 2, Radiation 1, dT/IT 8
0.937 ! Efficiency for Wind Speed 2, Radiation 2, dT/IT 1
0.655 ! Efficiency for Wind Speed 2, Radiation 2, dT/IT 2
0.374 ! Efficiency for Wind Speed 2, Radiation 2, dT/IT 3
0.092 ! Efficiency for Wind Speed 2, Radiation 2, dT/IT 4
0.000 ! Efficiency for Wind Speed 2, Radiation 2, dT/IT 5
0.000 ! Efficiency for Wind Speed 2, Radiation 2, dT/IT 6
0.000 ! Efficiency for Wind Speed 2, Radiation 2, dT/IT 7
0.000 ! Efficiency for Wind Speed 2, Radiation 2, dT/IT 8

4–540
TRNSYS 18 – Mathematical Reference

4.9.6. Type 73: Theoretical Flat-Plate Collector


This component models the thermal performance of a theoretical flat plate collector. The Hottel-Whillier
steady-state model is used for evaluating the thermal performance. The collector fin efficiency factor (F’)
and overall loss coefficient from the edges and bottom of the collector (UL) must be provided as parameters
to the model, as well as the properties of the cover(s) (or glazings). Incidence angle modifiers (IAMs) are
calculated based on the properties of the glazing(s).

4.9.6.1. Parameter / Input / Output Reference


PARAMETERS

1 Number in series [-] Specifies how many collectors are connected in a series
arrangement (outlet of first collector = inlet of second collector etc.).
Set this parameter to 1 if all collectors in the array are in parallel
(fed from a common manifold). The model assumes each parallel
chain of collectors (if any) has the same number of collectors in
series.

2 Collector area [m2] The total area of the solar collector array, consistent with the
supplied fin efficiency and loss coefficient (see Parameters 4 and 5
below).

3 Fluid specific heat [kJ/kg-K] The specific heat of the collector fluid.
The fin efficiency is a measure of the heat transfer from the fin to
4 Collector fin efficiency [-]
factor the maximum possible heat transfer from the fin. The maximum
heat transfer from the fin would occur if the fin was uniformly at the
base temperature.
Refer to: ASHRAE Standard 93-77 for details on the fin efficiency

5 Bottom, edge loss [kJ/hr-m2-K] The loss coefficient for the bottom and edges of the solar collector,
coefficient per unit collector area (using the area specified in Parameter 2).

6 Absorber plate [-] The emittance of the absorber plate of the solar collector. The
emittance emittance, or emissivity, is defined as the ratio of the radiation
emitted by the surface in question to the radiation emitted by a
blackbody (the perfect emitter) at the same temperature. This
property is used to calculate radiation losses from the collector.

7 Absorptance of [-] The absorptance of the absorber plate of the solar collector. The
absorber plate absorptance is a ratio of the amount of radiation absorbed by a
surface to the total radiation incident on the surface.

8 Number of covers [-] The number of glass or plastic covers (or glazings) over the
collector’s absorber. Set this value to 0 if the collector is
uncovered. Multiple covers are assumed to each have identical
properties.

9 Index of refraction of [-] Index of refraction of one glazing covering the solar collector
cover

10 Product of cover [-] The product of the extinction coefficient and cover thickness for
thickness and one glazing covering the solar collector
extinction coefficient

INPUTS

4–541
TRNSYS 18 – Mathematical Reference

1 Inlet temperature [°C] The temperature of the fluid entering the solar collector

2 Inlet flowrate [kg/hr] The mass flow rate of the fluid entering the solar collector

3 Ambient temperature [°C] The temperature of the ambient air surrounding the collector

4 Incident radiation [kJ/hr-m2] The total (beam + diffuse) radiation incident on the plane of the
solar collector, per unit area

5 Windspeed [m/s] The windspeed over the collector array.

6 Total horizontal [kJ/hr-m2] The total horizontal radiation (beam + diffuse) per unit area. This
radiation input is typically hooked to the fourth output of the TYPE 16
radiation processor.

7 Horizontal diffuse [kJ/hr-m2] The horizontal diffuse radiation. This input is typically hooked up to
radiation the fifth output of the TYPE 16 solar radiation processor.

8 Ground reflectance [-] The reflectance of the surface above which the solar collector is
positioned. Typical values are 0.2 for ground not covered by snow
and 0.7 for snow-covered ground. The reflectance is the ratio of
reflected radiation to total incident radiation and therefore must be
between 0 and 1.

9 Incidence angle [degrees] Angle of incidence of beam radiation on surface.

10 Collector slope [degrees] The slope of the collector surface. The slope is defined as the
angle between the surface and the horizontal.0° = horizontal
surface, 90° = vertical surface. Slope is positive when surface is
tilted in the direction of the surface azimuth. As a general rule,
performance is somewhat optimized when the collector slope is set
to the latitude.

DERIVATIVES

There are no derivatives used by this Type.

OUTPUTS

1 Outlet temperature [°C] The temperature of the fluid exiting the solar collector array.

2 Outlet flowrate [kg/hr] The flowrate of the fluid exiting the solar collector array. In this
model, the outgoing flow rate will always equal the incoming
flowrate.

3 Useful energy gain [kJ/hr] The rate of useful energy gain by the solar collector fluid:
Qu = mdot * Cp * (Tout - Tin)

4 Collector efficiency [-] The ratio of the collector’s useful energy gain (Output 3) to the total
incident radiation (beam + diffuse) on the surface of the collector

5 Incidence angle [-] The ratio of the transmittance-absorptance product of the collector
modifier (overall) at the given incidence angle over the transmittance-absorptance
product at normal incidence; the ratio of the total absorbed
radiation to the radiation that would have been absorbed if the
beam radiation were normal to the collector surface.

4–542
TRNSYS 18 – Mathematical Reference

4.9.6.2. Simulation Summary Report Contents


VALUE FIELDS

Collector Array Area [m2] Parameter 2

Number of Collectors [-] Parameter 1


in Series

TEXT FIELDS

There are no Text fields used for this Type.

INTEGRATED VALUE FIELDS

Energy Gain [kJ] Output 3

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Temperature [°C] Output 1

4.9.6.3. Hints and Tips


 Changing the Number of Collectors in Series: If the number of collectors in series changes, it is
generally advisable to change the flow rate to the collector array as well. Many users are surprised to
find that, upon changing the number of collectors in series (and leaving all else the same), the
efficiency and temperature out of the array are unaffected.
Consider an array of four collectors, each 2 m 2 with efficiency rated at 100 kg/hr (or 50 kg/hr-m2). With
all four collectors in parallel (Nseries = 1) and 200 kg/hr of flow to the array, the flow rate per collector
is (200/4 = 50) kg/hr. If the array is re-configured as two parallel sets of two collectors in series (Nseries
= 2) and all else remains the same, each branch of fluid will travel twice the collector length of the
previous example, but the flow rate per branch will be (200/2 = 100) kg/hr; these effects cancel each
other out, and the net result from the array will be the same as the previous example. Reduce the
array flowrate by half (from 200 kg/hr to 100 kg/hr) to see a comparison to the all-parallel case in which
the arrays receive the same flow rate per collector in both cases.
 Defining the Fin Efficiency and Loss Coefficient: The fin efficiency and the loss coefficient are
defined according to the Hottel and Whillier simplified analysis of flat-plate collectors, which is
summarized in Solar Engineering of Thermal Processes1. Theoretical values for both may be
calculated, given the dimensions and material properties of the collector’s construction; see the
aforementioned reference for a step-by-step procedure and examples.
 Continuity Checking: Make sure the specific heat specified for the collector fluid is the same as that
specified for any pipes, pumps, or storage tanks connected to the collector.
 Limitations of This Model: Type 73 is a steady-state model; there is no capacitance accounted for
in the collector. There is also no accounting for phase change of the fluid (boiling) in this model;
constant fluid properties are assumed. The analysis is only valid for collectors that satisfy the
assumptions of the Hottel and Whillier analysis; see Solar Engineering of Thermal Processes1 for a
complete list of assumptions.
 Comparison to Other Standard Collector Models: This model is best suited for flat-plate liquid
collectors for which the Hottel-Whillier simplifying analysis may be applied and for which there are
either no performance test data available, or the data are insufficient to either generate an efficiency
equation (Type 1) or create a performance map data file (Type 72).

4–543
TRNSYS 18 – Mathematical Reference

4.9.6.4. Nomenclature
A [m²] Total collector array aperture or gross area (consistent with
FR(), FRUL, FRUL/T and Gtest)

Cpf [kJ/kg-K] Specific heat of collector fluid


I [kJ/h-m²] Global (total) horizontal radiation
Id [kJ/h-m²] Diffuse horizontal radiation
IT [kJ/h-m²] Global radiation incident on the solar collector (Tilted surface)
IbT [kJ/h-m²] Beam radiation incident on the solar collector
mc [kg/h] Mass flow rate through the collector
F’ [-] fin efficiency of collector
UL [kJ/hr-m2-K] Overall loss coefficient from the collector, defined per unit top
surface area
NS [-] Number of identical collectors in series
NG [-] Number of collector covers (or glazings)
hw [W/m2-K] Heat transfer coefficient due to wind
Ta [°C] Ambient (air) temperature
Tav [°C] Average collector fluid temperature
Ti [°C] Inlet temperature of fluid to collector
β [degrees] collector slope
τα [-] transmittance-absorptance product of the collector

4.9.6.5. Detailed Description


The energy collection of each module in an array of N s modules in series is modeled according to the
Hottel-Whillier equation such that (j is the module number) :

FR,j IT     UL,j  Ti,j  Ta 


Ns
A
Qu  Eq. 4.9.6-1
Ns j1

Where:
NsmcCpc F'U L,j A
FR,j = 1 - exp - Eq. 4.9.6-2
A UL, j NsmcCpc

The collector fin efficiency factor, F', can be determined in a manner given in reference 2. The overall loss
coefficient is a complicated function of the collector construction and its operating conditions. The following
expression, developed by Klein2,is used to approximate UL,j in kJ/h-m2-K:

3.6 3.6  T2av,j + T2a Tav,j + Ta


UL,j = + + Ube
NG 1 + 2N G + f - 1 -NG Eq. 4.9.6-3
.33 p + .05NG(1 - p) g
C Tav,j - Ta + 1
TP ,j NG + f hw

4–544
TRNSYS 18 – Mathematical Reference

Where:

hw = 5.7 + 3.8 W (W/m 2-K)

f = (l - 0.04 hw + 0.0005 hw2)(l + 0.091NG)

c = 365.9 (l - 0.00883  + 0.0001298 2)


The overall transmittance-absorptance product is determined as:

1 - cos
IbT  b + Id 1 + cos  s + I  g Eq. 4.9.6-4
 = 2 2
IT
The transmittance-absorptance products for beam radiation is determined with TRNSYS function routine
Tau_Alpha (see the Programmer’s Guide). Effective incidence angles for sky diffuse and ground reflected
radiation are as defined in the Type 1 collector description. The outlet temperature of one module is used
as the inlet to the next and is given as:
AFR,j IT() - UL,j Ti,j - Ta
To,j = + Ti Eq. 4.9.6-5
N smcCpc
If the collector flow is zero, the collector stagnation temperature is:
I ()
Tp = T + Ta Eq. 4.9.6-6
UL

4.9.6.6. References
1. Beckman, W.A., and Duffie, J. A. Solar Engineering of Thermal Processes. Second Edition.
New York: John Wiley & Sons, Inc, 1991.
2. Klein S.A., 1975. Calculation of flat-plate collector loss coefficients. Solar Energy, 17 (1). Pp.
79-80

4–545
TRNSYS 18 – Mathematical Reference

4.9.7. Type 74: Compound Parabolic Concentrating


Collector
This component models the thermal performance of a compound parabolic concentrating (CPC) collector.
As with Type 73, the Hottel-Whillier steady-state model is used for evaluating the thermal performance. The
thermal model is identical to Type 73; the optical model takes into account the special optical considerations
unique to concentrating collectors.

4.9.7.1. Parameter / Input / Output Reference


PARAMETERS

1 Number in series [-] Specifies how many collectors are connected in a series
arrangement (outlet of first collector = inlet of second collector etc.).
Set this parameter to 1 if all collectors in the array are in parallel
(fed from a common manifold). The model assumes each parallel
chain of collectors (if any) has the same number of collectors in
series.

2 Collector area [m2] The total area of the solar collector array. Use an area (gross or
aperture) consistent with the area used to define the overall loss
coefficient (Parameter 5).

3 Fluid specific heat [kJ/kg-K] The specific heat of the collector fluid.
The ratio of the actual useful energy gain to the useful gain that
4 Collector fin efficiency [-]
factor (or collector would result if the collector absorbing surface were at the local fluid
efficiency factor) temperature, or (heat transfer from fluid to air)/(heat transfer from
absorber to air). For a flat absorber, it is the heat transfer from the
fin over the maximum possible heat transfer from the fin.
Refer to: ASHRAE Standard 93-77 for details on the fin efficiency

5 Overall loss coefficient [kJ/hr-m2-K] The overall loss coefficient from the solar collector absorber to the
ambient air, per unit collector area (using the area specified in
Parameter 2).

6 Wall reflectivity [-] The reflectivity of the walls of the CPC collector. The reflectivity is
a ratio of the reflected radiation to the toal incident radiation.

7 Half-acceptance angle [degrees] The half-acceptance angle (or critical angle) of the CPC collector.
(critical angle) The CPC collects both beam and diffuse radiation which approach
the aperture within the critical angle.

8 Truncation ratio [-] A full CPC is one in which the walls extend upward to a height h
which gives an aperture area of 1/sin(half-acceptance angle) times
the absorber area. Optimal concentration is achieved in a full
CPC, but a very large reflector is required. Most CPCs are
truncated to some fraction of this height (hbar).
Truncation ratio = hbar/h

9 Axis orientation [-] The orientation of the receiver axis:


1 = receiver axis is horizontal and in a plane with a slope of Input
11 (Transverse)
2 = receiver axis has same slope and azimuth as mounting
surface (Longitudinal)

4–546
TRNSYS 18 – Mathematical Reference

10 Absorptance of [-] The absorptance of the absorber surface of the collector. The
absorber surface absorptance is a ratio of the amount of radiation absorbed by a
surface to the total radiation incident on the surface.

11 Number of covers [-] The number of glass or plastic covers (or glazings) over the
collector’s absorber. Set this value to 0 if the collector is
uncovered. Multiple covers are assumed to each have identical
properties.

12 Index of refraction of [-] Index of refraction of one glazing covering the solar collector
cover

13 Product of cover [-] The product of the extinction coefficient and cover thickness for
thickness and one glazing covering the solar collector
extinction coefficient

INPUTS

1 Inlet temperature [°C] The temperature of the fluid entering the solar collector

2 Inlet flowrate [kg/hr] The mass flow rate of the fluid entering the solar collector

3 Ambient temperature [°C] The temperature of the ambient air surrounding the collector

4 Incident radiation [kJ/hr-m2] The total (beam + diffuse) radiation incident on the plane of the
solar collector, per unit area

5 Total horizontal [kJ/hr-m2] The total horizontal radiation (beam + diffuse) per unit area. This
radiation input is typically hooked to the fourth output of the TYPE 16
radiation processor.

6 Horizontal diffuse [kJ/hr-m2] The horizontal diffuse radiation. This input is typically hooked up to
radiation the fifth output of the TYPE 16 solar radiation processor.

7 Ground reflectance [-] The reflectance of the surface above which the solar collector is
positioned. Typical values are 0.2 for ground not covered by snow
and 0.7 for snow-covered ground. The reflectance is the ratio of
reflected radiation to total incident radiation and therefore must be
between 0 and 1.

8 Incidence angle [degrees] Angle of incidence of beam radiation on surface.

9 Zenith angle [degrees] The angle between the vertical and the line to the sun; the angle of
incidence of beam radiation on a horizontal surface.

10 Solar azimuth angle [degrees] The angular displacement from south of the projection of beam
radiation on the horizontal plane, with east negative and west
positive. 0° = from due south; -90° = from due east; 90° = from due
west.

11 Collector slope [degrees] The slope of the collector surface. The slope is defined as the
angle between the surface and the horizontal.0° = horizontal
surface, 90° = vertical surface. Slope is positive when surface is
tilted in the direction of the surface azimuth. As a general rule,
performance is somewhat optimized when the collector slope is set
to the latitude.

4–547
TRNSYS 18 – Mathematical Reference

12 Collector azimuth [degrees] The deviation of the collector surface from the local meridian, with
zero due south, east negative, and west positive. 0° = facing due
south; -90° = facing due east; 90° = facing due west.

DERIVATIVES

There are no derivatives used by this Type.

OUTPUTS

1 Outlet temperature [°C] The temperature of the fluid exiting the solar collector array.

2 Outlet flowrate [kg/hr] The flowrate of the fluid exiting the solar collector array. In this
model, the outgoing flow rate will always equal the incoming
flowrate.

3 Useful energy gain [kJ/hr] The rate of useful energy gain by the solar collector fluid:
Qu = mdot * Cp * (Tout - Tin)

4 Collector efficiency [-] The ratio of the collector’s useful energy gain (Output 3) to the total
incident radiation (beam + diffuse) on the surface of the collector

5 Incidence angle [-] The ratio of the transmittance-absorptance product of the collector
modifier (overall) at the given incidence angle over the transmittance-absorptance
product at normal incidence; the ratio of the total absorbed
radiation to the radiation that would have been absorbed if the
beam radiation were normal to the collector surface.

4.9.7.2. Simulation Summary Report Contents


VALUE FIELDS

Collector Array Area [m2] Parameter 2

Number of Collectors [-] Parameter 1


in Series

TEXT FIELDS

Axis Orientation [-] If Parameter 9 = 1, “Horizontal, transverse”


If Parameter 9 = 2, “Sloped, longitudinal”

INTEGRATED VALUE FIELDS

Energy Gain [kJ] Output 3

MINIMUM/MAXIMUM VALUE FIELDS

Outlet Temperature [°C] Output 1

4–548
TRNSYS 18 – Mathematical Reference

4.9.7.3. Hints and Tips


 Defining the Fin Efficiency (Collector Efficiency) and Loss Coefficient: The fin (collector)
efficiency and the loss coefficient are defined according to the Hottel and Whillier simplified analysis
of collectors, which is summarized in Solar Engineering of Thermal Processes1. The analysis for
cylindrical absorbers is analogous to that for flat-plate collectors; see the chapter ‘Concentrating
Collectors’ in the aforementioned reference for examples.
 Continuity Checking: Make sure the specific heat specified for the collector fluid is the same as that
specified for any pipes, pumps, or storage tanks connected to the collector.
 Limitations of This Model: Type 74 is a steady-state model; there is no capacitance accounted for
in the collector. There is also no accounting for phase change of the fluid (boiling) in this model;
constant fluid properties are assumed. The analysis is only valid for collectors that satisfy the
assumptions of the Hottel and Whillier analysis; see Solar Engineering of Thermal Processes1 for a
complete list of assumptions.
 Comparison to Other Standard Collector Models: This model is best suited for concentrating
collectors; it is the only solar collector model in the TRNSYS Standard Solar library which accounts for
the acceptance angle, trunctation ratio, and other unique optical performance considerations of
concentrating collectors.

4.9.7.4. Nomenclature
A [m²] Total collector array aperture or gross area (consistent with F R(),
FRUL, FRUL/T and Gtest)

Aa [m²] Aperture area of a single collector module


Ar [m²] Reflector area of a single collector module
As [m²] Receiver / absorber area of a single collector module
Cpf [kJ/kg-K] Specific heat of collector fluid
CR [-] Concentration ratio
Fsky [-] View factor to the sky
Fgnd [-] View factor to the ground
h m Height of full CPC with half acceptance angle c

h m Truncated height of CPC

I [kJ/h-m²] Global (total) horizontal radiation


Id [kJ/h-m²] Diffuse horizontal radiation
IT [kJ/h-m²] Global radiation incident on the solar collector (Tilted surface)
IbT [kJ/h-m²] Beam radiation incident on the solar collector

m [kg/h] Flowrate at use conditions

NS [-] Number of identical collectors in series


Ta [°C] Ambient (air) temperature
Tav [°C] Average collector fluid temperature
Ti [°C] Inlet temperature of fluid to collector
To [°C] Outlet temperature of fluid from collector

4–549
TRNSYS 18 – Mathematical Reference

UL [kJ/h-m²-K] Overall thermal loss coefficient of the collector per unit area
 [-] Short-wave absorptance of the absorber plate
 [°] Collector slope above the horizontal plane
 [°] Collector azimuth angle
s [°] Solar azimuth angle
 [°] Incidence angle for beam radiation
c [°] Half-acceptance angle
l [°] Longitudinal acceptance angle
t [°] Transversal acceptance angle
g [-] Ground reflectance
 [-] Short-wave transmittance of the collector cover(s)
() [-] Product of the cover transmittance and the absorber absorptance
()b [-] () for beam radiation (depends on the incidence angle )
()n [-] () at normal incidence
()s [-] () for sky diffuse radiation
()g [-] () for ground reflected radiation

4.9.7.5. Detailed Description


A compound parabolic concentrating (CPC) collector consists of a concentrating reflector and an absorber
(sometimes refered to as the receiver). The walls of a 2-dimensional (trough-like) CPC are parabolic in
shape. The focus of each parabola coincides with the intersection of the absorber and the opposite wall.
The CPC collects both beam and diffuse radiation which approach the aperture within a critical angle c,
called the half-acceptance angle. A full CPC is one in which the walls extend upward to a height h which
gives an aperture area of l/sinc times the absorber area. Optimal concentration is achieved in a full CPC,
but a very large reflector area is required. In practice, most CPC's are truncated to a height h < h.
A CPC collector can be modeled in three steps. First, the total beam and diffuse radiation within the
acceptance angle are determined. Next, reflector concentration and reflective loss are considered and the
effective radiation striking the absorber is calculated. This effective radiation is then used to find the energy
transferred to the collector flowstream and the resulting outlet temperature.
There are two possible orientations considered for a CPC receiver. In one case if the CPC were to track, it
would track the sun’s elevation throughout the day. In the other case, if the CPC were to track, it would
track the solar azimuth throughout the day.
In the first case (referred to as mode 1), the CPC’s axis is horizontal to the ground. Its long axis ideally runs
E/W (having a normal vector that points south) and if the CPC does not track the solar elevation then the
plane of the receiver has a fixed slope (taken as an input to this model). The axis may not run due E/W in
which case its normal vector faces a non-south azimuth. For this collector beam radiation enters the CPC
whenever l  c where:

1  tan 1 tan z cos(   s )   Eq. 4.9.7-1

In the second case (referred to as mode 2), the CPC’s long axis would ideally run N/S. If the CPC does not
track the solar azimuth then the plane of the receiver (and the long axis of the CPC) have a fixed slope that

4–550
TRNSYS 18 – Mathematical Reference

is taken as an input to the model. The long axis may not run due N/S in which case it would face a non-
south azimuth. In this case, beam radiation enters the CPC when t  c where:

sin z sin( - s)


 t = tan- 1 Eq. 4.9.7-2
cos
Diffuse radiation entering the aperture is estimated using view factors to the sky and ground. For the
longitudinal receiver orientation:

1 + cos
Fsky = Eq. 4.9.7-3
2CR
1 - cos
Fgnd = Eq. 4.9.7-4
2CR
and for the transverse receiver orientation:

1/CR + min(1/CR, cos)


Fsky = Eq. 4.9.7-5
2
max(1/CR, cos) - cos
Fgnd = Eq. 4.9.7-6
2

Axis of
CPC

c

Axis of Parabola
Parabola

Focus of
Parabola Receiver (Absorber)

Figure 4.9.7–1: Cross-Section of a Non-Truncated CPC


The total radiation entering the reflector aperture within the acceptance angle is:
Iin = FbIbT + FskyId + FgndgI Eq. 4.9.7-7

where Fb = l if the sun is within the acceptance angle, and Fb = 0 otherwise.

In discussing the reflector characteristics, it is helpful to use the coordinate system of Rabl shown on the
following page. As given by Rabl, a branch of the CPC satisfies:

y= x2
Eq. 4.9.7-8
2s (1 + sin c)

4–551
TRNSYS 18 – Mathematical Reference

and the x-coordinates of its endpoints are:


xs = s cosc Eq. 4.9.7-9

and:

1 + sin c 1/2
x=s -sin c + 1 + h cot2 c Eq. 4.9.7-10
cos c h
Axis o f
Y CPC

(X,Y)

(Xs ,Ys )

c

Figure 4.9.7–2: Geometry for Truncated CPC

The total radiation entering the collector aperture is I in . Aa. The total radiation incident on the absorber,
ignoring reflective loss, may be written IR . As. Therefore, in passing from the aperture to the absorber, the
radiation per unit area is increased by the concentration ratio:

A 2 sin c
CR = a = 2 xs cos c - xs + sin c - cos2 c Eq. 4.9.7-11
As sin c + 1
For full CPC's, i.e. when h /h = l, the concentration ratio is l/sinc. The concentration ratio falls off from
l/sinc as h /h decreases.

As radiation travels from the aperture to the absorber, some of it is reflected by the walls of the trough. If
the walls are not perfect reflectors, there is some loss of radiation. To account for this reflective loss, one
may define the effective reflectance of the reflector system as:
IR
 eff = Eq. 4.9.7-12
Iin  CR
As in the analysis of Rabl:

 eff   R n Eq. 4.9.7-13

4–552
TRNSYS 18 – Mathematical Reference

where R is the wall reflectance and n is the average number of internal reflections.

The average number of internal reflections can be expressed as:


𝐴𝑟 1 𝑥̅ 2 − 𝑥𝑠 2
𝑛= ( − ) Eq. 4.9.7-14
𝐴𝑠 2 2𝐴𝑟 𝑠(1 + sin 𝜃𝑐 )
with:
2
Ar = 1 + sin log (x/s) + 1 + sin c + (x/s)2 + x 1+ x 2
c s
As s(1 + sin c)
cos c + 2 (1 + sin c Eq. 4.9.7-15
cos c 2
-
1 + sin c
It is interesting to note that both n and CR are independent of the absorber width s.
The CPC absorber is modeled using the Hottel-Whillier collector equation such that:

 Iin     UL,j  Ti,j  Ta 


Ns
A FR
Qu  Eq. 4.9.7-16
Ns j1

where FR is determined as in mode 3. The overall transmittance-absorbtance product is calculated as:

I  b + IdT  d
 = bT Eq. 4.9.7-17
IT
The transmittance-absorptance product for beam radiation is determined with TRNSYS function Tau_Alpha
using an effective absorptance of eff . .

The incidence angle modifiers for both diffuse sky radiation, ()s/()n, and ground reflected diffuse
radiation, ()g/()n, are determined in all modes by integrating beam IAMs over the sky dome and over
the ground projected onto the collector surface, respectively. Isotropic diffuse radiation is assumed for this
analysis. See the integration equation below for integrating sky diffuse incidence angle modifiers over the
sky dome:
 / 2   / 2    /2 sin (cot  / tan )  
1

 ds  0  / 2  bn ( )  cos  sin  dd   / 2  / 2 b
( )  cos  sin  dd
 n Eq. 4.9.7-18
 n  / 2   /2  /2 sin 1 (cot  / tan )
0 
 /2
cos  sin  dd  
 / 2  
 /2
cos  sin  dd

For the ground-reflected diffuse radiation incidence angle modifiers, which are integrated over the surface
area of the ground projected onto the collector:
 /2  /2  b ( )  cos( )  sin( ) dd
 dg  / 2   sin 1 (cot  / tan )  n
 Eq. 4.9.7-19
 n  /2
 
 /2
cos( )  sin( ) dd
/ 2  sin 1 (cot  / tan )

These integrations are performed numerically, using the TRNSYS function Tau_Alpha to calculate the
beam transmittance-absorptance product at each interval.
Outlet and stagnation temperatures are calculated as in Type 73.

4–553
TRNSYS 18 – Mathematical Reference

4.9.7.6. References
1. Beckman, W.A., and Duffie, J. A. Solar Engineering of Thermal Processes. Second Edition. New
York: John Wiley & Sons, Inc, 1991.

4–554
TRNSYS 18 – Mathematical Reference

4.10. Storage (Thermal)

4–555
TRNSYS 18 – Mathematical Reference

4.10.1. Type 10: Gravel Bed Thermal Storage


This component models a packed bed of graded pebbles (rocks). Hot air, the usual working fluid, enters
the rock bed at the top and transfers heat to the pebbles. The storage can then be discharged by running
cold air from the bottom to the top of the bed. With the relase of TRNSYS 17, this model was enhanced to
allow for simaultaneous air flow in both directions. Prior to the TRNSYS 17 release, air flow was allowed in
only one direction at a given time.

4.10.1.1. Parameter / Input / Output Reference


PARAMETERS

1 Specific heat of [kJ/kg.K] The specific heat of the fluid flowing through the rock bed
working fluid (typically air)

2 Length of rock bed [m] The length of the rock bed in the flow direction

3 Cross section area of [m2] The inside dimensions of the rock bed cross sectional area
rock bed (perpendicular to the flow direction)

4 Perimeter [m] The inside dimension of the rock bed perimeter (perpendicular to
the flow direction)

5 Specific heat of rock [kJ/kg.K] The specific heat of the the rock in the rock bed

6 Apparent density [kg/m3] The average density of the combination of rock and void space
in the rock bed.

7 Loss coefficient [kJ/hr.m2.K] The thermal loss coefficiency between the rock bed and its
surroundings.

8 Effective thermal [kJ/hr.m.K] The effective thermal conductivity of the rock bed in the flow
conductivity direction (including voids).

INPUTS

1 Inlet temperature 1 [C] The temperature of the air entering the rock bed from the top and
flowing down.

2 Inlet flowrate 1 [kg/h] The flowrate of air entering the rock bed from the top and flowing
down. *Note - the flowrate of air entering the bed from the top
(this input) and the flowrate of air entering the bed from the
bottom (input 4) cannot be greater than zero simultaneously.

3 Inlet temperature 2 [C] The temperature of the air entering the tank from the bottom and
flowing upwards.

4 Inlet flowrate 2 [kg/h] The flowrate of air entering the rock bed from the bottom and
flowing upwards. *Note - the flowrate entering the bottom (this
input) and the flow entering from the top of the tank (Input 2)
cannot be greater than zero simultaneously.

5 Environment [C] The temperature of the surroundings to which the rock bed is
temperature exposed. This input is used to calculate the thermal losses from
the rock bed.

4–556
TRNSYS 18 – Mathematical Reference

DERIVATIVES

The number of derivatives determines the number of isothermal segments (in the flow direction) into which the
rock bed will be divided. Values between 1 and 40 are permitted.

1 Initial temperature of [C] The initial temperature of the specified segment of the rock bed.
segment Segment 1 = top of rock bed; segment N = bottom of rock bed.

OUTPUTS

1 Bottom node [C] The temperature of the fluid/rock in the bottom segment of the
temperature tank.

2 Flow rate from the [kg/h] The flowrate of fluid entering the top of the rock bed and leaving
bottom node at the bottom of the rock bed.

3 Top node temperature [C] The temperature of the fluid/rock in the top segment of the tank.

4 Flow rate from the top [kg/h] The flowrate of fluid entering the bottom of the rock bed and
node exiting the top of the rock bed.

5 Internal energy change [kJ] The change in internal energy since the simulation began. This
output should not be integrated.

6 Rate of energy supply [kJ/h] The rate of energy supplied by the rock bed to the load stream
(the air entering from the bottom and leaving the top). The supply
rate is: Qsupply = mdot,b * Cpair * (T1 – Tin,bot)

7 Environment losses [kJ/h] The rate of energy lost to the surroundings from the rock bed.

8 Average temperature [C] The average temperature of the rock bed.

4.10.1.2. Simulation Summary Report


VALUE FIELDS

Storage Length [m] Parameter 2

Storage Volume [m3] Pparameter 2 multiplied by Parameter 3

Storage U-value [kJ/h.K] Parameter 7 multiplied byt the rock bed surface area

Apparent Density [kg/m3] Parameter 6

Apparent Thermal [kJ/h.m.K] Parameter 8


Conductivity

Change in Internal [kJ] Output 5 reported at the end of the simulation


Energy

INTEGRATED VALUE FIELDS

Environment Losses [kW] Output 7

4–557
TRNSYS 18 – Mathematical Reference

Energy Supplied [kW] Output 6

MINIMUM/MAXIMUM VALUE FIELDS

Average Temperature [C] Output 8

Energy Supplied [kW] Output 6

4.10.1.3. Hints and Tips

4.10.1.4. Nomenclature
A cross-sectional area of the rock pile
Cp specific heat of air
Cr specific heat of rock
hv volumetric heat transfer coefficient between air and rocks
k effective thermal conductivity of the rock bed in the axial direction
L length of the rock bed in the flow direction
m air mass flow rate
P perimeter of rock bed wall

Qenv rate of energy loss from rock bed to surroundings

Qs rate at which energy is removed from the rock bed to meet the load
T average rock bed temperature
T air temperature
Tenv temperature of surroundings
Tin temperature of air entering the rock bed
Tr rock temperature
Ti temperature of air and rock in segment i
t time
U loss coefficient from the rock bed to the environment
V volume of rock bed = AL
E change in internal energy of the rock bed
hvV
 = NTU of the rock bed
 p
mC
r apparent rock density (accounting for voids)

V r C r
t  p
mC

4–558
TRNSYS 18 – Mathematical Reference

4.10.1.5. Detailed Description


EQUATIONS WITHOUT AXIAL CONDUCTION
Rock bed thermal storage can be described by the relations governing heat transfer for fluid flow in packed
beds. Neglecting temperature gradients within the rocks, axial conduction and assuming a uniform flow
distribution of air through the bed, the following two partial differential equations describe the air and rock
temperatures as a function of bed position and time:

Tr
=  (T - Tr) Eq. 4.10.1-1
t 
T
=  Tr - T - UPL T - Te nv Eq. 4.10.1-2
(X/L) mCp
These equations can be solved by finite difference methods. However, small time steps and many nodes
are required to maintain accuracy. As a result, the use of this model in simulations for extended periods
(e.g., a heating season or a year) becomes expensive in terms of computing costs.
The results of many simulations of air heating systems in which Eq. 4.10.1-1 and Eq. 4.10.1-2 have been
used to describe the rock bed behavior, have shown that the system performance has an asymptotic
dependence upon . For values of e greater than ~10, (which is generally much lower than the values
encountered in most practical designs) the system performance is independent of  (l);  may be increased
without bound without affecting system performance significantly.
This observation indicates that a rock bed model in which    may be applicable in most cases. The
equations describing the air and rock temperatures for    are given in Eq. 4.10.1-3 and Eq. 4.10.1-4.

T T
-A rCr = mCp + UP(T - Tenv) Eq. 4.10.1-3
t X

Tr = T Eq. 4.10.1-4

Eq. 4.10.1-3 and Eq. 4.10.1-4 can be solved with significantly less computational effort than Eq. 4.10.1-1
and Eq. 4.10.1-2.
For rock bed designs in which  > 10, the solution of Eq. 4.10.1-3 and Eq. 4.10.1-4 is nearly identical to that
of Eq. 4.10.1-1 and Eq. 4.10.1-2. In addition, it is possible to include axial conduction, since this situation is
easily handled as shown in the next section.

4–559
TRNSYS 18 – Mathematical Reference

EQUATIONS WITH AXIAL CONDUCTION


The partial differential equation describing both air and rock temperatures (considering axial conduction
and losses to the surroundings) is given in Eq. 4.10.1-5

T T 2T
 A r C r  mC
 p  UP(T  Tenv )  kA 2 Eq. 4.10.1-5
t x x
In order to solve this equation, the rock bed is divided into segments, as shown in Figure 4.10.1–1, in a
manner analogous to that used for the thermally stratified fluid storage tank such as Type158. An ordinary
differential equation can then be written for each segment, using finite difference methods.

Top
Segment 1

N
B ottom

Figure 4.10.1–1: Rockbed segmentation

The N differential equations can be expressed:


For Air Flow Downwards (i.e., from segment 1 towards segment N)
for i = 1:
VrCrdT1 = mCp Tin - T1 - UPL T1 - Tenv - kA T1 - T2 Eq. 4.10.1-6
N dt N L/N
for i = 2, N - 1:
V C dTi = mCp Ti-1 - Ti - UPL Ti - Tenv - kA Ti-1 - Ti - kA Ti - Ti+1 Eq. 4.10.1-7
N r r dt N L/N L/N
for i = N:
VrCrdTN = mCp TN-1- TN - UPL TN - Tenv - kA TN-1 - TN Eq. 4.10.1-8
N dt N L/N
For Air Flow Upwards (i.e., from segment N towards segment 1)
for i = N:
VrCrdTN = mCp Tin - TN - UPL TN - Tenv - kA TN - Tn-1 Eq. 4.10.1-9
N dt N L/N
for i = 2, N - 1:
VrCrdTi = mCp Ti+1 - Ti - UPL Ti - Tenv - kA Ti-1 - Ti - kA Ti - Ti+1 Eq. 4.10.1-10
N dt N L/N L/N

4–560
TRNSYS 18 – Mathematical Reference

for i = 1
VrCrdT1 = mCp T2- T1 - UPL T1 - Tenv - kA T2 - T1 Eq. 4.10.1-11
N dt N L/N
A value of N = 5 is recommended.

4.10.1.6. References
1. Hughes, P.M., Klein, S.A., and Close, D., "Packed Bed Thermal Storage Models for Solar Air Heating
and Cooling Systems", Journal of Heat Transfer, May (1976).

4–561
TRNSYS 18 – Mathematical Reference

4.10.2. Type 38: Plug Flow Vertical Cylindrical Storage Tank


This component models the behavior of a temperature stratified storage tank using variable size segments
of fluid. The size of segments is governed by the simulation time step, the magnitude of collector and load
flow rates, heat losses and auxiliary input. The main advantage over fixed node simulation techniques (eg.
Type 4) is that temperature stratification can be modeled with small segments in the temperature gradient
zone without the need to use small simulation time steps to obtain a "good" solution. This model is most
appropriate for tanks that exhibit a large degree of stratification.
There are two modes of operation. In mode 1, the tank has fixed inlet positions and the flow mixes with
adjacent segments if its temperature is within 1/2 degree. Otherwise a new segment is created and
temperature inversions are corrected by mixing appropriate segments above or below the inlets. In mode
2, the tank has variable inlet positions and new segments are inserted at the levels which produce no
temperature inversions. This allows a maximum degree of stratification and is equivalent to other liquid
thermal storage tank models with a large number of nodes.
This "plug-flow" tank model is very similar to the extended SOLSYS model outlined in [1] with the following
additional features:
 An optional auxiliary heater subject to temperature and/or time control,
 Conduction between segments,
 Upright or horizontal cylindrical tanks, and
 Different insulation thicknesses on the top and sides of upright tanks or eccentric location of the tank
in the insulation jacket for horizontal tanks.
NOTE: Only one unit of Type 38 can be used per simulation.

4.10.2.1. Parameter / Input / Output Reference


PARAMETERS

1 Inlet position mode [-] The auxiliary storage tank may operate in one of two modes in
determining the inlet positions of the flow streams. Mode 1
indicates that the heat source flow enters the tank in a fixed
location and the flow mixes with adjacent segments if the
temperature is within 1/2 degree. In Mode 2, the tank has variable
inlet positions and new segments are inserted at the levels which
produce no temperature inversions. This allows for a maximum
degree of stratification.

2 Tank volume [m3] The actual volume of the storage tank (not the nominal value).

3 Tank height [m] The height of the storage tank.

4 Height of collector [m] The vertical distance between the bottom of the storage tank and
return the inlet of the hot-side flow stream.

5 Fluid specific heat [kJ/kg.K] The specific heat of the fluid contained in the storage tank.

6 Fluid density [kg/m3] The density of the fluid contained in the storage tank.

7 Thermal conductivity [kJ/hr.m.K] The effective thermal conductivity of the fluid and the walls of the
thermal storage tank (0 = no conduction).

8 Tank configuration [-] The configuration of the thermal storage tank: 1 ---> Vertical
cylinder ; 2 ---> Horizontal cylinder

4–562
TRNSYS 18 – Mathematical Reference

9 Overall Loss [kJ/hr.K] The overall loss coefficient (UA) for the storage tank.
Coefficient

10 Insulation ratio [-] The ratio of the thickness of the top insulation to the side insulation
for vertical tanks, or the ratio of the insulation thickness of the top
insulation to the bottom insulation of a horizontal cylindrical tank
(set this ratio to 1 if the tank has a concentric insulation jacket).

11 Initial temperature [C] The initial temperature of the preheat portion of the thermal storage
tank.

12 Maximum heating rate [kJ/hr] The maximum rate at which energy can be added to the thermal
storage tank from the auxiliary heating element. If there is no
element present in the tank, set this parameter to 0.

13 Auxiliary height [m] The height of the auxiliary heater element above the bottom of the
storage tank.

14 Thermostat height [m] The height of the thermostat for the auxiliary heater above the
bottom of the storage tank.

15 Set point temperature [C] The set point temperature for the auxiliary heating element. The
thermostat will enable the heating element when the temperature of
the fluid in the node containing the thermostat falls below: Tset -
Tdb and continue to heat the fluid until it reaches the set point
temperature. Tset = this parameter; Tdb = temperature deadband

16 Temperature [deltaC] The dead band temperature difference for the auxiliary heating
deadband element. The thermostat will enable the heating element when the
temperature of the fluid in the node containing the thermostat falls
below: Tset - Tdb and continue to heat the fluid until it reaches the
set point temperature. (See manual for further information on
equation)

17 Flue loss coefficient [kJ/hr.K] The overall loss coefficient (UA) for heat loss to the flue when the
auxiliary heater is off. This parameter is used to model gas heated
storage tanks and should be set to zero if there is no flue.

INPUTS

1 Hot-side temperature [C] The temperature of the fluid flowing into the tank from the heat
source.

2 Hot-side flowrate [kg/hr] The flowrate of fluid into the storage tank from the heat source. An
equal flowrate of fluid leaves the bottom of the storage tank for
return to the heat source.

3 Cold-side temperature [C] The temperature of the replacement fluid flowing into the bottom of
the storage tank.

4 Cold-side flowrate [kg/hr] The flowrate of replacement fluid flowing into the bottom of the
storage tank. An equal amount of fluid is assumed to flow from the
top of the tank to meet the load.

5 Environment [C] The temperature of the environment in which the storage tank is
temperature located.

4–563
TRNSYS 18 – Mathematical Reference

6 Control signal [-] The control signal for the auxiliary heating element. The available
power for the heating element will be this input multiplied by the
maximum power for the element. If an auxiliary heater is not
desired for the simulation, set this input to a constant of 0.0 or set
the maximum power for the element to 0.0

OUTPUTS

The temperature of the fluid flowing from the bottom of the storage
1 Temperature to heat tank and returning to the heat source (the bottom node
source [C] temperature).

Flowrate to heat The flow rate of fluid exiting the bottom of the storage tank to return
2
source [kg/hr] to the heat source.

The temperature of the fluid flowing from the top of the storage tank
3
Temperature to load [C] to the load (the temperature of the top node).

4 Flowrate to load [kg/hr] The flow rate of fluid exiting the tank at the top to meet the load.

5 Thermal losses [kJ/hr] The rate of thermal energy loss to the environment.

The rate at which energy is removed from the tank to supply the
load. The energy rate to the load is calculated by: Qload =
6
mdot,load * Cp * (Ttop - Treplace) (See manual for further
Energy rate to load [kJ/hr] information on equation)

The internal energy change of the tank relative to its initial


7 condition. This output should not be integrated as it is an energy
Internal energy change [kJ] quantity and not an energy rate.

The rate at which energy was added to the thermal storage tank by
8
Auxiliary heating rate [kJ/hr] the auxiliary heater.

The rate of energy transfer from the heat source to the storage
9 Energy rate from heat tank. The rate is calculated from: Qin = mdot,source * Cp * (Thot -
source [kJ/hr] Ttosource) (See manual for further information on equation)

Average tank The average temperature of the fluid in the storage tank over the
10
temperature [C] timestep.

4.10.2.2. Simulation Summary Report


VALUE FIELDS

Tank volume [m3] Parameter 2

Fluid specific heat [kJ/kg.K] Parameter 5

Overall loss coefficient [kJ/h.K] Parameter 9

Maximum auxiliary [kJ/h] Parameter 12


heating rate

Set point temperature [C] Parameter 15

4–564
TRNSYS 18 – Mathematical Reference

TEXT FIELDS

Inlet position mode [n/a] Either “fixed” or “variable” depending on the value of parameter 1

Tank orientation [n/a] Either “vertical” or “horizontal”

INTEGRATED VALUE FIELDS

Energy rate to load [kJ] Output 6

Auxiliary heating rate [kJ] Output 8

Thermal losses [kJ] Output 5

MINIMUM/MAXIMUM VALUE FIELDS

Temperature to source [C] Output 1

Temperature to load [C] Output 3

Average tank [C] Output 10


temperature

4.10.2.3. Nomenclature
Cp specific heat of fluid
Ha height of auxiliary heater above bottom of tank
Ht height of tank
Hth height of thermostat above bottom of tank
Hr height of entry of hot stream (above bottom of tank)
k thermal conductivity
mh mass flow rate of hot stream entering tank
mL mass flow rate of load
Qaux rate of auxiliary energy input to tank
Qenv rate of energy loss from tank
Qhe maximum rate of energy input to tank by auxiliary
Qin rate of energy input to tank from hot fluid stream
Qsup rate of energy supplied to load by tank
ri ratio of insulation thickness of top to sides of upright tanks or top to bottom insulation ratio for horizontal
tanks
TD temperature of water delivered by tank to load
Tenv environmental temperature for losses
Th temperature of hot fluid entering tank
Ti temperature of ith segment
TI initial temperature of preheat portion of tank

4–565
TRNSYS 18 – Mathematical Reference

TL temperature of load stream entering tank


TR temperature of fluid return to heat source
Tset thermostat set temperature

T average tank temperature


Vh volume of fluid entering tank from heat source over a time interval t
Vi volume of ith segment
VL volume of fluid entering tank from load over a time interval Dt
Vt tank volume
UA overall UA value of tank
(UA)f overall conductance for heat loss to flue of gas heater
E change in internal energy storage
t simulation timestep
Tdb thermostat temperature deadband
 fluid density
htr optional control function input (0 to 1) that disables or enables auxiliary heater

4.10.2.4. Detailed Description


Figure 4.10.2–1 illustrates the concept of this tank model. In this example, the tank is initially divided into
four segments of volume Vi and temperature Ti, so that no temperature inversions are present. In one time
period, the heat source delivers a volume of liquid, Vh, equal to m  h t /  at a temperature Th. Assuming Th
is greater than T1, then a new segment is added at the top of the tank and the existing profile is shifted. At
the same time, the fluid enters from the load with a volume, VL, equal to m  L t /  and temperature of TL. If
TL is less than T4, then a segment is added at the bottom of the tank and the profile is shifted once more.
The net shift of the profile in the tank is equal to the difference between the total heat source volume and
load volume or m  L t /  . The segments and/or fraction of segments whose positions fall outside the
 h m
bounds of the tank are returned to the heat source and load. The average temperature delivered to load for
the example of Figure 4.10.2–1 is:
V T + (VL - Vh)T1
TD = h h Eq. 4.10.2-1
VL
and the average heat source return temperature, T R, is equal to TL. In general, for N segments the average
delivery and heat source return temperatures are computed as follows:
If Vh < VL, then

TR = TL:

 k 1

TD   Vh Th   Ti Vi  aTk Vk  / VL Eq. 4.10.2-2
 i 1 
where a and k must satisfy
0  a  1:
k 1
Vh   Vi  aVk  VL Eq. 4.10.2-3
i 1

If Vh > VL, then

4–566
TRNSYS 18 – Mathematical Reference

TD = Th:

 N

TR   VL TL   Ti Vi  aTk Vk  / Vh Eq. 4.10.2-4
 i  k 1 
where a and k must satisfy
0  a  1:
N
VL   T V  aT V
i  k 1
i i k k  Vh Eq. 4.10.2-5

In mode 1, the average delivery and heat source return temperatures are computed after the profile has
been corrected for temperature inversions. Segments are combined until the equilibrium temperatures
result in no temperature inversions. This process begins at each inlet and proceeds in the direction of the
inversion.
The optional auxiliary heater is modeled as in the Type 4 component. If necessary, the segment containing
the auxiliary is split into two segments at the actual position of the auxiliary. The auxiliary is on if the
temperature of the segment containing the thermostat is either less than T set-tdb or if the auxiliary was
on for the previous time interval and the thermostat temperature is less than T set. The segment containing
the auxiliary is heated first, until it reaches the temperature of the segment above. These two segments are
then heated together until they reach the temperature of the segment above them. This process continues
until either the maximum heater input is used or the set temperature is reached. If a load flow is occurring
and auxiliary is able to heat the top segment, then the delivered fluid is heated with a linear temperature
profile.
Storage losses from the tank and conduction between segments are evaluated before the temperature
profile has been adjusted for flows and auxiliary heat input. This is accomplished by solving the following
differential equation for each segment:
dTi (T - T ) (T - T )
CpVi = -(UA)i (Ti - Tenv) + (kA)i-1 i-1 i - (kA)i i i+1 Eq. 4.10.2-6
dt h h
i-1 i+1
where hi-1 = separation between centers of segments i-1 and i, and hi+1 = separation between centers
of segments i and i+1.

4–567
TRNSYS 18 – Mathematical Reference

To p Bo tto m

T time = t 1
1
T
2 T3
T
4

V1 V V V
2 3 4
T
h
collecto r T s tep 1
1
flow T
2 T
3
V T
h
4

V1 V V V
2 3 4
T
T 1
h s tep 2
T1
T2 T
3
T V
4
TL lo a d flow
L

V V V V V
h 1 2 3 4

T time t = t +  t
1 2 1
T T
2
3
T
4
T
5

V V V V V fra ctio n of v olume


1 2 3 4 5

Figure 4.10.2–1: Example of the Extended SOLSYS SYSTEM (adapted from ref. 1)
When conduction is included, the set of coupled differential equations is solved by successive substitution.
Conduction down the walls of the tank can be included by using an effective conductivity.
The overall conductance for heat loss from any segment, (UA) i, depends upon its surface area and a user-
supplied overall loss conductance UA. In addition an optional conductance for heat loss to a gas heater
flue when the auxiliary is not operating can also be specified.
The total loss from the tank is:
N
   ( UA) (T  T )
Q Eq. 4.10.2-7
env i i env
i 1

The energy input to the tank due to the hot inlet stream is:

Qin = mhCp(Th - TR) Eq. 4.10.2-8

The energy supplied to the load is:

Qsup = mLCp(TD - TL) Eq. 4.10.2-9

The change in internal energy of storage is:

4–568
TRNSYS 18 – Mathematical Reference

 N N

E  C p   Vi Ti   Vi Ti  Eq. 4.10.2-10
 i 1 i 1
t  TIME 0 

4.10.2.5. References
1. Kuhn, J.K. VanFuchs, G.F., and Zob, A.P., "Developing and Upgrading of Solar System Thermal Energy
Storage Simulation Models," Draft Report for DOE, Boeing Computer Services Company, August 31
(1980).

4–569
TRNSYS 18 – Mathematical Reference

4.10.3. Type 39: Variable Volume Liquid Storage


This component models a fully-mixed tank with a constant cross-sectional area that contains a variable
quantity of fluid. In its simplest form, a single flow enters from a hot source and a single flow stream exits
to a load as illustrated in Figure 4.10.3–1 (a). Since the incoming and outgoing flows need not be equal,
the level of fluid in the tank can vary. The level is allowed to vary between user specified high and low level
limits. If the lower limit is reached, the load flow necessary to maintain this level is output rather than the
desired load flow. If the volume of fluid exceeds the upper limit, then the excess flow necessary to keep
the tank at the upper limit is set as an output. There are two modes for handling excess flow when the
upper limit is reached. In mode 1, excess flow mixes with the contents of the tank to simulate a recirculation
flow stream as illustrated in Figure 4.10.3–1 (b). In this case, the temperature of the excess flow stream is
the temperature of the contents of the tank. In mode 2, the excess incoming fluid stream is diverted from
the tank as illustrated in Figure 4.10.3–1 (c). The temperature of the diverted stream is equal to that of the
incoming flow stream.

4.10.3.1. Parameter / Input / Output Reference


PARAMETERS

1 Tank operation mode [-] The operation mode of the storage tank when a full condition is
reched:
1 ---> Recirculate the fluid if the tank is full
2 ---> Divert the fluid stream if the tank is full

2 Tank volume [m3] The overall volume of the storage tank.

3 Minimum liquid volume [m3] The minimum volume of fluid allowed in the storage tank before the
load is modulated to maintain this minimum volume.

4 Maximum liquid [m3] The maximum volume of fluid allowed in the storage tank before
volume the fluid stream is either recirculated or diverted.

5 Tank circumference [m] The circumference of the storage tank.

6 Cross sectional area [m2] The cross-sectional area of the variable volume storage tank.

7 Wetted loss coefficient [kJ/h.m2.K] The loss coefficient of that part of the tank which is in contact with
the liquid

8 Dry loss coefficient [kJ/h.m2.K] The loss coefficient of that part of the tank which is not in contact
with the liquid

9 Liquid specific heat [kJ/kg.K] The specific heat of the liquid contained in the storage tank

10 Liquid density [kg/m3] The density of the liquid contained in the storage tank

11 Initial liquid [C] The temperature of liquid in the storage tank at the beginning of the
temperature simulation

12 Initial liquid volume [m3] The volume of liquid in the storage tank at the beginning of the
simulation.

INPUTS

4–570
TRNSYS 18 – Mathematical Reference

1 Inlet temperature [C] The temperature of liquid entering the storage tank

2 Inlet flow rate [kg/h] The flow rate of liquid entering the storage tank

3 Flow rate to load [kg/h] The flow rate of liquid leaving the storage tank

4 Environment [C] The temperature of the environment in which the storage tank is
temperature located.

5 Auxiliary energy input [kJ/h] The rate at which auxiliary energy is added to the storage tank.

OUTPUTS

1 Liquid temperature [C] The temperature of liquid contained in the storage tank

2 Load flow rate [kg/h] The flow rate of fluid exiting the storage tank to meet the load. Note
- this may be different than the desired load flow rate due to
minimum and maximum volume considerations.

3 Excess flow [C] The temperature of the recirculated flow stream (mode 1) or the
temperature diverted flow stream (mode 2) if a maximum volume condition is
reached.

4 Excess flow rate [kg/h] The flow rate of fluid that is either recirculated (mode 1) or diverted
(mode 2) due to a maximum volume condition being reached.

5 Liquid volume [m3] The volume of fluid in the storage tank.

6 Enthalpy difference [kJ/kg] The difference in enthalpies of the outgoing and the incoming flow
streams.

7 Environment losses [kJ/h] The rate at which energy is transferred to the environment from the
storage tank.

8 Internal energy change [kJ] The change in internal energy of the tank relative to the beginning
of the simulation. This term is an energy quantity and not an energy
rate and should not be integrated.

9 Level indicator [-] The level indicator for the storage tank:
-1 ---> Tank fluid is at minimum level
0 ---> Tank fluid is somewhere between minimum and maximum
levels
1 ---> Tank fluid is at maximum level

4.10.3.2. Simulation Summary Report Contents


VALUE FIELDS

Overall tank volume [m3] Parameter 2

Wet surface loss [kJ/h.m2.K] Parameter 7


coefficient

4–571
TRNSYS 18 – Mathematical Reference

Dry surface loss [kJ/h.m2.K] Parameter 8


coefficient

TEXT FIELDS

Operation mode [n/a] “Recirculate the fluid if the tank is full” or “Divert the fluid stream if the
tank is full” depending on the value of parameter 1

INTEGRATED VALUE FIELDS

Tank energy loss [kJ] Output 7

Excess flow [kg] Output 4

Auxiliary energy [kWh] Input 5

MINIMUM/MAXIMUM VALUE FIELDS

Tank temperature [C] Output 1

Tank volume [m3] Output 5

4.10.3.3. Nomenclature
Ax cross-sectional area of tank
Cpf specific heat of fluid in tank
Cx circumference of tank
mh flow rate of incoming hot stream
mi net incoming flow rate; mh in mode 1; mh - mr in mode 2
mL flow rate required by load
mo net flow leaving tank; ms - mr in mode 1; ms in mode 2
mr flow rate of recirculation or diverted stream necessary to keep fluid level at the upper limit
ms actual flow rate supplied to load
M instantaneous mass of fluid in tank
M average mass of fluid in tank over the timestep
MI initial mass of fluid in tank
M mass of fluid in tank at end of timestep
M-t mass of fluid in tank at beginning of timestep

Qenv energy loss rate from tank to environment


Qadd energy added to the tank from external sources (such as a heating element)
t time
T instantaneous temperature of fluid in tank
T average fluid temperature in tank over timestep
Tenv environmental temperature for losses from tank
Th temperature of incoming hot flow stream

4–572
TRNSYS 18 – Mathematical Reference

TI initial temperature of fluid in tank


T temperature of fluid at end of timestep
T-t temperature of fluid at beginning of timestep
Ud loss coefficient for dry portion of tank
Uw loss coefficient for wetted portion of tank
(UA)t overall conductance for heat loss from tank
VI initial volume of fluid in tank

V average volume of fluid over timestep


Vmin minimum allowable volume of fluid in tank
Vmax maximum allowable volume of fluid in tank
V volume of tank
E change in internal energy of fluid in the tank since the beginning of the simulation
H difference between the enthalpies of the outgoing and incoming flowstream per unit time
t simulation timestep
f fluid density

4.10.3.4. Detailed Description


Figure Figure 4.10.3–1 shows the flow configurations modeled by Type39.

.
m ,T m ,T
m ,T h h m r ,T h
h h h h

. m ,T
. m s ,T
m s ,T r m s ,T

(a) (b) (c)


Figure 4.10.3–1: Variable Volume Tank Configurations
The variable volume tank is modeled as a fully-mixed variable mass of water. The two differential equations
describing the rate of change of mass and internal energy are:
dM = mi - mo Eq. 4.10.3-1
dt
d(MT)
Cpf = miCpTh - moCpT - (UA) t(T-Tenv) Eq. 4.10.3-2
dt
The net flow into the tank, m1 , is mh in Mode 1 and mh - mr in Mode 2. The net flow leaving the tank is
ms - mr in Mode 1 and ms in Mode 2.
The solutions of (Eq 5.12.4.1) for the final and average mass for a given timestep are:

M = M-t + (mi - mo)t Eq. 4.10.3-3

M = M + M-t Eq. 4.10.3-4


2

4–573
TRNSYS 18 – Mathematical Reference

Simultaneous solution of Eq. 4.10.3-1 and Eq. 4.10.3-2 for final and average fluid temperatures for a
timestep gives:
 b/c
a  a ct 
T    T  t    1   Eq. 4.10.3-5
b  b  M   t 
M-t T-t - a (1-b/c)
T= +a b 1 + Ct -1 Eq. 4.10.3-6
b (c - b)t M-t
where,
(𝑈𝐴)𝑡 𝑞̇ 𝑎𝑑𝑑
𝑎 = 𝑚𝑖 𝑇ℎ + 𝑇𝑒𝑛𝑣 +
𝐶𝑝𝑓 𝐶𝑝𝑓
(UA) t
b = mi +
Cpf
c = mi - mo
For the situation where the incoming flow equals the total outgoing flow (i.e. no net change in mass), the
following differential equation results:
(UA) t
M-tdT = mi Th - T - T-Tenv Eq. 4.10.3-7
dt Cpf
This equation is solved analytically.
The change internal energy, the difference in enthalpies per unit time between outgoing and incoming flow
streams, and energy loss rate are calculated as:

E = Cpf  M T - MITI Eq. 4.10.3-8

 m
H  i C pf Th  m
 o C pf T Eq. 4.10.3-9

Qenv = UA t T - Tenv Eq. 4.10.3-10

The overall conductance for heat loss from the tank, (UA) t, is calculated based upon average wetted and
dry areas for the current timestep and user specified wet and dry loss coefficients.

4–574
TRNSYS 18 – Mathematical Reference

4.10.4. Type 153: Gas Water Heater with Integrated Controls


This Type models a standard residential gas water heater. The model represents the storage volume as a
series of cylindrical, isothermal nodes, in order to model the stratification observed in storage tanks. Each
constant-volume node interacts thermally with the nodes above and below through fluid conduction, forced
fluid movement (from inlet flow), and natural fluid mixing (destratification of temperature inversions in the
tank). The fluid in the tank interacts with the environment through thermal losses from the top, bottom, and
edges. There is an integrated auxiliary heater at the bottom of the tank, which is controlled through an
integrated thermostat.
To make the model representative of most typical residential water heaters, as well as to facilitate faster
and easier implementation of the model into projects, the following simplifications are made over more
flexible storage tank models in the TRNSYS libraries:
 The tank has only one flow stream; fluid enters through the bottom of the tank (either externally or
via diptube; the diptube’s interaction with the tank is not modeled) and exits through the top of the
tank.
 The model automatically assigns the number of nodes of the storage tank, based on the nominal
volume of the tank;
 The environment surrounding the tank is at a constant temperature (the same temperature is
applied at the top, bottom, and all edges of the tank);
 The auxiliary heat is always applied in the bottommost tank node;
 There is no capability to model immersed heat exchangers in this Type;
 The only conductance between nodes is from fluid to fluid; additional conductance effects (due to
tank walls, baffles, fins, or other heat-transfer-promoting devices) are not modeled;
 If the temperature of a node exceeds the temperature of the node above, the offending nodes will
be mixed at the moment at which they become unstable (there is no option to adjust the inversion
mixing flow rate or allow the tank to stratify with cold nodes on top of hot nodes);
 Control of the auxiliary heater is integrated into the model. The model will control the auxiliary heat
to maintain the temperature at the thermostat within the deadband of the temperature setpoint.
Unlike TRNSYS controller models, the embedded controls in this Type can make multiple control
decisions per timestep; thus, the cycle time of the controller does not necessarily restrict the
timestep allowed when using this Type.
Please see other storage tank models, such as Type 534, available in the TESS Storage Tank Library, for
modeling of storage tanks for which the above listed simplifications do not or should not apply.

4.10.4.1. Parameter/Input/Output Reference


PARAMETERS

1 Fluid volume [m3] The internal volume of the tank. In U.S. applications, this volume is
typically 95% of the rated storage volume (80 gallon nameplate =
75 gallon fluid volume).

2 Tank height [m] The internal height of the tank.

3 Tank heat loss [kJ/hr-m2-K] The effective heat loss coefficient for the storage tank. Thermal
coefficient losses through the top, bottom, and edges of the tank are a
function of this value and the temperature difference between the
tank nodes and the environment.

4–575
TRNSYS 18 – Mathematical Reference

4 Initial tank temperature [°C] The temperature of the fluid in the storage tank at the beginning of
the simulation. All nodes of the tank are at the same temperature
at the start of the simulation.

5 Rated heating capacity [kJ/hr] The rated heating capacity of the gas water heater heating source.
The amount of heat available to the fluid is simply this value
multiplied by the thermal efficiency of the heating device.

6 Heating efficiency [-] The efficiency of the heating device in converting fuel to useful
heat. The amount of heat available to the fluid is simply this value
multiplied by the heating capacity of the heating device.

7 Pilot light energy [kJ/hr] The rate at which the pilot light adds energy to the water heater
when the auxiliary heater is not firing. During periods when the
auxiliary heater is firing, the pilot light is assumed to be off.

8 Height fraction for [-] The fraction of the height from the bottom of the water heater to the
thermostat location of the thermostat (0=bottom, 1=top).

9 Setpoint deadband [°C] The temperature difference between the setpoint temperature and
the temperature at which the heating device becomes active. Note
that in this model, the setpoint is centered in the deadband; for
example, if the setpoint were 55 °C and the deadband were 6 °C,
the heating device would turn on at measured temperatures of
52 °C and lower and off at a measured temperature of 58 °C.

10 Fluid specific heat [kJ/kg-K] The specific heat of the fluid in the storage tank.

11 Fluid density [kg/m3] The density of the fluid in the storage tank.

12 Fluid conductivity [kJ/hr-m-K] The conductivity of the fluid in the storage tank.

INPUTS

1 Inlet temperature [°C] The temperature of the fluid entering the water heater (in this Type,
fluid always enters at the bottom of the storage tank).

2 Inlet flow rate [kg/hr] The flow rate of fluid entering the water heater, or the load flow on
the heater.

3 Environment [°C] The effective temperature of the tank’s environment, for calculating
temperature losses from the water heater.

4 Setpoint temperature [°C] The desired temperature of the water heater. Note: the water
heater will begin heating the water when the temperature at the
thermostat falls to this setpoint temperature minus ½ the deadband
temperature difference (Parameter 9).

OUTPUTS

1 Temperature at outlet [°C] The temperature of the fluid exiting the water heater.

2 Flow rate at outlet [kg/hr] The flow rate of the fluid exiting the water heater, or the load flow
on the heater. This is equal to the inlet flow rate to the water
heater.

4–576
TRNSYS 18 – Mathematical Reference

3 Average tank [°C] The average temperature of the fluid in the water heater.
temperature

4 Energy delivery rate to [kJ/hr] The net rate at which energy is removed from the storage tank due
fluid to fluid flowing through the water heater. This is simply: (flow rate
through the heater) x (specific heat of the fluid) x (temperature
difference between incoming fluid and outgoing fluid).

5 Auxiliary heating rate [kJ/hr] The rate at which auxiliary heat energy is added to the water heater
fluid. The amount of heat available to the fluid is simply this value
multiplied by the thermal efficiency of the heating device.

6 Tank losses [kJ/hr] The rate at which energy is lost to the environment through the
surfaces of the water heater.

7 Energy storage rate [kJ/hr] The rate at which energy is stored by the fluid in the water heater,
due to a rise in temperature of the fluid (capacitance effects).

8 Energy balance error [%] The percent energy balance error for the heat transfers in the water
heater. Due to the iterative solution nature of the model, nodal
temperatures are approximate to a degree, which can lead to
energy imbalances. These imbalances are usually small. Large
imbalances may indicate that the timestep of the simulation is too
large for the loads being modeled.

4.10.4.2. Simulation Summary Report Contents


VALUE FIELDS

Tank Volume [m3] The internal volume of the tank.

INTEGRATED VALUE FIELDS

Delivered Energy [kJ] The total energy delivered to the working fluid. This is the cumulative
value over the simulation of: (flow rate through the heater) x (specific
heat of the fluid) x (temperature difference between incoming fluid and
outgoing fluid).

Auxiliary Energy [kJ] The total auxiliary energy supplied to the water heater fluid. The amount
of heat available to the fluid is simply this value multiplied by the thermal
efficiency of the heating device.

Thermal Losses [kJ] The total thermal energy lost to the environment through the surfaces of
the water heater.

MINIMUM/MAXIMUM VALUE FIELDS

Tank outlet [°C] The temperature of the fluid exiting the water heater.
temperature

Tank average [°C] The average temperature of the fluid in the water heater (average
temperature temperature of all nodes of the water heater).

4–577
TRNSYS 18 – Mathematical Reference

4.10.4.3. Hints and Tips


 Selecting Parameters And Inputs:
 The manufacturer of the tank should supply the nominal volume, the height of the tank, the rated
power of the auxiliary heater (typically in kBtu/hr or MMBtu/hr), and the rated efficiency of the heater
at full load (full power). Typical efficiencies for gas-fired water heaters are 80% for standard non-
condensing models, 84-85% for high-efficiency non-condensing models, and up to 92-93% for
condensing models. This Type assumes efficiency is constant; use an average value if efficiency
varies with part-load ratio, temperature, or other influences.
 The thermostat is commonly located near the bottom of the tank. A deadband of 5 [°C] is provided
as default, but actual deadbands may vary up to 10 [°C] or more, depending on the precision of the
thermostat control and the cycle time of the auxiliary heater.
 Fluid properties for pure water are provided as the default; enter modified properties if another fluid
(glycol solution, etc) is to be used.
 Some weather data files provide mains water inlet temperature approximations as part of the data
set. The tank environment temperature is commonly either the ambient drybulb air temperature (if
the tank is located outdoors), the conditioned space temperature (if located in a conditioned area),
or a function of both the conditioned temperature and the drybulb air temperature, if located in a
non-conditioned space (such as a garage or attic).
 When to Use This Type: This Type is designed to simulate a typical residential gas-fired water heater
of the type commonly found in single-family residences, small multi-family residences, and some non-
residential facilities which provide hot water for sinks and showers. It is appropriate for most domestic
water heating applications in which the auxiliary energy (gas) is the sole source of heating for the tank.
 When Not to Use This Type: This Type should not be used for any of the following scenarios:
 Tanks with multiple inlet/outlet draws (such as a solar storage tank with one draw to/from the solar
collector and another draw to the load);
 Tanks with heat exchangers, either immersed or wrapped around the exterior of the tank;
 Tanks which do not direct incoming fluid to the bottom of the tank, including those with ‘heat
seeking’ dip tubes that direct fluid to the stratified layer of the tank most thermally similar;
 Tanks which do not draw outgoing fluid off of the top of the tank;
 Tanks with internal fins, baffles, or other instruments which promote enhanced heat transfer
through the tank (beyond fluid-to-fluid conduction and bouyancy mixing);
 Tanks with fluids other than pure water or glycol solutions, for which the ratio of bouyancy forces
to viscous forces may necessitate slower mixing between unstable thermal nodes.

4.10.4.4. Nomenclature
Surface area of the bottom of node j in contact with the
Abottom,j [m2] bottom of the tank; = 𝜋𝐷2 /4 if j = Nnodes, = 0 for all other
nodes
Surface area of the edge of node j in contact with the wall of
Aedge,j [m2]
the tank; = 𝜋𝐷ℎ𝑡𝑎𝑛𝑘 /𝑁𝑛𝑜𝑑𝑒𝑠 for all nodes of the tank
Surface area of the top of node j in contact with the top of
Atop,j [m2]
the tank; = 𝜋𝐷2 /4 if j = 1, = 0 for all other nodes
cp [kJ/kg-K] Specific heat of tank fluid

D [m] Diameter of the tank; = √(4 ∙ 𝑉𝑡𝑎𝑛𝑘 )/(𝜋 ∙ ℎ𝑡𝑎𝑛𝑘 )


Rate of change of the average temperature of node j with
dTj/dt [°C/hr]
respect to time

4–578
TRNSYS 18 – Mathematical Reference

htank [m] Height of the tank


The control signal of the auxiliary heater; changes to 0 if the
thermostat temperature is above setpoint, changes 1 if the
Iaux [-] thermostat temperature is at or below setpoint (Input 4)
minus deadband (Parameter 9), otherwise maintains signal
from previous timestep
j (subscript) [-] The jth node of the tank (1 = top of tank)

k [kJ/hr-m-K] Conductivity of tank fluid


Length of conduction between one node and the node
Lcond [m] adjacent above or below; the height of the tank divided by
the number of nodes in the tank
Flow rate of fluid through the tank; this is a constant-volume
𝑚̇ [kg/hr] tank, so flow into the tank will always match flow out of the
tank
The number of isothermal nodes of the storage tank,
Nnodes [-]
automatically assigned by the Type
𝑄̇𝑎𝑢𝑥,𝑗 [kJ/hr] Rate of auxiliary energy gain of node j

𝑄̇𝑎𝑢𝑥,𝑟𝑎𝑡𝑒𝑑 [kJ/hr] Rated capacity (power) of the auxiliary heater

Rate of conduction between node j and the fluid nodes


𝑄̇𝑐𝑜𝑛𝑑,𝑗 [kJ/hr]
immediately above and below node j
Rate of thermal loss between node j and the ambient or
𝑄̇𝑙𝑜𝑠𝑠,𝑗 [kJ/hr]
surrounding environment

𝑄̇𝑚𝑎𝑠𝑠𝑓𝑙𝑜𝑤,𝑗 [kJ/hr] Rate of heat transfer through node j due to fluid flow

Ambient (air) temperature; the environment temperature


Tamb [°C]
surrounding the tank

Tave [°C] Average tank temperature

Tfinal [°C] Temperature of the tank at the end of the timestep

Tinitial [°C] Temperature of the tank at the beginning of the timestep

Tinlet [°C] Inlet temperature of fluid to tank

Tj [°C] Temperature of the jth node of the tank


Overall loss coefficient of the tank, per unit surface area of
Utank [kJ/hr-m2-K]
the tank
Vtank [m3] Volume of the storage tank

ρ [kg/m3] Density of tank fluid


The efficiency of the auxiliary heater. The energy available
ηaux [-] to the fluid is the rated power of the heater multiplied by this
efficiency.

4.10.4.5. Detailed Description


Figure 4.10.4–1 below shows a graphical representation of the noded vertical cylindrical fluid heater.

4–579
TRNSYS 18 – Mathematical Reference

Figure 4.10.4–1: Vertical, cylindrical, isothermally noded storage tank with one inlet (bottom) and one outlet
(top)
The tank is divided into N horizontal nodes of equal volume. Each of the tank nodes is assumed to be
isothermal. Node 1 is at the top of the storage tank, and the final node is at the bottom of the tank.

In this type of storage tank, energy can be transferred into and out of each node through mass flow, through
conductance to the node above or below, through thermal losses to the environment, or (in the case of the
bottommost node) through the auxiliary heater. Each of these heat transfer terms is elaborated in the
following sections.

THERMAL LOSSES

Thermal losses to the surrounding environment from each fluid node are calculated as follows:
𝑄̇𝑙𝑜𝑠𝑠,𝑗 = 𝑈𝑡𝑎𝑛𝑘 ∙ 𝐴𝑡𝑜𝑝,𝑗 ∙ (𝑇𝑗 − 𝑇𝑎𝑚𝑏 ) + 𝑈𝑡𝑎𝑛𝑘 ∙ 𝐴𝑏𝑜𝑡𝑡𝑜𝑚,𝑗 ∙ (𝑇𝑗 − 𝑇𝑎𝑚𝑏 )
Eq. 4.10.4-1
+ 𝑈𝑡𝑎𝑛𝑘 ∙ 𝐴𝑒𝑑𝑔𝑒,𝑗 ∙ (𝑇𝑗 − 𝑇𝑎𝑚𝑏 )
All tank nodes include edge losses. Losses through the top or bottom of the tank are only included if j = 1
or j = Nnodes, respectively.

MASS FLOW THROUGH NODES


Heat transfer through a node due to mass flow through the node is calculated as follows:
𝑄̇𝑚𝑎𝑠𝑠𝑓𝑙𝑜𝑤,𝑗 = 𝑚̇ ∙ 𝑐𝑝 ∙ (𝑇𝑗+1 − 𝑇𝑗 ) Eq. 4.10.4-2

where Tj+1 = Tinlet if j = Nnodes (the bottom of the tank).

CONDUCTION BETWEEN ADJACENT NODES


Heat transfer due to conduction between adjacent fluid nodes is calculated as follows:
𝑘 𝑉𝑡𝑎𝑛𝑘 𝑘 𝑉𝑡𝑎𝑛𝑘
𝑄̇𝑐𝑜𝑛𝑑,𝑗 = ∙ (𝑇𝑗−1 − 𝑇𝑗 ) − ∙ (𝑇 − 𝑇𝑗+1 ) Eq. 4.10.4-3
𝐿𝑐𝑜𝑛𝑑 ℎ𝑡𝑎𝑛𝑘 𝐿𝑐𝑜𝑛𝑑 ℎ𝑡𝑎𝑛𝑘 𝑗
The first term is neglected if j =1 (the top of the tank), and the last term is neglected if j = Nnodes (the bottom
of the tank).

AUXILIARY HEATING
Heat transfer through an auxiliary heater is calculated as follows:
𝑄̇𝑎𝑢𝑥,𝑗 = 𝐼𝑎𝑢𝑥 ∙ 𝑄̇𝑎𝑢𝑥,𝑟𝑎𝑡𝑒𝑑 ∙ 𝜂𝑎𝑢𝑥 Eq. 4.10.4-4

Auxiliary heat is only input to the bottommost node of the heater.

SOLVING THE TEMPERATURE OF THE TANK NODES

4–580
TRNSYS 18 – Mathematical Reference

The energy balance over each fluid node is as follows:


𝑑𝑇𝑗
𝜌𝑐𝑝 𝑉𝑗 = 𝑄̇𝑚𝑎𝑠𝑠𝑓𝑙𝑜𝑤,𝑗 − 𝑄̇𝑙𝑜𝑠𝑠,𝑗 + 𝑄̇𝑎𝑢𝑥,𝑗 + 𝑄̇𝑐𝑜𝑛𝑑,𝑗 Eq. 4.10.4-5
𝑑𝑡
Recall that several of the heat transfer terms are a function of the node temperature, Tj. To solve the
differential equation analytically, the equation is placed into the form:
𝑑𝑇𝑗
= 𝑎𝑇𝑗 + 𝑏 Eq. 4.10.4-6
𝑑𝑡
where Tj (temperature of node j) is the dependent variable, t is time, a is a constant, and b may be a function
of time or of the dependent variable. If b is a constant, then the solution of this differential equation can be
readily solved. If b is not constant, then a reasonable approximation to the analytical solution can be found
by assuming that b is constant over the timestep and equal to its average value over the timestep.

At any time (for a not equal to zero):


𝑏𝑎𝑣𝑒⁄ 𝑏
𝑇𝑓𝑖𝑛𝑎𝑙 = (𝑇𝑖𝑛𝑖𝑡𝑖𝑎𝑙 + 𝑎) ∙ 𝑒
𝑎∆𝑡
− 𝑎𝑣𝑒⁄𝑎 Eq. 4.10.4-7

where:
𝑏𝑎𝑣𝑒 = 𝑏(𝑇𝑎𝑣𝑒 ) Eq. 4.10.4-8

and:
1 𝑏 𝑏
𝑇𝑎𝑣𝑒 = (𝑇 + 𝑎𝑣𝑒⁄𝑎) ∙ (𝑒 𝑎∆𝑡 − 1) − 𝑎𝑣𝑒⁄𝑎 Eq. 4.10.4-9
𝑎∆𝑡 𝑖𝑛𝑖𝑡𝑖𝑎𝑙
With this assumption, the problem becomes straightforward to solve. Simply write the differential equation
in the correct form, determine a and bave and solve for Tfinal and Tave. Then recalculate bave and iterate until
the temperatures converge. The assumption that b is constant over the timestep (and equal to its average
value over the timestep) is a reasonable approximation for the small timesteps used in a TRNSYS
simulation.

TEMPERATURE INSTABILITY AND RESOLUTION


At times, the nodes in the storage tank may become thermally unstable; in other words, a node may reach
a higher temperature than the node above. This happens frequently when the auxiliary heat is active and
the bottommost node quickly becomes hotter than the node above it. It can also happen if the incoming
fluid is hotter than the bottommost tank node, or if the temperature of the topmost node (which has greater
surface loss area than the node below and thus higher thermal losses) drops below the temperature of the
node immediately below.

The model will automatically check at the end of each timestep for thermal instability. If a thermal instability
is found, the model will calculate the time at which the offending nodes first became unstable and re-run
calculations at a sub-timestep, measured from the beginning of the timestep (or the end of the last sub-
timestep) up until the time of instability. The model will then immediately and thoroughly mix the offending
nodes and proceed with calculations from that time until the end of the full timestep. The process is repeated
if instability is encountered again. Figure 4.10.4–2 below illustrates the process through a simplified
example (with thermal losses and conduction effects neglected).

4–581
TRNSYS 18 – Mathematical Reference

(1) Example condition at the (2) Auxiliary heat is applied to (3) Since instability was found,
start of a timestep. This 40- bottom node; bottom node is calculations are re-run at a
gallon water tank has a hotter than node above at sub-timestep to the point the
setpoint of 55 °C, deadband the end of the timestep. nodes first become unstable
of 5 °C. (T4=T3, at 0.0194 [hr]).

(4) Unstable nodes are mixed. (5) Calculations continue until (6) Calculations are re-run at a
Nodes 3 and 4 are effectively the end of the timestep; sub-timestep until the nodes
one double-node, from now again, T3 (and T4) are hotter become unstable (T2=T3, at
until such time as T3 may be than T2 at the end of the 0.058 [hr]). The process
hotter than T4. timestep. repeats from step (4).
Figure 4.10.4–2: Illustration of thermal instability processing and rectification
For water (and fluids with similar properties), the ratio of buoyancy forces to viscous forces acting on the
fluid is typically very high, and the assumption of thorough and immediate mixing is reasonable. Other
models, such as Type 534 (in the TESS Storage Library) allow the user to define a flow rate at which
offending nodes will mix until stabilized, for cases where de-stratification may happen more slowly.

AUXILIARY HEATING CONTROLS


This storage tank relies on internal controls to add heat to the storage tank. Auxiliary heat is always applied
to the bottommost node of the tank; conduction and mixing with the unstable colder nodes above will drive
temperature changes throughout the rest of the tank. The user specifies the rated power of the auxiliary
heater [kJ/hr], the height of the thermostat (which determines which node’s temperature is used to trigger
the heater controls), the setpoint of the heater [°C], and the deadband of the thermostat [°C].

Most controller Types within TRNSYS require that only one control condition (on or off) may apply per
timestep. This necessitates using a timestep at least as small as the cycle time of the equipment being
controlled; large errors can result from using larger timesteps, especially if loads are large. One benefit of
Type 153’s integrated temperature controls is the ability to make control decisions at sub-timesteps smaller
than the simulation timestep.

4–582
TRNSYS 18 – Mathematical Reference

Once temperature instabilities have been checked and resolved (see Temperature Instability and
Resolution), the model checks to see if the auxiliary heat signal should be changed:
 If the auxiliary heat is ON, and the temperature of the node containing the thermostat is above its
setpoint temperature plus ½ the deadband, the model will calculate the time at which the node with
the thermostat first reached its setpoint plus ½ the deadband and re-run calculations at a sub-
timestep, measured from the beginning of the timestep (or the end of the last sub-timestep) up until
the time the setpoint plus ½ the deadband is satisfied. The model will then turn the auxiliary control
to OFF and proceed with calculations from that time until the end of the full timestep. The process
is repeated if auxiliary heat is triggered ON again before the end of the timestep (see below).
 If the auxiliary heat is OFF, and the temperature of the node containing the thermostat is below its
setpoint temperature minus ½ the deadband temperature difference, the model will calculate the
time at which the node with the thermostat first reached this temperature and re-run calculations at
a sub-timestep, measured from the beginning of the timestep (or the end of the last sub-timestep)
up until the time Tj = Tsetpoint – ½ ΔTdeadband. The model will then turn the auxiliary control to ON and
proceed with calculations from that time until the end of the full timestep. The process is repeated
if auxiliary heat is triggered OFF again before the end of the timestep (see above).

The procedure is similar to the handling of thermal instability at sub-timesteps. Note that thermal instabilities
are always addressed before auxiliary controls are addressed in the model. For example, in Figure 4.10.4–
2, diagram (2), the auxiliary heat would not turn off the first time the model reaches t=0.1 hr, even though
T4 = 59 [°C], because thermal instabilities have not yet been addressed.

4–583
TRNSYS 18 – Mathematical Reference

4.10.5. Type 154: Dual-Element Electric Water Heater with


Integrated Controls
This Type models a standard residential dual-element electric water heater. The model represents the
storage volume as a series of cylindrical, isothermal nodes in order to model the stratification observed in
storage tanks. Each constant-volume node interacts thermally with the nodes above and below through
fluid conduction, forced fluid movement (from inlet flow), and natural fluid mixing (destratification of
temperature inversions in the tank). The fluid in the tank interacts with the environment through thermal
losses from the top, bottom, and edges. There are two integrated auxiliary heaters for the tank, both of
which are controlled through integrated thermostats.
To make the model representative of most typical residential water heaters, as well as to facilitate faster
and easier implementation of the model into projects, the following simplifications are made over more
flexible storage tank models in the TRNSYS libraries:
 The tank has only one flow stream; fluid enters through the bottom of the tank (either externally or
via diptube; the diptube’s interaction with the tank is not modeled) and exits through the top of the
tank.
 The model automatically assigns the number of nodes of the storage tank, based on the nominal
volume of the tank;
 The environment surrounding the tank is at a constant temperature (the same temperature is
applied at the top, bottom, and all edges of the tank);
 Only two auxiliary heaters are specified for the tank; rather than specify the node of the heaters,
the user specifies the height of each heating element (relative to the height of the tank);
 There is no capability to model immersed heat exchangers in this Type;
 The only conductance between nodes is from fluid to fluid; additional conductance effects (due to
tank walls, baffles, fins, or other heat-transfer-promoting devices) are not modeled;
 If the temperature of a node exceeds the temperature of the node above, the offending nodes will
be mixed at the moment at which they become unstable (there is no option to adjust the inversion
mixing flow rate or allow the tank to stratify with cold nodes on top of hot nodes);
 Controls of the auxiliary heaters are integrated into the model. The model will control the auxiliary
heaters to maintain the temperatures at the thermostats within the deadbands of the temperature
setpoints. Unlike TRNSYS controller models, the embedded controls in this Type can make multiple
control decisions per timestep; thus, the cycle time of the controller does not necessarily restrict
the timestep allowed when using this Type.
Please see other storage tank models, such as Type 534, available in the TESS Storage Tank Library, for
modeling of storage tanks for which the above listed simplifications do not or should not apply.

4.10.5.1. Parameter/Input/Output Reference


PARAMETERS

1 Fluid volume [m3] The internal volume of the tank. In U.S. applications, this volume is
typically 95% of the rated storage volume (80 gallon nameplate =
75 gallon fluid volume).

2 Tank height [m] The internal height of the tank.

3 Tank heat loss [kJ/hr-m2-K] The effective heat loss coefficient for the storage tank. Thermal
coefficient losses through the top, bottom, and edges of the tank are a

4–584
TRNSYS 18 – Mathematical Reference

function of this value and the temperature difference between the


tank nodes and the environment.

4 Initial tank temperature [°C] The temperature of the fluid in the storage tank at the beginning of
the simulation. All nodes of the tank are at the same temperature
at the start of the simulation.

5 Rated heating [kJ/hr] The rated heating capacity of the upper element. The amount of
capacity, upper heat available to the fluid is simply this value multiplied by the
element thermal efficiency of the heating device.

6 Heating efficiency, [-] The efficiency of the heating device in converting fuel to useful
upper element heat. The amount of heat available to the fluid is simply this value
multiplied by the rated heating capacity of the upper device.

7 Height fraction of upper [-] The fraction of the height from the bottom of the water heater to the
element location of the upper element (a value between 0(bottom of tank)
and 1(top of tank)).

8 Rated heating [kJ/hr] The rated heating capacity of the lower element. The amount of
capacity, lower heat available to the fluid is simply this value multiplied by the
element thermal efficiency of the heating device.

9 Heating efficiency, [-] The efficiency of the heating device in converting fuel to useful
lower element heat. The amount of heat available to the fluid is simply this value
multiplied by the rated heating capacity of the lower device.

10 Height fraction of lower [-] The fraction of the height from the bottom of the water heater to the
element location of the lower element (a value between 0(bottom of tank)
and 1(top of tank)).

11 Height fraction for [-] The fraction of the height from the bottom of the water heater to the
upper thermostat location of the upper thermostat (a value between 0(bottom of tank)
and 1(top of tank)).

12 Setpoint deadband, [°C] The temperature difference between the setpoint of the upper
upper thermostat element and the temperature at which the heating device becomes
active. Note that in this model, the setpoint is centered in the
deadband; for example, if the setpoint were 55 °C and the
deadband were 6 °C, the heating device would turn on at
measured temperatures of 52 °C and lower and off at a measured
temperature of 58 °C.

13 Height fraction for [-] The fraction of the height from the bottom of the water heater to the
lower thermostat location of the lower thermostat (a value between 0(bottom of tank)
and 1(top of tank)).

14 Setpoint deadband, [°C] The temperature difference between the setpoint of the upper
lower thermostat element and the temperature at which the heating device becomes
active. Note that in this model, the setpoint is centered in the
deadband; for example, if the setpoint were 55 °C and the
deadband were 6 °C, the heating device would turn on at
measured temperatures of 52 °C and lower and off at a measured
temperature of 58 °C.

15 Master/slave enabled? [0,1] If this value is 1, master-slave behavior of the heating elements will
be enabled. In this mode, the lower element (slave) has the ability
to be activated only when the upper element (master) is off. Only

4–585
TRNSYS 18 – Mathematical Reference

one element at a time will be active in this mode, with priority given
to satisfying the upper thermostat.

If this value is 0, there is no master-slave operation, and both


elements can function simultaneously.

16 Fluid specific heat [kJ/kg-K] The specific heat of the fluid in the storage tank.

17 Fluid density [kg/m3] The density of the fluid in the storage tank.

18 Fluid conductivity [kJ/hr-m-K] The conductivity of the fluid in the storage tank.

INPUTS

1 Inlet temperature [°C] The temperature of the fluid entering the water heater (in this Type,
fluid always enters at the bottom of the storage tank).

2 Inlet flow rate [kg/hr] The flow rate of fluid entering the water heater, or the load flow on
the heater.

3 Environment [°C] The effective temperature of the tank’s environment, for calculating
temperature losses from the water heater.

4 Setpoint temperature, [°C] The desired temperature at the upper thermostat of the water
upper element heater. Note: auxiliary heat begins when the temperature at the
thermostat falls to this setpoint temperature minus ½ the deadband
temperature difference (Parameter 12).

5 Setpoint temperature, [°C] The desired temperature at the lower thermostat of the water
lower element heater. Note: auxiliary heat begins when the temperature at the
thermostat falls to this setpoint temperature minus ½ the deadband
temperature difference (Parameter 14).

OUTPUTS

1 Temperature at outlet [°C] The temperature of the fluid exiting the water heater.

2 Flow rate at outlet [kg/hr] The flow rate of the fluid exiting the water heater, or the load flow
on the heater. This is equal to the inlet flow rate to the water
heater.

3 Average tank [°C] The average temperature of the fluid in the water heater.
temperature

4 Energy delivery rate to [kJ/hr] The net rate at which energy is removed from the storage tank due
fluid to fluid flowing through the water heater. This is simply: (flow rate
through the heater) x (specific heat of the fluid) x (temperature
difference between incoming fluid and outgoing fluid).

5 Auxiliary heating rate, [kJ/hr] The rate at which auxiliary heat is added to the fluid through the
upper element upper element. The amount of heat available to the fluid is simply
this value multiplied by the thermal efficiency of the heating device.

6 Auxiliary heating rate, [kJ/hr] The rate at which auxiliary heat is added to the fluid through the
lower element lower element. The amount of heat available to the fluid is simply
this value multiplied by the thermal efficiency of the heating device.

4–586
TRNSYS 18 – Mathematical Reference

7 Total auxiliary heating [kJ/hr] The rate at which auxiliary heat is added to the fluid through both
rate heating elements.

8 Tank losses [kJ/hr] The rate at which energy is lost to the environment through the
surfaces of the water heater.

9 Energy storage rate [kJ/hr] The rate at which energy is stored by the fluid in the water heater,
due to a rise in temperature of the fluid (capacitance effects).

10 Energy balance error [%] The percent energy balance error for the heat transfers in the water
heater. Due to the iterative solution nature of the model, nodal
temperatures are approximate to a degree, which can lead to
energy imbalances. These imbalances are usually small. Large
imbalances may indicate that the timestep of the simulation is too
large for the loads being modeled.

11 Temperature at upper [°C] The temperature of the fluid at the height of the upper element of
auxiliary the storage tank for the current timestep.

12 Temperature at lower [°C] The temperature of the fluid at the height of the lower element of
auxiliary the storage tank for the current timestep.

4.10.5.2. Simulation Summary Report


VALUE FIELDS

Tank Volume [m3] The internal volume of the tank.

INTEGRATED VALUE FIELDS

Delivered Energy [kJ] The total energy delivered to the working fluid. This is the cumulative
value over the simulation of: (flow rate through the heater) x (specific
heat of the fluid) x (temperature difference between incoming fluid and
outgoing fluid).

Auxiliary Energy, [kJ] The auxiliary energy supplied to the water heater fluid through the upper
upper element element. The amount of heat available to the fluid is simply this value
multiplied by the thermal efficiency of the heating device.

Auxiliary Energy, lower [kJ] The auxiliary energy supplied to the water heater fluid through the lower
element element. The amount of heat available to the fluid is simply this value
multiplied by the thermal efficiency of the heating device.

Thermal Losses [kJ] The total thermal energy lost to the environment through the surfaces of
the water heater.

MINIMUM/MAXIMUM VALUE FIELDS

Tank outlet [°C] The temperature of the fluid exiting the water heater.
temperature

Tank average [°C] The average temperature of the fluid in the water heater (average
temperature temperature of all nodes of the water heater).

4–587
TRNSYS 18 – Mathematical Reference

4.10.5.3. Nomenclature
Surface area of the bottom of node j in contact with the
Abottom,j [m2] bottom of the tank; = 𝜋𝐷2 /4 if j = Nnodes, = 0 for all other
nodes
Surface area of the edge of node j in contact with the wall of
Aedge,j [m2]
the tank; = 𝜋𝐷ℎ𝑡𝑎𝑛𝑘 /𝑁𝑛𝑜𝑑𝑒𝑠 for all nodes of the tank
Surface area of the top of node j in contact with the top of
Atop,j [m2]
the tank; = 𝜋𝐷2 /4 if j = 1, = 0 for all other nodes
cp [kJ/kg-K] Specific heat of tank fluid

D [m] Diameter of the tank; = √(4 ∙ 𝑉𝑡𝑎𝑛𝑘 )/(𝜋 ∙ ℎ𝑡𝑎𝑛𝑘 )


Rate of change of the average temperature of node j with
dTj/dt [°C/hr]
respect to time
htank [m] Height of the tank
The control signal of the upper auxiliary heater; changes to
0 if the thermostat temperature is above setpoint, changes
Iaux,upper [-] to 1 if the thermostat temperature is at or below setpoint
(Input 4) minus deadband (Parameter 12), otherwise
maintains signal from previous timestep.
The control signal of the lower auxiliary heater; changes to
0 if the thermostat temperature is above setpoint, changes
to 1 if the thermostat temperature is at or below setpoint
(Input 5) minus deadband (Parameter 14), otherwise
Iaux,lower [-]
maintains signal from previous timestep. If master/slave
control is enabled, remains off anytime the upper
thermostat is not satisfied (only one auxiliary heater may
run at a time in this mode).
j (subscript) [-] The jth node of the tank (1 = top of tank)

k [kJ/hr-m-K] Conductivity of tank fluid


Length of conduction between one node and the node
Lcond [m] adjacent above or below; the height of the tank divided by
the number of nodes in the tank
Flow rate of fluid through the tank; this is a constant-volume
𝑚̇ [kg/hr] tank, so flow into the tank will always match flow out of the
tank
The number of isothermal nodes of the storage tank,
Nnodes [-]
automatically assigned by the Type
𝑄̇𝑎𝑢𝑥,𝑗 [kJ/hr] Rate of auxiliary energy gain of node j

𝑄̇𝑟𝑎𝑡𝑒𝑑,𝑢𝑝𝑝𝑒𝑟 [kJ/hr] Rated capacity (power) of the upper auxiliary heater

𝑄̇𝑟𝑎𝑡𝑒𝑑,𝑙𝑜𝑤𝑒𝑟 [kJ/hr] Rated capacity (power) of the lower auxiliary heater

Rate of conduction between node j and the fluid nodes


𝑄̇𝑐𝑜𝑛𝑑,𝑗 [kJ/hr]
immediately above and below node j
Rate of thermal loss between node j and the ambient or
𝑄̇𝑙𝑜𝑠𝑠,𝑗 [kJ/hr]
surrounding environment

𝑄̇𝑚𝑎𝑠𝑠𝑓𝑙𝑜𝑤,𝑗 [kJ/hr] Rate of heat transfer through node j due to fluid flow

Ambient (air) temperature; the environment temperature


Tamb [°C]
surrounding the tank
Tave [°C] Average tank temperature

4–588
TRNSYS 18 – Mathematical Reference

Tfinal [°C] Temperature of the tank at the end of the timestep

Tinitial [°C] Temperature of the tank at the beginning of the timestep

Tinlet [°C] Inlet temperature of fluid to tank

Tj [°C] Temperature of the jth node of the tank


Overall loss coefficient of the tank, per unit surface area of
Utank [kJ/hr-m2-K]
the tank
Vtank [m3] Volume of the storage tank

ρ [kg/m3] Density of tank fluid


The efficiency of the upper auxiliary heater. The energy
ηaux,upper [-] available to the fluid is the rated power of the heater
multiplied by this efficiency.
The efficiency of the lower auxiliary heater. The energy
ηaux,lower [-] available to the fluid is the rated power of the heater
multiplied by this efficiency.

4.10.5.4. Hints and Tips


 Selecting Parameters And Inputs:
 The manufacturer of the tank should supply the nominal volume, the height of the tank, the height
of the heating elements, and the rated power of the auxiliary heaters (typically in W or kW).
Efficiencies for electric resistance heating elements are typically very high (90-100%).
 Most electric water heaters use master/slave control of the heating elements; the rated power is
the power of each element, and only one element will be active at a time.
 The thermostats are commonly located near the heating elements. Deadbands of 5 [°C] are
provided as default, but actual deadbands may vary up to 10 [°C] or more, depending on the
precision of the thermostat control and the cycle time of the auxiliary heater.
 Fluid properties for pure water are provided as the default; enter modified properties if another fluid
(glycol solution, etc) is to be used.
 Some weather data files provide mains water inlet temperature approximations as part of the data
set. The tank environment temperature is commonly either the ambient drybulb air temperature (if
the tank is located outdoors), the conditioned space temperature (if located in a conditioned area),
or a function of both the conditioned temperature and the drybulb air temperature, if located in a
non-conditioned space (such as a garage or attic).
 When To Use This Type: This Type is designed to simulate a typical residential dual-element electric
water heater of the type commonly found in single-family residences, small multi-family residences,
and some non-residential facilities which provide hot water for sinks and showers. It is appropriate for
most domestic water heating applications in which the auxiliary energy (electricity) is the sole source
of heating for the tank.
 When Not To Use This Type: This Type should not be used for any of the following scenarios:
 Tanks with multiple inlet/outlet draws (such as a solar storage tank with one draw to/from the solar
collector and another draw to the load);
 Tanks with heat exchangers, either immersed or wrapped around the exterior of the tank;
 Tanks which do not direct incoming fluid to the bottom of the tank, including those with ‘heat
seeking’ dip tubes that direct fluid to the stratified layer of the tank most thermally similar;
 Tanks which do not draw outgoing fluid off of the top of the tank;

4–589
TRNSYS 18 – Mathematical Reference

 Tanks with internal fins, baffles, or other instruments which promote enhanced heat transfer
through the tank (beyond fluid-to-fluid conduction and bouyancy mixing);
 Tanks with fluids other than pure water or glycol solutions, for which the ratio of bouyancy forces
to viscous forces may necessitate slower mixing between unstable thermal nodes.

4.10.5.5. Detailed Description


Figure 4.10.5–1 below shows a graphical representation of the noded vertical cylindrical fluid heater.

Figure 4.10.5–1: Vertical, cylindrical, isothermally noded storage tank with one inlet (bottom) and one outlet
(top).
The tank is divided into N horizontal nodes of equal volume. Each of the tank nodes is assumed to be
isothermal. Node 1 is at the top of the storage tank, and the final node is at the bottom of the tank.

In this type of storage tank, energy can be transferred into and out of each node through mass flow, through
conductance to the node above or below, through thermal losses to the environment, or through the
auxiliary heaters. Each of these heat transfer terms is elaborated in the following sections.

THERMAL LOSSES
Thermal losses to the surrounding environment from each fluid node are calculated as follows:
𝑄̇𝑙𝑜𝑠𝑠,𝑗 = 𝑈𝑡𝑎𝑛𝑘 ∙ 𝐴𝑡𝑜𝑝,𝑗 ∙ (𝑇𝑗 − 𝑇𝑎𝑚𝑏 ) + 𝑈𝑡𝑎𝑛𝑘 ∙ 𝐴𝑏𝑜𝑡𝑡𝑜𝑚,𝑗 ∙ (𝑇𝑗 − 𝑇𝑎𝑚𝑏 )
Eq. 4.10.5-1
+ 𝑈𝑡𝑎𝑛𝑘 ∙ 𝐴𝑒𝑑𝑔𝑒,𝑗 ∙ (𝑇𝑗 − 𝑇𝑎𝑚𝑏 )
All tank nodes include edge losses. Losses through the top or bottom of the tank are only included if j = 1
or j = Nnodes, respectively.

MASS FLOW THROUGH NODES


Heat transfer through a node due to mass flow through the node is calculated as follows:
𝑄̇𝑚𝑎𝑠𝑠𝑓𝑙𝑜𝑤,𝑗 = 𝑚̇ ∙ 𝑐𝑝 ∙ (𝑇𝑗+1 − 𝑇𝑗 ) Eq. 4.10.5-2

where Tj+1 = Tinlet if j = Nnodes (the bottom of the tank).

CONDUCTION BETWEEN ADJACENT NODES


Heat transfer due to conduction between adjacent fluid nodes is calculated as follows:
𝑘 𝑉𝑡𝑎𝑛𝑘 𝑘 𝑉𝑡𝑎𝑛𝑘
𝑄̇𝑐𝑜𝑛𝑑,𝑗 = ∙ (𝑇 − 𝑇𝑗 ) − ∙ (𝑇 − 𝑇𝑗+1 ) Eq. 4.10.5-3
𝐿𝑐𝑜𝑛𝑑 ℎ𝑡𝑎𝑛𝑘 𝑗−1 𝐿𝑐𝑜𝑛𝑑 ℎ𝑡𝑎𝑛𝑘 𝑗
The first term is neglected if j =1 (the top of the tank), and the last term is neglected if j = Nnodes (the bottom
of the tank).

4–590
TRNSYS 18 – Mathematical Reference

AUXILIARY HEATING
Heat transfer through the auxiliary heaters is calculated as follows:
𝑄̇𝑎𝑢𝑥,𝑗 = 𝐼𝑎𝑢𝑥,𝑢𝑝𝑝𝑒𝑟 ∙ 𝑄̇𝑟𝑎𝑡𝑒𝑑,𝑢𝑝𝑝𝑒𝑟 ∙ 𝜂𝑎𝑢𝑥,𝑢𝑝𝑝𝑒𝑟 + 𝐼𝑎𝑢𝑥,𝑙𝑜𝑤𝑒𝑟 ∙ 𝑄̇𝑟𝑎𝑡𝑒𝑑,𝑙𝑜𝑤𝑒𝑟 ∙ 𝜂𝑎𝑢𝑥,𝑙𝑜𝑤𝑒𝑟 Eq. 4.10.5-4

Auxiliary heat from the upper auxiliary is only input to node j of the tank if node j contains the upper element;
likewise, auxiliary heat from the lower auxiliary is only input to node j if node j contains the lower element.

SOLVING THE TEMPERATURE OF THE TANK NODES


The energy balance over each fluid node is as follows:
𝑑𝑇𝑗
𝜌𝑐𝑝 𝑉𝑗 = 𝑄̇𝑚𝑎𝑠𝑠𝑓𝑙𝑜𝑤,𝑗 − 𝑄̇𝑙𝑜𝑠𝑠,𝑗 + 𝑄̇𝑎𝑢𝑥,𝑗 + 𝑄̇𝑐𝑜𝑛𝑑,𝑗 Eq. 4.10.5-5
𝑑𝑡
Recall that several of the heat transfer terms are a function of the node temperature, Tj. To solve the
differential equation analytically, the equation is placed into the form:
𝑑𝑇𝑗
= 𝑎𝑇𝑗 + 𝑏 Eq. 4.10.5-6
𝑑𝑡
where Tj (temperature of node j) is the dependent variable, t is time, a is a constant, and b may be a function
of time or of the dependent variable. If b is a constant, then the solution of this differential equation can be
readily solved. If b is not constant, then a reasonable approximation to the analytical solution can be found
by assuming that b is constant over the timestep and equal to its average value over the timestep.

At any time (for a not equal to zero):


𝑏𝑎𝑣𝑒⁄ 𝑏
𝑇𝑓𝑖𝑛𝑎𝑙 = (𝑇𝑖𝑛𝑖𝑡𝑖𝑎𝑙 + 𝑎) ∙ 𝑒
𝑎∆𝑡
− 𝑎𝑣𝑒⁄𝑎 Eq. 4.10.5-7

where:
𝑏𝑎𝑣𝑒 = 𝑏(𝑇𝑎𝑣𝑒 ) Eq. 4.10.5-8

and:
1 𝑏 𝑏
𝑇𝑎𝑣𝑒 = (𝑇 + 𝑎𝑣𝑒⁄𝑎) ∙ (𝑒 𝑎∆𝑡 − 1) − 𝑎𝑣𝑒⁄𝑎 Eq. 4.10.5-9
𝑎∆𝑡 𝑖𝑛𝑖𝑡𝑖𝑎𝑙
With this assumption, the problem becomes straightforward to solve. Simply write the differential equation
in the correct form, determine a and bave and solve for Tfinal and Tave. Then recalculate bave and iterate until
the temperatures converge. The assumption that b is constant over the timestep (and equal to its average
value over the timestep) is a reasonable approximation for the small timesteps used in a TRNSYS
simulation.

TEMPERATURE INSTABILITY AND RESOLUTION


At times, the nodes in the storage tank may become thermally unstable; in other words, a node may reach
a higher temperature than the node above. This happens frequently when the auxiliary heat is active and
the node containing the element quickly becomes hotter than the node above it. It can also happen if the
incoming fluid is hotter than the bottommost tank node, or if the temperature of the topmost node (which
has greater surface loss area than the node below and thus higher thermal losses) drops below the
temperature of the node immediately below.

The model will automatically check at the end of each timestep for thermal instability. If a thermal instability
is found, the model will calculate the time at which the offending nodes first became unstable and re-run
calculations at a sub-timestep, measured from the beginning of the timestep (or the end of the last sub-
timestep) up until the time of instability. The model will then immediately and thoroughly mix the offending
nodes and proceed with calculations from that time until the end of the full timestep. The process is repeated
if instability is encountered again. Figure 4.10.5–2 below illustrates the process through a simplified
example (with no mass flow and conduction effects neglected).

4–591
TRNSYS 18 – Mathematical Reference

(1) Example condition, start of a (2) Since upper aux is satisfied, (3) Since instability was found,
timestep. This 50-gallon tank heat is applied to the third calculations are re-run at a
has an upper setpoint of 57 node; the third node is hotter sub-timestep to the point the
°C, lower setpoint of 55 °C, than the second node at the nodes first become unstable
deadbands of 5 °C on both. end of the timestep. (T2=T3, at 0.0484 [hr]).

(4) Unstable nodes are mixed. (5) Calculations continue until (6) Calculations progress
Nodes 2 and 3 are effectively the end of the timestep; through the next timestep;
one double-node, from now since both auxiliaries are only thermal losses impact
until such time as T2 may be now off (and there is no flow the model. Since stability is
hotter than T3. Since the in this example), there may satisfied and thermostats are
lower thermostat is now at be little change through the not below (setpoint minus
setpoint, the lower heater end of the timestep. deadband), no sub-timesteps
turns off. or mixing are required.
Figure 4.10.5–2: Illustration of thermal instability processing and rectification.
For water (and fluids with similar properties), the ratio of buoyancy forces to viscous forces acting on the
fluid is typically very high, and the assumption of thorough and immediate mixing is reasonable. Other
models, such as Type 534 (in the TESS Storage Library) allow the user to define a flow rate at which
offending nodes will mix until stabilized, for cases where de-stratification may happen more slowly.

AUXILIARY HEATING CONTROLS

This storage tank relies on internal controls to add heat to the storage tank. Auxiliary heat is always added
to the node(s) which contain the heating elements (assigned based on the height of each element relative

4–592
TRNSYS 18 – Mathematical Reference

to the height of the tank); conduction and mixing with the unstable colder nodes above will drive temperature
changes throughout the rest of the tank. The user specifies the rated power of each auxiliary heater [kJ/hr],
the height of each thermostat (which determines which node’s temperature is used to trigger the heater
controls), the setpoints of the heaters [°C], and the deadbands of the thermostats [°C].

Most controller Types within TRNSYS require that only one control condition (on or off) may apply per
timestep. This necessitates using a timestep at least as small as the cycle time of the equipment being
controlled; large errors can result from using larger timesteps, especially if loads are large. One benefit of
Type 154’s integrated temperature controls is the ability to make control decisions at sub-timesteps smaller
than the simulation timestep.

Once temperature instabilities have been checked and resolved (see Temperature Instability and
Resolution), the model checks to see if either of the auxiliary heat signals should be changed. Conditions
of the upper auxiliary heater are checked first, followed by the conditions of the lower auxiliary heater. If
master-slave control is in effect, the lower element will not turn on as long as the upper element is not
satisfied, regardless of its setpoint or sensed temperature.
 If the auxiliary heat is ON, and the temperature of the node containing the thermostat is above its
setpoint temperature + ½ the deadband temperature diffreence, the model will calculate the time
at which the node with the thermostat first reached this temperature and re-run calculations at a
sub-timestep, measured from the beginning of the timestep (or the end of the last sub-timestep) up
until the time the setpoint plus ½ the deadband temperature difference is satisfied. The model will
then turn the auxiliary control to OFF and proceed with calculations from that time until the end of
the full timestep. The process is repeated if auxiliary heat is triggered ON again before the end of
the timestep (see below).
 If the auxiliary heat is OFF, and the temperature of the node containing the thermostat is below its
setpoint temperature minus ½ the deadband temperature difference, the model will calculate the
time at which the node with the thermostat first reached this temperature and re-run calculations at
a sub-timestep, measured from the beginning of the timestep (or the end of the last sub-timestep)
up until the time Tj = Tsetpoint – ½ ΔTdeadband. The model will then turn the auxiliary control to ON and
proceed with calculations from that time until the end of the full timestep. The process is repeated
if auxiliary heat is triggered OFF again before the end of the timestep (see above).

The procedure is similar to the handling of thermal instability at sub-timesteps. Note that thermal instabilities
are always addressed before auxiliary controls are addressed in the model. For example, in Figure 4.10.5–
2, diagram (2), the auxiliary heat would not turn off the first time the model reaches t=0.1 hr, even though
T3 = 60 [°C], because thermal instabilities have not yet been addressed.

4–593
TRNSYS 18 – Mathematical Reference

4.10.6. Type 156: Constant Volume Liquid Storage Tank with


Immersed Heat Exchanger
This subroutine models a fluid-filled, constant volume storage tank with immersed heat exchanger. This
component models a cylindrical tank with a vertical configuration as shown in Figure 4.10.6-1 below. The
fluid in the storage tank interacts with the fluid in the heat exchanger (through heat transfer with the
immersed heat exchanger), with the environment (through thermal losses from the top, bottom and edges)
and with up to two flow streams that pass into and out of the storage tank. The tank is divided into isothermal
temperature nodes (to model stratification observed in storage tanks) where the user controls the degree
of stratification through the specification of the number of “nodes”. Each constant-volume node is assumed
to be isothermal and interacts thermally with the nodes above and below through several mechanisms: fluid
conduction between nodes and fluid movement (either forced movement from inlet flow streams or natural
destratification mixing due to temperature inversions in the tank). The user has the ability to specify a coiled
tube immersed heat exchanger (or no HX if desired). Auxiliary heat may be provided to each isothermal
node individually, through the use of inputs to the model.

Figure 4.10.6-3: Vertically Cylindrical Tank Schematic

4.10.6.1. Parameter/Input/Output Reference


PARMAETERS

1 Tank Volume [m3] The internal (fluid) volume of the tank.

2 Tank Height [m] The internal height of the tank.

3 Number of Tank Nodes [-] The number of isothermal tank nodes into which the storage tank
will be divided (1=fully mixed tank).

4 Top Loss Coefficient [kJ/hr.m2.K] The heat loss coefficient for the top of the storage tank.

5 Edge Loss Coefficient [kJ/hr.m2.K] The heat loss coefficient for the vertical edges of the storage tank.

6 Bottom Loss [kJ/hr.m2.K] The heat loss coefficient for the bottom of the tank.
Coefficient

4–594
TRNSYS 18 – Mathematical Reference

7 Fluid Specific Heat [kJ/kg.K] The specific heat of the fluid in the tank.

8 Fluid Density [kg/m3] The density of the fluid in the tank.

9 Fluid Thermal [kJ/hr.m.K] The thermal conductivity of the tank fluid.


Conductivity

10 Fluid Viscosity [kg/m.h] The dynamic viscosity of the tank fluid

11 Fluid Thermal [1/K] The volumetric expansion coefficient of the tank fluid
Expansion Coefficient

12 Height Fraction of Inlet [-] The relative height of the first inlet port into the storage tank (height
1 of inlet / tank height). In this model, the ports are matched such that
the outlet of port 1 has the same flow rate as the inlet into port 1. A
value of 0 signifies the bottom of the tank and a value of 1 signifies
the top of the tank.

13 Height Fraction of [-] The relative height of the first outlet port from the storage tank
Outlet 1 (height of outlet / tank height). In this model, the ports are matched
such that the outlet of port 1 has the same flow rate as the inlet into
port 1. A value of 0 signifies the bottom of the tank and a value of 1
signifies the top of the tank.

14 Height Fraction of Inlet [-] The relative height of the second inlet port into the storage tank
2 (height of inlet / tank height). In this model, the ports are matched
such that the outlet of port 2 has the same flow rate as the inlet into
port 2. A value of 0 signifies the bottom of the tank and a value of 1
signifies the top of the tank.

15 Height Fraction at [-] The relative height of the second outlet port from the storage tank
Outlet 2 (height of outlet / tank height). In this model, the ports are matched
such that the outlet of port 2 has the same flow rate as the inlet into
port 2. A value of 0 signifies the bottom of the tank and a value of 1
signifies the top of the tank.

16 Height Fraction of HX [-] The relative height of the heat exchanger inlet into the storage tank
Inlet (height of inlet / tank height). A value of 0 signifies the bottom of the
tank and a value of 1 signifies the top of the tank.

17 Height Fraction of HX [-] The relative height of the heat exchanger outlet from the storage
Outlet tank (height of outlet / tank height). A value of 0 signifies the bottom
of the tank and a value of 1 signifies the top of the tank.

18 Inner Diameter of HX [m] The inner diameter of the tube comprising the coiled tube heat
Tube exchanger.

19 Outer Diameter of HX [m] The outer diameter of the tube comprising the coiled tube heat
Tube exchanger.

20 Length of Coiled HX [m] The length of one of the identical coiled heat exchanger tubes.
Tubes

21 Number of HX Tubes [-] The number of identical coiled tubes for the heat exchanger.

22 HX Wall Thermal [kJ/h.m.K] The thermal conductivity of the heat exchanger tube wall material.
Conductivity

4–595
TRNSYS 18 – Mathematical Reference

23 HX Coil Diameter [m] The diameter of the coiled tube heat exchanger.

24 HX Coil Pitch [m] The vertical distance between identical points on consecutive coils
of the heat exchanger.

25 Multiplier for HX [-] The multiplier 'c' in the equation for the calculation of the Nusselt
Natural Convection number for the HX: Nusselt = c * Rayleigh ^ n

26 Exponent for HX [-] The exponent 'n' in the equation for the calculation of the Nusselt
Natural Convection number for the HX: Nusselt = c * Rayleigh ^ n

27 Number of HX Nodes [-] The number of isothermal nodes into which the heat exchanger will
be divided. The higher the number of nodes, the greater the
accuracy but the slower the simulation speed.

28 HX Fluid Specific Heat [kJ/kg.K] The specific heat of the fluid in the heat exchanger.

29 HX Fluid Density [kg/m3] The density of the fluid in the heat exchanger.

30 HX Fluid Thermal [kJ/h.m.K] The thermal conductivity of the heat exchanger fluid.
Conductivity

31 HX Fluid Viscosity [kg/m.h] The dynamic viscosity of the heat exchanger fluid.

32 Number of [-] The number of thermostats in the storage tank. For each
Thermostats thermostat desired, the user will have to specify the normalized
height of the thermostat location (a parameter). The temperature at
each thermostat location is provided as an output from the model.

For each thermostat:

33 Height Fraction of [-] The relative height of the thermostat location in the storage tank
Thermostat (height of thermostat / tank height). A value of 0 signifies the
bottom of the tank and a value of 1 signifies the top of the tank.

34 Number of Auxiliary [-] The number of auxiliary heat inputs into the storage tank. For each
Heat Inputs auxiliary heat input specified, the user must specify the location of
the auxiliary heat input (a parameter) and the rate at which auxiliary
heat is added to the location (an input).

For each Auxiliary Heat Input:

35 Height Fraction of [-] The relative height of the auxiliary heat input into the storage tank
Auxiliary Input (height of input / tank height). A value of 0 signifies the bottom of
the tank and a value of 1 signifies the top of the tank.

INPUTS

1 Inlet Temperature for [C] The temperature of the fluid entering the storage tank through the
Port 1 first inlet port.

2 Inlet Flow Rate for Port [kg/h}: The flow rate of the fluid entering the storage tank through the first
1 inlet port.

3 Inlet Temperature for [C] The temperature of the fluid entering the storage tank through the
Port 2 second inlet port.

4–596
TRNSYS 18 – Mathematical Reference

4 Inlet Flow Rate for Port [kg/h] The flow rate of the fluid entering the storage tank through the
2 second inlet port.

5 Inlet Temperature for [C] The temperature of the fluid flowing into the immersed heat
HX exchanger in the storage tank.

6 Inlet Flow Rate for HX [kg/h] The flow rate of the fluid flowing into the immersed heat exchanger
in the storage tank.

7 Top Loss Temperature [C] The temperature of the environment for calculating losses from the
top of the storage tank.

8 Edge Loss [C] The temperature of the environment for calculating losses from the
Temperature edges of the storage tank.

9 Bottom Loss [C] The temperature of the environment for calculating losses from the
Temperature bottom of the storage tank.

For Each Auxiliary Heat Input:

10 Auxiliary Heat Input [kJ/h] The rate at which auxiliary energy is added (or removed) from the
storage tank for this location.

OUTPUTS

1 Temperature at Outlet [C] The temperature of the fluid exiting the storage tank through the
1 first outlet port.

2 Flow Rate at Outlet 1 [kg/h] The flow rate of the fluid exiting the storage tank through the first
outlet port.

3 Temperature at Outlet [C] The temperature of the fluid exiting the storage tank through the
2 second outlet port.

4 Flow Rate at Outlet 2 [kg/h] The flow rate of the fluid exiting the storage tank through the
second outlet port.

5 Temperature at HX [C] The temperaturte of the fluid exiting the storage tank through the
Outlet immersed heat exchanger.

6 HX Flow Rate [kg/h] The flow rate of fluid exiting the storage tank through the immersed
heat exchanger. This flow rate is set by the inlet flow rate to the
heat exchanger.

7 Average Tank [C] The average temperature of the fluid in the storage tank.
Temperature

8 Average HX [C] The average temperature of the fluid in the immersed heat
Temperature exchanger.

9 Energy Delivered via [kJ/h] The rate at which energy is removed from the tank through the first
Port 1 outlet port minus the rate at which energy is added to the tank
through the first inlet port.

10 Energy Delivered via [kJ/h] The rate at which energy is removed from the tank through the
Port 2 second outlet port minus the rate at which energy is added to the
tank through the second inlet port.

4–597
TRNSYS 18 – Mathematical Reference

11 Top Losses [kJ/h] The rate at which energy is lost to the environment through the top
surface of the storage tank.

12 Edge Losses [kJ/h] The rate at which energy is lost to the environment through the
edge surfaces of the storage tank.

13 Bottom Losses [kJ/h] The rate at which energy is lost to the environment through the
bottom surface of the storage tank.

14 Auxiliary Heating Rate [kJ/h] The rate at which auxiliary heat energy is added to the storage
tank.

15 Tank Energy Storage [kJ/h] The rate at which energy is stored by the fluid in the storage tank
Rate due to a rise in temperature of the fluid (capacitance effects).

16 HX Heat Transfer Rate [kJ/h] The rate at which energy is transferred from the fluid in the storage
tank to the fluid in the immersed heat exchanger.

17 HX Delivered Energy [kJ/h] The rate at which energy is removed from the immersed heat
exchanger due to the fluid flow exiting the heat exchanger at the
outlet minus the rate at which energy is added to the heat
exchanger by the fluid flow entering the storage tank at the heat
exchanger inlet.

18 HX Energy Storage [kJ/h] The rate at which energy is stored by the fluid in the immersed heat
Rate exchanger due to a temperarture rise of the fluid (capacitance
effects).

19 Tank Energy Balance [%] The percent energy balance error for the heat transfers in the
Error storage tank.

20 HX Energy Balance [%] The percent energy balance error for the heat transfers for the fluid
Error in the immersed heat exchanger.

For each Thermostat:

21 Temperature at [C] The temperature of the tank at the location of the specified
Thermostat thermostat.

For each Tank Node:

22 Tank Nodal [C] The average temperature of the fluid in the specified node of the
Temperature storage tank for the current timestep.

DERIVATIVES

For each Tank Node

1 Initial Tank [C] The temperature of the specified node of the storage tank at the
Temperature for Node beginning of the simulation (node 1 = top).

4.10.6.2. Simulation Summary Report


VALUE FIELDS

4–598
TRNSYS 18 – Mathematical Reference

Tank Volume [m3] Parameter 1

Number of Tank Nodes [-] Parameter 3

Number of HX Nodes [-] Parameter 27

Number of [-] Parameter 32


Thermostats

Number of Auxiliary [-] Parameter 34


Heat Inputs

INTEGRATED VALUE FIELDS

Delivered Energy [kJ] Output 9


through Port 1

Delivered Energy [kJ] Output 10


through Port 2

Delivered Energy [kJ] Output 17


through HX

Auxiliary Energy [kJ] Output 14

Thermal Losses [kJ] Output 11 + Output 12 + Output 13

MINIMUM/MAXIMUM VALUE FIELDS

Port 1 outlet [°C] Output 1


temperature

Port 2 outlet [°C] Output 3


temperature

HX outlet temperature [°C] Output 5

Tank average [°C] Output 7


temperature

HX average [°C] Output 8


temperature

4.10.6.3. Detailed Description


In this type of storage tank, heat can be transferred into and out of the storage tank through 3 unique fluid
flow streams. Two of the fluid streams mix with the storage fluid while the third flow stream transfers heat
to/from the storage tank through an immersed heat exchanger (the HX fluid does not mix with the storage
fluid). The natural convection from the heat exchanger to the fluid in the storage tank can be a difficult
problem to solve. Compounding this problem is the fact that the effects of the heat exchanger fluid mass
must be considered for these types of systems. The problem breaks down into the required solution of two
coupled differential equations:

4–599
TRNSYS 18 – Mathematical Reference

𝑑𝑇𝑡𝑎𝑛𝑘 (𝑄𝑖𝑛,𝑡𝑎𝑛𝑘 − 𝑄𝑜𝑢𝑡,𝑡𝑎𝑛𝑘 )


= Eq. 4.10.6-1
𝑑𝑡 𝐶𝑡𝑎𝑛𝑘
𝑑𝑇ℎ𝑥 (𝑄𝑖𝑛,ℎ𝑥 − 𝑄𝑜𝑢𝑡,ℎ𝑥 )
= Eq. 4.10.6-2
𝑑𝑡 𝐶ℎ𝑥
where Qin,Tank and Qout,Tank are functions of the ambient temperature, the inlet fluid conditions and flow rates,
and the heat exchanger temperature, and Qin,HX and Qout,HX are functions of the inlet fluid temperature and
flow rate to the heat exchanger and the tank temperatures. While there are other available methods to solve
coupled differential equations, we decided to solve the problem with an approximate analytical solution.
The analytical solution has several inherent advantages over numerical solutions. First, the subroutine
solves its own mathematical problem and does not have to rely on non-standard numerical recipes that
must be attached to the subroutine. Secondly, some of the other solution methods (mainly the numerical
solutions) are extremely dependent on the simulation timestep and may not converge under certain
circumstances commonly encountered in domestic hot water systems (namely high flow rates for example).
The analytical solution is timestep independent but does require an iterative solution inside the subroutine
to solve the coupled differential equations. While solving two coupled differential equations iteratively can
sometimes lead to convergence problems, this does not seem to be the case with this model under almost
all operating scenarios.
To solve the differential equations analytically, the equations are placed into the form:
𝑑𝑇
= 𝑎𝑇 + 𝑏 Eq. 4.10.6-3
𝑑𝑡
where T is the dependent variable, t is time, a is a constant and b may be a function of time or the dependent
variable. If b is a constant, than the solution of this differential equation can be readily solved. If b is not
constant, then a reasonable approximation to the analytical solution can be found by assuming that b is
constant over the timestep and equal to its average value over the timestep.
At any time (for a not equal to zero):
𝑏𝑎𝑣𝑒 (𝑎∆𝑡) 𝑏𝑎𝑣𝑒
𝑇𝑓𝑖𝑛𝑎𝑙 = (𝑇𝑖𝑛𝑖𝑡𝑖𝑎𝑙 + )𝑒 − Eq. 4.10.6-4
𝑎 𝑎
where:

𝑏𝑎𝑣𝑒 = 𝑏(𝑇𝑎𝑣𝑒 ) Eq. 4.10.6-5


and:
1 𝑏𝑎𝑣𝑒 𝑏𝑎𝑣𝑒
𝑇𝑎𝑣𝑒 = (𝑇𝑖𝑛𝑖𝑡𝑖𝑎𝑙 + ) (𝑒 (𝑎∆𝑡) − 1) − Eq. 4.10.6-6
𝑎∆𝑡 𝑎 𝑎
With this assumption, the problem becomes straightforward to solve. Simply write the differential equation
in the correct form, determine a and bave and solve for Tfinal and Tave. Then recalculate bave and iterate until
the temperatures converge.
While the assumption that b is constant over the timestep (and equal to its average value) is not technically
correct (b for the tank is a function of the heat exchanger temperature for example), it is a reasonable
approximation for the small timesteps used in TRNSYS simulations (maximum timestep = 1 hour).
This subroutine allows the user to designate the level of stratification for the storage tank by specifying a
number of tank nodes (N). The tank is then divided into N horizontal nodes of equal volume (before the
placement of the heat exchanger which reduces the volume (and hence the capacitance) of the node).
Each of the tank nodes is assumed to be isothermal. Node 1 is at the top of the storage tank. The greater
the number of nodes, the greater the stratification in the storage tank. Unreasonably increasing the number
of nodes may slow down the simulation dramatically.
The heat exchanger is also divided into a user-defined number of isothermal nodes (Nhx), but these nodes
are arranged along the flow direction of the heat exchanger (along the length of the pipe). Adjacent heat

4–600
TRNSYS 18 – Mathematical Reference

exchanger nodes interact thermally only via the flow stream, conduction is not considered between heat
exchanger nodes.
For coiled tube heat exchangers, the tubes comprising the heat exchanger (there may be more than one
tube bundled together) are divided into N hx nodes along the flow direction. For each heat exchanger node,
the user must supply the fraction of the heat exchanger pipe length to be assigned to that node and the
tank node in which this heat exchanger node is completely located. It is possible to have more than one
heat exchanger node located within a tank node.

Figure 4.10.6-2: Coiled Tube HX

HEAT EXCHANGER:
The outlet temperature at any time during the simulation for the heat exchanger flow stream is the average
temperature of the heat exchanger node that contains the outlet (the last specified node) over the timestep.
The heat exchanger and storage tank interact thermally through natural convection heat transfer from the
heat exchanger outer surface to the tank fluid (or in this case from the outer surface of the heat exchanger
node to the tank fluid node). The overall heat transfer coefficient (UA) of the heat exchanger to tank heat
transfer for any heat exchanger node can be expressed as:
𝑛 1 1
= + 𝑅𝑤 + Eq. 4.10.6-7
𝑈𝐴 ℎ𝑜 𝐴𝑜 ℎ𝑖 𝐴𝑖
where:
n = number of identical tubes (pipes)
ho = outer surface heat transfer coefficient (tank fluid side)
Ao = outer surface area of the HX node
Rw = tube wall resistance
hi = inner surface heat transfer coefficient (in the tubes)
ai = inner surface area of the HX node
and:
𝑘
ℎ𝑜 = 𝑁𝑢𝑑 Eq. 4.10.6-8
𝑑𝑜
where:
Nud= Nusselt number based on tube diameter
k = fluid thermal conductivity
do = outer pipe diameter
and:

𝑁𝑢𝑑 = 𝐶𝑅𝑎𝑛 𝐺𝐹 𝑚 Eq. 4.10.6-9


where:
Ra = Rayleigh number for the tank fluid (based on fluid properties at (T surf + T)/2  this requires
an iterative solution as Tsurf depends on the heat transfer)
Tsurf = outer surface temperature of HX
T = temperature of the tank node containing this HX node
C, n, GF, and m = user supplied parameters
and:

4–601
TRNSYS 18 – Mathematical Reference

𝑟
𝑙𝑛 ( 𝑜 ) Eq. 4.10.6-10
𝑟𝑖
𝑅𝑤 =
2𝜋𝐿𝑝𝑖𝑝𝑒 𝑘𝑤
where:
ro = outer pipe radius
ri = inner pipe radius
Lpipe = length of pipe node
kw = HX wall thermal conductivity
The inner surface heat transfer coefficient (hi) is dependent on the fluid properties. The flow is assumed to
be fully developed and the internal convection coefficient is based on the length of the tubes; and not on
the length of the node. For all cases the Reynolds number (Re hx) and Prandtl number (Prhx)are calculated
as:
4𝑚̇
𝑅𝑒ℎ𝑥 = Eq. 4.10.6-11
𝜋𝑑𝑖 𝜇
𝐶𝑝𝜇
𝑃𝑟ℎ𝑥 = Eq. 4.10.6-12
𝑘
where:
m = Flow rate through one tube of the HX
di = inner tube diameter
 = fluid viscosity
k = fluid thermal conductivity
Cp = fluid specific heat
For coiled tube heat exchangers, the critical Reynolds number for transition from laminar flow to turbulent
flow is calculated as:
𝑑𝑖 0.32
𝑅𝑒𝑐𝑟𝑖𝑡 = 20000 ( ) Eq. 4.10.6-13
𝑑𝑐𝑜𝑖𝑙
where:
dcoil = diameter of the coiled tube heat exchanger
The Nusselt number correlation for laminar flow is:
1
3 3 Eq. 4.10.6-14
1.5
51
48 11 𝐻𝐸
𝑁𝑢ℎ𝑥 = + 2 + 1.816 ( )
11 1342⁄ 1.15
𝑃𝑟ℎ𝑥 1+
𝑃𝑟ℎ𝑥
1+( )
𝐻𝐸 2
[( ) ]

where:

𝑑𝑖 0.5
𝑅𝑒ℎ𝑥 ( ) Eq. 4.10.6-15
𝑑𝑐𝑜𝑖𝑙
𝐻𝐸 =
𝑃𝑖𝑡𝑐ℎ𝑐𝑜𝑖𝑙 2
1+( )
𝜋𝑑𝑖

and for turbulent flow conditions is:

4–602
TRNSYS 18 – Mathematical Reference

𝑑𝑖 0.1
𝑁𝑢ℎ𝑥 = 0.023𝑅𝑒ℎ𝑥 0.85 𝑃𝑟ℎ𝑥 0.4 ( ) Eq. 4.10.6-16
𝑑𝑐𝑜𝑖𝑙
The internal heat transfer coefficient is then:
𝑘
ℎ𝑖 = 𝑁𝑢ℎ𝑥 Eq. 4.10.6-17
𝑑𝑖
For cases where there is no flow through the heat exchanger, the Nusselt number is set to 1.0 for the
calculation of the internal heat transfer coefficient. Finally, the heat transfer between the tank node (j) and
heat exchanger node (k) can be calculated as:
𝑄ℎ𝑥,𝑗→𝑘 = 𝑈𝐴𝑗,𝑘 (𝑇𝑡𝑎𝑛𝑘,𝑗 − 𝑇ℎ𝑥,𝑘 )
Eq. 4.10.6-18
The other component of heat transfer for the heat exchanger node (besides the heat transfer to the storage
tank fluid) is via fluid flow through the heat exchanger:
𝑄𝑓𝑙𝑜𝑤 = 𝑚̇𝐶𝑝(𝑇ℎ𝑥,𝑘 − 𝑇𝑖𝑛 )
Eq. 4.10.6-19
where:
m = mass flow rate through the node (depends on HX flow rate and the number of tubes)
Cp = fluid specific heat
Tin = the inlet temperature to the heat exchanger node (this temperature may be the entering HX
temperature or the temperature of the node upstream of this node depending on the location of the
node)
Thx,k = the temperature of the heat exchanger node
The a and b terms for the differential equation (dT/dt = aT + b) for the heat exchanger heat transfer for the
node can be expressed as:
𝑚̇𝐶𝑝 − 𝑈𝐴𝑗,𝑘
𝑎ℎ𝑥,𝑘 = Eq. 4.10.6-20
𝐶𝑎𝑝𝑘

−𝑚̇𝐶𝑝𝑇𝑖𝑛 + 𝑈𝐴𝑗,𝑘 𝑇𝑡𝑎𝑛𝑘,𝑗


𝑏ℎ𝑥,𝑘 = Eq. 4.10.6-21
𝐶𝑎𝑝𝑘
where:
Capk = mass of fluid in HX node * specific heat of HX fluid

STORAGE TANK
The storage tank model accounts for the following component heat transfers:
 thermal losses to the environment through the top of the storage tank
 thermal losses to the environment through the sides of the storage tank
 thermal losses to the environment through the bottom of the storage tank
 heat exchange with flowing and stagnant fluid in the heat exchanger
 conduction between adjacent tank nodes
 mixing between nodes to eliminate thermal instabilities
 mixing between nodes due to load flow through the storage tank
 auxiliary heat input to the tank

TOP, EDGE AND BOTTOM LOSSES:


The storage tank interacts thermally with its environment through heat losses (or gains) to the tank from
the top, edges and bottom areas of the storage tank. The model allows the user to specify unique
environment temperatures for the top surface, bottom surface and edges in order to increase the flexibility
of the model. The heat transfer from the top, edges and the bottom of the storage for tank node j is:

4–603
TRNSYS 18 – Mathematical Reference

𝑄𝑙𝑜𝑠𝑠,𝑡𝑜𝑝,𝑗 = 𝐴𝑡𝑜𝑝,𝑗 𝑈𝑡𝑜𝑝 (𝑇𝑡𝑎𝑛𝑘,𝑗 − 𝑇𝑒𝑛𝑣,𝑡𝑜𝑝 )


Eq. 4.10.6-22

𝑄𝑙𝑜𝑠𝑠,𝑏𝑜𝑡𝑡𝑜𝑚,𝑗 = 𝐴𝑏𝑜𝑡𝑡𝑜𝑚,𝑗 𝑈𝑏𝑜𝑡𝑡𝑜𝑚 (𝑇𝑡𝑎𝑛𝑘,𝑗 − 𝑇𝑒𝑛𝑣,𝑏𝑜𝑡𝑡𝑜𝑚 )


Eq. 4.10.6-23

𝑄𝑙𝑜𝑠𝑠,𝑒𝑑𝑔𝑒𝑠,𝑗 = 𝐴𝑒𝑑𝑔𝑒𝑠,𝑗 𝑈𝑒𝑑𝑔𝑒𝑠 (𝑇𝑡𝑎𝑛𝑘,𝑗 − 𝑇𝑒𝑛𝑣,𝑒𝑑𝑔𝑒𝑠 )


Eq. 4.10.6-24
where:
Atop,j = tank top surface area for thermal losses (all attributed to tank node 1)
Abottom,j = tank bottom surface area for thermal losses (all attributed to tank node N)
Aedges,j = tank edge surface area for thermal losses (distributed equally amongst all the nodes)
Utop = storage tank top heat loss coefficient
Ubottom = storage tank bottom heat loss coefficient
Uedges = storage tank edge heat loss coefficient
Ttank,j = temperature of the tank node
Tenv,top = tank environment temperature for losses through the top of the storage
Tenv,bottom = tank environment temperature for losses through the bottom of the storage
Tenv,edges = tank environment temperature for losses through the edges of the storage

CONDUCTION EFFECTS:
The nodes in the storage tank of this model can interact thermally via conduction between nodes. The
formulation of the conductivity heat transfer from tank node j is:
𝑇𝑗 − 𝑇𝑗+1 𝑇𝑗 − 𝑇𝑗−1
𝑄𝑐𝑜𝑛𝑑,𝑗 = 𝑘𝑗 𝐴𝑗 + 𝑘𝑗−1 𝐴𝑗−1 Eq. 4.10.6-25
𝐿𝑐𝑜𝑛𝑑,𝑗 𝐿𝑐𝑜𝑛𝑑,𝑗−1
Tj = temperature of this node
Tj+1 = temperature of the node directly below the current node
Tj-1 = temperature of the node directly above the current node
kj = thermal conductivity of fluid in node j
kj-1 = thermal conductivity of fluid in node directly above the current node
Aj = conduction interface area between this node and the one below it (may be reduced by the
presence of a heat exchanger tube passing through the boundary between the tank nodes)
Aj-1 = conduction interface area between this node and the one above it (may be reduced by the
presence of a heat exchanger tube passing through the boundary between the tank nodes)
Lcond,j = vertical distance between the centroid of this node and the centroid of the node below
Lcond,j-1 = vertical distance between the centroid of this node and the centroid of the node above

INLET FLOW EFFECTS


This model allows the user to have two flow streams which pass into and out of the storage tank. The user
must specify the inlet and outlet locations for each of the inlet and outlet streams by specifying the fraction
of the tank height at which each inlet and outlet are placed. The model then determines which nodes contain
the inlets and outlets based on the tank height and the number of nodes. In this manner the number of tank
nodes can be changed without having to reenter the nodes for the inlet and outlet ports. The temperatures
at the outlets at any time are simply the average temperatures of the nodes containing the outlets over the
simulation timestep. The user provides the inlet temperature and flow rate through each of the inlets. The
inlet and outlet locations are also fixed throughout the simulation – they cannot be changed. The outlet
flow rate from any outlet is simply the inlet flow rate from its paired inlet (for example 100 kg/h into inlet 1
causes 100 kg/h to exit the tank through outlet 1). An example is shown below of the path of the flow
streams with the following conditions:
 Stream 1 = 200 kg/h with Inlet in Node 4 and Outlet in Node 1
 Stream 2 = 75 kg/h with Inlet in Node 1 and Outlet in Node 3

4–604
TRNSYS 18 – Mathematical Reference

Figure 4.10.6-3: Example Flows


In this tank model, the inlet fluid into a node is completely mixed with the storage tank fluid at every timestep
before this fluid moves on to the next node (the fluid flow path is directly from the inlet node to the outlet
mode). For example, water at 10 C and at a flow rate of 200 kg/h enters node 4 (outlet = node 1) of a
storage tank which has an initial temperature of 30 C. The 10 C inlet flow stream mixes with the 30 C water
in the tank node causing the tank node to fall to 25 C (for example). 200 kg/h of 25 C water then crosses
the boundary into node 3 where it mixes with the fluid in this boundary before moving on towards node 2
and eventually out through the outlet in node 1.
As mentioned earlier, each inlet to the tank is assumed to be paired with an outlet from the tank. In other
words, you cannot have two outlets from the tank and only one inlet into the tank or two inlets to the tank
and only one outlet from the tank. However, by the use of a Type 11 mixing valve (2 inlets 1 outlet) or a
Type 11 flow diverter (1 inlet 2 outlets) in combination with this tank model you can effectively simulate
these odd paired systems. For example, if you wished to simulate 100 kg/h of water entering the bottom
of the storage tank through an inlet port and 100 kg/h of water entering the middle of the tank from a different
fluid stream with 200 kg/h leaving through the top of the tank in one outlet you could specify the following
parameters:
“Height fraction of Inlet 1” = 0 Indicates the first inlet location is at the bottom of the tank
“Height fraction of Outlet 1” = 1 Indicates the first outlet location is at the top of the tank
“Height fraction of Inlet 2” = 0.5 Indicates the seond inlet location is at the middle of the tank
“Height fraction of Outlet 2” = 1 Indicates the second outlet location is at the top of the tank
A Type 11 flow mixer is then used to mix the two outlet streams from the tank (they are both at the same
temperature) and you have now effectively modeled a two inlet, 1 outlet storage tank.

MIXING EFFECTS:
At times, the nodes in the storage tank may become thermally unstable (a node has a higher temperature
than the node above). If this happens, the model completely mix any nodes that are unstable at the end of
the timestep to avoid problems.

AUXILIARY HEATING EFFECTS:


This storage tank relies on external controls to add (or possibly remove) heat from the storage tank. This
feature can be used to model auxiliary heating effects (electrical element, combustion heating, etc.). The
user supplies heat input rates for each of the nodes in the storage tank through inputs to the model. For
example, an aquastat model may sense the top node temperature of the storage tank and send a control
signal to an auxiliary heater model that adds heat to the bottom node of the storage tank until the top node
reaches its setpoint; at which time the control signal from the aquastat is disabled and input energy to the
tank is ceased.

SOLVING THE TANK EQUATIONS


The differential equations for the tank nodes can be written as:

4–605
TRNSYS 18 – Mathematical Reference

𝑑𝑇𝑡𝑎𝑛𝑘,𝑗 𝑄𝑖𝑛,𝑡𝑎𝑛𝑘,𝑗 − 𝑄𝑜𝑢𝑡,𝑡𝑎𝑛𝑘,𝑗


= Eq. 4.10.6-26
𝑑𝑡 𝐶𝑡𝑎𝑛𝑘,𝑗
or expanded to:
𝑑𝑇𝑡𝑎𝑛𝑘,𝑗
Eq. 4.10.6-27
𝑑𝑡
𝑄𝑎𝑢𝑥,𝑗 − 𝑄ℎ𝑥,𝑗→𝑘 − 𝑄𝑙𝑜𝑠𝑠,𝑡𝑜𝑝,𝑗 − 𝑄𝑙𝑜𝑠𝑠,𝑏𝑜𝑡𝑡𝑜𝑚,𝑗 − 𝑄𝑙𝑜𝑠𝑠,𝑒𝑑𝑔𝑒𝑠,𝑗 − 𝑄𝑐𝑜𝑛𝑑,𝑗 − 𝑄𝑓𝑙𝑜𝑤,𝑖,𝑗 − 𝑄𝑚𝑖𝑥,𝑗
=
𝐶𝑡𝑎𝑛𝑘,𝑗
These equations are then placed in the form:
𝑑𝑇
= 𝑎𝑇 + 𝑏 Eq. 4.10.6-28
𝑑𝑡
and a and b values are found for each node. The b term holds the temperatures of other tank nodes and
heat exchanger nodes. These temperatures in the b term are assumed to be constant for the solution of
the nodal differential equations at their average value over the timestep. The nodal differential equation is
then solved (as described earlier), new final and average nodal temperatures are calculated and the entire
process is repeated until a converged solution is obtained. Then the heat exchanger nodal calculations are
repeated until all tank and heat exchanger nodes are converged. As described earlier, mixing may initiate
during the timestep if temperature inversions are observed between adjacent nodes. As in all TRNSYS
components, the outputs from the model are average values over the timestep.

4–606
TRNSYS 18 – Mathematical Reference

4.10.7. Type 158: Constant Volume Liquid Storage Tank (no


Heat Exchanger)
This subroutine models a fluid-filled, constant volume storage tank. This component models a cylindrical
tank with a vertical configuration. The fluid in the storage tank interacts with the environment (through
thermal losses from the top, bottom and edges) and with up to two flow streams that pass into and out of
the storage tank. The tank is divided into isothermal temperature nodes (to model stratification observed
in storage tanks) where the user controls the degree of stratification through the specification of the number
of “nodes”. Each constant-volume node is assumed to be isothermal and interacts thermally with the nodes
above and below through several mechanisms: fluid conduction between nodes and through fluid
movement (either forced movement from inlet flow streams or natural destratification mixing due to
temperature inversions in the tank). Auxiliary heat may be provided to each isothermal node individually,
through the use of inputs to the model.

4.10.7.1. Parameter/Input/Output Reference


PARMAETERS

1 Tank Volume [m3] The internal (fluid) volume of the tank.

2 Tank Height [m] The internal height of the tank.

3 Number of Tank Nodes [-] The number of isothermal tank nodes into which the storage tank
will be divided (1=fully mixed tank).

4 Top Loss Coefficient [kJ/hr.m2.K] The heat loss coefficient for the top of the storage tank.

5 Edge Loss Coefficient [kJ/hr.m2.K] The heat loss coefficient for the vertical edges of the storage tank.

6 Bottom Loss [kJ/hr.m2.K] The heat loss coefficient for the bottom of the tank.
Coefficient

7 Fluid Specific Heat [kJ/kg.K] The specific heat of the fluid in the tank.

8 Fluid Density [kg/m3] The density of the fluid in the tank.

9 Fluid Thermal [kJ/hr.m.K] The thermal conductivity of the tank fluid.


Conductivity

10 Height Fraction of Inlet [-] The relative height of the first inlet port into the storage tank (height
1 of inlet / tank height). In this model, the ports are matched such that
the outlet of port 1 has the same flow rate as the inlet into port 1. A
value of 0 signifies the bottom of the tank and a value of 1 signifies
the top of the tank.

11 Height Fraction of [-] The relative height of the first outlet port from the storage tank
Outlet 1 (height of outlet / tank height). In this model, the ports are matched
such that the outlet of port 1 has the same flow rate as the inlet into
port 1. A value of 0 signifies the bottom of the tank and a value of 1
signifies the top of the tank.

12 Height Fraction of Inlet [-] The relative height of the second inlet port into the storage tank
2 (height of inlet / tank height). In this model, the ports are matched
such that the outlet of port 2 has the same flow rate as the inlet into

4–607
TRNSYS 18 – Mathematical Reference

port 2. A value of 0 signifies the bottom of the tank and a value of 1


signifies the top of the tank.

13 Height Fraction at [-] The relative height of the second outlet port from the storage tank
Outlet 2 (height of outlet / tank height). In this model, the ports are matched
such that the outlet of port 2 has the same flow rate as the inlet into
port 2. A value of 0 signifies the bottom of the tank and a value of 1
signifies the top of the tank.

14 Number of [-] The number of thermostats in the storage tank. For each
Thermostats thermostat desired, the user will have to specify the normalized
height of the thermostat location (a parameter). The temperature at
each thermostat location is provided as an output from the model.

For each thermostat:

15 Height Fraction of [-] The relative height of the thermostat location in the storage tank
Thermostat (height of thermostat / tank height). A value of 0 signifies the
bottom of the tank and a value of 1 signifies the top of the tank.

16 Number of Auxiliary [-] The number of auxiliary heat inputs into the storage tank. For each
Heat Inputs auxiliary heat input specified, the user must specify the location of
the auxiliary heat input (a parameter) and the rate at which auxiliary
heat is added to the location (an input).

For each Auxiliary Heat Input:

17 Height Fraction of [-] The relative height of the auxiliary heat input into the storage tank
Auxiliary Input (height of input / tank height). A value of 0 signifies the bottom of
the tank and a value of 1 signifies the top of the tank.

INPUTS

1 Inlet Temperature for [C] The temperature of the fluid entering the storage tank through the
Port 1 first inlet port.

2 Inlet Flow Rate for Port [kg/h}: The flow rate of the fluid entering the storage tank through the first
1 inlet port.

3 Inlet Temperature for [C] The temperature of the fluid entering the storage tank through the
Port 2 second inlet port.

4 Inlet Flow Rate for Port [kg/h] The flow rate of the fluid entering the storage tank through the
2 second inlet port.

5 Top Loss Temperature [C] The temperature of the environment for calculating losses from the
top of the storage tank.

6 Edge Loss [C] The temperature of the environment for calculating losses from the
Temperature edges of the storage tank.

7 Bottom Loss [C] The temperature of the environment for calculating losses from the
Temperature bottom of the storage tank.

For Each Auxiliary Heat Input:

4–608
TRNSYS 18 – Mathematical Reference

8 Auxiliary Heat Input [kJ/h] The rate at which auxiliary energy is added (or removed) from the
storage tank for this location.

OUTPUTS

1 Temperature at Outlet [C] The temperature of the fluid exiting the storage tank through the
1 first outlet port.

2 Flow Rate at Outlet 1 [kg/h] The flow rate of the fluid exiting the storage tank through the first
outlet port.

3 Temperature at Outlet [C] The temperature of the fluid exiting the storage tank through the
2 second outlet port.

4 Flow Rate at Outlet 2 [kg/h] The flow rate of the fluid exiting the storage tank through the
second outlet port.

5 Average Tank [C] The average temperature of the fluid in the storage tank.
Temperature

6 Energy Delivered via [kJ/h] The rate at which energy is removed from the tank through the first
Port 1 outlet port minus the rate at which energy is added to the tank
through the first inlet port.

7 Energy Delivered via [kJ/h] The rate at which energy is removed from the tank through the
Port 2 second outlet port minus the rate at which energy is added to the
tank through the second inlet port.

8 Top Losses [kJ/h] The rate at which energy is lost to the environment through the top
surface of the storage tank.

9 Edge Losses [kJ/h] The rate at which energy is lost to the environment through the
edge surfaces of the storage tank.

10 Bottom Losses [kJ/h] The rate at which energy is lost to the environment through the
bottom surface of the storage tank.

11 Auxiliary Heating Rate [kJ/h] The rate at which auxiliary heat energy is added to the storage
tank.

12 Tank Energy Storage [kJ/h] The rate at which energy is stored by the fluid in the storage tank
Rate due to a rise in temperature of the fluid (capacitance effects).

13 Tank Energy Balance [%] The percent energy balance error for the heat transfers in the
Error storage tank.

For each Thermostat:

14 Temperature at [C] The temperature of the tank at the location of the specified
Thermostat thermostat.

For each Tank Node:

15 Tank Nodal [C] The average temperature of the fluid in the specified node of the
Temperature storage tank for the current timestep.

4–609
TRNSYS 18 – Mathematical Reference

DERIVATIVES

For each Tank Node

1 Initial Tank [C] The temperature of the specified node of the storage tank at the
Temperature for Node beginning of the simulation (node 1 = top).

4.10.7.2. Simulation Summary Report


VALUE FIELDS

Tank Volume [m3] Parameter 1

Number of Tank Nodes [-] Parameter 3

Number of [-] Parameter 14


Thermostats

Number of Auxiliary [-] Parameter 16


Heat Inputs

INTEGRATED VALUE FIELDS

Delivered Energy [kJ] Output 6


through Port 1

Delivered Energy [kJ] Output 7


through Port 2

Auxiliary Energy [kJ] Output 11

Thermal Losses [kJ] Output 8 + Output 8 + Output 10

MINIMUM/MAXIMUM VALUE FIELDS

Port 1 outlet [°C] Output 1


temperature

Port 2 outlet [°C] Output 3


temperature

Tank average [°C] Output 5


temperature

4.10.7.3. Detailed Description


In this type of storage tank, heat can be transferred into and out of the storage tank through 2 fluid streams
which mix with the storage. The problem breaks down into the required solution of a differential equation:
𝑑𝑇𝑡𝑎𝑛𝑘 𝑄𝑖𝑛,𝑡𝑎𝑛𝑘 − 𝑄𝑜𝑢𝑡,𝑡𝑎𝑛𝑘
= Eq. 4.10.7-1
𝑑𝑡 𝐶𝑡𝑎𝑛𝑘
where Qin,Tank and Qout,Tank are functions of the ambient temperature and the inlet fluid conditions and flow
rates. While there are other available methods to solve coupled differential equations, we decided to solve
the problem with an approximate analytical solution. The analytical solution has several inherent

4–610
TRNSYS 18 – Mathematical Reference

advantages over numerical solutions. First, the subroutine solves its own mathematical problem and does
not have to rely on non-standard numerical recipes that must be attached to the subroutine. Secondly,
some of the other solution methods (mainly the numerical solutions) are extremely dependent on the
simulation timestep and may not converge under certain circumstances commonly encountered in domestic
hot water systems (namely high flow rates for example). The analytical solution is timestep independent
but does require an iterative solution inside the subroutine to solve the coupled differential equations.
To solve the differential equations analytically, the equation is placed into the form:
𝑑𝑇
= 𝑎𝑇 + 𝑏 Eq. 4.10.7-2
𝑑𝑡
where T is the dependent variable, t is time, a is a constant and b may be a function of time or the dependent
variable. If b is a constant, than the solution of this differential equation can be readily solved. If b is not
constant, then a reasonable approximation to the analytical solution can be found by assuming that b is
constant over the timestep and equal to its average value over the timestep.
At any time (for a not equal to zero):
𝑏𝑎𝑣𝑒 𝑎∆𝑡 𝑏𝑎𝑣𝑒
𝑇𝑓𝑖𝑛𝑎𝑙 = (𝑇𝑖𝑛𝑖𝑡𝑖𝑎𝑙 + )𝑒 − Eq. 4.10.7-3
𝑎 𝑎
where:
𝑏𝑎𝑣𝑒 = 𝑏(𝑇𝑎𝑣𝑒 )
Eq. 4.10.7-4
and:
1 𝑏𝑎𝑣𝑒 𝑏𝑎𝑣𝑒
𝑇𝑎𝑣𝑒 = (𝑇𝑖𝑛𝑖𝑡𝑖𝑎𝑙 + ) (𝑒 𝑎∆𝑡 − 1) − Eq. 4.10.7-5
𝑎∆𝑡 𝑎 𝑎
With this assumption, the problem becomes straightforward to solve. Simply write the differential equation
in the correct form, determine a and bave and solve for Tfinal and Tave. Then recalculate bave and iterate until
the temperatures converge.
While the assumption that b is constant over the timestep (and equal to its average value) is not technically
correct, it is a reasonable approximation for the small timesteps used in TRNSYS simulations (maximum
timestep = 1 hour).
This subroutine allows the user to designate the level of stratification for the storage tank by specifying a
number of tank nodes (N). The tank is then divided into N horizontal nodes of equal. Each of the tank
nodes is assumed to be isothermal. Node 1 is assumed to be at the top of the storage tank. The greater
the number of nodes, the greater the stratification in the storage tank. Unreasonably increasing the number
of nodes may slow down the simulation dramatically.

STORAGE TANK
The storage tank model accounts for the following component heat transfers:
 thermal losses to the environment through the top of the storage tank
 thermal losses to the environment through the sides of the storage tank
 thermal losses to the environment through the bottom of the storage tank
 conduction between adjacent tank nodes
 mixing between nodes to eliminate thermal instabilities
 mixing between nodes due to load flow through the storage tank
 auxiliary heat input to the tank

TOP, EDGE AND BOTTOM LOSSES:


The storage tank interacts thermally with its environment through heat losses (or gains) to the tank from
the top, edges and bottom areas of the storage tank. The model allows the user to specify unique

4–611
TRNSYS 18 – Mathematical Reference

environment temperatures for the top surface, bottom surface and edges in order to increase the flexibility
of the model. The heat transfer from the top, edges and the bottom of the storage for tank node j is:
𝑄𝑙𝑜𝑠𝑠,𝑡𝑜𝑝,𝑗 = 𝐴𝑡𝑜𝑝,𝑗 𝑈𝑡𝑜𝑝 (𝑇𝑡𝑎𝑛𝑘,𝑗 − 𝑇𝑒𝑛𝑣,𝑡𝑜𝑝 )
Eq. 4.10.7-6

𝑄𝑙𝑜𝑠𝑠,𝑏𝑜𝑡𝑡𝑜𝑚,𝑗 = 𝐴𝑏𝑜𝑡𝑡𝑜𝑚,𝑗 𝑈𝑏𝑜𝑡𝑡𝑜𝑚 (𝑇𝑡𝑎𝑛𝑘,𝑗 − 𝑇𝑒𝑛𝑣,𝑏𝑜𝑡𝑡𝑜𝑚 )


Eq. 4.10.7-7

𝑄𝑙𝑜𝑠𝑠,𝑒𝑑𝑔𝑒𝑠,𝑗 = 𝐴𝑒𝑑𝑔𝑒𝑠,𝑗 𝑈𝑒𝑑𝑔𝑒𝑠 (𝑇𝑡𝑎𝑛𝑘,𝑗 − 𝑇𝑒𝑛𝑣,𝑒𝑑𝑔𝑒𝑠 )


Eq. 4.10.7-8
where:
Atop,j = tank top surface area for thermal losses (all attributed to tank node 1)
Abottom,j = tank bottom surface area for thermal losses (all attributed to tank node N)
Aedges,j = tank edge surface area for thermal losses (distributed equally amongst all the nodes)
Utop = storage tank top heat loss coefficient
Ubottom = storage tank bottom heat loss coefficient
Uedges = storage tank edge heat loss coefficient
Ttank,j = temperature of the tank node
Tenv,top = tank environment temperature for losses through the top of the storage
Tenv,bottom = tank environment temperature for losses through the bottom of the storage
Tenv,edges = tank environment temperature for losses through the edges of the storage

CONDUCTION EFFECTS:
The nodes in the storage tank of this model can interact thermally via conduction between nodes. The
formulation of the conductivity heat transfer from tank node j is:
𝑇𝑗 − 𝑇𝑗+1 𝑇𝑗 − 𝑇𝑗−1
𝑄𝑐𝑜𝑛𝑑,𝑗 = 𝑘𝑗 𝐴𝑗 + 𝑘𝑗−1 𝐴𝑗−1 Eq. 4.10.7-9
𝐿𝑐𝑜𝑛𝑑,𝑗 𝐿𝑐𝑜𝑛𝑑,𝑗−1
Tj = temperature of this node
Tj+1 = temperature of the node directly below the current node
Tj-1 = temperature of the node directly above the current node
kj = thermal conductivity of fluid in node j
kj-1 = thermal conductivity of fluid in node directly above the current node
Aj = conduction interface area between this node and the one below it
Aj-1 = conduction interface area between this node and the one above it
Lcond,j = vertical distance between the centroid of this node and the centroid of the node below
Lcond,j-1 = vertical distance between the centroid of this node and the centroid of the node above

INLET FLOW EFFECTS


This model allows the user to have two flow streams which pass into and out of the storage tank. The user
must specify the inlet and outlet locations for each of the inlet and outlet streams by specifying the fraction
of the tank height at which each inlet and outlet are placed. The model then determines which nodes contain
the inlets and outlets based on the tank height and the number of nodes. In this manner the number of tank
nodes can be changed without having to reenter the nodes for the inlet and outlet ports. The temperatures
at the outlets at any time are simply the average temperatures of the nodes containing the outlets over the
simulation timestep. The user provides the inlet temperature and flow rate through each of the inlets. The
inlet and outlet locations are also fixed throughout the simulation – they cannot be changed. The outlet
flow rate from any outlet is simply the inlet flow rate from its paired inlet (for example 100 kg/h into inlet 1
causes 100 kg/h to exit the tank through outlet 1). An example is shown below of the path of the flow
streams with the following conditions:
 Stream 1 = 200 kg/h with Inlet in Node 4 and Outlet in Node 1
 Stream 2 = 75 kg/h with Inlet in Node 1 and Outlet in Node 3

4–612
TRNSYS 18 – Mathematical Reference

Figure 4.10.7-1: Example Flows


In this tank model, the inlet fluid into a node is completely mixed with the storage tank fluid at every timestep
before this fluid moves on to the next node (the fluid flow path is directly from the inlet node to the outlet
mode). For example, water at 10 C and at a flow rate of 200 kg/h enters node 4 (outlet = node 1) of a
storage tank which has an initial temperature of 30 C. The 10 C inlet flow stream mixes with the 30 C water
in the tank node causing the tank node to fall to 25 C (for example). 200 kg/h of 25 C water then crosses
the boundary into node 3 where it mixes with the fluid in this boundary before moving on towards node 2
and eventually out through the outlet in node 1.
As mentioned earlier, each inlet to the tank is assumed to be paired with an outlet from the tank. In other
words, you cannot have two outlets from the tank and only one inlet into the tank or two inlets to the tank
and only one outlet from the tank. However, by the use of a Type 11 mixing valve (2 inlets 1 outlet) or a
Type 11 flow diverter (1 inlet 2 outlets) in combination with this tank model you can effectively simulate
these odd paired systems. For example, if you wished to simulate 100 kg/h of water entering the bottom
of the storage tank through an inlet port and 100 kg/h of water entering the middle of the tank from a different
fluid stream with 200 kg/h leaving through the top of the tank in one outlet you could specify the following
parameters:
“Height fraction of Inlet 1” = 0 Indicates the first inlet location is at the bottom of the tank
“Height fraction of Outlet 1” = 1 Indicates the first outlet location is at the top of the tank
“Height fraction of Inlet 2” = 0.5 Indicates the seond inlet location is at the middle of the tank
“Height fraction of Outlet 2” = 1 Indicates the second outlet location is at the top of the tank
A Type 11 flow mixer is then used to mix the two outlet streams from the tank (they are both at the same
temperature) and you have now effectively modeled a two inlet, 1 outlet storage tank.

MIXING EFFECTS:
At times, the nodes in the storage tank may become thermally unstable (a node has a higher temperature
than the node above). If this happens, the model completely mix any nodes that are unstable at the end of
the timestep to avoid problems.

AUXILIARY HEATING EFFECTS:


This storage tank relies on external controls to add (or possibly remove) heat from the storage tank. This
feature can be used to model auxiliary heating effects (electrical element, combustion heating, etc). The
user supplies heat input rates for each of the nodes in the storage tank through inputs to the model. For
example, an aquastat model may sense the top node temperature of the storage tank and send a control
signal to an auxiliary heater model that adds heat to the bottom node of the storage tank until the top node
reaches its setpoint; at which time the control signal from the aquastat is disabled and input energy to the
tank is ceased.

SOLVING THE TANK EQUATIONS


The differential equations for the tank nodes can be written as:

4–613
TRNSYS 18 – Mathematical Reference

𝑑𝑇𝑡𝑎𝑛𝑘,𝑗 𝑄𝑖𝑛,𝑡𝑎𝑛𝑘,𝑗 − 𝑄𝑜𝑢𝑡,𝑡𝑎𝑛𝑘,𝑗


= Eq. 4.10.7-10
𝑑𝑡 𝐶𝑡𝑎𝑛𝑘,𝑗
or expanded to:
𝑑𝑇𝑡𝑎𝑛𝑘,𝑗 𝑄𝑎𝑢𝑥,𝑗 − 𝑄𝑙𝑜𝑠𝑠,𝑡𝑜𝑝,𝑗 − 𝑄𝑙𝑜𝑠𝑠,𝑏𝑜𝑡𝑡𝑜𝑚,𝑗 − 𝑄𝑙𝑜𝑠𝑠,𝑒𝑑𝑔𝑒𝑠,𝑗 − 𝑄𝑐𝑜𝑛𝑑,𝑗 − 𝑄𝑓𝑙𝑜𝑤,𝑖,𝑗 − 𝑄𝑚𝑖𝑥,𝑗
= Eq. 4.10.7-11
𝑑𝑡 𝐶𝑡𝑎𝑛𝑘,𝑗
These equations are then placed in the form:
𝑑𝑇
= 𝑎𝑇 + 𝑏 Eq. 4.10.7-12
𝑑𝑡
and a and b values are found for each node. The b term holds the temperatures of other tank nodes. These
temperatures in the b term are assumed to be constant for the solution of the nodal differential equations
at their average value over the timestep. The nodal differential equation is then solved (as described
earlier), new final and average nodal temperatures are calculated and the entire process is repeated until
a converged solution is obtained. As described earlier, mixing may initiate during the timestep if temperature
inversions are observed between adjacent nodes. As in all TRNSYS components, the outputs from the
model are the average values over the timestep.

4–614
TRNSYS 18 – Mathematical Reference

4.11. Utility

4–615
TRNSYS 18 – Mathematical Reference

4.11.1. Type 9: Data Reader (Generic Data Files)


This component serves the purpose of reading data at regular time intervals from a text based file,
converting it to a desired system of units, and making it available to other TRNSYS components as time
varying values.
Type 9 may be used in either a "free" or a "formatted" reading mode. In "free-formatted" reading the data
lines need not be exactly identical in format – however each value must be separated from the previous
value by a blank or a comma. "Formatted" reading (specified by either F or E FORTRAN format statements)
may be specified instead.

4.11.1.1. Parameter / Input / Output Reference


PARMAETERS

1 Mode - This parameter sets the mode of the data reader. The different
values (Modes 1 to 6) are explained hereunder:
1: The first line in the data file is the simulation start time. Initial
conditions are provided as instantaneous values for ALL variables
(including the ones that are given as average values over the time
step in the rest of the data file).
2: The first line in the data file is the simulation start time. Initial
conditions are provided as instantaneous or averaged values over
one timestep according to the options set for each variables.
3. The first line in the data file corresponds to the first time step of
the simulation. No initial values are provided in the file.
4: The first line in the data file corresponds to time = 0. If the
simulation start is not 0, lines are skipped accordingly in the data
file. Initial conditions are provided as instantaneous values for ALL
variables (including the ones that are given as average values over
the time step in the rest of the data file)
5: The first line in the data file corresponds to time = 0. If the
simulation start is not 0, lines are skipped accordingly in the data
file. Initial conditions are provided as instantaneous or averaged
values over one timestep according to the options set for each
variables
6. The first line in the data file corresponds to the first timestep in a
year. If the simulation does not start at the beginning of the year,
lines are skipped in the data file. No initial values are provided in
the file

2 Header Lines to Skip - Number of header lines to skip in the data file (e.g. Variable names,
units, or additional information not used by TRNSYS)

3 No. of values to read - This parameter specifies how many values are to be read from
each line of the data file. Note that even if some values are used,
the component must read all values up to the last one which is
used. E.g. if only the 1st, 2nd and 6th values are desired, this
parameter should be equal to 6.

4 Time interval of data hr Time interval used to record the data in the file (e.g. hourly = 1.0,
daily = 24.0). The data time interval must be an integer multiplier of
the simulation timestep. E.g. if the simulation timestep is 15
minutes, the data time interval could be 15 min, 30 min, 1h, etc.

4–616
TRNSYS 18 – Mathematical Reference

The next four parameters are cycled once for each column read from the data file (parameter 3)

5 Interpolate or not - This parameter indicates whether the values for the nth variable in
the data file are to be interpolated (1) or not (-1). Parameter 5 is for
the first column, Parameter 9 is for the second column, etc.
Radiation values should NOT be interpolated - this is the function
of the radiation processor.

6 Multiplication factor - Multiplication factor for the nth variable (column). Parameter 6 is for
the first column, Parameter 10 is for the second column, etc.
Output(n) = Value(n) * multiplication factor + addition factor

7 Addition factor - Addition factor for the nth variable (column). Parameter 7 is for the
first column, Parameter 11 is for the second column, etc. Output(n)
= Value(n) * multiplication factor + addition factor

8 Average or - This parameter indicates whether the nth variable (column) is an


instantaneous value average value over the data time interval (0) or an instantaneous
value (1). Note that printed results from previous TRNSYS
simulations are average values over the time step. Parameter 8 is
for the first column, Parameter 12 is for the second column, etc.

The final two parameters are NOT cycled.

9 Logical unit for input - This parameter sets the Fortran Logical Unit (File reference
file number) of the output file. It is used internally by TRNSYS to refer
to the file. This parameter will automatically be assigned to a
unique value by the TRNSYS Studio.

10 Free format mode - The value -1 for this parameter indicates that the data reader
should read data in free format mode. The values should be
separated by blanks (spaces, tabs) or commas (","). The value 1 for
this parameter indicates that a FORMAT statement will be provided
to show Type9 how to read the data file.

OUTPUTS

1 Output 1 [any] The first value read from data file (if at least n values are read).

99 Output 99 [any] The 99th value read from data file. If less than 99 values are read,
this output will have a value of 0.

100 Time of last read [hr] The time at which the values were last read from the data file. Note
when connecting a Type9 to a Type16 this output should be
connected to the appropriate Type16 input.

101 Time of next read [hr] The time at which the values will next be read from the data file.
Note when connecting a Type9 to a Type16 this output should be
connected to the appropriate Type16 input.

The remaining outputs are cycled based on the value of parameter 3

102 Value at next time [any] The value at the next timestep of the listed output.

4–617
TRNSYS 18 – Mathematical Reference

4.11.1.2. Simulation Summary Report Contents


TEXT FIELDS

Data File Name n/a The name of the data file read by this component.

4.11.1.3. Hints and Tips


 Up to 98 values may be read from each line. In "formatted" reading the values must be supplied in
exactly the format specified. In "free format", values need only occur in the same sequence on each
line, separated by at least one blank space or by a comma.
 The data from line to line must be at constant time intervals (e.g., hourly solar radiation readings).
 In free format, values are output in the same sequence as they appear on the data lines, i.e., if the 3rd
value on each data line is solar radiation, then the 3rd OUTPUT will be the solar radiation value. In
formatted reading the first OUTPUT will be the first value read with the specified format (not necessarily
the first value on the data line.)
 Format specification: in TRNSYS 15, Type 9 used an "implied" Format statement. After TRNSYS 16,
the Format statement must comply with the general rules for such statements in TRNSYS (see Volume
07, TRNEdit and Input file syntax). Because the variables read by TRNSYS will be double precision
variables, the formats must be in F or E format.
 Outputs may or may not be interpolated between data timesteps depending upon the parameter
specifications. For instance, if the month, day, and year were read in, these should not be interpolated.
 Outputs 99 and 100 are the times at the beginning (t d1) and end (td2) of the current data interval,
required by the Type16 radiation processor for its interpolation of radiation data.
 The data reader includes an additional 100 OUTPUTS. OUTPUT (100 + i) represents the value of
OUTPUT (i) at the next simulation timestep if the value is interpolated, or OUTPUT (i) at the next data
timestep if the value is not interpolated.
 If wind direction is specified in the data file, the user must make sure that the convention used for wind
direction in the data file is the same as the convention in the other components used in the simulation.
Most components define wind coming from the NORTH as having direction 0 and wind coming from
the SOUTH as having direction 180.

4.11.1.4. Nomenclature
Vi (n) ith value read from the nth line
mi multiplication factor for the ith value
ai addition factor for the ith value
Vi'(n) ith value of the nth line after application of the multiplication and addition factors
td1 time corresponding to values on the previous line
td2 time corresponding to values on the next line

4.11.1.5. Detailed Description


OPERATION MODES
With TRNSYS 16 and beyond, the definition of the simulation start time has changed. In TRNSYS 15 and
before, the simulation time step was actually the end of the first time step. After TRNSYS 16, the simulation
start time is the moment in time at which the simulation is to begin. Other time steps are still referred

4–618
TRNSYS 18 – Mathematical Reference

to using the time at the end of the time step. For example a hourly simulation over one year used to start
at 1 and end at 8760. In TRNSYS 16 and beyond it starts at 0 and ends at 8760.
New operation modes were added to Type 9 to cope with that new definition and provide more flexibility to
Type 9:

Mode 1
The first line in the data file is the simulation start time. Initial conditions are provided as instantaneous
values for ALL variables (including the ones that are given as average values over the time step in the rest
of the data file)

Mode 2
The first line in the data file is the simulation start time. Initial conditions are provided as instantaneous or
averaged values over one timestep according to the options set for each variables (i.e. is a variable is
provided as instantaneous values, initial conditions are assumed to be instantaneous as well).

Mode 3
The first line in the data file corresponds to the first time step of the simulation (not the initial time). No initial
values are provided in the file.

Mode 4
The first line in the data file corresponds to time = 0. If the simulation start is not 0, lines are skipped
accordingly in the data file. Initial conditions are provided as instantaneous values for ALL variables
(including the ones that are given as average values over the time step in the rest of the data file)

Mode 5
The first line in the data file corresponds to time = 0. If the simulation start is not 0, lines are skipped
accordingly in the data file. Initial conditions are provided as instantaneous or averaged values over one
timestep according to the options set for each variables

Mode 6
The first line in the data file corresponds to the first timestep in a year. If the simulation does not start at the
beginning of the year, lines are skipped in the data file. No initial values are provided in the file

MANIPULATIONS PERFORMED ON VARIABLES


Each variable is associated to 4 parameters that tell TRNSYS whether or not to interpolate the data, whether
the column in question contains instantaneous or interpolated data, and define a simple unit conversion
operation.

Average or instantaneous values


Each variable read by Type 9 can be an instantaneous or an average value over the data time step.
TRNSYS always expects average values from Type 9 so instantaneous values are converted. Solar
radiation is typically provided as average values over the time step, while temperature and humidity are
often given as instantaneous values.

Interpolation and unit conversion


Each variable can be interpolated or not, whether or not it is provided as an instantaneous or an average
value. This is different from TRNSYS 15 where average values were never interpolated, while
instantaneous values were always interpolated.

4–619
TRNSYS 18 – Mathematical Reference

After interpolation and / or conversion to an average over the simulation time step, the variable can be
converted to a different set of units, if required, by a simple linear relationship (the multiplier m and addition
term a are provided as parameters):
𝑉𝑖 ′(𝑛) = 𝑚𝑖 𝑉𝑖 (𝑛) + 𝑎𝑖

EXAMPLE
Let us use a very simple data file to show how the different parameters of Type9 are interpreted by
TRNSYS. The following data points are given as input data file:
0
0
1
2
3
4
Figure 4.11.1–1: Data File
The first line contains the value during the initialization time step, and the next lines are the values during
the following timesteps.

HOURLY DATA
Figure 4.11.1–1 shows the contents of a basic data file, if they are assumed to be values given every hour.

Figure 4.11.1–2: Plot of Data File Contents

Table 4.11.1–1 shows the parametes for Type 9, if the data is assumed to start from the first line, it contains
the information with 1-hour intervals and the data is to be interpreted as average values during the timestep.

Table 4.11.1–1: Parameters for Type9

No. Parameter name Value


1 Mode 2
2 Headers line to skip 0
3 No. of values to read 1
4 Time interval of data 1 hr

4–620
TRNSYS 18 – Mathematical Reference

5 Interpolate or not? 1 (interpolate)


6 Multiplication factor 1
7 Addition factor 0
8 Average or instantaneous value 0 (average)

These parameters indicate TRNSYS to interpret the input data file as follows:
- T(0)=0, The initial value of the function
- Average value from 0 to 1 = 0, as specified in the data file, therefore the value at T(1)=0.
- Average value from 1 to 2 = 1, as specified in the data file, therefore the value at T(2)=2 in order to get an
average of 1.
- Average value from 2 to 3 = 2, as specified in the data file, therefore the value at T(3)=2 in order to get an
average of 2.
- Average value from 3 to 4 = 3, as specified in the data file, therefore the value at T(4)=4 in order to get an
average of 3
In order to have these averages, the following instantaneous values yield these averages:
T(0)=0
T(1)=0
T(2)=2
T(3)=2
T(4)=4

The values reported by TRNSYS are average values over the timestep reported at the end of the timestep
so we have:
- TRNSYS Time=0, Output=0
- TRNSYS Time=1,Output=0
- TRNSYS Time=2,Output=1
- TRNSYS Time=3,Output=2
- TRNSYS Time=4,Output=3
The resulting plot (see Figure 4.11.1–3) shows exactly the same values as the input data file, which is
consistent with the fact that the values reported by TRNSYS are average values over the timestep reported
at the end of the timestep.

4–621
TRNSYS 18 – Mathematical Reference

Figure 4.11.1–3: On-line plotter if data is interpreted as 1-hour intervals.

2-HOUR DATA - AVERAGES


Let us now use the same input data file, but assume that the data is provided for 2-hours intervals.
The input file is shown in Figure 4.11.1–4.

Figure 4.11.1–4: Data file assumed as 2-hour intervals.

Table 4.11.1–2: Parameters for Type9, assuming data is spaced in 2-hour intevals

No. Parameter name Value


1 Mode 2

4–622
TRNSYS 18 – Mathematical Reference

2 Headers line to skip 0


3 No. of values to read 1
4 Time interval of data 2 hr
5 Interpolate or not? 1 (interpolate)
6 Multiplication factor 1
7 Addition factor 0
8 Average or instantaneous value 0 (average)

These parameters indicate TRNSYS to interpret the input data file as follows:
- T(0)=0, The initial value of the function
- Average value from 0 to 2 = 0, as specified in your data file, therefore the value at T(2)=0
- Average value from 2 to 4 = 1, as specified in your data file, therefore the value at T(4)=2 in order to get
an average of 1
- Average value from 4 to 6 = 2, as specified in your data file, therefore the value at T(6)=2 in order to get
an average of 2
- Average value from 6 to 8 = 3, as specified in your data file, therefore the value at T(8)=4 in order to get
an average of 3

These average values can be the result of the following instantaneous values:
T(0)=0
T(2)=0
T(4)=0
T(6)=1
T(8)=2
T(10)=2
T(12)=2
The values reported by TRNSYS are average values over the timestep reported at the end of the timestep
so we have:
TRNSYS Time=0, Output=0
TRNSYS Time=1,Output=0
TRNSYS Time=2,Output=0
TRNSYS Time=3,Output=0.5
TRNSYS Time=4,Output=1.0
TRNSYS Time=5,Output=1.5
TRNSYS Time=6,Output=2.0

Figure 4.11.1–5 shows the online plotter with these results.

4–623
TRNSYS 18 – Mathematical Reference

Figure 4.11.1–5: On-line plotter for the data interpreted as average values given in 2-hour intervals.

2-HOUR DATA – INSTANTANEOUS VALUES


Let us assume that the data file contains instantaneous values, specified in 2-hour intervals. Table 4.11.1–
3 shows the required parameters.

Table 4.11.1–3: Parameters for Type9, assuming data is spaced in 2-hour intevals

No. Parameter name Value


1 Mode 2
2 Headers line to skip 0
3 No. of values to read 1
4 Time interval of data 2 hr
5 Interpolate or not? 1 (interpolate)
6 Multiplication factor 1
7 Addition factor 0
8 Average or instantaneous value 1 (instantaneous)

With these parameters, the points for the 2-hour case would then be
T(0)=0
T(2)=0
T(4)=1
T(6)=2

4–624
TRNSYS 18 – Mathematical Reference

T(8)=3

The values reported by TRNSYS are average values over the timestep reported at the end of the timestep
so we have:
TRNSYS Time=0, Output=0
TRNSYS Time=1,Output=0
TRNSYS Time=2,Output=0
TRNSYS Time=3,Output=0.25
TRNSYS Time=4,Output=0.75
TRNSYS Time=5,Output=1.25
TRNSYS Time=6,Output=1.75

Figure 4.11.1–6 shows the online plotter with these results.

Figure 4.11.1–6: On-line plotter for the data interpreted as instantaneous values given in 2-hour
intervals.

4–625
TRNSYS 18 – Mathematical Reference

4.11.2. Type 14: Time Dependent Forcing Functions


In a transient simulation it is sometimes convenient to employ a time-dependent forcing function that has a
behavior characterized by a repeated pattern. The purpose of this component is to provide a means of
generating a forcing function of this type. The pattern of the forcing function is established by a set of
discrete data points indicating its values at various times through one cycle. Linear interpolation is provided
in order to generate a continuous forcing function from this discrete data.

4.11.2.1. Parameter / Input / Output Reference


PARMAETERS

1 Initial value of time hr] The initial value of time for the function. If the cycle is to repeat, this
initial value of time must be set to 0.0.

2 Initial value of function [any] The value of the function at the initial value of time.

The next two parameters are cycled for as many points as are needed to define the forcing function.

3 Time at point [hr] The value of time at the specified data point.

4 Value at point [any] The value of the function at the specified data point.

OUTPUTS

1 Average value of any The average value of the function over the timestep. Since most
function TRNSYS outputs are the average value over the timestep, this is
the output that should be connected to the inputs of other
components.

2 Instantaneous value of any The instantaneous value of the function at the end of the timestep.
function over the
timestep

4.11.2.2. Simulation Summary Report Contents


MINIMUM/MAXIMUM VALUE FIELDS

Forcung Function [any] Output 1


Value

4.11.2.3. Hints and Tips


 The final value of TIME specified as one of this component’s parameters determines the cycle repeat
time. If the final value of the TIME parameter is 24 then the cycle will repeat daily. If it is 17 then a 17
hour repeating function has been defined.
 While there are numerous proformas included for Type14 they differ only in the displayed units of the
outputs. They are all functionally equivalent.
 While the instantaneous value of the function at the end of the timestep is available as one of Type14’s
outputs, users should almost always use the “average value” output as most outputs in TRNSYS
represent the average value over the time step and not an instantaneous value at the end of the time
step.

4–626
TRNSYS 18 – Mathematical Reference

 Both the instantaneous value of the forcing function are available as outputs. When step-like functions
are to be defined, it is recommended to define the function by repeating each time value with two
different values of V, and then use the average value (output(1)) in the simulation. This will guarantee
the use of the exact same profile for any value of the time step. For example, to define an occupancy
in a building between 8 AM and 5PM (occupancy is 0 at night, 1 during the day, and must change
instantly from 0 to 1 and 1 to 0):
 Define the origin (time = 0, V = 0)
 Define the time at which the occupancy starts, repeating the value 0 (time = 8, V = 0)
 Repeat the time at which the occupancy stops with the value 1 (time = 8, V = 1)
 Define the time at which the occupancy stops, repeating the value 1 (time = 17, V = 1)
 Repeat the time at which the occupancy stops with the value 1 (time = 17, V = 0)
 Define the end of the period tc (after that the cycle is repeated) (time = 24, V = 0)
 Use output(1) (average value over the time step)

4.11.2.4. Nomenclature
TIME current value of time in simulation
CT the cycle time (the time span after which the pattern repeats itself, which may be the total simulation
time)
N the number of segments defining the function (N+1 points must be specified)
V0 the initial value of the forcing function (occurs at TIME = 0, CT, 2CT, 3CT etc.)
Vi the value of the forcing function at point i
ti the elapsed time from the start of the cycle at which point i and Vi are reached
𝑉̅ the linearly interpolated average value of the function over the timestep
to the initial value of time. Must be zero if the function repeats itself. IF CT is the total simulation time,
to can be less than or equal to the initial simulation time
t the simulation timestep

4.11.2.5. Detailed Description


The cycle must be completely specified requiring that tN (tN = ti at i = N) be greater than or equal to CT.
𝑉̅ , the average value of the function, is calculated as follows:
∆𝑡
𝑡𝑐 = MOD(𝑇𝐼𝑀𝐸, 𝐶𝑇 ) − Eq. 4.11.2-1
2
i is then found satisfying ti-1 < tc < ti then:
𝑡𝑐 − 𝑡𝑖−1
𝑅= Eq. 4.11.2-2
𝑡𝑖 − 𝑡𝑖−1
𝑉̅ = 𝑉𝑖−1 + 𝑅(𝑉𝑖 − 𝑉𝑖−1 ) Eq. 4.11.2-3

4–627
TRNSYS 18 – Mathematical Reference

4.11.3. Type 21: Time Values


This component returns different time values at the current time step, such as the -current year of
simulation, current month of simulation, current day of the simulation. Type21 can give these values relative
to the initial time or in an absolute value from hour = 0.

4.11.3.1. Parameter / Input / Output Reference


PARMAETERS

1 Mode [-] This parameter is ignored; it is included to allow for backwards


compatibility in future versions.

2 Relative or absolute [-] This parameter indicates whether values are relative or absolute.
time "0" indicates absolute time while a "1" indicates values relative to
the initial time.

OUTPUTS

1 Simulation year [year] Current simulation year

2 Simulation month [month] Current simulation month.

3 Simulation day [day] Current simulation day,

4 Calendar month [month] Calendar month (1-12)

5 Day of the year [day] Day of the year (1-365)

6 Day of the month [day] Day of the month (1-30,1-31,1-28)

7 Day of the week [day] Day of the week (1-7).

8 Hour of the year [hour] Hour of the year(1-8760)

9 Hour of the month [hour] Hour of the month (1-720,1-744,1-672)

10 Hour of the week [hour] Hour of the week (1-168)

11 Hour of the day [hour] Hour of the day (1-24)

4.11.3.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.3.3. Hints and Tips


 To coincide with the TRNSYS specification of time, the values reset during the timestep after the last
hour of the segment. For example with a simulation timestep of 0.25 hour, when the simulation time is
at 24.00 hours, the hour of day value would be 24, and at simulation time 24.25 the hour of day value
would be 1.

4–628
TRNSYS 18 – Mathematical Reference

4.11.4. Type 24: Quantity Integrator


This component model is analogous to a piece of equipment in a physical system that integrates a quantity
over a period of time; for example, a kWh meter that continuously totals the amount of electrical energy
consumed. Whenever a quantity in a system simulation requires integration over the period of simulation,
the use of this component will perform the required function.

4.11.4.1. Parameter / Input / Output Reference


PARMAETERS

1 Integration period [-] The time interval over which the inputs are to be investigated. The
outputs are reset to zero after each reset time interval. If the reset
time is set to a negative value, then units of months are assumed
(if the reset time is set to -2, then the reset time will be two
months...)

2 Relative or absolute [-] This parameter controls whether the integration intervals are
time relative or absolute
0: integrate at time intervals relative to the simulation start time
1: integrate at absolute time intervals
For example, if the simulation start time is 0.5, the simulation time
step is 0.25 and the integration interval (or reset time) is 1: If this
parameter is set to 0, reset will occur at 0.5, 1.5, 2.5, etc. If this
parameter is set to 1, reset will occur at 1, 2, 3, etc.

INPUTS

The inputs are cycled based on the response to a question asked in the Simulation Studio Proforma

1 Input to be integrated [any] Leave the initial value at zero unless you wish to add a constant to
the integration results.
The constant added will be the initial value.

OUTPUTS

The outputs are cycled such that there will be one output for each input

1 Integration result [any] The result of the integration of the corresponding input. Output 1will
be the result of the integration of Input 1 with respect to time.

4.11.4.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.4.3. Hints and Tips


 Type 24 can integrate up to 500 variables and there is no specific limit on the number of Type 24 units
that can be used in a simulation.
 If a reset time of -1 is entered then Type24 will automatically reset monthly, taking into account the
different lengths of each month.

4–629
TRNSYS 18 – Mathematical Reference

4.11.4.4. Nomenclature
Xi the ith quantity or rate to be integrated
Yi the time integral of Xi

4.11.4.5. Detailed Description


This component integrates a series of quantities over a period of time. Type24 is able to reset periodically
throughout the simulation either after a specified number of hours or after each month of the year. With the
release of TRNSYS 16, Type24 was expanded so that the time between resets could be counted relative
to the start time of the simulation or in absolute time. For example, with a 1 hour reset time, relative time
resetting, and a simulation start time of 0.5, the integrator will reset at time 1.5, 2.5, 3.5, 4.5, etc. With a 1
hour reset time, absolute time resetting, and a simulation start time of 0.5, the Type24 integrator would
reset at time 1.0, 2.0, 3.0, 4.0, etc. Thus the first integration period would not be a full hour.
Type24’s outputs are, of course represented as:

𝑌𝑖 = ∫ 𝑋𝑖 𝑑𝑡 Eq. 4.11.4-1
𝑡𝑖𝑚𝑒

If a reset time of -1 is entered then Type24 will automatically reset monthly, taking into account the different
lengths of each month.

4–630
TRNSYS 18 – Mathematical Reference

4.11.5. Type 41: Forcing Function Sequencer


This component is useful for organizing daily profiles generated by Type14 forcing functions (or other
repeating functions) into a sequence that forms an annual profile. Up to 20 different schedules may be
considered for each day of a standard week. An additional set of profiles is allowed for non-standard days
throughout the year. These might represent holidays or plant shut-down schedules.

4.11.5.1. Parameter / Input / Output Reference


PARMAETERS

1 Number of profiles for [-] This parameter sets how many combined schedules (profiles)
each day Type41 will produce.

2 Input set for day 1 of [-] An index indicating which set of inputs will be set as the output for
the week the first day of each week.

3 Input set for day 2 of [-] An index indicating which set of inputs will be set as the output for
the week the second day of each week.

4 Input set for day 3 of [-] An index indicating which set of inputs will be set as the output for
the week the third day of each week.

5 Input set for day 4 of [-] An index indicating which set of inputs will be set as the output for
the week the fourth day of each week.

6 Input set for day 5 of [-] An index indicating which set of inputs will be set as the output for
the week the fifth day of each week.

7 Input set for day 6 of [-] An index indicating which set of inputs will be set as the output for
the week the sixth day of each week.

8 Input set for day 7 of [-] An index indicating which set of inputs will be set as the output for
the week the seventh day of each week.

The remaining parameters are optional

9 Number of non [-] The number of non standard days that occur during the year.
standard days

10 Input set for non- [-] An index indicating which set of inputs will be set as the output for
standard days all of the non standard days

The next parameter is cycled based on the number of non-standard days specified by parameter 9

11 Day of the year for non [-] The day of the year on which this non-standard schedule should
standard day occur.

INPUTS

1 Input to be integrated [any] Leave the initial value at zero unless you wish to add a constant to
the integration results.
The constant added will be the initial value.

4–631
TRNSYS 18 – Mathematical Reference

OUTPUTS

The outputs are cycled based on the value of parameter 1

1 Function output for [any] The value of each profile (specified as output 1) for the current day
current day of the simulation.

4.11.5.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.5.3. Hints and Tips


 There are a number of special case versions of this component set up as proformas in the Simulation
Studio

4.11.5.4. Detailed Description


Specifying an annual schedule using Type14 requires an enormous number of parameters. As an
alternative, the user can specify shorter (perhaps daily) schedules using multiple instances of Type14 and
then combine them together using Type41.
The first parameter of Type41 sets the number of combined schedules that the Type will produce. One
possibility is that a single instance of Type41 could be used to combine a set of Type14s into a service hot
water draw profile, another set of Type14s into an occupancy profile, and a third set of Type14s into a
lighting and plug load heat gain profile. In this case the value of the first parameter (referred to as Nv) would
be set to 3. A set of Nv inputs is then required for each day or set of days that has a unique set of profiles.
Parameters 2-8 identify which set of inputs are to be used for each day of the week.
As an example, suppose that it is necessary to generate schedules for lighting and electric usage for a
building.
The schedules for the weekdays differ from those on the weekend. In this case, it would be necessary to
have four Type14 forcing functions to generate daily profiles. One each for lights and electricity during the
week and one each for on weekends. The first input might be an output from the Type14 schedule for
weekday lights. The second input would then be weekday electricity. Similarly, the third and fourth inputs
would be for weekend lights and electricity.
If the first day of the year to be simulated falls on a Monday, then the first input set (Inputs 1 and 2) is used
for days 1 through 5 and the second set is used for days 6 and 7. Therefore, parameter 1 would be 2 (2
set of inputs, electricity and lighting) and parameters 2-6 would be set to 1 and parameters 7 and 8 would
be equal to 2.
It is possible to consider a different set of schedules for holidays than occur during the standard week. It is
then necessary to specify additional parameters to establish the input set to be used and the days on which
these schedules should occur. If for the previous example, an additional two schedules for lights and
electricity were provided for 9 holidays (inputs 5 and 6), then the following additional parameters (9 - 19)
would be required:
Table 4.11.5–1: Parameters for Type41

Parameter Description Parameter Value


Number

9 Number of days for non-standard profile during the year: 9

10 Number of input sets associated with non-standard set 3

4–632
TRNSYS 18 – Mathematical Reference

11 1st holiday (Day number in the year, 1st of January) 1

12 2nd holiday (Day number in the year, 15th of February) 46

13 3rd holiday (31st of May) 151

14 4th holiday (4th of July) 185

etc…

19 9th holiday (25th of December) 359

4–633
TRNSYS 18 – Mathematical Reference

4.11.6. Type 42: Linear Interpolation


This component models is the same as the Type42 mentioned in the HVAC library. Fundamentally, this
component passes between 1 and 3 independent variable values into a routine that interpolates between
those values and returns between 1 and 5 dependent variable values. While the component can be used
to model HVAC equipment, it can equally well be used for other purposes in which multidimensinonal
interpolation is needed.

4.11.6.1. Parameter/Input/Output Description


PARMAETERS

1 Logical unit [-] The logical unit number of the file containing data. Every
external file that TRNSYS reads to or writes from must be
assigned a unique integer (logical unit number) in the TRNSYS
input file. Simulation Studio assigns this number automatically

2 Number of [-] The number of independent variables on which the interpolation


independent variables is depends.

3 Number of dependent [-] The number of dependent variables to be read from the external
variables data file.

4 Number of values of [-] The number of values of the first independent variable for which
the 1st independent data is supplied in the external file. NOTE: These values should
variable be entered in the 3rd line of the data file.

The next parameter is only needed if the data file contains values for more than one independent variable. In other
words if the dependent values depend on two or more variables.

5 Number of values of [-] The number of values of the second independent variable for
the 2nd independent which data is supplied in the external file. NOTE: These values
variable should be entered in the 2nd line of the data file.

The next parameter is only needed if the data file contains values for more than two independent variables. In
other words if the dependent values depend on three variables.

6 Number of values of [-] The number of values of the third independent variable for which
the 3rd independent data is supplied in the external file. NOTE: These values should
variable be entered in the 1st line of the data file.

INPUTS

1 Control function [0/1] The control function for the interpolation. The outputs from this
component are simply the interpolated values from the data file
multiplied by this control function.

2 First independent [any] The value of the first independent variable on which the
variable value interpolated values depend. This is the independent variable
whose values are located in the 3rd line of the external data file.

3 Second independent [any] The value of the second independent variable on which the
variable value interpolated values depend. This is the independent variable
whose values are located in the 2nd line of the external data file.

4–634
TRNSYS 18 – Mathematical Reference

4 Third independent [any] The value of the third independent variable on which the
variable value interpolated values depend. This is the independent variable
whose values are located in the 1st line of the external data file.

OUTPUTS

The outputs are cycled based on the value of parameter 3

1 Independent variable [any] The value of the specified dependent variable.


value

4.11.6.1. Simulation Summary Report Contents


VALUE FIELDS

Number of [-] The value of parameter 2


independent variables

Number of dependent [-] The value of parameter 3


variables

INTEGRATED VALUE FIELDS

One integrated value will be reported for each dependent variable in the data file.

Dependent variable [-] The integrated value of each dependent variable over the course of the
value simulation

MINIMUM/MAXIMUM VALUE FIELDS

One min/max value will be reported for each dependent variable in the data file.

Dependent variable [0..1] The minimum and maximum value of each dependent variable over the
value course of the simulation

One min/max value will be reported for each independent variable in the data file.

Independent variable [V] The minimum and maximum value of each independent variable over
value the course of the simulation

4.11.6.2. Detailed Description


The data is read and interpolated using the TRNSYS InterpolateData() subroutine. The data should be
provided in a file accessed through a Fortran logical unit. Data values for each dependent variable are
required for each combination of independent variable values specified. Examples using Type 42 for one,
two, and three independent variables follow:
Residential Heat Pump
The performance of an ambient source heat pump is primarily a function of the outdoor air temperature.
Suppose one wished to use Type 42 to determine heating capacity, energy absorbed by the evaporator,
and COP as a function of ambient temperature. In this case, there is a single independent variable (ambient
temperature) and three dependent variables (capacity, absorbed energy, and COP). The first N X1 numbers
in the data file must be values of ambient temperature in increasing order. Next are the values of capacity,

4–635
TRNSYS 18 – Mathematical Reference

energy absorbed, and COP at the lowest ambient temperature, followed by their values at the next air
temperature, and so on. The first input is the control signal and the second input is the current ambient
temperature. The first three outputs will be values of capacity, energy absorbed, and COP at the current
ambient temperature multiplied by the control signal. The data file might look like the following. Please note
that the data below is NOT realistic but is meant simply to give the user an idea of the format of the required
data file.
10 15 20 30 ! [C] values of ambient temperature
10000 8000 3.0 ! values of capacity [kJ/h] energy absorbed [kJ/h] and COP [-] at 10C
12000 9000 3.0 ! values of capacity [kJ/h] energy absorbed [kJ/h] and COP [-] at 15C
14000 10000 3.0 ! values of capacity [kJ/h] energy absorbed [kJ/h] and COP [-] at 20C
16000 11000 3.0 ! values of capacity [kJ/h] energy absorbed [kJ/h] and COP [-] at 30C
Air Conditioner
This example describes the use of the Type 42 to determine cooling capacity and COP of an air conditioner
in terms of ambient temperature and relative humidity. Both the numbers of independent and dependent
variables are two. Consider ambient temperature to be the primary independent variable. It is necessary to
supply capacity and COP versus ambient temperature data for different values of relative humidity. The
first NX2 numbers in the data file are the increasing values of relative humidity for which capacity and COP
versus temperature data is provided. The next NX1 values are increasing ambient temperatures at which
capacity and COP data are evaluated. Values of capacity and COP at the corresponding temperatures at
the lowest value of relative humidity are next, followed by capacity and COP values at these same
temperatures, at the next relative humidity and so on. The first input is the control signal and the second
and third inputs should be the current values of the ambient temperature and relative humidity. The first two
outputs are the values of capacity and COP at the current conditions multiplied by the control function. The
data file format in this case might look like the following (again, the values are NOT realistic)
25 50 75 ! [%] values of ambient relative humidity
10 15 20 30 ! [C] values of ambient temperature
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 25% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 25% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 25% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 25% RH and 30C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 50% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 50% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 50% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 50% RH and 30C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 75% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 75% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 75% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 75% RH and 30C
Chemical (Absorption) Heat Pump
The steady-state capacity and COP of an absorption heat pump may be characterized in terms of the
energy input rate to the generator, the evaporator fluid inlet temperature, and the condenser fluid inlet
temperature. In this case, there are three independent and two dependent variables. Consider the generator
energy as the primary independent variable and the evaporator and condenser inlet temperatures as the
secondary and tertiary independent variables, respectively. It is necessary to provide N X3 X NX2 sets of
capacity and COP data versus generator input energy. The first NX3 numbers in the data file are increasing
values of condenser inlet temperature. These are followed by N X2 values of increasing evaporator
temperature and NX1 values of increasing generator input energy. Values of capacity and COP for each
value of generator input at the lowest evaporator and condenser temperatures are next.
A set of these performance numbers is required for each evaporator temperature, still at the lowest
condenser temperature. This sequence of data entry is repeated for each value of condenser temperature.
The first input is the control signal and the current energy input to the generator, evaporator inlet
temperature, and condenser inlet temperature are the second, third, and fourth inputs to this component.

4–636
TRNSYS 18 – Mathematical Reference

The first two outputs are the products of the control function and the capacity and COP. The data file format
in this case might look like the following (again, the values are NOT realistic)
500 1000 ! [kg/h] values of air flow rate
25 50 75 ! [%] values of ambient relative humidity
10 15 20 30 ! [C] values of ambient temperature
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 25% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 25% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 25% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 25% RH and 30C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 50% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 50% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 50% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 50% RH and 30C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 75% RH and 10C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 75% RH and 15C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 75% RH and 20C
10000 3.0 ! values of capacity [kJ/h] and COP [-] at 500 kg/h, 75% RH and 30C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 25% RH and 10C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 25% RH and 15C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 25% RH and 20C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 25% RH and 30C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 50% RH and 10C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 50% RH and 15C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 50% RH and 20C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 50% RH and 30C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 75% RH and 10C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 75% RH and 15C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 75% RH and 20C
20000 2.0 ! values of capacity [kJ/h] and COP [-] at 1000 kg/h, 75% RH and 30C

4–637
TRNSYS 18 – Mathematical Reference

4.11.7. Type 55: Periodic Integrator and Statistics


During a transient simulation, it is often desirable to know some basic statistics of an input over a specified
time range. This component calculates the count, mean, sample standard deviation, sum of squares,
variance, minimum, time at which the minimum occurs, maximum, and time at which the maximum occurs
of up to ten Inputs over a range of time periods specified by the user. In addition, the component will
calculate the integral of the input with respect to time or alternatively, the sum of the Input over the specified
time range. This component has no physical counterpart in actual hardware but is included in the
information flow diagram like any other component.
What makes this component especially useful is its ability to perform periodic summaries over a large
number of user-specified time ranges. For example, with this component it is possible to determine the
mean monthly value of solar radiation on a tilted surface from 8:00 a.m. to 9:00 a.m. Another example
where this component would provide useful might be the determination of the annual compressor power
used by a refrigeration system from 5:00 p.m. Friday to midnight Sunday.
For each Input (up to 10), the user must specify whether the Input should be integrated or summed, the
starting time of the day for the periodic summary, the length of time for each period of the summary, the
repeat time between summary periods, the reset time of the summary, and the absolute start and stop
times for the summary.

4.11.7.1. Parameter / Input / Output Reference


PARMAETERS

The parameters are cycled based on the number of inputs to be assessed (1-10)

1 Integrate or sum? [-] This parameter indicates to the periodic integrator component
whether this input should integrated with respect to time or
summed over the period of interest. If the input is to be integrated
set this parameter equal to the input number. If the input is to be
summed instead, set this parameter to the negative of the input
number. For example, if the first input is to be summed over the
time period and the second input is to be integrated with respect to
time, parameter 1 should be set to -1 and parameter 8 should be
set to 2.

2 Relative starting hour [hr] The relative starting hour of the period for the specified input
(referenced to midnight).
For example, if the simulation start time is set to 0, and this
parameter is set to 8, the periodic summary for this input will begin
at 8:00 am, not 9:00 am.
Example: The first input is to be investigated between 8 am and 10
am every day with monthly results expected for March and April.
Answer: the value of this parameter should be 8

3 Duration [hr] The length of time for which the specified input is to be evaluated
after the relative starting hour is reached. By specifying a value of -
1 for this parameter, the summary period will run from the starting
hour to the end of the month.
Example: The first input is to be investigated between 8 am and 10
am every day with results expected for March and April.
Answer: the value of this parameter should be 2

4–638
TRNSYS 18 – Mathematical Reference

4 Cycle repeat time [hr] The number of hours between the start of consecutive summary
periods for the specified input. Specifying a value of -1 indicates to
the component that the cycles should repeat monthly.
Example: The first input is to be evaluated between 8 am and 10
am every day with monthly results expected for March and April.
Answer: the value of this parameter should be 24

5 Reset time [hr] The time interval over which the specified input is to be
investigated before the outputs are reset to zero. Specifing a value
of -1 for this parameter indicates that the outputs are to be reset at
the end of each month.
Example: An input is to be investigated between 8 am and 10 am
every day with results expected for March and April
Answer: the value of this parameter should be -1 (monthly reset)

6 Absolute starting hour [hr] The absolute starting hour for the periodic summary. This feature
allows the periodic integrator to skip times at which no information
is desired for this input. For example, an input is to be investigated
only in December of an annual simulation. By setting this
parameter to the first hour in December, significant calculation time
is saved. Be careful to have the absolute starting time less than the
first hour of the year for which this input is to be investigated.

7 Absolute stopping hour [hr] The absolute stopping hour for the specified input. This parameter
allows the periodic integrator routine to skip times when no
summary information is desired for this input. For example, periodic
information is only desired for January of an annual simulation. By
setting this parameter to the last hour of January, significant
calculation time can be saved. Be sure to set this parameter
greater than the last hour for which summary information is
desired.

INPUTS

The inputs are cycled based on the number of values to be assessed (1-10)

1 Input value [any] The input to be evaluated over the period specified by parameters:
1+(i-1)*7 through 7+(i-1)*7.
Make sure to integrate a rate and sum a quantity!

OUTPUTS

The outputs are cycled based on the number of values to be assessed (1-10)

1 Integral [any] The integral of the specified input with respect to time over the
period specified by the parameter list.

2 Count [-] The number of times the specified input was evaluated over the
period specified by the parameter list.

3 Mean value [any] The average value of the specified input over the time period.
Mean = Sum of Input/Count

4–639
TRNSYS 18 – Mathematical Reference

4 Standard deviation [any] The sample standard deviation for the specified input over the time
period. The lower the standard deviation, the closer the inputs are
grouped around the mean.
SSD = ((Sum of (Input - Mean)^2)/(Count-1))^0.5

5 Variance [any] The variance of the specified input over the time period. The lower
the variance, the closer the inputs are grouped around the mean.
Variance = Sample Standard Deviation ^ 2

6 Sum of squares [any] The sum of squares of the specified input over the time period. The
sum of squares of an input is a measure of how closely the inputs
are grouped around the mean. The lower the SSQ, the closer the
inputs are grouped around the mean.
SSQ = Sum of (Inputs - Mean)^2

7 Minimum value [any] The minimum value of the specified input occurring in the specified
time period.

8 Time of minimum value [hr] The hour of the year during which the minimum value of the
specified input occurred in the time period.

9 Maximum value [any] The maximum value of the specified input occurring in the time
period.

10 Time of maximum [hr] The hour of the year at which the maximum value of the specified
value input occurred during the time period.

4.11.7.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.7.3. Hints and Tips


 Up to 10 Inputs may be specified for the summary.
 The required number of Parameters is equal to the number of Inputs supplied multiplied by seven.
 The number of Outputs is equal to the number of Inputs multiplied by ten.
 Outputs 1,11,21.... are either the integral of Input i with respect to time, or the summation of Input i
over the specified time range. Care must be taken to choose the correct method of evaluating the
Input.

4.11.7.4. Nomenclature
Lengthi duration of period for Input i (hours)
Maxi maximum value of Input i over the time range
Meani mean value of Input i
Mini minimum value of Input i over the time range
Ni number of values of Input i per reset time
Repeati time interval between periods for Input i (hours)
Reseti time interval over which Input i should be investigated (hours)
Starti absolute starting time for summary of Input i (hour of year)
SSDi sample standard deviation of Input i

4–640
TRNSYS 18 – Mathematical Reference

SSQi sum of squares of Input i


Stopi absolute stopping time for summary of Input i (hour of year)
Toni relative starting hour of period for each summary of Input i
VALi variable taking either the value of the Input or 0
Vari variance of Input i over time period of interest
Yi integral or sum of Input i over time period of interest
t simulation timestep

4.11.7.5. Detailed Description


The user has the option of specifying whether Input i should be integrated or summed over the periods of
interest. If the Input is to be integrated, the following formulation applies:
𝑠𝑡𝑜𝑝𝑖
𝑌𝑖 = ∫ 𝑉𝐴𝐿𝑖 𝑑𝑡 Eq. 4.11.7-1
𝑠𝑡𝑎𝑟𝑡𝑖

If instead the Input is to be summed over the periods of interest:


𝑠𝑡𝑜𝑝𝑖

𝑌𝑖 = ∑ 𝑉𝐴𝐿𝑖 Eq. 4.11.7-2


𝑠𝑡𝑎𝑟𝑡𝑖

where:
VALi = INPUTi if [Toni + n (Repeati)]  TIME  [Toni + lengthi n (Repeati)] n = 0,1,2,3…
VALi = 0 otherwise
The total number of values of Input i to be evaluated per reset time is defined as the count of Input i. For
the periodic integrator, the count of Input i may be expressed as:
𝐿𝑒𝑛𝑔𝑡ℎ𝑖 (ℎ𝑟𝑠) 𝑅𝑒𝑠𝑒𝑡𝑖 (ℎ𝑟𝑠)
𝑁𝑖 = ( )( ) Eq. 4.11.7-3
∆𝑡(ℎ𝑟𝑠) 𝑅𝑒𝑝𝑒𝑎𝑡𝑖 (ℎ𝑟𝑠)
The mean value of Input i is defined as the average value of Input i over the period of interest:
𝑆𝑡𝑜𝑝
∑𝑠𝑡𝑎𝑟𝑡𝑖𝑖 𝑉𝐴𝐿𝑖
𝑀𝑒𝑎𝑛𝑖 = Eq. 4.11.7-4
𝑁𝑖
To determine how the Inputs of i deviate from the mean value of Input i, the standard deviation of Input i is
calculated. The standard deviation of Input i is a measure of the degree to which the values of Input i vary
from the average value of Input i. The lower the standard deviation, the closer the values of Input i are
grouped around the mean.
The periodic integrator calculates the sample standard deviation (SSD) of Input i over the time period:
𝑠𝑡𝑜𝑝
∑𝑠𝑡𝑎𝑟𝑡𝑖 (𝑉𝐴𝐿𝑖 − 𝑀𝑒𝑎𝑛𝑖 )2
𝑆𝑆𝐷𝑖 = √ 𝑖 Eq. 4.11.7-5
𝑁𝑖 − 1
Another measure of the degree to which Input i is grouped around the mean value of Input i is the variance.
The variance is the summation of the squares of the difference between Input i and the mean value of Input
i. Similar to the standard deviation, the lower the variance, the less the individual values of Input i vary from
the mean. A lower value of variance also implies that the mean is a more reliable estimate of the entire
sample:
𝑠𝑡𝑜𝑝
∑𝑠𝑡𝑎𝑟𝑡𝑖 𝑖(𝑉𝐴𝐿𝑖 − 𝑀𝑒𝑎𝑛𝑖 )2
𝑉𝐴𝑅𝑖 = Eq. 4.11.7-6
𝑁𝑖 − 1
Note: The variance is simply the square of the sample standard deviation.

4–641
TRNSYS 18 – Mathematical Reference

The summation of the squares of Input i, another measure of the deviation of Input i from its mean, is also
kept by the periodic integrator and defined as:
𝑠𝑡𝑜𝑝𝑖

𝑆𝑆𝑄𝑖 = ∑ (𝑉𝐴𝐿𝑖 − 𝑀𝑒𝑎𝑛𝑖 )2 Eq. 4.11.7-7


𝑠𝑡𝑎𝑟𝑡𝑖

4–642
TRNSYS 18 – Mathematical Reference

4.11.8. Type 57: Unit Conversion


Type57 provides a way to perform unit conversion inside a TRNSYS input file or project. Users must
describe the incoming variable type and units (temperature and °C for example) and the desired output
variable units (°F for example) using tables provided at the end of this component description. The
conversion routine checks the input to make sure it is of the correct variable type and units, performs the
unit conversion, and provides the new output type and units to all units depending on this output.
The conversion routine can also be used to assign a variable type and units to an equation or constant
name previously undescribed. The equation can now be passed to other components with the variable type
and units known. Care should be taken when specifying the variable type of the equation or constant since
input/output checking is not available for constants and equations (see Volume 07-ProgrammersGuide).

4.11.8.1. Parameter / Input / Output Reference


PARMAETERS

The parameters are cycled based on the number of values whose units are to be converted

1 Table number for input [-] The table number corresponding to the dimension of the specified
input. Refer to section 4.11.8.6 for additional details.
Temperature=1; Length=2; Area=3; Volume=4; Specific Volume=5;
Velocity=6; Mass=7; Density=8; Force=9; Pressure=10;
Energy=11; Power=12; Specific Energy=13 (h,u); Specific
Heat=14; Flowrate=15; Volumetric Flowrate=16; Flux=17; Thermal
Conductivity=18; Heat Transfer Coeff.=19; Dynamic Viscosity=20;
Kinematic Viscosity=21; Misc.=22

2 ID number from table [-] The number corresponding to the units of the specified inputs from
for input the table specified in the previous parameter. Refer to section
4.11.8.6 for additional details.

3 ID number from table [-] The identification number corresponding to the desired output units
for output from the table specified two parameters previous.

INPUTS

The inputs are cycled based on the number of values whose units are to be converted

1 Input value [any] The specified input that it to have its units converted according to
parameters:

OUTPUTS

The outputs are cycled based on the number of values whose units are to be converted

1 Output value [any] Output i is equal to input i after the unit conversion process.

4.11.8.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4–643
TRNSYS 18 – Mathematical Reference

4.11.8.3. Hints and Tips


 Users may add their own unit conversions and/or types to the Type57 routine by adding to the file
units.lab (located in %TRNSYS18%\Exe), keeping the same format as that supplied. If a new variable
type is added to the units.lab file, the Type57 source code must be changed as follows to accept this
new type: 1. Redimension the Type variable, 2. Provide the two-letter designation of the variable type
to the Type data statement.
 The required number of Parameters is equal to the number of Inputs supplied multiplied by three.
 The number of Outputs is equal to the number of Inputs.
 The maximum number of inputs per instance of Type57 is set to 20.

4.11.8.4. Nomenclature
ai addition factor for converting input units to standard units
ao addition factor for converting standard units to desired output units
mi multiplication factor for converting input units to standard units
mo multiplication factor for converting standard units to output units
Ntable,i table number corresponding to input variable type
Vin,i variable type number specifying units of input variable from specified table
Vout,i variable type number specifying desired units of output variable from specified table
Xst input variable after conversion to standard units
Xi ith input variable
Yi output variable after conversion to desired output units

4.11.8.5. Detailed Description


The steps to convert an input type to an output type are summarized below:
1) Input variable type read from parameter list (Ntable,i)
2) Input units specifier read from parameter list (Vin,i)
3) Multiplication and addition factors for input variable read from file Units.lab (m i and ai
respectively)

4) Conversion from input units to standard units:


Xst = (Xi - ai) / mi
5) Desired output units specifier read from parameter list (Vout,i)
6) Multiplication and addition factors for desired output variable read from file Units.lab (m o
and ao respectively)
7) Conversion from standard units to desired output units:
Yi = Xst * mo + ao

4.11.8.6. Unit Conversion Tables


Table 4.11.8–1: TABLE #1: TEMPERATURE

VAR. TYPE # VAR. UNITS VAR.TYPE MULT. FACTOR ADD. FACTOR


1 °C TE1 1.0 0
2 °F TE2 1.8 32
3 K TE3 1.0 273.15

4–644
TRNSYS 18 – Mathematical Reference

4 R TE4 1.8 492

Table 4.11.8–2: TABLE #2: LENGTH

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 m LE1 1 0
2 cm LE2 100 0
3 km LE3 1000 0
4 in LE4 39.3701 0
5 ft LE5 3.28084 0
6 miles LE6 6.21371 E-04 0

Table 4.11.8–3: TABLE #3: AREA

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 m2 AR1 1 0
2 cm2 AR2 1 E+04 0
3 km2 AR3 1 E-06 0
4 in2 AR4 1550 0
5 ft2 AR5 10.7639 0
6 mi2 AR6 3.86102 E-07 0

Table 4.11.8–4: TABLE #4: VOLUME

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 m3 VL1 1 0
2 l VL2 1000 0
3 ml VL3 1 E+06 0
4 in3 VL4 6.10237 E+04 0
5 ft3 VL5 35.3147 0
6 gal VL6 264.172 0

Table 4.11.8–5: TABLE #5: SPECIFIC VOLUME

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 m3/kg SV1 1 0
2 l/kg SV2 1000 0
3 ft3/lbm SV3 16.0185 0
4 in3/lbm SV4 2.76799 E+04 0

Table 4.11.8–6: TABLE #6: VELOCITY

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 m/s VE1 1.0 0
2 km/hr VE2 3.6 0
3 ft/s VE3 3.28084 0
4 ft/min VE4 196.85 0
5 mph VE5 2.23694 0

Table 4.11.8–7: TABLE #7: MASS

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 kg MA1 1 0

4–645
TRNSYS 18 – Mathematical Reference

2 g MA2 1000 0
3 lbm MA3 2.20462 0
4 ounces MA4 35.274 0
5 ton MA5 1.10231 E-03 0

Table 4.11.8–8: TABLE #8: DENSITY

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 kg/m3 DN1 1.0 0
2 kg/l DN2 0.001 0
3 lbm/ft3 DN3 6.2428 E-02 0
4 lbm/gal DN4 8.3454 E-03 0

Table 4.11.8–9: TABLE #9: FORCE

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 N FR1 1.0 0
2 lbf FR2 0.224809 0
3 ounce FR3 3.59694 0

Table 4.11.8–10: TABLE #10: PRESSURE

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 BAR PR1 1 0
2 kPa PR2 100 0
3 Pa PR3 1 E+05 0
4 ATM PR4 0.986923 0
5 psi PR5 14.5038 0
6 lbf/ft2 PR6 2.08854 E+03 0
7 in. H2O PR7 401.463 0
8 in. Hg PR8 29.53 0

Table 4.11.8–11: TABLE #11: ENERGY

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 kJ EN1 1 0
2 kWh EN2 2.77778 E-04 0
3 Cal EN3 238.846 0
4 ft-lbf EN4 737.562 0
5 hp-hr EN5 3.72506 E-04 0
6 BTU EN6 0.947817 0

Table 4.11.8–12: TABLE #12: POWER

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 kJ/hr PW1 1 0
2 W PW2 0.277778 0
3 kW PW3 2.77778 E-04 0
4 hp PW4 3.72505 E-04 0
5 BTU/hr PW5 0.947817 0
6 BTU/min PW6 1.57969 E-02 0
7 Tons PW7 7.89847 E-05 0

4–646
TRNSYS 18 – Mathematical Reference

Table 4.11.8–13: TABLE #13: SPECIFIC ENERGY

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 kJ/kg SE1 1 0
2 BTU/lbm SE2 0.429923 0
3 ft-lbf/lbm SE3 334.553 0

Table 4.11.8–14: TABLE #14: SPECIFIC HEAT

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 kJ/kg-K CP1 1 0
2 W-hr/kg-K CP2 0.277778 0
3 BTU/lbm-R CP3 0.238846 0
Table 4.11.8–15: TABLE #15: FLOW RATE

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 kg/hr MF1 1 0
2 kg/s MF2 2.77778 E-04 0
3 lbm/hr MF3 2.20462 0
4 lbm/s MF4 6.12395 E-04 0

Table 4.11.8–16: TABLE #16: VOLUMETRIC FLOW RATE

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 m3/hr VF1 1 0
2 m3/s VF2 2.77778 E-04 0
3 l/hr VF3 1000 0
4 l/s VF4 0.277778 0
5 ft3/s VF5 9.80958 E-03 0
6 ft3/hr VF6 35.3144 0
7 gpm VF7 4.40286 0

Table 4.11.8–17: TABLE #17: FLUX

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 kJ/hr-m2 IR1 1 0
2 W/m2 IR2 0.277778 0
3 BTU/hr-ft2 IR3 8.8055 E-02 0

Table 4.11.8–18: TABLE #18: THERMAL CONDUCTIVITY

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 kJ/hr-m-K KT1 1 0
2 W/m-K KT2 0.277778 0
3 BTU/hr-ft-R KT3 0.160497 0

Table 4.11.8–19: TABLE #19: HEAT TRANSFER COEFFICIENTS

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 kJ/hr-m2-K HT1 1 0
2 W/m2-K HT2 0.277778 0
3 BTU/hr-ft2-R HT3 4.89194 E-02 0

4–647
TRNSYS 18 – Mathematical Reference

Table 4.11.8–20: TABLE #20: DYNAMIC VISCOSITY

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 N-s/m2 VS1 1 0
2 kg/m-s VS2 1 0
3 poise VS3 10 0
4 lbf-s/ft2 VS4 2.08854 E-02 0
5 lbf-hr/ft2 VS5 5.80151 E-06 0
6 lbm/ft-hr VS6 2419.08 0
Table 4.11.8–21: TABLE #21: KINEMATIC VISCOSITY

VAR. TYPE # VAR. UNITS VAR. TYPE MULT. FACTOR ADD. FACTOR
1 m2/s KV1 1 0
2 m2/hr KV2 3600 0
3 ft2/s KV3 10.7639 0
4 ft2/hr KV4 3.87501 E+04 0

Table 4.11.8–22: MISCELLANEOUS

VAR. TYPE
Dimensionless DM1
Degrees DG1
Percentage PC1
Month MN1
Day DY1
Hour TD1
Control function CF1

4–648
TRNSYS 18 – Mathematical Reference

4.11.9. Type 62: Calling External Programs: Excel™


Type62 (Calling External Programs – ExcelTM) was originally programmed by Jochen Wriske and Markus
Oertker at the Lehrstuhl für Technische Thermodynamik, RWTH Aachen.
This component allows the user to develop a model in an Excel TM spreadsheet and to have TRNSYS call
Excel and execute the spreadsheet at each simulation timestep and iteration. The Excel TM spreadsheet
must have a Visual Basic macro script embedded in it so it is necessary to enable macros in Excel in order
to use Type62. Two examples of using Type62 are provided and it is recommended that the user start
developing their spreadsheet using one of the spreadsheets from those two examples as they already have
a working VB macro built in to them.

4.11.9.1. Parameter / Input / Output Reference


PARMAETERS

1 Mode [-] This parameter is reserved for future use

2 Number of inputs [-] The number of input values that are expected by the Excel
spreadsheet and VB macro. The cells in the spreadsheet should be
named Input1 to InputN (where N is the value of parameter 2)

3 Number of outputs [-] The number of output values that will be passwed back to TRNSYS
by the Excel spreadsheet and VB macro. The cells in the
spreadsheet should be named Output1 to OutputN (where N is the
value of parameter 3)

4 Show Excel [0/1] Set this parameter to 1 if you want Excel to be visible during the
simulation. If this parameter is set to 0, Excel will run hidden in the
background.

INPUTS

The inputs are cycled based on the value of parameter 2

1 Input value [any] The value of each input to be sent to Excel

OUTPUTS

The outputs are cycled based on the value of parameter 3

1 Output value [any] The value of each output returned by Excel.

4.11.9.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.9.3. Hints and Tips


 It is recommended that users start by verifying that one of the examples of TRNSYS calling Excel
operates on their computer then continue by copying the example and editing the Excel spreadsheet.
It can be difficult to develop a correctly working VB macro in Excel from scratch; modifying the existing
macro is a less error-prone process
 Up to 30 Type62 units can be used in one simulation.

4–649
TRNSYS 18 – Mathematical Reference

 Type62 is coded to accept up to 15 inputs and 15 outputs. This number can be increased by modifying
the Type62 Fortran code, recompiling it, and relinking the TRNSYS dll (TRNDll).

4.11.9.4. Detailed Description


Type 62 implements a link with ExcelTM. The Fortran routine communicates with Excel TM through a
Component Object Model (COM) interface for fast data transfer. The Excel TM spreadsheet must have a
Visual Basic macro script embedded in it so it is necessary to enable macros in Excel in order to use Type
62. Normally, Excel is set up in such a way as to automatically disable macros since they can pose a
security threat.
By default, up to 15 inputs are sent to Excel. The “15-input” limit can be increased by recompiling Type62
and relinking the TRNDll. The inputs are transferred to cells in the ExcelTM worksheet that are named Inp_1,
Inp_2, … , Inp_15. You must name the cells in your ExcelTM file (use CTRL-F3 for a shortcut).
In Excel, Outputs are calculated from the inputs using standard functions or advanced VBA macros. Please
see the examples provided in "%TRNSYS18%\Examples\Calling Excel\". When developing a new
simulation that implements Type 62, it is advisable to copy one of the existing example Excel TM files
because they both already have the VBA script needed for communicating with TRNSYS embedded in
them. Note also that if you do use the exsiting VBA script, the names of the variables referenced in the
script and the names of the cells to which they refer must match. For example, the VBA script refers to the
15 possible input variables as Inp_1, Inp_2,…Inp_15. As a result, the names that you choose for your cells
when working in the Name Manager must also be Inp_1, Inp_2, etc. You are not obligated to choose the
naming form Inp_xx; you can choose whatever name you like but make sure that the names in the VBA
script and the names of the cells match each other.
The path and filename of your ExcelTM file are provided in a LABEL statement. Type 62 will understand the
following kind of pathnames:
 Relative to the deck (default if no path is specified)
E.g. "My Excel File.xls"
 Absolute (if the path starts with "\" or if the second character is ":")
E.g. "C:\Trnsys17\Examples\Data Files\Type62-CallingExcel.xls"
 Relative to the TRNSYS root directory (if the path starts with ".\")
E.g. ".\Examples\Data Files\Type62-CallingExcel.xls", which is equivalent to the second example here
above if TRNSYS is installed in "C:\Trnsys17"

4–650
TRNSYS 18 – Mathematical Reference

4.11.10. Type 66: Calling External Programs: Engineering


Equation Solver (EES)
Engineering Equation Solver (EES) [1], is a non-linear equation solver that can be used to solve sets of
equations without resorting to programming languages such as FORTRAN or C++. The advantage of EES
is that equations are written in an algebraic format instead of in a programming language format. In its more
recent versions (since 1998) EES supports Dynamic Data Exchange commands in order to exchange
information with other programs. Dynamic Data Exchange (DDE) is a method of sending messages to other
programs through the Microsoft Windows operating system. DDE is supported by many programs including
the applications within Microsoft Office. Type66 makes use of DDE commands to launch EES, pass
parameter and Input information to EES, ask EES to solve, and recuperate output information, which is
then treated like output from any other TRNSYS component.
Type66 requires the EES Professional version because it makes use of the DDE (Dynamic Data Exchange)
capability, which is only included with the Professional version. Contact your EES distributor to obtain a
Professional version.

4.11.10.1. Parameter/Input/Output Reference


PARMAETERS

1 Input mode [-] This parameter specifies how the EES model will be called. If set to
1, the EES model will be called at every time step and at every
iteration. If set to 2, the first input is a control signal. The first input
will not be sent to EES. Please refer to parameter 2 for information
on the various ways that outputs can be treated in Input mode 2.

2 Control mode [-] This parameter is only used in Input mode 2 (parameter 1 set to 2).
In Input mode 2, the first input is not sent to EES but is a control
signal. When that control signal is set to 0, the EES model will not
be called. This parameter determines how outputs will be treated
when the EES model is not called.
1: outputs are set to 0 if Input Mode is 2 and the first input is 0
2: outputs are set to predefined (parameter) values if Input Mode is
2 and the first input is 0
3: output values are held from the previous time step if Input Mode
is 2 and the first input is 0

3 Allowable wait [s] The allowable amount of time that TRNSYS will allow EES before
deciding that EES is non responsive. (Not implemented yet)

4 Number of outputs [-] The number of outputs that EES will be returning.

INPUTS

The inputs are cycled based on the answer to a question in the Studio proforma

1 Input value [any] The value of each input to be sent to EES

OUTPUTS

The outputs are cycled based on the value of parameter 4

4–651
TRNSYS 18 – Mathematical Reference

1 Output value [any] The value of each output returned by EES.

4.11.10.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.10.3. Hints and Tips


 Some users have reported that adding the /c flag to the EES file directly following the $Export
command is helpful in the EES/TRNSYS communication. While not strictly required, the /c flag clears
the clipboard (a Windows® construct by which information is passed between TRNSYS and EES) and
makes it less likely that TRNSYS/EES communication will be interrupted during the simulation. The
syntax is: $ EXPORT /c 'CLIPBOARD' (comma separated list of output variables)
 Some users have also reported that adding the /d flag to the EES file directly following the $Export
command is helpful in the EES/TRNSYS communication. As with /c, /d is not required. The /d flag
outputs the data in the same format as in the solutions window. In other words, it removes the scientific
notation and uses decimal output instead. The syntax is: $EXPORT /d 'CLIPBOARD' (comma
separated list of output variables)
 The EES help manual lists a number of additional modifiers under the $EXPORT directive.

4.11.10.4. Detailed Description


THE EES FILE
The first step in using Type66 is to develop the mathematics of the component in EES. Unfortunately, there
are a number of features in EES that cannot be used directly from TRNSYS and Type66; parametric tables
and diagram windows stand out as examples. What TRNSYS can easily access are blocks of simultaneous
equations, procedures, functions, etc. Since the communication process is best illustrated with an example,
the following shows a simple air compressor model written to be solved by EES. The EES file is set up to
use temperatures in Kelvin and pressure in Pascals.
m_dot = m_dot_TRNSYS*convert(kg/hr,kg/s)
p_1 = p_1_TRNSYS*convert(atm,Pa)
p_2 = p2_TRNSYS*convert(atm,Pa)
T_1 = convertTemp(C,K,T1_TRNSYS)
w1 = w1_TRNSYS

"! Compressor performance"


"calculate specific heat of air"
C_p = SPECHEAT(AirH2O,T=T_1,P=p_1,w=w1)
"pressure ratio"
r_p = p_2/p_1
"calculate isothermal work"
W_isothermal = m_dot*R*T_1*ln(p_2/p_1)
"calculate actual work"
W_actual = m_dot*(n/(n-1))*R*T_1*((p_2/p_1)^((n-1)/n)-1)
"calculate isothermal efficiency"
eta_isothermal = W_isothermal/W_actual
"calculate outlet temperature"
T_2 = T_1*r_p^((n-1)/n)
"calculate heat transferred"
Q = m_dot*c_p*(T_2-T_1) - W_actual

"! TRNSYS outputs"


out1 = p_2*convert(Pa,atm)

4–652
TRNSYS 18 – Mathematical Reference

out2 = convertTemp(K,C,T_2)
out3= eta_isothermal
out4 = Q*convert(kJ/s,MJ/hr)
out5 = W_actual*convert(kJ/s,MJ/hr)
out6 = W_isothermal*convert(kJ/s,MJ/hr)
To this point there is nothing special about the EES file; nothing has been written in a specialized format
for TRNSYS’s sake. The output variable labels out1, out2, etc. are simply variable names. The only slightly
unusual feature of the EES file is that there are a number of “convert” statements included to take the units
of the various Input variables provided by TRNSYS and change them into the units expected by EES based
on the EES file’s settings. On the output side, a number of unit conversions are included to put the variables
back into TRNSYS’s system of units.
Once the EES model has been developed, two statements are added, one before the EES model equations
and one afterwards. These are the DDE statements that tell EES to get the Input variables from the
Windows clipboard before solving the equations and then to post the results back onto the clipboard. The
DDE statements inserted are of the form:
$Import 'CLIPBOARD' InputVariable1,InputVariable2,InputVariable3,...
and
$Export 'CLIPBOARD' OutputVariable1, OutputVariable2, OutputVariable3,...
For the example above, the DDE statements are:
$Import 'CLIPBOARD' p_1_TRNSYS,T1_TRNSYS,w1_TRNSYS,p2_TRNSYS,m_dot_TRNSYS,R,n

m_dot = m_dot_TRNSYS*convert(kg/hr,kg/s)
p_1 = p_1_TRNSYS*convert(atm,Pa)
... remainder of EES File removed ...
out5 = W_actual*convert(kJ/s,MJ/hr)
out6 = W_isothermal*convert(kJ/s,MJ/hr)

$Export 'CLIPBOARD' out1,out2,out3,out4,out5,out6


In other words, the EES file should expect TRNSYS (through Type66) to post seven variables on the
clipboard and, once it has solved its own equations, should post six variables back to the clipboard before
informing TRNSYS that it has successfully solved at the current iteration of the current time step.

THE TRNSYS INPUT FILE


Type66 normally has four parameters. The first parameter is the Type66 Input mode. When set to 1, all of
the Type66 Inputs are sent to EES. When set to 2, the first Input is assumed to be a control signal having
a value of 0 (OFF) or 1 (ON) and is NOT sent to EES. When OFF, the outputs of the model are set based
on the value of the second parameter.
One of the difficulties in simulating the performance of a system component in EES comes in assessing the
performance of the device when a system controller switches it off. EES lends itself quite well, for example,
to simulating the steady state performance of a refrigeration cycle. If at any point in time the refrigeration
cycle is to be turned off, an alternate set of EES equations must be developed. Often an EES procedure is
also necessary to carry out the logic of “if Type66 Input 1 is 0 then solve system of equations A whereas if
Type66 Input 1 is 1 then solve system of equations B.” Quickly the advantages of developing components
in EES evaporate. To alleviate the problem, Type66 is equipped with a MODE parameter having one of the
following values and consequences.

Value of Output Value Calculation Method When the Device is OFF


Parameter
2

4–653
TRNSYS 18 – Mathematical Reference

1 The performance of the EES component will be calculated at each iteration based
exclusively on the contents of the EES file. Outputs are set based on the results of the
EES calculations.

2 When the device is OFF (control signal set to 0) EES will not be called. The Type66
outputs will be held at their last calculated values until the control signal switches to
ON (1) and EES is called again. The control signal Input is NOT sent to EES.

3 When the device is OFF (control signal set to 0) EES will not be called. The Type66
outputs will be set to values predefined amongst the Type66 parameter list until the
control signal switches to ON (1) and EES is called again. The control signal Input is
NOT sent to EES.

4 When the device is OFF (control signal set to 0) EES will not be called. The Type66
outputs will be set to 0 until the control signal switches to ON (1) and EES is called
again. The control signal Input is NOT sent to EES.

The third parameter to Type66 is intended to control the amount of time the EES is allowed to take before
TRNSYS decides that EES is not responding or that it cannot solve the system of equations. The allowable
wait time is specified in milliseconds. In the initial TRNSYS 16 release, this parameter was not implemented.
The user may enter any value they wish – TRNSYS will wait for a response from EES forever and may
become hung in certain instances.
The fourth Type66 parameter is the number of outputs that will be set by the EES model or, in the case of
a control signal set to 0, by Type66 itself.
If the second parameter (output mode) is set to 2, the model outputs are set to predefined values listed as
parameters following the four standard parameters. An example follows:
UNIT 7 TYPE 66 Call EES (Predefined Output Values)
PARAMETERS 10
2 ! 1 Input mode
2 ! 2 Output mode
10000 ! 3 Allowable wait
6 ! 4 Number of outputs
2 ! 5 Value when OFF for output-1
100 ! 6 Value when OFF for output-2
0.8 ! 7 Value when OFF for output-3
-9 ! 8 Value when OFF for output-4
40 ! 9 Value when OFF for output-5
40 ! 10 Value when OFF for output-6
...
In Input mode 1, Type66 requires as many Inputs as are expected by the EES model. In Input mode 2,
Type66 requires a control signal Input be provided before the list of Inputs that will be sent to the EES
model. This first Input is not sent to EES.
Type66 also requires two labels. The first label tells Type66 where the EES executable program can be
found. The second label tells Type66 where the EES file to be run can be found. As with other TRNSYS
label statements, path names may contain spaces as long as they are enclosed in quote marks. An example
follows:
...
LABELS 2
c:\EES32\ees.exe
“c:\TRNSYS17\Examples\Calling EES\compressor.ees”

4–654
TRNSYS 18 – Mathematical Reference

4.11.10.5. References
1. Klein, S.A., Alvarado, F.L., EES-Engineering Equation Solver, 2004, F-Chart Software, Middleton, WI
2. Bradley, D.E. and Blair, N.J., “Simulation Synergy, Interconnecting Simulation Programs,” Proceedings
of ASES Annual Meeting 1999, Portland ME, (1999).

4–655
TRNSYS 18 – Mathematical Reference

4.11.11. Type 82: Pacemaker (Simulation Speed Control)


Type 82 is used to slow down a simulation by a given delay at each time step or to slow a simulation down
to real time.

4.11.11.1. Parameter / Input / Output Reference


PARMAETERS

1 Heartbeat on/off [0/1] 0 = No sound ; 1 = One beep at each time step

INPUTS

1 Delay time [s] Time by which to delay the simulation after each timestep. This
value may be set as a fraction of a second. Use -1 to indicate 'real
time' (1 hour takes 1 hour to simulate). Use 0 to indicate 'no delay'
(component will then have no effect)

4.11.11.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.11.3. Hints and Tips


 Connectiong this input to an equation allows you to slow down the simulation for observation with a
Scope (Type 76) at predetermined times of particular interest during the simulation.

4.11.11.4. Detailed Description


Slowing down the simulation by a given, constant delay at each time step can be used to better observe a
system during its simulation, especially in conjunction with Type 76 (Scope). Animations can be slowed
down to the point where the system behavior can be easily observed. The delay is given in seconds per
time step. A typical value is 0.1 in order to observe an animation. The value depends on the complexity of
the modeled system however: it cumulates with the time TRNSYS needs to compute the rest of the system;
the delay is the minimum waiting time between two time steps.
Slowing down the simulation to real time is done by setting the only input of the type to -1. This option is
typically used in real time process control application where TRNSYS pilots hardware equipment and/or
receives data from measuring devices in real time. In this mode, a one-week simulation will actually take
one week to execute. The Heartbeat parameter can be used to make the component beep at each time
step, so that execution of the process can be better monitored (while typically nothing will happen on the
screen for a very long time).
As the variable controlling simulation speed is an input, it is possible to slow down a particular part of the
simulation (e.g., a very hot day in summer) by simply connecting this input to an equation that uses the
built-in TIME variable and some Boolean functions.

4–656
TRNSYS 18 – Mathematical Reference

4.11.12. Type 83: Differentiation


Type83 calculates the derivative of an input value based on the value during the previous time step. Type
83 can differentiate up to 100 variables and there is no limit on the number of instances of Type83 that can
be used in a simulation.

4.11.12.1. Parameter/Input/Output Reference


PARMAETERS

1 Mode [-] This parameter is not implemented and is reserved for future use.

2 Number of variables [-] The number of variables whose derivatives will be computed.

INPUTS

The inputs are cycled based on the value of parameter 4

1 Input value [any] The input signal to be differentiated with respect to time.

OUTPUTS

The outputs are cycled based on the value of parameter 3

1 Output value [any] The derivative with respect to time of each input variable.

4.11.12.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.12.3. Nomenclature
xi the ith quantity or rate whose derivative should be calculated.
t the time step

4.11.12.4. Detailed Description


The derivative of each input is computed based on:
xi xi x  xi ,t t
  i ,t Eq. 4.11.12-1
t t t

4–657
TRNSYS 18 – Mathematical Reference

4.11.13. Type 84: Moving Average


Type84 calculates the moving average of a signal during the previous n time steps where n is a user-
defined value. Type84 can calculate the moving average of up to 100 variables and there is no limit on the
number of instances of Type 84 that can be used in a simulation.

4.11.13.1. Parameter/Input/Output Reference


PARMAETERS

1 Mode [-] This parameter is not implemented and is reserved for future use.

2 Number of variables [-] The number of variables for which a moving average will be
computed.

3 Number of timesteps [-] The number of time steps over which the moving average will be
computed.

INPUTS

The inputs are cycled based on the value of parameter 4

1 Input value [any] The value of each input whose average is to be computed.

OUTPUTS

The outputs are cycled based on the value of parameter 3

1 Output value [any] The average of each input value over the previous n timesteps
where n is set by parameter 3.

4.11.13.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.13.3. Nomenclature
t time step
N number of time steps

xi average of variable xi

4.11.13.4. Detailed Description


Mathematically, the moving average computed by this component is expressed by:
xi xi x  xi ,t t
  i ,t Eq. 4.11.13-1
t t t

4–658
TRNSYS 18 – Mathematical Reference

4.11.14. Type 95: Holiday Calculator


The Type95 Holiday Calculator performs a number of “calendar computations” based on the starting date
of a TRNSYS simulation and the elapsed time. These results may be useful when dealing with time-
dependent load patterns or utility rate schedules. This component was originally developed for use with the
Type96 Rate Schedule Processor but may prove useful for other applications. (Note that Type96 requires
Inputs from Type95).
Type95’s outputs include the year, month, date, and day of week, and hour of day. Type95 determines
whether a particular timestep falls on a bank holiday. Some holidays, such as Christmas, always fall on a
particular date. Others, such as President’s Day in the US, depend on the day of the week and do not fall
on the same date from one year to the next. Type95 will handle both sorts of holidays. A default list is
included for standard American holidays, but the user may define additional or alternative holidays. Type95
accounts for leap years and daylight savings time.

4.11.14.1. Parameter / Input / Output Reference


PARMAETERS

1 Mode [-] 0: standard US holidays only; 1: standard US and user-defined


holidays; 2: user-defined holidays only.

2 Initial year [-] The calendar year in which the simulation begins.

3 Initial hour [-] The hour of the year on which the simulation begins. This
parameter is ignored.

4 Daylight savings time [-] 1: use daylight savings time.


flag
2: ignore daylight savings time.

The remainder of the parameters are cycled based on the number of non standard holidays the users wishes to
define

5 Month of holiday [-] The month in which this user-defined holiday occurs.

6 Day of holiday [-] The day of the month on which this user-defined holiday occurs.

OUTPUTS

1 Hour of the day [-] This value ranges from 0 to 23.

2 Hour of the year [-] This integer value ranges from 0 to 8759 in a normal year and from
0 to 8783 in leap years.

3 Day of the year [-] This integer value ranges from 1 to 365 during standard years and
from 1 to 366 during leapyears.

4 Day of the week [-] This integer ranges from 0 (Sunday) to 6 (Saturday)

5 Month [-] This integer value ranges from 1 (January) to 12 (December)

6 Date [-] The day of the month (this integer value ranges from 1 to 31)

7 Year [-] The current simulation year (starting with the value entered as a
parameter).

4–659
TRNSYS 18 – Mathematical Reference

8 Weekend flag [-] This output has a value of 1 if the current day is a weekend day
and a value of 0 if the current day is a weekday. Simulations are
assumed to start on a Sunday.

9 Holiday flag [-] This output has a value of 1 if the current day is a holiday and a
value of 0 if not.

4.11.14.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.14.3. Hints and Tips


 Type95 includes a daylight savings time flag

4.11.14.4. Nomenclature
Dhol,j Date (day-of-month) of user-defined holiday j
DOW Day-of-Week (0 = Sunday, 6 = Saturday)
DOY Day-of-Year (1-366)
FLAGDS Flag to enable daylight savings time
FLAGHOL Output flag indicating whether timestep falls on a holiday
FLAGWE Output flag indicating whether timestep falls on a weekend
HOD Hour-of-Day (0-23)
HOY Hour-of-Year (0-8783)
Mhol,j Month (1-12) of user-defined holiday j
YEARstart Year at start

4.11.14.5. Detailed Description


DEFINING HOLIDAYS
Three “holiday operation” modes are available for Type 95. The only effect of choosing a mode is to define
what days of the year will be considered to be holidays. All other calculations (date, day of week, etc.) will
not be affected. Thus, the choice of mode is irrelevant for applications in which holidays play no role. The
value of Parameter 1 defines the mode as follows:
Mode = 0 Use only standard American bank holiday list
Mode = 1 Use standard American bank holiday list and additional user-defined holidays
Mode = 2 Use user-defined holidays but do not use standard American bank holiday list

4–660
TRNSYS 18 – Mathematical Reference

The default list of standard holidays is:

New Year’s Day: January 1st


Martin Luther King Jr. Day 3rd Monday in January
President’s Days 3nd Monday in February
Memorial Day Last Monday in May
Independence Day July 4th
Labor Day 1st Monday in September
Columbus Day 2nd Monday in October
Veterans’ Day November 11th
Thanksgiving Day 4th Thurday in November
Christmas Day December 25th

All of these holidays are included for Modes 0 and 1. Sometimes a holiday with a specific date, such as
Independence Day, falls on a Saturday or Sunday. If this happens, the holiday will be automatically “moved”
to Friday or Monday for that particular year. Easter is not included in the list because it always falls on a
Sunday.
When using Modes 1 and 2, the user may define additional holidays by adding values to the end of the
Parameter list. All user-defined holidays must be given a specific date, like Christmas or Independence
Day. Type 95 will support custom holidays that fall on a certain day of the week (1 st Monday in April, etc.)
Two numbers are added to the Parameter list for each additional user-defined holiday. These values are
the month of the holiday (1-12) and the date (1-31). If the user-defined holiday falls on the weekend, then
the holiday flag is set to the previous Friday or following Monday.
EXAMPLE: Two additional holidays are desired: October 31 st and December 24th. Eight Parameters are
used instead of the standard four. The additional four Parameters are 10, 31, 12, and 24.

LEAP YEAR AND DAYLIGHT SAVINGS TIME


Type 95 automatically assumes February to be 29 days long when the year is an even multiple of four. The
optional daylight savings time is activated by entering 1 for Parameter 4. Daylight savings in disabled if
Parameter 4 is set to any other value. Daylight savings begins with the first Sunday in April and extends
through the last Sunday in October. When daylight savings is in effect, the clock time (HOD, or hour-of-
day) calculated by Type 95 is shifted one hour ahead of simulation time.

ALGORITHMS
The calculations for month, year, and hour of day are fairly simple, relying on modular division along with
the length of each month. Montes [1998] gives a detailed explanation of computational methods for
electronic calendars. The calculation for the day of the week (Sunday, Monday, etc.) is given in the following
equation:
5𝑦
𝐷𝑂𝑊 = MOD (36 + 𝐷𝑂𝑌 + , 7) Eq. 4.11.14-1
4
where:
𝐷𝑂𝑌 = 𝐷𝑎𝑦 − 𝑜𝑓 − 𝑌𝑒𝑎𝑟
14 − 𝑚𝑜𝑛𝑡ℎ Eq. 4.11.14-2
𝑦 = 𝑦𝑒𝑎𝑟 −
12

Some holidays occur on specific days of the week rather than on set dates. President’s Day, for instance,
occurs on the third Monday in February. The formula for finding these “moving” holidays is:

4–661
TRNSYS 18 – Mathematical Reference

𝐷𝑎𝑡𝑒 = 1 + 7(𝑁 − 1) + MOD(𝐷𝑂𝑊ℎ𝑜𝑙 − 𝐷𝑂𝑊𝑟𝑒𝑓 , 7) Eq. 4.11.14-3

where:
𝐷𝑂𝑊𝑟𝑒𝑓 = 𝐷𝑂𝑊(𝑌𝑒𝑎𝑟, 𝑀𝑜𝑛𝑡ℎ, 𝐷𝑎𝑡𝑒 = 1 + 7(𝑁 − 1)) Eq. 4.11.14-4

Here, DOWhol is the day of the week for the holiday in question: 1 for Monday, 2 for Tuesday, and so on.
N is the number of occurrence for that day in the month, so N is set to 3 when solving for the third Monday
in the month.

4–662
TRNSYS 18 – Mathematical Reference

4.11.15. Type 96: Utility Bill Generator


The Type 96 Utility Rate Schedule Processor calculates electric bills for grid-tied buildings. It may be used
to determine savings in buildings employing electric parallel generation. This component accounts for both
usage ($/kWh) and demand ($/kW) charges over the course of the simulation. Type 96 assumes that the
area utility employs a “net metering” policy so that power generated on-site which exceeds the
instantaneous load may be sold back to utility at the retail rate. Any parallel generation source may be
used: photovoltaic arrays, wind turbines, or gas-fired microturbines, for example. Two Type 96 components
may be employed in a simulation to compare utility bills with and without parallel generation. Type 96 relies
on Inputs from the Type 95 Holiday Calculator, so a Type 95 component must be present for the simulation
to function properly. The Type 96 component performs economic calculations but does not represent a
physical part of a building’s electrical system. It does not perform any of the functions of an inverter or
charge controller, for instance.
The Utility Rate Schedule Processor needs power Inputs from the parallel generation at each time step as
well as values for electrical consumption (building load). It also requires several time-dependent inputs
such as month, day, and hour from the Type 95 Utility Rate Schedule Calendar. This information is
combined with a utility rate schedule, read from a specially formatted text file, to calculate utility bills. Type
96 supports energy usage charges ($/kWh) and instantaneous power demand charges ($/kW). “Monthly
demand charges” are based on the largest instantaneous power consumption over the course of that
month. “Rolling demand” or “ratchet” charges may also be included, based on the largest instantaneous
power consumption over the last twelve months. The rate schedule may include hourly and/or seasonal
variations as well as reduced rates for weekends and holidays.
Type 96 generates two sets of output data. Several standard TRNSYS Outputs are produced at each
timestep. These Outputs include the usage and demand rates and the value of the power consumed,
generated, and fed back to the grid. In addition, Type 96 generates a pair of output files detailing a building’s
electric bill at each month. These files are identical in content but are formatted differently. One is intended
to be opened from a text editor and the other should be opened as space-delimited text in a spreadsheet.
Each “utility bill” file gives monthly reports on usage, monthly demand, and ratchet charges.

4.11.15.1. Parameter / Input / Output Reference


PARAMETERS

1 Logical unit number for [-] The integer assigned to the utility rate schedule file. This value is
rate schedule input file assigned automatically by the SimulationStudio

2 Logical unit number for [-] The integer assigned to the text format output file. This value is
text output assigned automatically by the SimulationStudio

3 Logical unit number for [-] The integer assigned to the spreadsheet format output file. This
spreadsheet output value is assigned automatically by the SimulationStudio

4 Switch to observe off- [0/1] If this value is set to 0 then off peak rates will not be considered on
peak weekend rates weekends. If this value is set to 1 then off peak rates will be applied
on weekends.

5 Switch to observe off- [0/1] If this value is set to 0 then off peak rates will not be considered on
peak holiday rates holidays. If this value is set to 1 then off peak rates will be applied
on holidays.

6 Maximum excess [W] The maximum grid resale power rate. If the excess power (beyond
power what is needed by the load) exceeds this value then that power is
assumed to be lost and not sold back to the utility.

4–663
TRNSYS 18 – Mathematical Reference

INPUTS

1 Hour of the day [hr] Self explanatory

2 Hour of the year [hr] Self explanatory

3 Month [any] Month of the year (1-12)

4 Year [any] Self explanatory

5 Building load [W] The present electricity required by the system.

6 Flag indicating [-] A value of 1 indicates that the current simulation day is a weekend
weekend day. A value of 0 indicates that it is a week day.

7 [-] A value of 1 indicates that the current simulation day is a holiday. A


Flag indicating holiday
value of 0 indicates that it is not.

8 [W] Power generated locally that can be used to offset building (or
Parallel generation system) electrical load before purchasing power from or sending
power to the grid.

OUTPUTS

1 Useage rate [currency/kW The cost of electricity (currency/kWh) at the present time in the
h] simulation.

2 Monthly demand rate [currency/kW] The demand rate ($/kW) for the current month in the simulation.

3 Net load [W] The system load minus any parallel generation

4 Power purchased from [W] Grid power purchased at the current time in the simulation.
utility

5 Power sold to utility [W] Excess power (beyond that required by the load) produced by
parallel generation at the current time in the simulation.

6 Instantaneous value of [currency] The current total price for power being consumed by the building
power purchased and coming from the utility grid.

7 Instantaneous value of [currency] The current total price for power being sold back to the utility grid.
power sold

8 Instantaneous savings [currency] The amount of currency saved at the present time by parallel
from parallel generation. This is the amount of parallel generation currently
generation being applied against the load and expressed as currency.

9 Instantaneous parallel [-] The fraction of the system load that is presently being met by
fraction parallel generation.

10 Total instantaneous [W] Total parallel generation losses due to the parameter that caps the
losses rate at which power can be sold back to the utility.

11 Instantaneous value of [currency] The value (in units of currency) of building load based on energy
load usage rate [currency]

4–664
TRNSYS 18 – Mathematical Reference

12 Cumulative utility bill [currency] Total cumulative utility bill over whole simulation, updated monthly
in currency units.

13 Useful parallel [W] The power from parallel generation which goes to satisfy building
generation load or is sold back to utility

4.11.15.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.15.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.11.15.4. Nomenclature
BILLTOT Total cumulative utility bill over whole simulation, updated monthly [$]
Chgdemand Monthly demand charge [$]
BILLTOT Total cumulative utility bill over whole simulation, updated monthly [$]
Chgdemand Monthly demand charge [$]
Chgratchet Ratchet charge based on greatest power consumption over last twelve months, assessed
monthly [$]
Chgusage Energy usage charge, assessed monthly [$]
DISOPHU Demand rate discount coefficient for low monthly on-peak hours of use [$/kW]
FLAGHOL Holiday flag: 1 indicates bank holiday, 0 indicates no holiday
FLAGWK Weekend flag: 1 indicates Saturday or Sunday, 0 indicates weekday
FRACpar Fraction of building load met by parallel generation
HOD Hour-of-day
HOY Hour-of-year
LUbill,text Logical unit number for utility bill output file (text-editor format)
LUbill,spread Logical unit number for utility bill output file (spreadsheet format)
LUsched Logical unit number for utility rate schedule input file
OPHU On-peak hours of use: Ratio of on-peak energy consumption to maximum instantaneous on-
peak load for a month
Pbuy Power purchased from utility [W]
Pgen Parallel generation [W]
Pload Electrical load of building [W]
Ploss Total parallel generation losses [W]
Pmaxsell Maximum excess generation to be sold back to utility through net metering [W]
Pnetload Building load after subtracting parallel generation [W]
Psell Parallel generation exceeding load, sold back to utility through net metering [W]
Puseful Parallel generation which goes to satisfy building load or is sold back to utility [W]
Ratedemand Monthly demand rate [$/kW]
Rateratchet Rate for twelve-month ratchet charge [$/kW]
Rateusage Energy usage rate [$/kWh]
SW HOL Switch to enable or disable off-peak rates for all holidays
SW WE Switch to enable or disable off-peak rates for all weekends

4–665
TRNSYS 18 – Mathematical Reference

Valbuy Value of purchased power at any timestep based on energy usage rate [$]
Valgen Value of parallel generation at any timestep based on energy usage rate [$]
Valload Value of building load based on energy usage rate [$]
Valsell Value of energy sold back to utility under net metering, based on energy usage rate [$]

4.11.15.5. Detailed Description


At each time step, Type 96 determines a net building load, the difference between the building’s energy
consumption and parallel generation. If the net load is positive, the customer purchases power from the
utility equal to the net load.

Pnetload  Pload  Pgen Eq 4.11.15-1

Pbuy = Pnetload for Pnetload > 0


Eq 4.11.15-2
Pbuy = 0 for Pnetload ≤ 0

Type 96 assumes net metering, so power may be sold back to the utility when generation exceeds load.
However, the user has the option to set Pmaxsell, a maximum grid resale power rate. The resale power is
calculated at each timestep as follows:

Psell  0 for Pnetload ≥ 0

Psell  Pnetload for Pnetlaod < 0 and |Pnetload| < Pmaxsell


Eq 4.11.15-3

Psell = Pmaxsell for Pnetlaod < 0 and |Pnetload| ≥ Pmaxsell

All power generated in excess of the load is lost if Pmaxsell is set to 0.


Type 96 sets the total power loss Ploss to any excess generation beyond the grid resale limit Pmaxsell:

Ploss = 0 for Psell ≤ Pmaxsell


Eq 4.11.15-4
Ploss = Pgen – Pload – Pmaxsell for Psell > Pmaxsell

The monthly usage charge is found by totaling power purchases and sales over the course of the month
and multiplying by the usage rate at each timestep (the usage rate need not be constant):

Chg usage  t  Rateusage, j Pbuy , j  Psell , j 


N
Eq 4.11.15-5
j 1

Here, N is the number of timesteps in the month and t is the length of the timestep in hours, as assigned
in the TRNSYS SIMULATION statement.
Monthly demand charges are determined based on the largest single instantaneous product of net load
and demand rate over the course of the month. Like energy usage rates, demand schedule in Type 96
may include hourly or seasonal variations. This means that the demand charge may coincide with the
greatest single monthly load if the demand rate is greater at some other time. The monthly demand charge
for a month with a length of N timesteps is:

Chg demand  maxRatedemand,1 * Pbuy,1 ....Ratedemand, N * Pbuy, N  Eq 4.11.15-6

4–666
TRNSYS 18 – Mathematical Reference

Twelve-month ratchet charges are calculated similarly, except that the period of N timesteps represents the
last twelve months rather than a single month:

Chg ratchet  maxRateratchet,1 * Pbuy,1 ....Raterachet, N * Pbuy, N  Eq 4.11.15-7

The usage, monthly demand, and ratchet rates are automatically found at each timestep. The rates are
based on the contents of a special rate schedule text file (detailed in a later section) and the Outputs of the
TRNSYS Rate Schedule Calendar, Type 95. The Calendar generates essential information such as the
hour of day and flags indicating whether a particular timestep falls on a weekend or holiday.

USING TYPE96 IN CONJUNCTION WITH TYPE95


Type 96 must be connected to a Type 95 Holiday Calculator in order to function. (Type 95, however, may
be used independently of Type 96 for applications other than rate schedule calculations.) The Type 95
component should precede all Type 96 components in the TRNSYS Input file. Table 4.11.15–1
outlines how the Outputs of Type 95 should be linked to the Inputs of Type 96.
Table 4.11.15–1: Linking Inputs and Outputs from Type 95 and Type 96

QUANTITY Type 96 Input Type 95 Output


Hour-of-Day Input 1 Output 1
Hour-of-Year Input 2 Output 2
Month Input 3 Output 5
Year Input 4 Output 7
Weekend Flag Input 6 Output 8
Holiday Flag Input 7 Output 9

TYPE 96 OUTPUT FILES AND OTHER FEATURES


The Type 95 Holiday Calculator generates flags indicating whether each timestep falls on a holiday or a
weekend. Most utility rate schedules include reduced usage and demand rates for all bank holidays and
weekends. The values for these special off-peak rates are defined in the rate schedule text file, as
described in the following section. Two “switches” in the Parameter list for Type 96 determine whether
weekends and/or holidays should be billed at the special rates. Parameter 4 is the “weekend switch” and
Parameter 5 is the “holiday switch.” Setting these Parameters to 1 indicates that weekends or holidays
should be billed under off-peak rates. Any other values indicate that Type 96 should ignore weekends or
holidays.
Some utilities allow reductions in the monthly demand rate for customers with low monthly values for “on-
peak hours of use,” or OPHU. The OPHU is defined as the ratio of the total on-peak energy consumption
over the course of the month (in kWh) divided by the maximum on-peak instantaneous power consumption
(in kW):

Energyon peak
OPHU  Eq 4.11.15-8
Powermax,on  peak

If the OPHU total is less than the user-defined value OPHUmax, the demand rate which would have been
used to assess the demand charge for that month will be reduced according to the OPHU value. The
“demand rate discount coefficient” DISOPHU acts as a multiplier for demand rate reduction as shown in the
following formula:

4–667
TRNSYS 18 – Mathematical Reference

RateDemand,disc  RateDemand  DIS OPHU OPHU max  OPHU  Eq 4.11.15-9

Parameter 7 is the demand rate discount coefficient DISOPHU in $/kW. Parameter 8 is OPHUmax, the
maximum allowable number of on-peak hours of use for the customer to be eligible for the demand rate
discount. This discounting scheme is unusual; most utilities employ fixed demand rates. Setting either
Parameter 7 or Parameter 8 to zero will disable the demand rate discount.
Type 96 generates two output files as the simulation runs. These two files contain identical information on
the customer’s monthly utility bills. One of these files is formatted to be read using a text editor such as the
Microsoft Wordpad. The FORTRAN logical unit number for the text-editor file is given in Parameter 2. The
second file is meant to be opened from a spreadsheet as space-delimited text. Parameter 3 assigns the
logical unit number for the spreadsheet file. Figure 4.11.15–1 gives an example of the utility bill file output
in the text-editor format. The building simulated here is an office highrise with very large electrical loads.

4–668
TRNSYS 18 – Mathematical Reference

Month: JANUARY Year: 1990

Total Energy Usage: 684206.5 kW-hr


Usage Charge: $ 21124.22
Maximum Load for Month: 1654.28 kW
Monthly Demand Charge: $ 15368.2480
Twelve Month Rolling Demand Charge: $ 1124.91
MONTHLY ELECTRICITY CHARGE: $ 37617.38

Month: FEBRUARY Year: 1990

Total Energy Usage: 627883.4 kW-hr


Usage Charge: $ 19317.23
Maximum Load for Month: 1585.91 kW
Monthly Demand Charge: $ 14733.0674
Twelve Month Rolling Demand Charge: $ 1124.91
MONTHLY ELECTRICITY CHARGE: $ 35175.21
Figure 4.11.15–1 Type 96 Utility Bill Output File (Formatted for Text Editor)

EXTERNAL DATA FILE


Type 96 reads the utility rate schedule (usage and demand rates at various hours and seasons) from a text
file at the beginning of the TRNSYS simulation. The rate schedule file is accessed only once over the entire
simulation and all its contents are stored by Type 96. Parameter 1 assigns the logical unit number for this
file. A rate schedule file must be developed and saved before running any TRNSYS simulation
employing Type 96.
The rate schedule file may be created using a text editor such as the Microsoft Notepad, although a
spreadsheet program is recommended to be sure the correct number of values are entered. In this case
the rate schedule file must be saved as tab-delimited text. If a text editing application is employed
instead, you must hit the RETURN key after the last line of the file. A sample rate schedule file, Type96-
UtilityRateScheduler.dat, is included with in the Examples\Data Files directory. This file may be used as a
template for creating custom rate schedules.
The original version of the Type96-UtilityRateScheduler.dat file looks like:
1
0 8783 0.025…. [x10] 0.1….[x7] 0.025…[x7] 0.02 3.5….[x10] 5…[x7]
3.5…[x7] 3
1.55
The 1 on the first line indicates the number of ‘annual rate divisions’ in the schedule. One such division is
needed each time the rate schedule changes over the course of a calendar year. Time-of-day changes are
not considered in finding this number. The original Type96-UtilityRateScheduler.dat schedule does not
change over the course of the year, so there is only one annual rate division. On the other hand, rates
might increase in the summer and go down again in the fall; this arrangement would require three annual
rate divisions. The first would be from January 1st until, for instance, May 31st. The second might last from
June 1st until August 31st, and the third might cover September 1st through December 31st.
The second line consists of 52 numbers specifying daily rate schedule information. A similar ‘long’ line is
needed for each annual rate division. Since the default Type96-UtilityRateScheduler.dat schedule does
not change over the course of the year, only one such ‘long’ line is needed.
The first number on the long line is the hour of the year (starting at January 1, 12:00 am) at which that rate
division begins. The second is the hour at which the division ends. In this case hour 8783 corresponds to
11:00 pm on December 31 in a leap year. The Type 95 calendar component handles leap years, so you
should assume 366 days per year. You must include enough long lines to account for each hour in the
year.
The next 24 numbers are hourly usage rates in $/kW-hr for weekdays. The first hour is midnight to 1:00
AM, the second 1:00 AM through 2:00 AM, and so on. The 25 th number is the usage rate in $/kW-hr for

4–669
TRNSYS 18 – Mathematical Reference

weekends and holidays. However, this value is only used for weekends when Parameter 4 is set to 1. It is
used for holidays only when Parameter 5 is set to 1.
Next are 24 numbers defining the hourly demand schedule in $/kW. The last number on the long line is the
demand rate for weekends and holidays. The monthly demand charge is based on the greatest
instantaneous net load, multiplied by the demand rate at that hour, over the course of that month.
The final number in the file is the “12-month rolling demand” rate in $/kW. If this is a non-zero number, a
second demand charge (the “ratchet charge”) will be assessed each month based on the largest
instantaneous net load over the last 12-month period. Figure 4.11.15–2 summarizes the format of the rate
schedule file.

Number of Annual Start of Annual Rate


Rate Divisions Division #1 (hr of year)

End of Annual Rate


N Division #1 (hr of year)

Tstart,1 Tend,1 24# 1# 24# 1#


Tstart,2 Tend,2 24# 1# 24# 1#
.
24 Hourly Holiday/Weekend
. Demand Rates Demand Rate

Tstart,N Tend,N 24# 1# 24# 1#


Rrate
24 Hourly Holiday/Weekend
Usage Rates Usage Rate
Rolling 12-Month
Demand Rate
(Ratchet)

Figure 4.11.15–2 Type 96 Utility Bill Output File (Formatted for Text Editor)

4.11.15.6. References

4–670
TRNSYS 18 – Mathematical Reference

4.11.16. Type 97: Calling External Programs: CONTAM


This component provides a link between TRNSYS’s Type56 Detailed Multizone Building and a bulk airflow
modeling program called CONTAM developed by the US National Institute of Standards and Technology
(NIST) [1,2].
There are two versions of the link between TRNSYS and CONTAM. This version (Type97) links TRNSYS
with a slimmed down version of the CONTAM engine that was recast in Fortran as a native TRNSYS Type.
The connection is fast but not all features of CONTAM are accessible. The other version (Type98) links
TRNSYS with the full CONTAM package and all its features are available. Both versions of the link require
the use of the CONTAM interface,
The CONTAM program (including its interface) can be downloaded for free from the Indoor Air Quality and
Ventilation Group’s section of the National Institute of Standards and Technology’s web site at:
http://www.bfrl.nist.gov/IAQanalysis/index.htm
To obtain a hard a copy, contact the Indoor Air Quality and Ventilation Group, Building and Fire Research
Laboratory, National Institute of Standards and Technology, 100 Bureau Drive, Stop 8600, Gaithersburg,
MD 20899-8600 USA, Phone: (301) 975 5900.

4.11.16.1. Parameter / Input / Output Reference


Like Type56 the CONTAM proforma is automatically generated by the TRNSYS Simulation Studio by
indicating a CONTAM *.air file in the External Files tab of the Type97 proforma.

PARMAETERS

1 Logical Unit of the [-] The integer assigned to the name and location of the *.air file that
CONTAM input file contains the description of the building’s airflow elements. This file
is generated by CONTAM.

4.11.16.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.16.3. Hints and Tips


 Type97 provides a link between TRNSYS and a slimmed down (Fortran) version of the CONTAM
engine. Not all features of CONTAM-W are implemented in the Fortran version (such as contaminant
transport). For a link between TRNSYS and the fully featured CONTAM-W engine, please see Type98.

4.11.16.4. Detailed Description


The process of creating a link between Type97 and Type56 involves three steps. First, a building thermal
model with appropriate inputs and outputs is created using TRNBuild. Second, an airflow model of the same
building is created using CONTAM. Third, the CONTAM building model and the TRNBuild building model
are linked together using either the TRNSYS Simulation Studio or TRNEdit.

THE THERMAL MODEL


Creation of the TRNBuild thermal model follows all of the same conventions as the creation of a normal
building. The only difference is that infiltration into each zone and the coupling airflows between zones
should all be defined as Inputs to Type56 (as opposed to being defined as constants or schedules). One
note to bear in mind is that in TRNBuild and Type56 a coupling airflow from zone A to zone B does not
automatically include a coupling airflow from zone B to zone A. These two airflows must be defined
individually; CONTAM will calculate their values.

4–671
TRNSYS 18 – Mathematical Reference

THE CONTAM MODEL


The CONTAM online documentation provides an excellent and complete source of information on setting
up an airflow model. The process involves defining zones, defining simple air handler supplies and returns,
and defining air links that connect the zones to one another and that connect the zones to ambient
conditions. Once the model is complete, the CONTAM “Simulation” menu includes an option for generating
a TRNSYS Input file. This file (extension *.air), much like Type56 and TRNBuild’s *.inf file includes all of
the information about the air flow model, including a list of required inputs and a list of outputs that CONTAM
will provide. Again as in the case of Type56, the TRNSYS Simulation Studio fills in the Type97 proforma
“on the fly” based on information contained in the *.air file.

INPUT AND OUTPUT CONNECTIONS


In very general terms, Type56 takes infiltration, interzonal air flows, and air handler system supply and
return flows from Type97 and calculates zone temperatures in return. Type97 takes these zone
temperatures and recalculates the interzonal airflows based on the updated information. Iteration continues
until both the zone temperatures and the interzonal air flows converge upon a solution.
With the original release of Type97 (TRNSYS v. 16.0), the inputs required by the model were atmospheric
pressure, wind speed, wind direction, ambient temperature and the air temperature of each zone modeled
in both Type57 and Type97. The CONTAM model had to remain completely static; the user created a set
of air flow paths between the building and ambient and between the zones of the building and that
configuration had to remain constant throughout the simulation. With the release of TRNSYS 17, users are
now able to define multipliers for each path. If these multipliers are given a value between 0 and 1, they
can be used to restrict an opening, effectively modeling operable doors, windows, and dampers. To make
use of the feature, the user must modify the CONTAM *.air file manually after it has been generated by
CONTAM and must remake the modification if the CONTAM project is altered. There are three
modifications that must be made:
 Add text describing each new input to the existing list of “Required Inputs” that appears at the end
of the *.air file.
 Adjust the total number of inputs in the section labeled “-999 inputs & outputs.”
 Locate the 8th field of the appropriate air flow path(s) in the section labeled “-999 paths,” and enter
the corresponding input number.
There are two quirks about CONTAM *.air files that should be kept in mind:
First, CONTAM itself contains approximately a dozen different flow path models. The TRNSYS
implementation of CONTAM (Type97) contains a much reduced set of flow path models. One of the
restrictions is that an opening allowing air flow in both directions (an open interior door for example) is
modeled as two openings in the *.air file, each allowing flow in only one direction. Because of this restriction,
the user may notice that there are more flow paths listed in the *.air file than were specified in CONTAM.
Care must be taken to look at the list of flow paths in the *.air file and to provide the same input indicators
for each of their multipliers. If, for example, an interior door with bidirectional flow is to be modeled, the
TRNSYS user will add two multiplier inputs to Type97 but will provide the same multiplier value for both of
them.
Second CONTAM automatically assigns path numbers starting in the upper left hand corner of the
uppermost layer of the building. Thus, if you add more paths to your CONTAM project and then regenerate
the *.air file, the numbering will have changed. The TRNSYS Studio is quite effective at managing and
updating existing connections but pay close attention none the less.
The following table shows two excerpts from a *.air file. On the left is an unmodified file requiring 10 inputs.
On the right is the same project but with an 11th input added and used as a multiplier on a bi-directional
flow path that separates two zones. Note that the same input number (11) is referenced by both flow paths
that make up the opening.
Original *.air file Modified *.air file
-999 paths: -999 paths:

4–672
TRNSYS 18 – Mathematical Reference

1 5 1 1.511 1 2 1 0 1 0.036 0 1.0 1 5 1 1.511 1 2 1 0 1 0.036 0 1.0


2 5 1 1.489 1 2 1 0 1 0.036 0 1.0 2 5 1 1.489 1 2 1 0 1 0.036 0 1.0
3 1 3 0.0 0 0 1 9 0 0.0 0.0 0 3 1 3 0.0 0 0 1 9 0 0.0 0.0 0
4 2 1 0.222 1 1 1 0 0 0 -1 1.0 4 2 1 0.222 1 1 1 11 0 0 -1 1.0
5 2 1 -0.222 1 1 1 0 0 0 -1 1.0 5 2 1 -0.222 1 1 1 11 0 0 -1 1.0
6 4 2 0.0 0 0 1 10 0 0.0 0.0 0 6 4 2 0.0 0 0 1 10 0 0.0 0.0 0
7 5 2 0.511 1 2 1 0 2 0.036 180 1.0 7 5 2 0.511 1 2 1 0 2 0.036 180 1.0
8 5 2 0.489 1 2 1 0 2 0.036 180 1.0 8 5 2 0.489 1 2 1 0 2 0.036 180 1.0
-999 inputs & outputs: -999 inputs & outputs:
10 8 11 8
112 112
215 215
321 321
424 424
525 525
631 631
751 751
852 852
-999 end-of-data -999 end-of-data

********** REQUIRED INPUTS ********** ********** REQUIRED INPUTS **********

1 Temperature of zone MainZone/GroundFloor 1 Temperature of zone MainZone/GroundFloor


2 Temperature of zone Foyer/GroundFloor 2 Temperature of zone Foyer/GroundFloor
3 Temperature of zone AHU1(Rec)/GroundFloor 3 Temperature of zone AHU1(Rec)/GroundFloor
4 Temperature of zone AHU1(Sup)/GroundFloor 4 Temperature of zone AHU1(Sup)/GroundFloor
5 Ambient Temperature 5 Ambient Temperature
6 Barometric Pressure 6 Barometric Pressure
7 Wind Speed 7 Wind Speed
8 Wind Direction 8 Wind Direction
9 System flow from zone MainZone/GroundFloor to 9 System flow from zone MainZone/GroundFloor to
zone AHU1(Rec)/GroundFloor zone AHU1(Rec)/GroundFloor
10 System flow from zone AHU1(Sup)/GroundFloor to 10 System flow from zone AHU1(Sup)/GroundFloor to
zone Foyer/GroundFloor zone Foyer/GroundFloor
11 Multiplier on OpenDoor opening

With the release of TRNSYS 17, users are able to simulate hybrid (mechanical and natural) airflow systems.
To do so, the user adds an AHS (air handling system) to the CONTAM model of the building. The AHS
consists of the air handler unit and any number of supplies and returns. There is no need to specify the
minimum outdoor air amount or the supply or return volume requested by the AHS component nor the
design flow rate for either the supply or return components; all of these values will come from the ventilation
system in TRNSYS. On the TRNBuild side, the user adds a new VENTILATION type to each zone that
contains a supply. The air flow rate calculated by the ventilation system components in TRNSYS will need
to be passed to both Type56 and to Type97. The interzonal air flow rates and infiltration air flow rates are
now affected by what is going on in the mechanical ventilation system.
The wind direction convention in CONTAM is N=0°, E=90°, etc. Pressure is expected in Pascals. Infiltration
flow rates are calculated in airchanges and interzonal air flow rates are calculated in kg/h. Note that there
is a typographical error in the CONTAM help files, which state that flow rates are calculated in kg//s; they
are not.

4.11.16.5. References
1. W. Stuart Dols, George N. Walton, 2002. CONTAMW 2.0 User Manual. Multizone Airflow and
Contaminant Transport Analysis Software. National Institute of Standards and Technology. Report NISTIR
6921. http://www.bfrl.nist.gov/IAQanalysis/index.htm
2. George N. Walton and W. Stuart Dols, 2003. CONTAM 2.1 Supplemental User Guide and Program
Documentation. National Institute of Standards and Technology. Report NISTIR 7049.
http://www.bfrl.nist.gov/IAQanalysis/index.htm

4–673
TRNSYS 18 – Mathematical Reference

4.11.17. Type 98: Calling External Programs: CONTAM-W


Type98 offers a link between TRNSYS and the fully featured CONTAM-W (as opposed to a link between
TRNSYS and the FORTRAN snapshot of CONTAM that Type97 offers. Type98 and tutorials covering its
useare freely available from https://www.nist.gov/services-resources/software/contam

4–674
TRNSYS 18 – Mathematical Reference

4.11.18. Type127: Floating Mean Temperature Based On EN


15251:2007
This routine calculates the mean value of an input variable within a time period specified by the user. An
application might be the determination of the ambient air temperature mean value over a certain time period
e.g. 24 hours to regulate a heating system. Sometimes, especially for a quickly reacting system a shorter
time period is necessary. For this reason, a time period can be specified e.g. from 6 am until 6 pm. The
routine calculates the mean value within this 12 hours time period. At the end of the time period the
calculated mean value as well as all values of the input variable in that time period are stored until the next
12 hour time period begins. At the beginning of the next 12 hour time period the values of the input variable
of the last 12 hour period are replaced with the actual data with progressing time. With this constant set of
values the mean value is actualized at every progressing time step.

4.11.18.1. Parameter / Input / Output Description


PARMAETERS

1 Start time [hr] starting time of time period

2 Stop time [hr] stopping time of time period

3 Initial value [any] initial value of mean value

INPUTS

1 Value [any] input variable for calculation of the mean value

OUTPUTS

1 Mean value [any] mean value for the specified time period

2 Final mean value [any] mean value at the end at the specified stopping time

3 Floating mean value [any] the floating mean value

4.11.18.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.11.18.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.11.18.4. Nomenclature
mean - mean value of the input
val - input
start - starting time for calculation of the mean value of INPUT
stop - stopping time for calculation of the mean value of INPUT
T - simulation time step
N - number of time steps within the time period

4–675
TRNSYS 18 – Mathematical Reference

4.11.18.5. Detailed Description


The INPUT is summed within the period of interest and divided by the amount of time steps:
N

 Val i
Eq. 4.11.18-1
Mean  i 1
N
where:
Stop  Start
N Eq. 4.11.18-2
t

The floating mean temperature rm for the actual day is calculated based on EN 15251:2007:

rm ed1 0.8ed2 0.6ed3 0.5ed4 0.4ed5 0.3ed6 0.2ed7/ 3.8 Eq. 4.11.18-3

Where ed-1 through ed-7 are the daily mean temperatures for the day before until 7 days back.

4.11.18.6. References
German Title: “Eingangsparameter für das Raumklima zur Auslegung und Bewertung der Energieeffizienz
von Gebäuden - Raumluftqualität, Temperatur, Licht und Akustik,” DIN EN 15251, 2007
English title:
“Indoor environmental input parameters for design and assessment of energy performance of buildings
addressing indoor air quality, thermal environment, lighting and acoustics,” DIN EN 15251, 2007

4–676
TRNSYS 18 – Mathematical Reference

4.11.19. Type 130: Calling External Programs: ESP-r


Type130 is one part of a utility that allows cosimulation between TRNSYS and ESP-r [1]. The coupling is
discussed in the document Getting Started with ESP-r TRNSYS co-simulations.pdf located in the TRNSYS
documentation directory.

4–677
TRNSYS 18 – Mathematical Reference

4.11.20. Type 155: Calling External Programs: Matlab™


This TRNSYS Type implements a link with Matlab. The connection uses the Matlab engine, which is
launched as a separate process. The Fortran routine communicates with the Matlab engine through a
Component Object Model (COM) interface. Type 155 can have different calling modes (e.g. iterative
component or real-time controller).
In order to operate the link with Matlab you must have either the 64-bit version of Trnsys18 and Matlab or
you must have the 32-bit version of Trnsys18 and Matlab. If you are using the 64-bit link then Matlab’s
“bin\win64” folder must be on the Windows® search path. If you are using the 32-bit version of the link then
Matlab’s “bin\win64” folder must be on the Windows® search path.
You must also make sure that the Type155.dll file (located in the ..\Trnsys18\Exe\) directory is compiled for
the version of Matlab that you are using. Various versions of the dll may be found in
the ..\Trnsys18\Exe\DLLs\ directory. If you do not find your version of Matlab in that folder, please contact
your distributor for assistance.
There are no specific limits on the number of inputs, outputs, or instances of Type 155 in a simulation.
NOTE: When two or more instances of Type155 are used in the same project, all m-files share the
same workspace in Matlab (they are "scripts", not "functions") so variables like trnInfo, trnTime, etc.
and any local variable used in different m-files will be overwritten at each call.

4.11.20.1. Parameter / Input / Output Reference


PARMAETERS

1 Mode [-] This parameter is reserved for future use

2 Number of inputs [-] The number of input values that are to be passed by TRNSYS to
the Matlab engine

3 Number of outputs [-] The number of output values that will be returned to TRNSYS by
the Matlab engine.

4 Calling Mode [any] This parameter describes the iterative behavior of this component.
Currently, the values 0 and 10 are defined.
0: Standard Iterative component (called at each call of each time
step)
10: Non-iterative component called at the end of each time step,
after integrators and printers - This is suitable for a controller that
calculates its outputs for one time step based on the converged
("measured") values of previous time step.

5 Keep Matlab open after If this parameter is 1 for at least one unit of Type 155 in the
simulation simulation, the Matlab engine will not be closed when TRNSYS
exits. This can be useful for further data analysis or debugging
purposes.
Please note that the Matlab instance launched by TRNSYS will exit
by itself after a certain time, so you should save your session and
re-open it in another Matlab instance if you want to keep working
on the data

INPUTS

4–678
TRNSYS 18 – Mathematical Reference

1 Input value any The value of each input to be passed by TRNSYS to the Matlab
engine

OUTPUTS

1 Output value any The value of each output computed by Matlab and passed back to
TRNSYS.

LABELS

1 m-file name any The name and the location of the m-file to be run by Matlab.

4.11.20.2. Simulation Summary Report Contents


Type155 does not produce an entry in the simulation summary report (*.ssr) file.

4.11.20.3. Hints and Tips


 Avoid the use of the Matlab “clear all” statement. This statement has been found to delete all of the
data that is being passed from TRNSYS to Matlab.
 Please see the Detailed Description section below.

4.11.20.4. Detailed Description


PARAMETERS
 Parameter 1 is a Mode reserved for future use.
 The number of inputs and outputs are set by Parameters 2 and 3
 Parameter 4 (Calling Mode) describes the iterative behavior of this component. The values 0 and 10
are defined:
 0: Standard Iterative component (called at each call of each time step). In this case Type 155 sets
INFO(9) to 1 (See Volume 07, Programmer's Guide)
 10: Non-iterative component called at the end of each time step, after integrators and printers -
This is suitable for a controller that calculates its outputs for one time step based on the converged
("measured") values of previous time step. In this case Type 155 sets INFO(9) to 2 (See Volume
08, Programmer's guide).

MATLAB M-FILE
The path and filename of your Matlab file are provided in a LABEL statement. Type 155 will understand the
following kind of pathnames (Note that Matlab m-files cannot have spaces or special characters in their
names):
 Relative to the deck (default if no path is specified)
E.g. "My_M_File.m"
 Absolute (if the path starts with "\" or if the second character is ":")
E.g. "C:\Trnsys18\Examples\Data Files\Type155_CallingMatlab.m"
 Relative to the TRNSYS root directory (if the path starts with ".\")
E.g. ".\Examples\Data Files\Type155_CallingMatlab.m", which is equivalent to the second example
here above if TRNSYS is installed in "C:\Trnsys18"

4–679
TRNSYS 18 – Mathematical Reference

STRUCTURE OF THE M-FILE


The same m-file will be called at each call to Matlab. Hence, the m-file must handle the different TRNSYS
calls, very nuch like what a TRNSYS Type is doing (Note that very simple components will not have to
perform any special operation).
An example is provided here below and in .\Examples\Data Files\Calling Matlab. There is also a more
complex example in .\Examples\Calling Matlab.
A few points are worth noting:
 The m-file called by Type 155 is a Matlab "batch file", not a function (variables are created by TRNSYS
in the main workspace).
 Matlab does not only receive the inputs in trnInputs but also other information about the simulation:
 trnInfo (a copy of the INFO array)
 trnTime (simulation time)
 trnStartTime (simulation start time)
 trnStopTime (simulation stop time)
 trnTimeStep (simulation time step)
 mFileErrorCode (see here below)
 Matlab must return outputs in trnOutputs. In order to prevent memory access violations in case the m-
file fails, TRNSYS creates the output array (trnOutputs) with the correct size before running the m-file.
As long as you do not reduce the size or delete the output array in your m-file, all errors will result in
nice error handling and not a memory access violation.
 Another mechanism is implemented to prevent TRNSYS from continuing a simulation in case the m-file
fails:
 Before running the m-file, TRNSYS creates a variable called mFileErrorCode which is initialized to 1
 If the value of that variable is not zero when Matlab returns, the simulation will stop and TRNSYS will
display en error message with the value of mFileErrorCode. This can be used by the m-file to give a
hint about what happened if the value of mFileErrorCode is incremented at different places in the m-
file. In the example here below, if the m-file returns an error code of 200, something happened during
a post-convergence call.

EXAMPLE ( ".\EXAMPLES\DATA FILES\TYPE155_CALLINGMATLAB.M" )

% Type155_CallingMatlab.m
% -----------------------------------------------------------------------------
%
% Example M-file called by TRNSYS Type 155
%
% Data passed from / to TRNSYS
% ----------------------------
%
% trnTime (1x1) : simulation time
% trnInfo (15x1) : TRNSYS info array
% trnInputs (nIx1) : TRNSYS inputs
% trnStartTime (1x1) : TRNSYS Simulation Start time
% trnStopTime (1x1) : TRNSYS Simulation Stop time
% trnTimeStep (1x1) : TRNSYS Simulation time step
% mFileErrorCode (1x1) : Error code for this m-file. It is set to 1 by TRNSYS
% and the m-file should set it to 0 at the
% end to indicate that the call was successful. Any non-
% zero value will stop the simulation
% trnOutputs (nOx1) : TRNSYS outputs
%

4–680
TRNSYS 18 – Mathematical Reference

%
% Notes:
% ------
%
% You can use the values of trnInfo(7), trnInfo(8) and trnInfo(13) to identify
% the call (e.g. first iteration, etc.)
% Real-time controllers (callingMode = 10) will only be called once per time
% step with trnInfo(13) = 1 (after convergence)
%
% The number of inputs is given by the size of trnInputs and by trnInfo(3)
% The number of expected outputs is given by trnInfo(6)
% -----------------------------------------------------------------------------
% This example implements a very simple component. The component is iterative
% (should be called at each TRNSYS call)
% -----------------------------------------------------------------------------

% TRNSYS sets mFileErrorCode = 1 at the beginning of the M-File for error


% detection. This file increments mFileErrorCode at different places. If an
% error occurs in the m-file the last succesful step will be indicated by
% mFileErrorCode, which is displayed in the TRNSYS error message
% At the very end, the m-file sets mFileErrorCode to 0 to indicate that
% everything was OK

mFileErrorCode = 100; % Beginning of the m-file

% --- Process Inputs and global parameters ------------------------------------% -----


------------------------------------------------------------------------
nI = trnInfo(3);
nO = trnInfo(6);

MyInput = trnInputs(1);

mFileErrorCode = 110; % After processing inputs

% --- First call of the simulation: initial time step (no iterations) ---------% -----
------------------------------------------------------------------------% (note that
Matlab is initialized before this at the info(7) = -1 call, but
% the m-file is not called)

if ( (trnInfo(7) == 0) & (trnTime-trnStartTime < 1e-6) )

% This is the first call (Counter will be incremented later for this very
% first call)
iCall = 0;
% This is the first time step
iStep = 1;
% Do some initialization stuff, e.g. initialize history of the variables
% for plotting at the end of the simulation
% (uncomment lines if you wish to store variables)
nTimeSteps = (trnStopTime-trnStartTime)/trnTimeStep + 1;
history.inputs = zeros(nTimeSteps,nI);
% No return, normal calculations are also performed during this call
mFileErrorCode = 120 % After initialization call

end

% --- Very last call of the simulation (after the user clicks "OK") -----------% -----
------------------------------------------------------------------------

if ( trnInfo(8) == -1 )

4–681
TRNSYS 18 – Mathematical Reference

mFileErrorCode = 1000;
% Do stuff at the end of the simulation, e.g. calculate stats, draw plots,
% etc...
mFileErrorCode = 0; % Tell TRNSYS that we reached the end of the m-file
% without errors
return

end

% --- Post convergence calls: store values ------------------------------------% -----


------------------------------------------------------------------------

if (trnInfo(13) == 1)

mFileErrorCode = 200; % Beginning of a post-convergence call


% This is the extra call that indicates that all Units have converged. You
% should do things like:
% - calculate control signal that should be applied at next time step
% - Store history of variables
history.inputs(iStep) = MyInput;
% Note: If Calling Mode is set to 10, Matlab will not be called during
% iterative calls.
% In that case only this loop will be executed and things like incrementing
% the "iStep" counter should be done here
mFileErrorCode = 0; % Tell TRNSYS that we reached the end of the m-file
% without errors

return % Do not update outputs at this call

end

% --- All iterative calls -----------------------------------------------------


% -----------------------------------------------------------------------------

% --- If this is a first call in the time step, increment counter ---

if ( trnInfo(7) == 0 )
iStep = iStep+1;
end

% --- Process Inputs ---

mFileErrorCode = 130; % Beginning of iterative call

% Do calculations here
MyResult = MyInput*2;
% --- Set outputs ---
trnOutputs(1) = MyResult;

mFileErrorCode = 0; % Tell TRNSYS that we reached the end of the m-file without
% errors

return

GENERAL TROUBLESHOOTING
Each time a new version of MATLAB is released, the TRNSYS developers need to recompile and relink the
Type155.dll file against the latest MATLAB libraries. If you have MATLAB installed and the Calling MATLAB
example does not run, it may be that you have a version of Type155.dll that does not correspond to your

4–682
TRNSYS 18 – Mathematical Reference

version of MATLAB. DLLs compatible with various versions of MATLAB are located in .\SourceCode\DLLs\.
Always check the description result file (listing and log file) if an error is prompted executing a simulation.

INSTALLING MATLAB 32-BIT EDITION


Under “normal” cisrcumstnaces, it is recommended that you run the 64-bit version of TRNSYS that
communicates with the 64-bit version of Matlab.

A 32-bit version of Trnsys 18 is available and it can only call the 32-bit of Matlab. If you are using the 32-bit
version of TRNSYS, in order to use Type 155 you need to install the 32-bit version of Matlab. To install the
32-bit version of Matlab:
 On your Matlab DVD, browse to the bin\win32 directory and run setup.exe. Note that if you run the
setup program in the root directory on a Windows 7 64-bit machine, it will install the 64-bit Matlab
version without asking for any confirmation. So you have to run the 32-bit setup program located in
bin\win32.
 Install Matlab and your toolboxes. Do not install into the default directory but rather in a directory
outside of Program Files, e.g. C:\Matlab.
 Add the path to libeng.dll, which is normally located in C:\Matlab\bin\win32, to your windows search
path (assuming you installed in C:\Matlab, otherwise adapt)
 To do this, in Control Panel, System, Advanced System Settings, Environment variables, edit the
Path variable (we recommend that you edit the one in System Variables rather than User
Variables). Add “C:\Matlab\bin\win32;” (without the quotes but with the trailing semicolon) at the
beginning of the search path. You will notice that Matlab has added other subdirectories of
C:\Matlab to the path but not that one (and you thought TRNSYS was bad…).
 If you also install the 64-bit version of Matlab you should make sure this directory is before all other
references to Matlab in the path.
 Note that if you change the path while the TRNSYS Studio is running you will need to restart the
TRNSYS Studio

4–683
TRNSYS 18 – Mathematical Reference

4.11.21. Type 159: Calling External Programs: MATHIS


The simulation code MATHIS is available as a separate type for TRNSYS. It allows modelling the air flow
network of a building.

A new project can be created using the “File/New project/Coupled MATHIS project” feature in Simulation
Studio.

To edit the air flow network, right click the type 159 and select “Edit air flow network”.

DEMO version comes with the default Trnsys installer. If you wish to get a full commercial version, please
contact your distributor or go to http://software.cstb.fr

4–684
TRNSYS 18 – Mathematical Reference

4.11.22. Type 163: Calling External Programs: Python – using


I/O files
This TRNSYS Type allows TRNSYS to communicate with the Python script. The communication is
accomplished by using file i/o in both FORTRAN and Python, so it is not particularly fast. For the link to
work, a Python environment must be installed on the computer and the path to Python must be included in
the Windows path. (If you can open a Windows Command Prompt and execute Python by simply typing
python in the Command Window, then the path to Python is correctly included in the Windows path.) While
this is similar to writing a TRNSYS type in Python, the Python script will not perform the usual initialization
steps or have access to the TRNSYS function like a full TRNSYS type.

4.11.22.1. Parameter/Input/Output Reference


PARMAETERS

1 Number of parameters [-] This number of parameters (constant during the simulation) that will
be passed by TRNSYS to the Python script.

2 Number of inputs [-] The number of input values that are to be passed by TRNSYS to
the Python script.

3 Number of outputs [-] The number of output values that will be returned to TRNSYS by
the Python script.

For Each Parameter:

4 Value of parameter The value of the parameter that will be passed by TRNSYS to the
Python script.

INPUTS

1 Input value any The value of each input to be passed by TRNSYS to the Python
script.

OUTPUTS

1 Output value any The value of each output computed by the Python script and
passed back to TRNSYS.

LABELS

1 Python script file name any The name and the location of the Python script to be executed.

4.11.22.2. Simulation Summary Report Contents


Type163 does not produce an entry in the simulation summary report (*.ssr) file.

4.11.22.3. Hints and Tips


 At the time of the Trnsys18.00.0000 release Python3 scripts are supported.

4–685
TRNSYS 18 – Mathematical Reference

4.11.22.4. Detailed Description


At each TRNSYS iteration, this type writes a file that include the parameters set by the user at the start of
the simulation and the inputs to the type. It then activates the Python script. The Python script reads the
values from the file created by the type and performs whatever calculations have been written in the script.
The script then writes a new file that contains the output values that it have just calculated and returns
control back to the TRNSYS type. Finally, the type reads the new file and passes the outputs on to the rest
of the simulation.

STRUCTURE OF THE PYTHON SCRIPT


The Python script must perform certain tasks in order to correctly communicate with the TRNSYS type.
First it must open the file of values from the TRNSYS type. This is file is always names py_inputs.dat. The
first line of the file will contain the number of parameters, inputs and outputs. The second line will linclude
all of the parameter values. The third line will include all of the input values. Then the script should perform
whatever calculatiohns are desired. Finally the script needs to write a file named py_outputs.dat of the
output values all on one line.
Below if an example Python script with 1 parameter and 3 inputs that calculates two outouts – the sum of
the first two inputs and the third input raised to the power of the parameter:
f = open("py_inputs.dat",'r')
lines = f.readlines()
f.close()

PIO = [int(i) for i in lines[0].split()]


Pars = [float(i) for i in lines[1].split()]
Ins = [float(i) for i in lines[2].split()]

out = list()
out.append(Ins[0]+Ins[1])
out.append(Ins[2]**Pars[0])

f = open("py_outputs.dat",'w')
outline = " ".join(str(x) for x in out)
f.write(outline)
f.close

4–686
TRNSYS 18 – Mathematical Reference

4.11.23. Type 169: Calling External Programs: Python – direct


calling Python
This TRNSYS Type allows TRNSYS to communicate with a Python script. This component is written in
C++ to allow for embedding the Python in the code. Wrappers are also created to enhance Python to
communicate variables directly between TRNSYS and Python. For the link to work, a Python environment
must be installed on the computer and the path to Python must be included in the Windows path. (If you
can open a Windows Command Prompt and execute Python by simply typing python in the Command
Window, then the path to Python is correctly included in the Windows path.) While this is similar to writing
a TRNSYS type in Python, the Python script will not perform the usual initialization steps or have access to
the TRNSYS function like a full TRNSYS type.

4.11.23.1. Parameter/Input/Output Reference


PARMAETERS

1 Number of inputs [-] The number of input values that are to be passed by TRNSYS to
the Python script.

2 Number of outputs [-] The number of output values that will be returned to TRNSYS by
the Python script.

INPUTS

For Each Input:

1 Input value any The value of each input to be passed by TRNSYS to the Python
script.

OUTPUTS

For Each Output:

1 Output value any The value of each output computed by the Python script and
passed back to TRNSYS.

LABELS

1 Python script file name any The name and the location of the Python script to be executed.

2 Python function name any The name of the function in the Python script that will be called by
TRNSYS at each iteration.

4.11.23.2. Simulation Summary Report Contents


Type169 does not produce an entry in the simulation summary report (*.ssr) file.

4.11.23.3. Hints and Tips


 At the time of the Trnsys18.00.0000 release Python3 scripts are supported.

4–687
TRNSYS 18 – Mathematical Reference

4.11.23.4. Detailed Description


At each TRNSYS iteration, this type invokes a Python function from a Pyhton script file. Wrappers have
been written to allow the Python script to get the Inputs from TRNSYS and to set the Outputs in TRNSYS.
Some portions on the Python file need to be structured correctly to allow the communication with TRNSYS.

STRUCTURE OF THE PYTHON SCRIPT


The Python script must perform certain tasks in order to correctly communicate with the TRNSYS type.
First the TRNSYS Python functions need to be imported. This is accomplished by including the line
import TRNSYSpy as TRNSYS
at the top of the Python file. This gives the Python script access to three different functions to communicate
with TRNSYS:
getInputValue(i) returns the ith Input from TRNSYS
setOutputValue(i,value) sets the ith Output to TRNSYS as the value
The Python calculations must be included in a function in the file and the name of the function is specified
as the second Label of the TRNSYS component.
Below if an example Python script with 4 inputs that calculates two outouts – the sum of the inputs 2&3 and
the fourth input raised to the power of the first input:
import TRNSYSpy as TRNSYS

def PythonExample():
# retrieve values from the Parameters and Inputs
inp1 = TRNSYS.getInputValue(1)
inp2 = TRNSYS.getInputValue(2)
inp3 = TRNSYS.getInputValue(3)
inp4 = TRNSYS.getInputValue(3)
# processing
out1 = inp2+inp3
out2 = inp4**inp1
# return the new values to the Outputs
TRNSYS.setOutputValue(1,out1)
TRNSYS.setOutputValue(2,out2)
return

4–688
TRNSYS 18 – Mathematical Reference

4.12. Weather

4–689
TRNSYS 18 – Mathematical Reference

4.12.1. Type 15: Standard File Format Weather Data


Processor
This component reads and interprets weather data available in a series of standardized formats. The data
files implemented are: Typical Meteorological Year (TMY), Typical Meteorological Year version 2 (TMY2),
EnergyPlus Weather, International Weather for Energy Calculations (IWEC), Canadian Weather for Energy
Calculations (CWEC), Typical Meteorological Year version 3 (TMY3), German TRY 2004, and German
TRY 2010. In addition to reading data files, Type15 calculates total, beam, sky diffuse, ground reflected
solar radiation, the angle of incidence of beam solar radiation, the slope and azimuth of as many surfaces
as the user cares to define. The Type further includes calculation of mains water temperature and effective
sky temperature for radiation calculations. It also outputs a number of indicators such as heating and cooling
season, monthly and annual maximum, minimum and average temperature.

4.12.1.1. Parameter / Input / Output Reference


PARAMETERS

1 File Type [-] The type of file which is to be read: 1 = TMY format, 2 = TMY2
format, 3 = Energy+ format, 4 = IWEC format, 5 = CWEC format,
6=Metoenorm for TRNSYS format, 7 = TMY3 format, 8 = German
TRY 2004 format, 9 = German TRY 2010 format

For File Types 1, 2, 3, 4, 5, 6 & 7:

2 Logical unit [-] The logical unit through which the data reader will read the external
weather file.

3 Tilted Surface [-] The radiation processing mode that will be used to calculate the
Radiation Mode radiation components on a tilited surface: 1= Isotropic Sky Model, 2
= Hay and Davies Model, 3 = Reindl Model, 4 = Perez 1988 Model.
5 = Perez 1999 Model. Refer to the documentation for the Type 16
model for more information.

4 Ground reflectance - [-] The ground reflectance for the periods of the year in which there is
no snow no snow cover.

5 Ground reflectance - [-] The ground reflectance for the periods of the year in which there is
snow cover snow cover.

6 Number of surfaces [-] The number of surfaces for which tilted surface radiation
calculations will be performed.

For Each Surface:

7 Tracking mode [-] The type of surface for the radiation calculations: 1 = fixed surface
(no tracking), 2 = the surface rotates about a vertical axis in order
to track the sun, 3 = the surface rotates about a fixed (user-defined)
axis, 4 = the surface 2-axis tracks such that the beam radiation is
always normal to the surface.

8 Slope of surface [degrees] The slope of the surface or axis of rotation. For tracking mode 1,
this input is the fixed slope of the surface. For tracking mode 2, this
input is the slope of surface (which does not change as the
collector rotates). For tracking mode 3, this slope is the slope of the
axis around which the collector rotates. For tracking mode 4 this
input is not used.

4–690
TRNSYS 18 – Mathematical Reference

Slopes are defined positive when tilted towards the azimuth: 0 =


horizontal, 90 = vertical and facing the azimuth, -90 = vertical and
facing away from the axis.

9 Azimuth of surface [degrees] The azimuth of the surface or axis of rotation. For tracking mode 1,
this input is the fixed azimuth of the surface. For tracking mode 2,
this input is not used. For tracking mode 3, this input is the azimuth
of the axis around which the collector rotates. For tracking mode 4
this input is not used.
Azimuths are defined positive when facing the equator: 0 = facing
the equator, 90 = facing west, -90 = facing east.

For File Type = 1:

10 Latitude [degrees] The latitude of the city for which the external weather data will be
read.

For File Types 8 & 9:

2 Logical unit [-] The logical unit through which the data reader will read the external
weather file.

3 Tilted Surface [-] The radiation processing mode that will be used to calculate the
Radiation Mode radiation components on a tilited surface: 1= Isotropic Sky Model, 2
= Hay and Davies Model, 3 = Reindl Model, 4 = Perez 1988 Model.
5 = Perez 1999 Model. Refer to the documentation for the Type 16
model for more information.

4 Ground reflectance [-] The ground reflectance.

5 No Used [-] This parameter must be present but is not used by the component.

6 Elevation [m] The elevation of the weather location.

7 Latitude [degrees] The latitiude of the weather location.

8 Longitude [deggrees] The longitude of the weather location.

9 Number of surfaces [-] The number of surfaces for which tilted surface radiation
calculations will be performed.

For each surface:

10 Tracking mode [-] The type of surface for the radiation calculations: 1 = fixed surface
(no tracking), 2 = the surface rotates about a vertical axis in order
to track the sun, 3 = the surface rotates about a fixed (user-defined)
axis, 4 = the surface 2-axis tracks such that the beam radiation is
always normal to the surface.

11 Slope of surface [degrees] The slope of the surface or axis of rotation. For tracking mode 1,
this input is the fixed slope of the surface. For tracking mode 2, this
input is the slope of surface (which does not change as the
collector rotates). For tracking mode 3, this slope is the slope of the
axis around which the collector rotates. For tracking mode 4 this
input is not used.

4–691
TRNSYS 18 – Mathematical Reference

Slopes are defined positive when tilted towards the azimuth: 0 =


horizontal, 90 = vertical and facing the azimuth, -90 = vertical and
facing away from the axis.

12 Azimuth of surface [degrees] The azimuth of the surface or axis of rotation. For tracking mode 1,
this input is the fixed azimuth of the surface. For tracking mode 2,
this input is not used. For tracking mode 3, this input is the azimuth
of the axis around which the collector rotates. For tracking mode 4
this input is not used.
Azimuths are defined positive when facing the equator: 0 = facing
the equator, 90 = facing west, -90 = facing east.

OUTPUTS

1 Dry bulb temperature [C] The dry bulb (ambient) temperature. (Interpolated at timestep less
than one hour)

2 Dew point temperature [C] The dew point temperature of the ambient air.

3 Wet bulb temperature [C] The wet bulb temperature of the ambient air.

4 Effective sky [C] The effective sky temperature for long wave radiation calculations.
temperature

5 Mains water [C] The temperature of the water available from the water main.
temperature

6 Humidity ratio [-] The absolute humidity ratio of the ambient air. (Interpolated at
timesteps of less than one hour)

7 Percent relative [-] The relative humidity of the ambient air (percentage).
humidity

8 Wind velocity [m/s] The velocity of the wind. (Interpolated at timesteps of less than one
hour)

9 Wind direction [degrees] The direction from which the wind originates. (Interpolated for
timesteps of less than one hour)
0 = North, 90 = East, 180 = South, 270 = West

10 Atmospheric pressure [atm] The pressure of the ambient conditions.

11 Total sky cover [-] Amount of sky dome covered by clouds or obscuring phenomena

12 Opaque sky cover [-] Amount of sky dome covered by clouds or obscuring phenomena
that prevent observing the sky or higher cloud layers

13 Extraterrestrial solar [kJ/hr.m^2] The extraterrestrial radiation on a horizontal surface.


radiation

14 Global horizontal [kJ/hr.m^2] The global solar radiation on a horizontal surface integrated over
radiation (not the previous hour (not interpolated at timesteps less than one
interpolated) hour). For global horizontal solar radiation define a horizontal
surface and use the radiation outputs for that surface.

4–692
TRNSYS 18 – Mathematical Reference

15 Direct normal radiation [kJ/hr.m^2] The direct normal solar radiation integrated over the previous hour
(not interpolated) (not interpolated at timesteps less than one hour). For interpolated
direct normal radiation define a two-axis tracking surface and use
the beam radiation outputs for that surface.

16 Solar zenith angle [degrees] The solar zenith angle.

17 Solar azimuth angle [degrees] The solar azimuth angle.

18 Total horizontal [kJ/hr.m^2] The total radiation (beam + diffuse) incident upon a horizontal
radiation surface.

19 Horizontal beam [kJ/hr.m^2] The beam radiation incident upon a horizontal surface.
radiation

20 Sky diffuse radiation on [kJ/hr.m^2] The sky diffuse incident on a horizontal surface.
the horizontal

21 Ground diffuse [kJ/hr.m^2] The ground-reflected diffuse incident on a horizontal surface.


radiation on the
horizontal

22 Total diffuse radiation [kJ/hr.m^2] The total diffuse radiation (sky + ground reflected) incident upon a
on the horizontal horizontal surface.

23 Angle of incidence for [degrees] The angle of incidence for the beam radiation relative to a
horizontal horizontal surface.

For Each Surface:

24 Total tilted surface [kJ/hr.m^2] The total (beam + diffuse) radiation incident upon the specified
radiation for surface surface.

25 Beam radiation for [kJ/hr.m^2] The beam radiation incident upon the specified surface.
surface

26 Sky diffuse radiation [kJ/hr.m^2] The incident sky diffuse radiation on the specified surface.
for surface

27 Ground reflected [kJ/hr.m^2] The incident ground reflected diffuse radiation on the specified
diffuse radiation for surface.
surface

28 Total diffuse radiation [kJ/hr.m^2] The incident diffuse radiation (ground reflected + sky) on the
for surface specified surface.

29 Angle of incidence for [degrees] The angle of incidence between incident beam radiation and the
surface specified surface.

30 Slope of surface [degrees] The slope of the specified surface.

31 Azimuth of surface [degrees] The azimuth of the specified surface.

32 Latitude [degrees] The latitude of the city for the chosen weather file.

33 Longitude [degrees] The longitude of the city represented by the weather data file.

4–693
TRNSYS 18 – Mathematical Reference

34 Shift in solar time hour [degrees] The shift in solar time hour angle required to proces the weather
angle data. This value is calculated by subtracting the longitude of the
weather location from the standard longitude for the location.

35 Site elevation [m] The elevation of the city above sea level.

36 Heating season [-] This output indicates whether heating devices are typically enabled
indicator for the month: 1= enabled, 0 = disabled.

37 Cooling season [-] This output indicates whether cooling devices are typically enabled
indicator for the month: 1= enabled, 0 = disabled.

38 Monthly average [C] The average temperature of the ambient air in the current month.
temperature

39 Monthly minimum [C] The minimum temperature of the ambient air in the current month.
temperature

40 Monthly maximum [C] The maximum temperature of the ambient air in the current month.
temperature

41 Annual average [C] The average temperature of the ambient air over the year.
temperature

42 Annual minimum [C] The minimum temperature of the ambient air over the year.
temperature

43 Annual maximum [C] The maximum temperature of the ambient air over the year.
temperature

44 Global horizontal Average total amount of direct and diffuse illuminance received on
illuminance a horizontal surface.

45 Direct normal Average amount of direct normal illuminance received within a 5.7°
illuminance field of view centered on the sun.

46 Diffuse illuminance on Average amount of illuminance received from the sky (excluding
horizontal the solar disk) on a horizontal surface.

47 Zenith luminance Average amount of luminance at the sky's zenith.

48 Horizontal visibility [km]

49 Ceiling height [m]

50 Precipitable water [-]

51 Aerosol optical depth [-] Broadband aerosol optical depth (broad-band turbidity).

52 Snow depth [-]

53 Days since last [day] Number of days since last snowfall.


snowfall

54 Month [-] The month of the year.

4–694
TRNSYS 18 – Mathematical Reference

55 Hour of the month [hr] The hour of the month.

56 Hour of the day [hr] The hour of the day.

57 Day of the year [-] The day of the year.

58 Day of the month [-] The day of the current month.

59 Ground reflectance [0..1] The reflectance of the ground under current conditions.

4.12.1.2. Simulation Summary Report Contents


VALUE FIELDS

Weather file format [n/a] An indication of which standard file format (TMY, TMY2, IWEC, etc.) is
being read

Weather file name [n/a] The name and location of the weather file.

4.12.1.3. Hints and Tips


There are no usage hints written for this component. Please feel free to submit your tips!

4.12.1.4. Nomenclature
Eo,sky [0..1] Clear sky emissivity
Tdewpt [ºC] Dew point temperature
time [hr] The hour of the year (simulation time)
pressure [millibars] Atmospheric pressure
Esky [0..1] Emissivity of the sky in the presence of clouds
fcloud [0..1] Fraction of sky covered by opaque clouds
Ecloud [0..1] Emissivity of clouds
Tamb [ºC] Ambient temperature
Tmains [ºC] Mains temperature
[ºC] Average annual air temperature
Tamb
Tamb,max [ºC] Maximum difference between monthly average ambient temperatures

day [1..365] Julian day of the year

4.12.1.5. Detailed Description


Most of Type15 is devoted to reading standard format data files. With the raw data read from the file, it calls
the TRNSYS kernel subroutine getIncidentRadiation to compute the amount of solar radiation falling on
surfaces of arbitrary user-defined orientation. Since the getIncidentRadiation subroutine is used by various
other TRNSYS components and may be called by user-written components, it is fully documented in the
07-Programmer’s Guide manual. Type15 also includes an algorithm for calculating the effective sky
temperature. This algorithm came from a Thermal Energy System Specialists Utility Library component

4–695
TRNSYS 18 – Mathematical Reference

(Type575). In addition to these three main components, Type15 also calculates a number of other useful
weather related values based on algorithms published by the United States Department of Energy’s
Building America Program [6]. This section is devoted to a discussion of the sky temperature model [7],
Building America algorithms, and other Type15 outputs. Please refer to the getIncidentRadiation section of
the 07-Programmer’s Guide manual for information about Type15’s solar radiation processing algorithms.

OPERATION MODES AND ACCEPTED FILE FORMATS


The following standard weather data formats can be read and processed by Type15:

Mode Format Description & references


1 TMY (TMY1) Original TMY format used by the NSRDB (National Solar Radiation Data
Base) [4]
2 TMY2 TMY2 format originally used for the US NSRDB database. Also used by
all Meteonorm-generated weather files distributed with TRNSYS
(beginning with version 16). [1]
3 EPW EnergyPlus / ESP-r weather format [2]. A large database of weather
files is available on the EnergyPlus website:
http://www.eere.energy.gov/buildings/energyplus/weatherdata.html
4 IWEC ASHRAE's International Weather for Energy Calculation data format [3]
5 CWEC Canadian Weather for Energy Calculation [5]
6 Meteonorm Identical to the TMY2 format originally used for the US NSRDB
(TMY2) database. Provided as a separate mode for user convenience.
7 TMY3 Typical Meteorological Year version 3 format.
8 German TRY German TRY version 2004 format.
2004
9 German TRY German TRY version 2010 format.
2010

NOTE: Fundamentaly, the wind direction in TRNSYS depends on the convention given in the weather
data file. The standard file-formats indicated in the above table use as convention N=0°, E=90°, etc.
The user must check that this convention is in accordancd with the specific component that will use
the information later in the simulation (i.e., COMIS or CONTAM).

SKY TEMPERATURE
Calculation of the sky temperature begins with an estimation of the clear sky emissivity based on the dew
point temperature. The dew point correlation for clear sky emissivity is:
2
 Tdewpt  T 
E o, sky  0.711  0.56     0.73 *  dewpt  Eq. 4.12.1-1
 100   100 
The clear sky emissivity is then corrected for time of day in order to account for the differences in radiative
transfer between the night time black sky and the day time blue sky, as shown in the following equation in
which time is the hour of the year:

 MODtime,24 
Eo,sky  Eo,sky  0.013  cos 2   Eq. 4.12.1-2
 24 

4–696
TRNSYS 18 – Mathematical Reference

The clear sky emissivity is then corrected for atmospheric pressure. While Type15 reads pressure from
data files in Pascals or atmospheres (depending on the file format), the model takes makes an internal
conversion to millibars, the pressure units for which the equation was developed:

Eo,sky  Eo,sky  0.00012  pressure  1000 Eq. 4.12.1-3

The emissivity of the sky in the presence of clouds is calculated by multiplying the clear sky emissivity by
the fraction of the sky that is covered by clouds and by the emissivity of the clouds themselves, as shown
in the following equation. The fraction of sky covered by opaque clouds has a value between 0 (no cloud
cover) and 1 (complete cloud cover). Depending upon the mode of this component, the fraction of sky
covered by opaque clouds may be entered either as a value between 0 and 1 or as a percentage (0 to
100) :

Esky  Eo,sky  1.0  Eo,sky  f cloud   cloud Eq. 4.12.1-4

Finally, the sky temperature is computed using the correlation shown in the equation:

Tsky  Esky
1/ 4
Tamb  273.13  273.13 Eq. 4.12.1-5

MAINS WATER TEMPERATURE


Type15 provides an output of the temperature at which water might be expected to exit a buried distribution
system. The algorithm was developed by Christensen and Burch at the U.S. National Renewable Energy
Laboratory. The mains water temperature algorithm is:

T   360
Tmains  Tamb  offset  ratio amb,max  sin day  15  lag   90 Eq. 4.12.1-6
 2   365 
In which offset is defined as 3 ºC (6 ºF), ratio is defined by the equation:

ratio  0.22  0.0056Tamb  6.67 Eq. 4.12.1-7

And in which lag is defined by:

lag  1.67  0.56 Tamb  6.67  Eq. 4.12.1-8

The offset, lag, and ratio values were obtained by fitting data compiled by Abrams and Shedd [8], the Florida
Solar Energy Center [9], and Sandia National Labs [10].

GROUND REFLECTANCE
The user is asked to supply values of ground reflectance for snow covered and non-snow covered ground
among Type15’s parameters. Because all of the standard data file formats include data fields for whether
or not the ground is covered by snow, it is relatively easy for Type15 to change the ground reflectance
accordingly. The ground reflectance computed by Type15 follows a step function and depends only on the
value of the “snow covered ground” flag in the data file being read. The ground reflectance is set as its own
output and is also used in calculating the amount of ground reflected solar radiation that falls on each
surface defined in Type15.

HEATING AND COOLING SEASON INDICATORS


The Building America Program Performance Analysis Procedures document includes a method by which
indicators for typical heating equipment use and typical cooling equipment use can be calculated. Type15
sets one of its outputs (the heating season indicator) to a value of “1” if heating equipment is typically used
during that month and to a value of “0” otherwise. Type15 sets another output (the cooling season indicator)
to a value of “1” if cooling equipment is typically used and to a value of “0” otherwise. The methodology for
determining heating season is as follows:

4–697
TRNSYS 18 – Mathematical Reference

The heating system is typically enabled during a month in which the monthly average temperature is less
than 21.94 C and during December and January if the annual minimum air temperature is less than 15 C.
The cooling system is typically enabled during a month in which the monthly average temperature is above
18.89 C and during July and August. Lastly, if there are two consecutive months during which the heating
system is enabled the first month and the cooling system is enabled the second month (or vice versa) then
both systems should be allowed to operate during both months.

MONTHLY AND ANNUAL CONDITIONS


Type15 outputs the minimum, maximum and average monthly and annual temperature as the simulation
progresses. The values are all calculated during Type15’s initialization at the beginning of the simulation
so the values do not represent running averages, minima or maxima.

4.12.1.6. References
[1] National Renewable Energy Laboratory. 1995. User's Manual for TMY2s (Typical Meteorological
Years), NREL/SP-463-7668, and TMY2s, Typical Meteorological Years Derived from the 1961-1990
National Solar Radiation Data Base, June 1995, CD-ROM. Golden: NREL.
[2] Crawley, Drury B., Jon W. Hand, Linda K. Lawrie. 1999. “Improving the Weather Information Available
to Simulation Programs,” in Proceedings of Building Simulation ’99, Volume II, pp. 529-536, Kyoto,
Japan, September 1999. IBPSA.
[3] ASHRAE. 2001. International Weather for Energy Calculations (IWEC Weather Files) Users Manual
and CD-ROM, Atlanta: ASHRAE
[4] National Climatic Data Center. 1981. Typical Meteorological Year User's Manual, TD-9734, Hourly
Solar Radiation—Surface Meteorological Observations, May 1981. Asheville: National Climatic Data
Center, U.S. Department of Commerce.
[5] Numerical Logics. 1999. Canadian Weather for Energy Calculations, Users Manual and CD-ROM.
Downsview, Ontario: Environment Canada.
[6] Hendron, R. et. al., “Building America Performance Analysis Procedures” (revision 1), Building
America, U.S. Department of Energy, NREL/TP-550-35567
[7] Berdahl, Martin M., “Characteristics of Infrared Sky Radiation in the U.S.A.”, Solar Energy Journal,
33.4 (1984): 321.
[8] Abrams, D.W., and Shedd, A.C., 1996. “Effect of Seasonal Changes in Use Patterns and Cold Inlet
Water Temperature on Water Heating Load”, ASHRAE Transactions, AT-96-18-3.
[9] Parker, D., 2002. “Research Highlights from a Large Scale Residential Monitoring Study in a Hot
Climate”. FSEC-PF369-02. Cocoa, FL, Florida Solar Energy Center.
[10] Kolb, G., 2003. Private communication. Sandia National Laboratories, Albuquerque, NM.

4–698
TRNSYS 18 – Mathematical Reference

4.12.2. Type 99: User-Defined File Format Data Reader /


Processor
This component serves the main purpose of reading weather data at regular time intervals from a data file,
converting it to a desired system of units and generating direct and diffuse radiation outputs for an arbitrary
number of surfaces with arbitrary orientation and inclination.
Type 99 reads some standard weather data file formats, as well as a user-specified format according to a
syntax explained here below.
This data reader is also able to read in general data (which may be any kind of data without restriction to
weather data), converting it to a desired system of units and making it available to other TRNSYS UNITS
as time varying forcing functions.
Type 99 uses free-formatted reading for user defined data. Each value must be separated from the previous
value by a blank or a comma.

4.12.2.1. Parameter / Input / Output Reference


PARAMETERS

1 Logical unit [-] This parameter sets the Fortran Logical Unit (File reference
number) of the output file. It is used internally by TRNSYS to refer
to the file. This parameter will automatically be assigned to a
unique value by the TRNSYS Studio

2 Sky model for diffuse [-] This parameter selects the sky model used to calculate diffuse
radiation radiation on tilted surfaces: 1: Isotropic sky model, 2: Hay and
Davies model, 3: Reindl model, 4: Perez 1988 model, 5: Perez
1999 model.
Note: The Perez 1999 model is usually considered to be the best
available model

3 Tracking mode [-] This parameter is used to indicate that the surfaces on which the
tilted surface radiation is calculated are tracking the sun: 1: Fixed
surface, 2: Single axis tracking, vertical axis (fixed slope, variable
azimuth), 3: Single-axis tracking, axis is in the plane of the surface,
4: Two-axis tracking

INPUTS

1 Ground reflectance [-] The reflectance of the ground above which the surface is
located.Typical values are 0.2 for ground not covered by snow and
0.7 forground covered by snow.

For Each Surface:

2 Slope of surface [degress] The slope of the surface or tracking axis. The slope is positive
when tilted in the direction of the azimuth. 0 = Horizontal, 90 =
Vertical facing toward azimuth. Refer to the abstract for details on
slope specification for tracking surfaces.

3 Azimuth of surface [degrees] The solar azimuth angle is the angle between the local meridian
and the projection of the line of sight of the sun onto the
horizontalplane. 0 = Facing equator, 90 = Facing west, 180 =

4–699
TRNSYS 18 – Mathematical Reference

Facing north, 270 = Facing east. Refer to the manual for details on
the azimuth parameter for tracking surfaces.

OUTPUTS

The outputs are cycled based on the number of values to be assessed (1-10)

1 Ambient Temperature [any] The ambient dry-bulb temperature

2 Relative Humidity [-] The ambient relative humidity

3 Wind Velocity [m/s] The wind speed

4 Wind Direction [-] The wind direction (specified by the user)

5 User Defined Data 1 [any] The fifth value read from the data file

6 User Defined Data 2 [any] The sixth value read from the data file

7 User Defined Data 3 [any] The seventh value read from the data file

8 User Defined Data 4 [any] The eighth value read from the data file

9 Extraterrestrial [kJ/hr.m^2] Ninth value read from data file (if PAR 2 > 8).
Radiation on Horizontal

10 Solar Zenith Angle [degrees] Tenth value read from data file (if PAR 2 > 9).

11 Solar Azimuth Angle [degrees] Eleventh value read from data file (if PAR 2 > 10).

12 Total Radiation on the [kJ/hr.m^2] Twelfth value read from data file (if PAR 2 > 11).
Horizontal

13 Beam Radiation on the [kJ/hr.m^2] Thirteenth value read from data file (if PAR 2 > 12).
Horizontal

14 Sky Diffuse Radiation [kJ/hr.m^2] Fourteenth value read from data file (if PAR 2 > 13).
on the Horizontal

15 Ground Relected [kJ/hr.m^2] Fifteenth value read from data file (if PAR 2 > 14).
Diffuse Radiation on
the Horizontal

16 Angle of Incidence for [degrees] Sixteenth value read from data file (if PAR 2 > 15).
the Horizontal

17 Slope of the Horizontal [degrees] Seventeenth value read from data file (if PAR 2 > 16).

For Each Surface:

18 Total Radiation on [kJ/hr.m^2] Eighteenth value read from data file (if PAR 2 = 18).
Tilted Surface

19 Beam Radiation on [kJ/hr.m^2]


Tilted Surface

4–700
TRNSYS 18 – Mathematical Reference

20 Sky Diffuse Radiation [kJ/hr.m^2]


on Tilted Surface

21 Ground Reflected [kJ/hr.m^2]


Diffuse Radiation on
Tilted Surface

22 Angle of Incidence for [degrees]


Tilted Surface

23 Slope of Tilted Surface [degrees]

4.12.2.2. Simulation Summary Report Contents


This component does not produce an entry in the Simulation Summary Report (*.ssr) file.

4.12.2.3. Hints and Tips


 Up to 5 UNITS of TYPE 99 may be specified.
 The data from line to line must be at constant time intervals (e.g., hourly ambient temperature
readings).
 In user defined data mode (MODE 0), values are output in the same sequence as they appear on the
data lines, i.e. if the 3rd value on each data line is CO 2 concentration, then the 3rd OUTPUT will be
the CO2 concentration value.
In every weather data mode, the OUTPUTS have the same predefined order in order to facilitate the
connection process.
 In user defined data mode (MODE 0), up to 20 comment lines may precede the data lines. Comment
lines must not begin with a number.
 Outputs may or may not be interpolated between data timesteps depending upon the parameter
specifications. For instance, if the number of occupants of a room were read in, these should not be
interpolated.
 If Simulation ends with Weather Data containing radiation  0 the output for radiation data is set to
zero for the last hour of simulation.
 The wind direction in TRNSYS depends on the convention given in the weather data file. The standard
file-formats indicated in the above table use as convention N=0°, E=90°, etc. The user must check
that this convention is in accord with the specific component that will use the information later in the
simulation (i.e., COMIS or CONTAM).

4.12.2.4. Nomenclature
AI Anisotropy index

ai Addition factor for the ith value

a/c Weighted circumsolar solid angle


f Modulating factor for Reindl titlted surface model
F1' Reduced brightness coefficient (circumsolar)

F2' Reduced brightness coefficient (horizon brightening)

Io Extraterrestrial radiation

4–701
TRNSYS 18 – Mathematical Reference

Ion Extraterrestrial radiation at normal incidence

Ib Beam radiation on horizontal surface

Ibn Beam radiation at normal incidence

IbT Beam radiation on tilted surface

Id Diffuse radiation on horizontal surface

4.12.2.5. Detailed Description


Type 99 uses the same algorithms as Types 15 and 16 to calculate solar radiation on tilted surfaces (with
the same tilted surface radiation modes 1 to 4) and to calculate the position of one – and two-axes tracking
surfaces. Please refer to the getIncidentRadiation section of the 07-Programmer’s Guide manual for more
details.
The Radiation data is checked for values > 0 before sunrise and after sunset and is interpolated for time
steps smaller or larger than the time difference between two data lines. The internal radiation Processor
generates direct and diffuse radiation outputs for an arbitrary number of surfaces with any azimuth and
slope. Moreover, standard outputs are Temperature, relative humidity, wind velocity as well as wind
direction. Up to four more data columns may be processed using user defined weather data in MODE 1.

HORIZONTAL RADIATION MODES


Type 99 needs two components of solar radiation (e.g. beam and diffuse horizontal) in order to calculate
the radiation on a tilted surface. It can use different combinations:
 Ib and Id
 I and Id
 I and Ibn
 I, Tamb and RH. The diffuse radiation is estimated using Reindl's full correlation (6a)
 The diffuse radiation is estimated using Reindl's reduced correlation

DATA FILE SYNTAX


The header contains keywords, followed by the respective values. Keywords are contained between
<brackets>.
An example for the German location Würzburg is shown here below:

<userdefined>
<longitude> -9.9 ! East of greenwich: negative
<latitude> 49.8
<gmt> 1 !time shift from GMT, east: positive (hours)
<interval> 1 !Data file time interval between consecutive lines (hours)
<firsttime> 1 !Time corresponding to first data line (hours)
<var> IBEAM_H <col> 5 <interp> 0 <add> 0 <mult> 1 <samp> -1 !...to get radiation in W/m²
<var> IBEAM_N <col> 0 <interp> 0 <add> 0 <mult> 1 <samp> 0 !...to get radiation in W/m²
<var> IDIFF_H <col> 6 <interp> 0 <add> 0 <mult> 1 <samp> -1 !...to get radiation in W/m²
<var> IGLOB_H <col> 0 <interp> 0 <add> 0 <mult> 1 <samp> 0 !...to get radiation in W/m²
<var> TAMB <col> 3 <interp> 2 <add> 0 <mult> 1 <samp> 0 !...to get °C
<var> RHUM <col> 4 <interp> 1 <add> 0 <mult> 100 <samp> 0 !...to get rel. hum. in %
<var> WSPEED <col> 2 <interp> 1 <add> 0 <mult> 1 <samp> 0 !...to get wind speed in m/s
<var> WDIR <col> 1 <interp> 1 <add> 0 <mult> 1 <samp> 0 !...to get wind dir. in degr.
<var> udef1 <col> 12 <interp> 0 <add> 0 <mult> 100 <samp> 0 !...to get ... in ...
<var> test <col> 9 <interp> 1 <add> 0 <mult> 100 <samp> 0 !...to get ... in ...
<var> idefix <col> 8 <interp> 2 <add> 0 <mult> 100 <samp> 0 !...to get ... in ...
<var> udef4 <col> 11 <interp> 0 <add> 0 <mult> 100 <samp> 0 !...to get ... in ...
<data>

4–702
TRNSYS 18 – Mathematical Reference

270 2.6 .7 .93 0 0 -10 3.2 1e3 .2 8 0 1


330 1.5 .6 .94 0 0 -11 3.2 2e3 .2 8.1 0 1

The whole header is enclosed by two keywords <userdefined> and <data>, marking the beginning and end
of the header section:
<userdefined>
.
.
.
<data>
Inside this header, the following keywords must appear:

Keyword Units Description


<longitude> VALUE (degrees) east of greenwich: negative
<latitude> VALUE (degrees)
<gmt> VALUE (hours) time shift from GMT, east: positive
if solar time  write “solar”
<interval> VALUE (hours) data file time interval td between consecutive lines

<firsttime> VALUE (hours) time corresponding to first data line

It is extremely important to specify the correct values. Any difference in geographical data or time will lead
to an artificial time shift. For radiation data, this results in a wrong amount of direct or diffuse radiation on
tilted surfaces. This will cause warnings in the listing file:
***** WARNING FROM UNIT 12 TYPE 99 DATA READER
RADIATION AT TIME 6.25 HAS A VALUE OF 23 BUT SUN IS DOWN
IN DATA COLUMN 5 -- SUNRISE AT 6.67, SUNSET AT 17.21
Weather data variables are indicated by the keyword <var>, followed by specific names:

Specific Name Description


IBEAM_H Beam radiation on horizontal
IBEAM_N Beam radiation at normal incidence
IDIFF_H Sky diffuse radiation on horizontal
IGLOB_H Global radiation on horizontal
TAMB Ambient temperature
RHUM Relative humidity of ambient air
WSPEED Wind speed
WDIR Wind direction

One or more of these variables have to appear in the user defined data header. Please use the variable
names like indicated in the listing above, when the corresponding physical variable is available. There is
special type of interpolation for radiation data, which can’t be changed by the user, since behavior at sunrise
and sunset has to be taken into account. Thus the values of the keyword <interp> are ignored for radiation
data.
Up to 4 extra quantities can be read in, like “udef1” in the Würzburg example.
If the column number equals 0 inside a <var> definition line, this indicates to skip the information.

4–703
TRNSYS 18 – Mathematical Reference

Moreover, information about the columns containing the respective values, the interpolation mode, the
ability of data manipulation through addition and multiplication factors as well as the value which determines
the data corresponding time interval are indicated by additional keywords. The keywords belong to a certain
variable and have to appear in a one line statement and in a fixed order:
<var> NAME <col> VALUE <interp> VALUE <add> VALUE <mult> VALUE <samp> VALUE

Keyword Value Description


<col> Number of the column for variable NAME. If value = 0, the variable
will be skipped and the respective output set to zero
<interp> 0 No interpolation
1 Linear interpolation
2 Five point spline interpolation (Akima)
<add> addition factor ai

<mult> multiplication factor m i

<samp> -1 column value is a mean value related to the time interval td ending
at the time corresponding to actual data line
0 column value is a mean value related to the time interval td/2 before
and after the time corresponding to actual data line
1 column value is a mean value related to the time interval td starting
at the time corresponding to actual data line

Addition and multiplication factors have to be chosen in a way that values have the following units:

Variable Unit
Radiation [W/m²]
Temperature [°C]
Relative humidity [%]
Wind speed [m/s]
Wind direction [degrees]

It is recommended to avoid spline interpolation for relative humidity data, because the smoothing of data
may result in a relative humidity of more than 100% for data with a sudden increase from 90 to 99% for
example. The same is valid for wind speed to avoid negative values. So spline interpolation is applicable in
the case of temperature or additional user defined data columns.

4.12.2.6. References
1. SOLMET, Volume 2 - Final Report, "Hourly Solar Radiation Surface Meteorological Observations,"
TD-9724, (l979).
2. Randall, C.M. and Whitson, M.E., Final Report, "Hourly Insolation and Meteorological Data Bases
Including Improved Direct Insolation Estimates," Aerospace Report No. ATR-78(7592)-l, (l977).
3. Duffie, J.A. and Beckman, W.A., Solar Energy Thermal Processes, Wiley, New York, l974.
4. ASHRAE Handbook of Fundamentals, American Society of Heating, Refrigerating, and Air-
Conditioning Engineers, l972.
5. Braun, J.E. and Mitchell, J.C., "Solar Geometry for Fixed and Tracking Surfaces," Solar Energy, vol.

4–704
TRNSYS 18 – Mathematical Reference

31, No. 5, October, 1983.


6. (a) Reindl, D. T., Beckman, W. A., Duffie, J. A., "Diffuse Fraction Correlations", Solar Energy, Vol.
45, No. 1, 1990, pp. 1-7.
(b) Reindl, D. T., Beckman, W. A., Duffie, J. A., “Evaluation of Hourly Tilted Surface Radiation
Models", Solar Energy, Vol. 45, No. 1, 1990, pp. 9-17.
7. Hay, J.E., Davies, J.A., "Calculation of the Solar Radiation Incident on an Inclined Surface",
Proceedings First Canadian Solar Radiation Workshop, pp. 59-72, (1980).
8. Perez, R., Stewart, R., Seals, R., Guertin, T., "The Development and Verification of The Perez Diffuse
Radiation Model", Sandia Report SAND88-7030, (Sandia National Laboratories, Albuquerque, New
Mexico, 87185, USA) October, 1988.

4–705

You might also like