Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

TRNSYS 18

a TRaNsient SYstem Simulation program

Volume 1

Getting Started

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 – Getting Started

About This Manual


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

Revision history
2004-09 For TRNSYS 16.00.0000 2005-02 For TRNSYS 16.00.0037
2006-01 For TRNSYS 16.01.0000 2006-06 For TRNSYS 16.01.0002
2007-03 For TRNSYS 16.01.0003 2009-11 For TRNSYS 17.00.0006
2010-04 For TRNSYS 17.00.0013 2012-03 For TRNSYS 17.01.0000
2014-05 For TRNSYS 17.02.0000 2018-02 For TRNSYS 18.00.0008

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:

TRNSYS Coordinator Email: techsupport@tess-inc.com


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

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

Notice
This report was prepared as an account of work partially sponsored by the United States Government.
Neither the United States or the United States Department of Energy, nor any of their employees, nor any
of their contractors, subcontractors, or employees, including but not limited to the University of Wisconsin
Solar Energy Laboratory, makes any warranty, expressed or implied, or assumes any liability or
responsibility for the accuracy, completeness or usefulness of any information, apparatus, product or
process disclosed, or represents that its use would not infringe privately owned rights.

© 2018 by the Solar Energy Laboratory, University of Wisconsin-Madison

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.

1–2
TRNSYS 18 – Getting Started

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

Additional contributors who developed components that have been included in the Standard Library are
listed in Volume 4.

Contributors to the building model (Type 56) and its interface (TRNBuild) are listed in Volume 5.

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

1–3
TRNSYS 18 – Getting Started

TABLE OF CONTENTS
1. GETTING STARTED 1–5
1.1. What is this manual? 1–5
1.2. What is TRNSYS? 1–5
1.3. How does TRNSYS work? 1–5
1.4. How do the component models work? 1–6
1.5. What are the various programs in the TRNSYS package? 1–6
1.6. How are component models added to TRNSYS? 1–8
1.7. What are the different manuals included in the TRNSYS documentation set? 1–8

1–4
TRNSYS 18 – Getting Started

1. GETTING STARTED

1.1. What is this manual?


The intent of the Getting Started manual is to explain some of the basics concepts behind how TRNSYS
works and the different tools that make up the TRNSYS package. Once you have an understanding of
these basic concepts you can move to the other volumes of the documentation set that provide detailed
information on the different tools and tutorials on the use of TRNSYS. But it is very important to
understand the concepts included in this manual before proceeding with tutorials.

1.2. What is TRNSYS?


TRNSYS is a complete and extensible simulation environment for the transient simulation of systems,
including multi-zone buildings. It is used by engineers and researchers around the world to model new
energy concepts, from simple domestic hot water systems to the design and simulation of buildings and
their equipment, including control strategies, occupant behavior, alternative energy systems (wind, solar,
photovoltaic, hydrogen systems), etc.

One of the key factors in TRNSYS’ success over the last 40 years is its open, modular structure. The
source code of the kernel as well as the component models is delivered to the end users. This simplifies
extending existing models to make them fit the user’s specific needs.

TRNSYS applications include:


 Solar systems (solar thermal and PV)
 Low energy buildings and HVAC systems with advanced design features (natural ventilation, slab
heating/cooling, double façade, etc.)
 Renewable energy systems
 Cogeneration, fuel cells
 Anything that requires dynamic simulation!

1.3. How does TRNSYS work?


TRNSYS simulations are constructed by connecting individual component models (known as Types)
together into a complete model. These individual components represent a piece of equipment that can
be represented by a system of equations to calculate its performance, such as pumps, pipes, chillers,
solar collectors, etc. These are then connected together in the TRNSYS environment similarly to how
they would be connected in real life.

When a simulation is started the TRNSYS kernel determines which Types are included in the simulation
by reading the input file. It also checks the input file for syntax errors and whether all of the Types

1–5
TRNSYS 18 – Getting Started

included in the simulation can be found in the available DLLs. If this is all correct, TRNSYS then initiates
the simulation. TRNSYS uses a method called successive substitution to solve the system of Types and
connections at any point in time. At a new time step of the simulation, the kernel (TRNSYS's brain) calls
the Types once in the order that the Types appear in the input file. The Types each return their outputs
and the kernel records the values. It then sets these outputs as the inputs to the Types as appropriate
and as described by the connections indicated in the input file then calls all the Types again. This is now
the second iteration at the same time step. Again the Types compute and report their outputs. The kernel
looks at the newly computed outputs and compares them against the values calculated at the previous
iteration. If the values differ by less than the tolerance that the user has indicated then the system of
Types is said to have converged and the kernel allows the time to proceed to the next time step. If the
values of the outputs have changed more than the tolerance allows then the kernel will repeat the
substitution / calling procedure until the outputs do converge or until a user-specified iteration limit is
reached. If the limit is reached without convergence the kernel issues a warning and proceeds to the next
time step. If enough warnings of this kind are issued then the simulation terminates in error.

When a simulation is complete, TRNSYS writes an error log file and any output files that have been set-
up for the simulation. The error file contains notification, warning and error messages from the simulation.

1.4. How do the component models work?


At the most fundamental level, a component (referred to as a Type) in TRNSYS is merely a black box.
The TRNSYS kernel feeds inputs to the black box and in turn, the black box produces outputs. The kernel
takes care of solving the system of black boxes. To delve a little deeper, however, TRNSYS makes a
distinction between inputs that change with time and inputs that do not change with time. Examples of
inputs that might change with time are temperature, flow rate, or voltage. Examples of inputs that do not
change with time are area or rated capacity. Time dependent inputs are referred to as INPUTS while time
independent inputs are referred to as PARAMETERS. For a given component, the decision to what are
parameters and what are inputs is made by the component developer at the time of development and
cannot be changed without changing the actual code of the component and recompiling the DLL.

At each iteration and at each time step, a component turns the current values of the INPUTS and
PARAMETERS into OUTPUTS. No distinction is made among OUTPUTS; all OUTPUTS are assumed to
be time dependent and are recomputed by a component whenever appropriate.

1.5. What are the various programs in the


TRNSYS package?
Simulation Studio –

The main visual interface is the TRNSYS Simulation Studio. From there, you can create projects by drag-
and-dropping components to the workspace, connecting them together and setting the global simulation
parameters.

The Simulation Studio saves the project information in a TRNSYS Project File (*.tpf). When you run a
simulation, the Studio also creates a TRNSYS input file (text file that contains all the information on the
simulation but no graphical information).

1–6
TRNSYS 18 – Getting Started

The Simulation Studio also includes an output manager from where you control which variables are
integrated, printed and/or plotted, and a log/error manager that allows you to study in detail what
happened during a simulation.

Simulation Engine –

The simulation engine (also referred to as the kernel) performs the actual transient simulation. It is
programmed in Fortran and the source code is distributed with the program. The engine is compiled into a
Windows Dynamic Link Library (DLL), TRNDll. The TRNSYS kernel reads the TRNSYS input file (known
as the deck file (*.dck)) and determines all the information on the simulation (which components are used
and how they are connected). It also opens any additional data files (e.g. weather data) needed by the
simulation and creates output files.

The simulation engine is called by an executable program, TRNExe.exe, which also implements the
online plotter, a very useful tool that allows you to view dozens of output variables during a simulation.

Multi-zone Building Interface (TRNBuild/TRNSYS3d) –

This multi-zone building component models the thermal behavior of a building divided into different
thermal zones. In order to use this component, a separate pre-processing program must first be
executed.

TRNBuild is the tool used to enter input data for multi-zone buildings. It allows you to specify all the
building structure details, as well as everything that is needed to simulate the thermal behavior of the
building, such as windows optical properties, heating and cooling schedules, etc. TRNBuild creates a
building description file (*.bui) that includes all the information required to simulate the building.

TRNSYS3d for TRNSYS is a plugin for SketchUp™ that allows you to create the building geometry from
scratch: add zones, draw heat transfer surfaces, draw windows, draw shading surfaces, etc. This
information is saved in a *.IDF file. This building geometry data can be imported into TRNBuild instead of
entering building geometry manually

TRNEdit/TRNSED –

TRNEdit is a specialized editor that can be used to create or modify TRNSYS input files (decks). This is
not recommended in general and only advanced users should attempt to modify deck files by hand. Most
users should rely on the Simulation Studio to generate and modify deck files.

TRNEdit can be used to create redistributable applications (known as TRNSED applications). Those
executables can be freely distributed to end-users who do not have a TRNSYS license in order to offer
them a simplified simulation tool. The distributable includes a dedicated visual interface designed by
adding special commands to the TRNSYS input file.

Component Libraries –

The TRNSYS installation comes with a standard library of over a 100 components for use in a TRNSYS
simulation. Many additional libraries are available to expand its capabilities:
 TRNLIB: sel.me.wisc.edu/trnsys/trnlib (free component library)
 STEC library: sel.me.wisc.edu/trnsys/trnlib/stec/stec.htm
 TRANSSOLAR libraries: www.trnsys.de
 TESS libraries: www.trnsys.com

1–7
TRNSYS 18 – Getting Started

In addition, TRNSYS component models can be shared between users. A TRNSYS component model
includes 2 or 3 or 4 different files. The first are the DLL(s) that the TRNSYS engine will call to actually
simulate the component. There can be both a Debug and Release version of the DLL and these should
be placed the in appropriate folders: %TRNSYS18%\UserLib\ReleaseDLLs and
%TRNSYS18%\UserLib\DebugDLLs. In order for the component to be used inside of Simulation Studio,
the proforma must be moved into the correct folder. The proforma (*.tpf) and possible the graphic icon for
the component (*.bmp) need to be moved into the %TRNSYS18%\Studio\Proformas folder. They can be
moved into a subfolder in the directory which would locate them in a different position in the component
tree in Simulation Studio.

1.6. How are component models added to


TRNSYS?
TRNSYS’s source code is split into two parts: the kernel contains all of the brains while the component
models (Types) calculate the performance of the various components that may be used in a given
simulation.

One of TRNSYS’s major strengths is the ease with which users may write new components to expand
upon the capabilities of the program. Three features provide the foundation of this expandability. First is
TRNSYS’s open architecture. With one exception, all standard components are provided along with their
source code to act as a reference and to act as the basis for adding new components. Second, all
components whether standard components or user written components are formulated in the same
manner and follow the same steps and progression throughout the code; writing new components
becomes a matter of using a template and adding the appropriate functions, utility calls and equations to
write a model of your own. Thirdly, and perhaps most importantly, the TRNSYS kernel does not impose
any hierarchy whatsoever on the components that are used in a simulation. Nor does it make any
assumptions regarding the order in which components should be solved to simulate the system. TRNSYS
continues to iterate through all components until convergence is reached. While this can make controls in
a TRNSYS simulation somewhat more cumbersome, it has a major advantage from the point of view of
someone writing a new component; that is that there is no need for the component writer to modify the
TRNSYS kernel in any way in order to accommodate and include their new component. There is no need,
for example to decide where in the management hierarchy the new component that you are writing fits
best. Components in TRNSYS are automatically called by the kernel as soon as they are found in a given
simulation.

The DLL-based architecture allows users and third-party developers to add custom component models,
using any common programming language that can create a DLL which can communicate with the
TRNSYS kernel. In addition, TRNSYS can be easily connected to many other applications, for pre- or
post-processing or through interactive calls during the simulation (e.g. Microsoft Excel, Matlab, EES,
CONTAM, etc.).

1.7. What are the different manuals included in


the TRNSYS documentation set?
Volume 1 – Getting Started: This manual explains what TRNSYS is and what programs make the
TRNSYS suite. You will learn how to install TRNSYS, run examples and create simple projects.

1–8
TRNSYS 18 – Getting Started

Volume 2 - Using the Simulation Studio: This manual describes the TRNSYS Simulation Studio in
detail. This visual interface is used to create and simulate projects. It can also help you create new
components.

Volume 3 - Standard Component Library Overview: This manual gives an overview of the available
components in the standard TRNSYS library.

Volume 4 - Component Mathematical Reference: This manual gives the mathematical description of
all components available in the Standard TRNSYS library.

Volume 5 - Multizone Building (Type56 – TRNBuild): The TRNSYS multizone building (Type 56) and
its visual interface (TRNBuild) are described in detail in this manual.

Volume 6 - TRNEdit: This manual includes a description of the input file syntax. It also explains how to
use TRNEdit to edit TRNSYS input files, create distributable applications (known as TRNSED apps.) and
run parametric studies.

Volume 7 - Programmer's Guide: This user guide describes how the kernel and the components
interact. It provides detailed instructions to create components and to easily update TRNSYS 15
components.

Volume 8 - Weather Data: This manual describes the weather data distributed with TRNSYS 18. More
than 1000 files in more than 150 countries are available.

Volume 9 – Tutorials: This manual includes tutorials on the use of TRNSYS and creating simulation.

Volume 10 – Examples: This manual describes the various example projects included with the TRNSYS
package.

Volume A0 – Installation Guide: This manual includes the complete instructions for installing the
TRNSYS package.

Volume A1 – TRNFlow: This manual describes the use of the TRNFlow bulk airflow modeling tool add-
on for TRNSYS. If TRNFlow has not been purchased, then the file will be empty.

Volume A2 – TESSLibs: This manual describes the component included in the add-on TESS
Component Libraries. If no TESS Component Libraries have been purchase the file will be empty.

Volume A3 – Type 19 Supplement: This supplement describes how to specify the parameters for the
Type 19 Detailed Single Zone component model.

Volume A4 – Mathis Air Flow Modeling: This supplement describes how the Mathis air flow modeling
add-on works with TRNSYS.

1–9

You might also like