You are on page 1of 32

Division Evaluation et Valorisation Logicielles

TRNSYS
TRansient SYstem Simulations

Introduction to TRNSYS N. Blair / W. Keilholz

Division Evaluation et Valorisation Logicielles


Introduction to TRNSYS

Why Simulate ?
History of TRNSYS
TRNSYS Concept
Simulation Input
Input File Keywords
Simulation Output
TRNSYS Family of Tools

Introduction to TRNSYS N. Blair / W. Keilholz

1
Why Use Simulations ?
Division Evaluation et Valorisation Logicielles

Orders of magnitude faster than


experiments
Orders of magnitude less expensive than
experiments
Non-linear dependence on weather
Variation on short and long time scales

Introduction to TRNSYS N. Blair / W. Keilholz

Where is TRNSYS useful ?


Division Evaluation et Valorisation Logicielles

Component OUTPUT is a function of time


Mathematical solution involves time-
dependent differential equations
(ex. thermal storage devices)

One or more of the component outputs is to


be integrated over time
Introduction to TRNSYS N. Blair / W. Keilholz

2
History of TRNSYS
Division Evaluation et Valorisation Logicielles

Public/government support to SEL


First public version was 6.0 in March 1975
Originally a PhD thesis by Sanford Klein
Originally developed for solar processes
Current developments focus on building loads
and HVAC systems

TRNSYS ideas used in other programs:


DOE2, HVACSim+, TRACE,CA-SIS
Introduction to TRNSYS N. Blair / W. Keilholz

Cross-Section of Users
Division Evaluation et Valorisation Logicielles

Approx. 200 Universities worldwide


National Renewable Energy Lab
Florida Solar Energy Center
National Institute of Standards and Technology (NIST)
Sandia National Labs
National Aeronautic and Space Administration (NASA)
Sacramento Municipal Utility District
Johnson Controls
Bechtel Corporation
Trane Company
BMW
Electricitie de France
PSA (Peugeot-Citroen)
Introduction to TRNSYS N. Blair / W. Keilholz

3
Why has TRNSYS survived ?
Division Evaluation et Valorisation Logicielles

General Purpose (from PV cells to cows)


Flexible (modular)
General Component Formulation
Open Source Code
Documentation
Model Exchange between users
Continuous full-time SUPPORT

Introduction to TRNSYS N. Blair / W. Keilholz

Cooperative TRNSYS Activities


Division Evaluation et Valorisation Logicielles

SEL : Distributors
TRNSHELL, TRNSED - Belgium
- Germany
TRNSYS Source Code - France
- Japan
- Spain
- Sweden
- United States

TRANSSOLAR :
CSTB : IISiBat
PREBID
Graphical Front-end
Type 56 Development
Introduction to TRNSYS N. Blair / W. Keilholz

4
Modular Approach
Division Evaluation et Valorisation Logicielles

Provides tremendous flexibility


Well Suited for systems with time-
dependent conditions

Requires some expertise

Introduction to TRNSYS N. Blair / W. Keilholz

What is TRNSYS ?
Division Evaluation et Valorisation Logicielles

Algebraic and differential equation solver


Library of common thermal energy systems
Method for adding user-written modules
Designed especially for transient
simulations
Routines for input of weather and time-
dependent forcing functions
Introduction to TRNSYS N. Blair / W. Keilholz

5
TRNSYS Concepts
Division Evaluation et Valorisation Logicielles

Modular technique:
Large problem --> several smaller problems

General Formulation

Entire problem reduced to :


formulating mathematical models
describing interconnection process
Introduction to TRNSYS N. Blair / W. Keilholz

System Definition
Division Evaluation et Valorisation Logicielles

Set of Components
Each component represents a physical structure
Interconnected in order to accomplish a
specified task
Example : Solar System
Collector
Tank
Heat Exchanger
Pump
Controller

Introduction to TRNSYS N. Blair / W. Keilholz

6
System Definition (Cont.)
Division Evaluation et Valorisation Logicielles

System consists of Components

Therefore:
Simulate system performance by simulating
the performance of the individual
components.

Introduction to TRNSYS N. Blair / W. Keilholz

Black Box Approach


Division Evaluation et Valorisation Logicielles

Requires two unique types of information

Parameters : time-independent quantities


Inputs : time-dependent quantities

Provides desired variables as Outputs

Introduction to TRNSYS N. Blair / W. Keilholz

7
Black Box (Graphic)
Division Evaluation et Valorisation Logicielles

Black Box

(Subroutine:
FORTRAN, C, C++, EES, ...)

Introduction to TRNSYS N. Blair / W. Keilholz

Information Flow
Division Evaluation et Valorisation Logicielles

Arrows into and out of components


analogous to pipes and wires in a real
system
Mass flow and temperature -> pipe
information flow
Pump control signal -> information flow
through a wire

Introduction to TRNSYS N. Blair / W. Keilholz

8
System Diagram
Division Evaluation et Valorisation Logicielles

m
& , To
Aux. Heater m
& , Tset
r
to
ec
oll

&
Q
rC

aux
la
So

m
& , Ti

Introduction to TRNSYS N. Blair / W. Keilholz

Information Flow
Division Evaluation et Valorisation Logicielles

Ti m
& S Ta
A
FR
Collector UL m
& To
Cp

m
& To Tset
Aux. Heater Cp

m
& & aux
Q
Introduction to TRNSYS N. Blair / W. Keilholz

9
Information Flow (Cont.)
Division Evaluation et Valorisation Logicielles

Time Q& aux Time


Time
Quantity
Dependent
Integrator
Conditions
Time Q& aux

Ta Ti S Q aux
Printer

Print of Q aux

Introduction to TRNSYS N. Blair / W. Keilholz

Information Flow Diagram


Division Evaluation et Valorisation Logicielles

Ti

Time Dependent S To
Conditions Solar Collector
Ta

Auxiliary Heater

&
Q aux
Printer Q aux
Integrator

Print of Q aux

Introduction to TRNSYS N. Blair / W. Keilholz

10
Input-Output Scheme
Division Evaluation et Valorisation Logicielles

TRNSYS list of components and interconnections


Type Number
identifies the function of the equipment
each component given a unique Type number

Unit Number
Ex: How to distinguish if more than one collector??
arbitrarily assigned value for each instance of a
component (normally some pattern is used)
unique for each simulation (only one Unit 10)

Introduction to TRNSYS N. Blair / W. Keilholz

Information Flow Diagram


Division Evaluation et Valorisation Logicielles

Ti
UNIT 1 TYPE 9
S UNIT 2 TYPE 1 To
Time Dependent
Conditions Ta Solar Collector

Unit 3 TYPE 6
Auxiliary Heater

&
Q
Q aux aux
UNIT 5 TYPE 25
Printer UNIT 4 TYPE 24
Integrator
Print of Q aux

Introduction to TRNSYS N. Blair / W. Keilholz

11
Acyclic vs. Recyclic
Division Evaluation et Valorisation Logicielles Information Flow

UNIT X TYPE X UNIT Y TYPE Y UNIT Z TYPE Z

Introduction to TRNSYS N. Blair / W. Keilholz

Available TRNSYS Components


Division Evaluation et Valorisation Logicielles

Three General Types of Components


Utility Components
ex: data reader, printer, plotter

Equipment Components
ex: chiller, solar collector, pump, fan

Physical Phenomena Components


ex: psychrometrics, radiation processor

Introduction to TRNSYS N. Blair / W. Keilholz

12
Standard Components (1)
Division Evaluation et Valorisation Logicielles

Utility Components Thermal Storage


Data Reader Stratified Liquid Storage Tank
Weather Data Generator Rockbed
Radiation Processor Algebraic Tank
Time-dependent functions
Load Profile Sequencer HVAC Equipment
ON/OFF Auxiliary Heater
Algebraic Operations Absorption Air conditioner
Quantity Integrator Dual-Source Heat Pump
Periodic Integrator
Economics Conditioning Equipment
Cooling Coil
Psychrometrics Cooling Tower
Refrigerant Properties Vapor Compression Chiller
Desiccant Systems
Convergence Promoter
Unit Conversion Routine

Introduction to TRNSYS N. Blair / W. Keilholz

Standard Components (2)


Division Evaluation et Valorisation Logicielles

Building Loads and Structures Hydronics


Energy/(Degree Day) House Pump
Detailed Single-zone Fan
Detailed Multi-zone Mixing Valve/Tee
Roof and Attic Pressure Relief Valve
Overhangs and Wingwalls Pipe/Duct
Window
Thermal Storage Wall Controllers
Attached Sunspace Differential Controller
3 Stage Room Thermostat
Heat Exchangers Microprocessor Controller
Heat Exchanger
Waste Heat Recovery

Introduction to TRNSYS N. Blair / W. Keilholz

13
Standard Components (3)
Division Evaluation et Valorisation Logicielles

Electric Components Solar Collectors


PV/Thermal Collector Thermal Efficiency Map
Storage Battery Detailed Performance Map
Regulator/Inverter Theoretical CPC
Combined PV subsystem Incidence Angle Modifiers
Theoretical Flat-Plate
Output Components Air Collector-Storage Subsystem
Printer Domestic Water Heating
Plotter Subsystem
Histogram Plotter Collector Array Shading
Simulation Summarizer
On-Line Printer

Introduction to TRNSYS N. Blair / W. Keilholz

Non-Standard Components
Division Evaluation et Valorisation Logicielles

TRNLIB - Online Library of User Written


components
ASHRAE Toolkits
HVACSIM+ Models
SEL Student written components
Any user can contribute components here

Commercial Non-Standard Libraries


TESS (Thermal Energy Systems; USA)
Transsolar ( Germany )

Introduction to TRNSYS N. Blair / W. Keilholz

14
Transsolar Non-Standard
Division Evaluation et Valorisation Logicielles
Components

z Building Components
Multizone Building Model with transparent Insulation
Interzonal Airflow

z Thermal Storage Components


Floor Panel Heating / Hypocaust Thermal Storage
Seasonal Ground Heat Storage (Multiport Pit Storage Model)
Multi-port Tank Storage Model
ICEPIT Pit Storage Model for Heat and Cold Storage
Indoor and Outdoor Pool Model

Introduction to TRNSYS N. Blair / W. Keilholz

Transsolar Non-Standard
Division Evaluation et Valorisation Logicielles
Components
z Solar and HVAC Components
Detailed Solar Collector Model w/ Capacity and Quadratic Loss Coef.
UNICOL unglazed Collector
Window Collector Model

z HVAC Components
Gas fired Aux. Heater with Flue Condensation
Static and Dynamic Radiator Models
Electric and Gas Driven Compression Heat Pump

z Controller Components
PID-Controller

z TRNSPID Dynamic Parameter Identification with TRNSYS

Introduction to TRNSYS N. Blair / W. Keilholz

15
TESS Non-Standard
Division Evaluation et Valorisation Logicielles Components (1)
zHVAC Components
2-Speed Fan
5-Stage Room Thermostat
Residential Cooling Coil
Simple Single-Zone Building
10-Port Flow Mixer
10-Port Flow Diverter Heat Exchanger with Hot-Side Bypass
Modified TYPE 3 Fan
Modified TYPE 6 Auxiliary Heater (Simple Furnace)
zGround Coupled Heat Pump Components
Buried Horizontal Pipe
Ground Temperature Model
U-Tube Vertical Ground HX
Tube-in-Tube Vertical Ground HX
Water Source Heat Pump

Introduction to TRNSYS N. Blair / W. Keilholz

TESS Non-Standard
Division Evaluation et Valorisation Logicielles Components (2)
Utility Components
ASHRAE Infiltration Model
Ground Temperature Model
Sky Temperature Model
Equipment Fouling
ASHRAE Occupancy Loads
Night Setback/setup model
Heating and Cooling Season Model
Average Day Creator for 2 Inputs
2-Dimensional Bin Sorter

Introduction to TRNSYS N. Blair / W. Keilholz

16
Simulation Input
Division Evaluation et Valorisation Logicielles

Weather files
TMY, TMY2, non-standard
Load files
drives the use of energy
Complete TRNSYS Input file (.dck)
tells TRNSYS what to do
components and connections

For multizone building simulation:


Building information files (describe the building)
output of PREBID

Introduction to TRNSYS N. Blair / W. Keilholz

Weather Files
Division Evaluation et Valorisation Logicielles

TMY (Typical Meteorological Year)


hourly weather for 230 locations in US & Canada

TMY2
Recently released (1996) update to TMY
Better data
Available free from NREL website
Readable now, standard mode in TRNSYS 15

Introduction to TRNSYS N. Blair / W. Keilholz

17
Weather Data (2)
Division Evaluation et Valorisation Logicielles

TRNSYS TMY
modified TMY files
unnecessary values removed for size
4 US cities included in standard package
230 US/Canadian Cities available for download at SEL
website

Non-Standard
any data file can be read in
formatted or free formatted file reading (Type9)

Introduction to TRNSYS N. Blair / W. Keilholz

TRNSYS Input File Example


Division Evaluation et Valorisation Logicielles

SIMULATION 0.0 72.0 1.0

UNIT 16 TYPE 16 SOLAR RADIATION PROCESSOR


PARAMETERS 9
3 1 1 152 43.1 4871 0. 2 -1
INPUTS 6
1,1 1,19 1,20 0,0 0,0 0,0
0. 0. 0. 0.2 40 0.

UNIT 4 TYPE 1 FLAT-PLATE COLLECTOR


PARAMETERS 14
1 1 6.5 4.19 1 50 0.7 15 0.0 -1 4.19 1 0.1 0.0
INPUTS 10
3,1 3,2 3,2 1,2 16,6 16,4 16,5 0,0 16,9 16,10
20 200 200 15.6 0.0 0.0 0.0 0.2 0.0 40.

Introduction to TRNSYS N. Blair / W. Keilholz

18
Input File Keywords
Division Evaluation et Valorisation Logicielles

SIMULATION to tf t
to - is the hour of the year at which the simulation is to begin.
tf - is the hour of the year at which the simulation is to end.
t - is the timestep to be used (hours; fractions are possible:
ex. 0.5 = half an hour).

Every simulation must have this command


Fixed Timestep: Cannot be varied during simulation

Introduction to TRNSYS N. Blair / W. Keilholz

Input File Keywords


Division Evaluation et Valorisation Logicielles

END

The END statement must be the last line of a


TRNSYS input file.

Introduction to TRNSYS N. Blair / W. Keilholz

19
Input File Keywords
Division Evaluation et Valorisation Logicielles

UNIT n TYPE m Comment


where
n - is the UNIT number of the component.
m - is the TYPE number of the component.

Allowable TYPE numbers are integers between 1 and 300.


Examples:
UNIT 6 TYPE 15 EXAMPLE COMPONENT
UNIT 26 TYPE 26 PLOTTER
UNIT 1 TYPE 4 TANK

Introduction to TRNSYS N. Blair / W. Keilholz

Input File Keywords


Division Evaluation et Valorisation Logicielles

PARAMETERS n
where
n is the number of PARAMETERS to follow on the
next line(s).
Normally, this value is the number of parameters
required by the component
Example:
The TYPE 3 pump model requires 4 PARAMETERS:
UNIT 1 TYPE 3 PUMP
PARAMETERS 4
100. 4.19 100. 0.2
Introduction to TRNSYS N. Blair / W. Keilholz

20
Input File Keywords
Division Evaluation et Valorisation Logicielles

INPUTS n
where
n - is the number of INPUTS to follow on the next line(s).
u1,o1 u2,o2 . . . ui,oi . . . un,on
where
ui - is the number of the UNIT to which the ith INPUT is connected.
oi - is the OUTPUT (i.e., the 1st, 2nd, etc.) of UNIT number ui

V1, V2, . . . , Vi, . . . , Vn


where
Vi - is the initial value of the ith INPUT variable.

Introduction to TRNSYS N. Blair / W. Keilholz

Input File Keywords


Division Evaluation et Valorisation Logicielles

Complete example of one component in the input file

UNIT 1 TYPE 4 TANK


PARAMETERS 6
2 .42 4.19 1000 1.44 -1.69
INPUTS 5
2,1 2,2 3,1 3,2 0,0*
60. 0.0 21. 0.0 60.*

* Note the use of the constant input feature.

Introduction to TRNSYS N. Blair / W. Keilholz

21
Input File Keywords
Division Evaluation et Valorisation Logicielles

* Comment

The '*' must appear first on the line

The entire line is printed without modification.

Example:
*THIS IS AN EXAMPLE OF A COMMENT LINE
*THIS IS ANOTHER ONE
*ETC.

Introduction to TRNSYS N. Blair / W. Keilholz

Input File Keywords


Division Evaluation et Valorisation Logicielles

EQUATIONS n
NAME1 = ... equation 1 ...
NAME2 = ... equation 2
...
NAMEn = ... equation n
Equations define variables that can be used as component inputs or equations
Variables can be defined as:
algebraic functions of constants
previously defined variables
outputs from other TRNSYS components
Various built-in functions are allowed (AND(), MAX(),MIN())

Introduction to TRNSYS N. Blair / W. Keilholz

22
Input File Keywords
Division Evaluation et Valorisation Logicielles

SOLVER k

where k is 0 or 1.
0 - Successive Substitution
1 - Powells Method

Optional: If a SOLVER card is not present in the TRNSYS input


file, SOLVER 0 is assumed.

Powell Method not normally necessary

Introduction to TRNSYS N. Blair / W. Keilholz

Input File Keywords


Division Evaluation et Valorisation Logicielles

ASSIGN filename lu
where
filename - is the full name of the desired file; filename must be
less than or equal to 40 characters in length
lu - is the logical unit number to which filename is to be
assigned
The logical unit can then be used as a parameter in other components

ASSIGN \ TRNWIN\ TEST\ TEST.LST 6


ASSIGN \ TRNWIN\ TEST\ TEST.OUT 10

ASSIGN \ TRNWIN\ TEST\ TEST.PLT 11


Introduction to TRNSYS N. Blair / W. Keilholz

23
Input File Keywords
Division Evaluation et Valorisation Logicielles

TOLERANCES D A or TOLERANCES -D -A

D is a relative (and D is an absolute) error tolerance controlling the


integration error
A is a relative (and A is an absolute) error tolerance controlling the
convergence of input and output variables

Important to adjust A if there are convergence problems with the


simulation
Optional keyword: Default value of 0.01 is used

Introduction to TRNSYS N. Blair / W. Keilholz

Input File Keywords


Division Evaluation et Valorisation Logicielles

LIMITS m n p

m is the maximum number of iterations which can be performed


during a time-step before a WARNING message is printed out.
n is the maximum number of WARNING messages which may be
printed before the simulation terminates in ERROR.
p is an optional limit to turn on tracing.

Important to increase the LIMITS command if convergence problems


Optional Command : Default value or m=20 and n=50 is used

Introduction to TRNSYS N. Blair / W. Keilholz

24
Simulation Output
Division Evaluation et Valorisation Logicielles

Standard Printer (Type 25)


creates ASCII text files
able to specify printing interval (every timestep,
once a day, etc.)
Online Printer (Type 65)
plots input values to the screen during a
simulation

Introduction to TRNSYS N. Blair / W. Keilholz

Online Printer
Division Evaluation et Valorisation Logicielles

Introduction to TRNSYS N. Blair / W. Keilholz

25
Go back on time
Division Evaluation et Valorisation Logicielles

Introduction to TRNSYS N. Blair / W. Keilholz

Several Onlines
Division Evaluation et Valorisation Logicielles

Online
tabs

Introduction to TRNSYS N. Blair / W. Keilholz

26
TRNSYS Solvers
Division Evaluation et Valorisation Logicielles

Successive Substitution (Solver 0 )


Algorithm:
1. For each unit, outputs are calculated for the given 1

inputs; outputs are passed as inputs to other units


2. As long as the system doesnt converge, step 1 is 2
repeated
Many iterations can be necessary
The original and still most common solution method
Best method for standard problems
Systems which may cause problems:
Little or no capacitance (energy storage)
Rapidly changing systems with many discrete states
Introduction to TRNSYS N. Blair / W. Keilholz

TRNSYS Solvers (2)


Division Evaluation et Valorisation Logicielles

Powells Method (Solver 1)


Generates a matrix using input-output connections
Solves the input-output matrix of simultaneous
equations
Has the ability to backsolve problems
Requires more component calls each time step
Difficulty with certain components with internal
storage (pipe, Type 56)
Excellent for simulations with no capacitance (PV
systems) or discrete control states

Introduction to TRNSYS N. Blair / W. Keilholz

27
TRNSYS Tools
Division Evaluation et Valorisation Logicielles

IISiBat
graphical front-end for TRNSYS
PREBID
graphical tool for entering building information
TRNSED / TRNSHELL
tool to share simulations with non-users
environment for building TRNSYS-based applications
SimCad
CAD tool for building Simulation (add-on product)

Introduction to TRNSYS N. Blair / W. Keilholz

PREBID
Division Evaluation et Valorisation Logicielles

Blueprints .BUI
Building description

PREBID
User Interface
.DCK
Simulation
TRNSYS
IISiBat .BLD
project multizone building
Building description
Type 56 .TRN
Transfer coefficients

Introduction to TRNSYS N. Blair / W. Keilholz

28
Extension: SimCad
Division Evaluation et Valorisation Logicielles

Blueprints .BUI
SimCad
Building description

PREBID
User Interface
.DCK
Simulation
TRNSYS
.BLD
IISiBat project multizone building
Building description
Type 56 .TRN
Transfer coefficients

Introduction to TRNSYS N. Blair / W. Keilholz

TRNSED (1)
Division Evaluation et Valorisation Logicielles

Utility program for sharing TRNSYS


simulations with non-TRNSYS users
Hides unimportant TRNSYS details
Able to display user-selected values
(parameters, constant inputs, etc.)
Ideal for new users
Can be distributed to anyone

Introduction to TRNSYS N. Blair / W. Keilholz

29
TRNSED (2)
Division Evaluation et Valorisation Logicielles

Pop-up menus
Range checking for input values
Provides complete system description
User-friendly format
Dual Unit systems allow display of any
units
Context-Sensitive Help

Introduction to TRNSYS N. Blair / W. Keilholz

30
File types
Division Evaluation et Valorisation Logicielles

TRNSYS
Input
*.dck Input file, no TRNSED (from IISiBat 3)
*.trd Input file with TRNSED commands (from IISiBat 3)
*.tpf TRNSYS project file (for IISiBat 3)
*.tmy, *.tm2, *.dat, Weather data
*.bui User-readable Building description file
(for PREBID)
*.trn,*.bld Internal Building description files (from PREBID)
w4-lib.dat Window Library
*.lib Library files (layers, walls for PREBID
*.for FORTRAN Sourcecode
*.tmf TRNSYS model file (for IISiBat 3)
Output
*.lst Listing (Result) file
*.plt, *.out, *.xls, (Any extension chosen by the user)

Introduction to TRNSYS N. Blair / W. Keilholz

File types (2)


Division Evaluation et Valorisation Logicielles

COMIS
Input
*.cif Input File (from IISiBat 2)
*.set Set-file for expert options
*.cmf Meteo schedule data (any extension allowed)
*.csm Multi schedule data
*.csf Other schedule data
*.daf, *.tmf Internal, temporary time management files
Output
*.cof Standard output
*.cso Spreadsheet output files
*.cho Histogram output files
*.cer Error file

Introduction to TRNSYS N. Blair / W. Keilholz

31
File types (3)
Division Evaluation et Valorisation Logicielles

SimCad
Input
*.dxf AutoCad drawings
*.ifc Industry Foundation Class file

Output
*.bui Building description file for PREBID

Introduction to TRNSYS N. Blair / W. Keilholz

creates
Program File Data Flow
Division Evaluation et Valorisation Logicielles

*.lst
*.trd TRNSED
*.tpf *.out

IISiBat 3 TRNSYS
*.dck *.plt

Building *.inf
Air Flow Calculation

*.trn
*.rdb PREBID
*.cof
*.bld
COMIS
SimCad *.bui IISiBat 2 *.cso
*.cif

Introduction to TRNSYS N. Blair / W. Keilholz

32