0% found this document useful (0 votes)
138 views

Tesslibs 17: Applications Library Mathematical Reference

This document provides a mathematical description of Type 514 thermostat controls component in TRNSYS. Type 514 defines a temperature setpoint schedule that remains the same each day of the week. It consists of heating and cooling setpoints as well as setback/setup temperatures and the hours they apply. The Type 514.exe program is used to generate schedules by moving bars to set times for different temperature setpoints. Schedules are saved as input files for Type 514 component to use in TRNSYS simulations.

Uploaded by

Ayman El jafif
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)
138 views

Tesslibs 17: Applications Library Mathematical Reference

This document provides a mathematical description of Type 514 thermostat controls component in TRNSYS. Type 514 defines a temperature setpoint schedule that remains the same each day of the week. It consists of heating and cooling setpoints as well as setback/setup temperatures and the hours they apply. The Type 514.exe program is used to generate schedules by moving bars to set times for different temperature setpoints. Schedules are saved as input files for Type 514 component to use in TRNSYS simulations.

Uploaded by

Ayman El jafif
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/ 41

TESSLibs 17

Component Libraries for the TRNSYS


Simulation Environment

Volume 01

Applications Library
Mathematical Reference

TESS – Thermal Energy Systems Specialists


http://www.tess-inc.com
http://www.trnsys.com
TESSLibs 17 – Applications Library Mathematical Reference

About This Manual


The information presented in this manual is intended to provide a detailed mathematical
reference for the TESS Applications Component Library for use with TRNSYS 17.

Revision history
 2005-11 For TESSLibs 2.00 and TRNSYS 16.00.0000
 2010-05 For TESSLibs 17.0 and TRNSYS 17.00.0000
 2012-03 For TESSLibs 17.1 and TRNSYS 17.01.0000

Where to find more information


Further information about the program and its availability can be obtained from the TRNSYS and
TESSLibs websites or from the TRNSYS coordinator at Thermal Energy System Specialists, LLC:

TRNSYS Coordinator Email: techsupport@tess-inc


Thermal Energy System Specialists, LLC Phone: +1 (608) 274 2577
22 North Carroll Street – Suite 370 Fax: +1 (608) 278 1475
Madison, WI 53703 – U.S.A.

TRNSYS and TESSLibs websites:


http://sel.me.wisc.edu/trnsys
http://www.tess-inc.com
http://www.trnsys.com

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 Thermal Energy System Specialists, LLC, 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.

© 2013 by Thermal Energy System Specialists, LLC of Madison, Wisconsin, USA

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 Thermal Energy System Specialists, LLC, of
Madison, Wisconsin.

2
TessLibs 17 – Applications Library Mathematical Reference

TESS Library Contributors

J.W. Thornton D.E. Bradley T.P. McDowell

N.J. Blair M.J. Duffy N.D.LaHam

A.V. Naik

3
TESSLibs 17 – Applications Library Mathematical Reference

4
TessLibs 17 – Applications Library Mathematical Reference

TABLE OF CONTENTS
APPLICATIONS LIBRARY M ATHEMATICAL REFERENCE 6
1.1. Type 514: Thermostat Controls 7
1.1.1. Mathematical Description 7
1.2. Type 515: Heating And Cooling Season Scheduler 12
1.2.1. Mathematical Description 12
1.3. Type 516: Multiple Day Scheduler 16
1.3.1. Mathematical Description 16
1.4. Type 517: Single Day Scheduler 22
1.4.1. Mathematical Description 22
1.4.2. Normalized Scheduler: Type517-Normalized 26
1.5. Type 518: Monthly Scheduler 27
1.5.1. Mathematical Description 27
1.6. Type 519: Holiday Scheduler 32
1.6.1. Mathematical Description 32
1.7. Type 520: Multiple Thermostat Controls 37
1.7.1. Mathematical Description 37

5
TESSLibs 17 – Applications Library Mathematical Reference

APPLICATIONS LIBRARY MATHEMATICAL


REFERENCE

This manual provides a detailed reference on each component model (Type) in the TESS
Libraries add-on to the TRNSYS Simulation Environment. 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 thirteen component categories that match the upper level directories in
the Simulation Studio proformas. Those categories are:
Applications
Controllers
Cogeneration (CHP)
Electrical
Geothermal (GHP)
Ground Coupling
HVAC
High Temperature Solar
Hydronics
Loads and Structures
Optimization (TRNOPT)
Solar
Storage
Utility

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.

6
TessLibs 17 – Applications Library Mathematical Reference

1.1. Type 514: Thermostat Controls

The Thermostat Controls utility programs (Type514.exe, and ThermoSched.exe) and their
companion component Type514 are used in conjunction with one another to define a set point
schedule that stays the same regardless of the day of the week. A set point schedule consists of
a heating set point and setback temperature, a cooling set point and setup temperature, and the
hours during which they apply. While this documentation has been written using temperature set
points as an example, it should be noted that there is nothing inherent about the ThermoSched or
Type514 programs that force it to be used only for temperatures. It should also be noted that the
difference between Type520 and Type514 is that Type520 allows for differing schedules during
weekdays, on Saturdays and on Sundays while Type514 applies the same schedule regardless
of the day of the week.

Two applications are provided: Type514.exe is a plugin for use with the TRNSYS Simulation
Studio while ThermoSched.exe is designed for use in distributable TRNSED applications. The
first section of the Detailed Description here below provides the user with information on
manipulating Type514.exe and ThermoSched.exe since operationally they are identical.
Type514.exe and ThermoSched.exe differ only in the format of data that they pass to the
program that called them. A second section describes the use of Type514 and Type514.exe
within the TRNSYS Simulation Studio environment. The third section of the Detailed Description
describes the application of ThermoSched.exe in TRNSED distributable applications.

1.1.1. Mathematical Description

1.1.1.1. Use of the Scheduler Programs

At the top of the screen is the File menu which controls the selection of the file that will store the
values and be read in by TRNSYS as well as the control of the program. The user can select
“Open” from the menu to open an existing file, “Save” to save the current values to a file, or “Exit”
to leave the program.

The two vertical bars on the screen shown in Figure 1.1-1 are used to set the times when the
different set points are used, with heating being set on the left hand bar and the cooling on the
right hand. The period when the set point temperature is used is set by the middle section of the
bar (red part in heating and blue part in cooling). The sections at the top and bottom of the bar
denote times when the setback (in heating) or setup (in cooling) temperatures are used. The
sections of the bar are changed by grabbing the separation lines with the mouse and moving the
lines to the desired time. When the mouse cursor is moved over a separation line so that it can
be selected the cursor changes from the arrow ( ) to the pointing finger ( ). The line can then
be moved by clicking and moving the mouse while holding the mouse button down. When
selected the cursor will change to the closed hand ( ). While the separation lines are moving
the time values on the right side of the bar will change to denote the time being set. Times can
be set at 15 minute intervals.

7
TESSLibs 17 – Applications Library Mathematical Reference

Figure 1.1-1: Thermostat Control

The heating set point and setback temperatures are set in the text boxes on the bottom left of the
window and the cooling set point and setup temperature in the textboxes on the right bottom of
the window.

1.1.1.2. Implementation of Type514.exe and the Type514 Component in the


Simulation Studio

Type514.exe is a Simulation Studio plugin. Plugins offer an alternative method for entering
parameters and inputs. Once Type514 has been placed in a Studio project, double click the
component as you normally would to enter its parameter and input initial values. The window that
pops up should look like that shown in Figure 1.1-2. Clicking the icon in the lower left hand corer
of the window will launch Type514.exe, allowing you to set the appropriate schedule.

8
TessLibs 17 – Applications Library Mathematical Reference

Figure 1.1-2: Data Entry When a Plugin is Available

1.1.1.3. Implementation of ThermoSched.exe and the Type514 Component in


TRNSED

While TRNSED is a powerful tool for taking user supplied data and inserting it into the appropriate
spot in a TRNSYS simulation input file, for some types of data, TRNSED’s built in syntax can be
cumbersome for the end user. For example, if the TRNSED programmer wishes to allow the end
user to enter a heating or cooling set point schedule, s/he is limited to using groups controlled by
a radio buttons, or to adding enough sequential numerical value fields into the TRNSED interface
to accommodate the entire schedule. Type514 and its companion program (ThermoSched.exe)
offer an alternative; the TRNSED programmer can provide the end user with a clickable button in
the TRNSED interface. When the end user clicks that button, the ThermoSched application is
launched and the end user can set up heating and cooling set points, heating setback and cooling
set up temperatures and the times during which these are active using a dedicated graphical
interface. The following example shows a possible implementation in TRNSED. Please refer to
the TRNSED/TRNEdit manual for more information regarding the syntax used.

Figure 1.1-3 shows what the TRNSED end user might see in this example’s implementation of
Type514. The text and button in the figure below are contained in a bitmap image called
HtCl.bmp.

Figure 1.1-3: A Clickable Button in TRNSED. Clicking the button launches the ThermoSched.exe
Application

The TRNSED source required to create Figure 1.1-3 is as follows:


*|[HeatCoolDisplay|Heating and Cooling Set Points
*|<APPLINK4> c:\Trnsys17\images\HtCl.bmp file=c:\Trnsys17\AppDat\T514dat.tsc RIGHT

9
TESSLibs 17 – Applications Library Mathematical Reference

ASSIGN "c:\Trnsys17\AppsDat\T514dat.tsc" 26
*|]

UNIT 35 TYPE 514 - HEATING/COOLING SET POINT SCHEDULER (MULTTHERMOSCHED.EXE)


PARAMETERS 2
26 !logical unit of data file
...

In the above, the <APPLINK4> keyword takes three arguments. The first argument is the location
of the clickable bitmap image that will be displayed in TRNSED view. When clicked, the
executable program associated with APPLINK4 (in this case ThermoSched.exe) will be launched
and will load the file indicated by the second argument. In this case, it is the *.tsc file that contains
the hourly data. The third argument is a justification (LEFT, RIGHT, or CENTER) for the bitmap
image.

The only other thing that the TRNSED programmer must do in order to implement the clickable
button is to make sure that APPLINK4 in the TRNEdit File: Setup Menu is directed to
ThermoSched.exe. The Link Tab might be set as follows:

Figure 1.1-4: The TRNEdit Links Setup

When the end user clicks on the button in the TRNSED display, c:\Trnsys17\Tess
Models\Plugins\ThermoSched.exe is launched with the file “..\Trnsys17\AppDat\T514dat.tsc.”
Once the user has made and saved their changes to the slider values, MultThermoSched records
those changes in the appropriate .tsc file. Later in the TRNSED input file, the same files are
ASSIGNed to logical unit numbers. The data file is read by Type514 during the simulation and the
Type outputs appropriate values of the heating or cooling set points for each hour of the
simulation.

1.1.1.4. File Format

Type514 transfers data by means of a text file with the extension *.tsc. Normally there is no need
to modify the file’s contents because the plugin and thermosched.exe are designed to read from
and write to the file. For reference sake, however, the file syntax is shown below.
TRNSYS17 1.00a ! header
20 ! hour of the day (1-24) when the heating setback becomes active.
0 ! number of quarter hours after the heat setback hour when the setback becomes active
8 ! hour of the day for the return from heating setback.
0 ! number of quarter hours after the setback return hour when the setback is over.
30 ! heating set point temperature (user specified units)
10 ! heating set back temperature (user specified units)
17 ! hour of the day when the cooling setup becomes active.
0 ! number of quarter hours after the cooling setback hour when setup becomes active.
7 ! hour of the day for the return from cooling setup
0 ! number of quarter hours after the setup return hour when the setup is over.
35 ! cooling set point temperature (user specified units)

10
TessLibs 17 – Applications Library Mathematical Reference

40 ! cooling setup temperature (user specified units)

11
TESSLibs 17 – Applications Library Mathematical Reference

1.2. Type 515: Heating And Cooling Season Scheduler

The Heating and Cooling Season Scheduler utility programs (Type515.exe and
SeasonsScheduler.exe) and their companion component Type515 are used in conjunction with
one another to input a heating/cooling season schedule. A heating/cooling schedule denotes
which portions of the year when heating or cooling (or both) equipment may be utilized.

Two applications are provided: Type515.exe is a plugin for use with the TRNSYS Simulation
Studio while SeasonsScheduler.exe is designed for use in distributable TRNSED applications.
The first section of the Detailed Description here below provides the user with information on
manipulating Type515.exe and SeasonsScheduler.exe since operationally they are identical.
Type515.exe and SeasonsScheduler.exe differ only in the format of data that they pass to the
program that called them. A second section describes the use of Type515 and Type515.exe
within the TRNSYS Simulation Studio environment. The third section of the Detailed Description
describes the application of SeasonsScheduler.exe in TRNSED distributable applications.

1.2.1. Mathematical Description

2.2.1.1. Use of the Scheduler Programs

At the top of the screen is the File menu, which controls the selection of the file that will store the
values and be read in by TRNSYS as well as the control of the program. The user can select
“Open” from the menu to open an existing file, “Save” to save the current values to a file, or “Exit”
to leave the program.

The two horizontal bars on the screen are used to set the dates when the different seasons are
active, with the heating season being set with the upper bar and the cooling season with the
lower. The part of the year that has heating active is denoted by the red portion of the bar and
that has cooling active by the blue portion. The sections of the bar are changed by grabbing the
separation lines with the mouse and moving the lines to the desired date. When the mouse cursor
is moved over a separation line so that it can be selected the cursor changes from the arrow ( )
to the pointing finger ( ). The line can then be moved by clicking and moving the mouse while
holding the mouse button down. When selected the cursor will change to the closed hand ( ).
While the separation lines are moving the dates below the bar will change to denote the date
being set. Any day of the year (except leap days) can be selected. Figure 1.2-1: Heating and
Cooling Season Data Entry

shows the data entry screen for the Heating and Cooling Season Scheduling utility program.

Figure 1.2-1: Heating and Cooling Season Data Entry

12
TessLibs 17 – Applications Library Mathematical Reference

2.2.1.2. Implementation of Type515.exe and the Type515 Component in the


Simulation Studio

Type515.exe is a Simulation Studio plugin. Plugins offer an alternative method for entering
parameters and inputs. Once Type515 has been placed in a Studio project, double click the
component as you normally would to enter its parameter and input initial values. The window that
pops up should look like that shown in the figure below. Clicking the icon in the lower left hand
corer of the window will launch Type515.exe, allowing you to set the appropriate schedule.

Figure 1.2-2: Data Entry When a Plugin is Available

2.2.1.3. Implementation of SeasonsScheduler and the Type515 Component in


TRNSED

While TRNSED is a powerful tool for taking user supplied data and inserting it into the appropriate
spot in a TRNSYS simulation input file, for some types of data, TRNSED’s built in syntax can be
cumbersome for the user. For example, if the TRNSED programmer wishes to allow the end user
to enter the beginning and end of heating and cooling seasons in a building simulation, one
traditional method has been to include a pull down menu for the month in which cooling is to start,
then to include a numerical value field for the day of that month on which cooling is to start. Next,
a pull down menu and a numerical value field for the end of the cooling season are included,
followed by the same for the beginning and end of the heating season. Implementation of the
heating and cooling season schedules can be simplified through the use of Type515 and its
companion application, SeasonsScheduler.exe. The TRNSED programmer can provide the end
user with a button in the TRNSED interface, which when clicked launches the SeasonsScheduler
application allowing the end used to set up the heating and cooling season begin and end points
graphically. The following example shows such a possible implementation in TRNSED. Please
refer to the TRNSED/TRNEdit manual for more information regarding the syntax used.

Figure 1.2-3 shows what the TRNSED end user might see in this example’s implementation of
Type515. The text and button in the figure below are contained in a bitmap image called
Seas.bmp

13
TESSLibs 17 – Applications Library Mathematical Reference

Figure 1.2-3: A Clickable Button in TRNSED. Clicking the button launches the SeasonsScheduler.exe
Application

The TRNSED source required to create Figure 1.2-3 is as follows:

*|[SEAS|Heating and Cooling Season Parameters


*|<APPLINK1> c:\Trnsys17\images\Seas.bmp file=c:\Trnsys17\AppsDat\seas.hcs LEFT
ASSIGN c:\Trnsys17\AppsDat\seas.hcs 21
*|]

UNIT 10 TYPE 515 - HEATING AND COOLING SEASON SCHEDULER (SEASONSSCHEDULER.EXE)


PARAMETERS 1
21 !logical unit of data file
...

In the above, the <APPLINK1> keyword takes three arguments. The first argument is the location
of the clickable bitmap image that will be displayed in TRNSED view. When clicked, the
executable program associated with APPLINK1 (in this case SeasonsScheduler.exe) will be
launched with the second argument. The second argument is the file that should be loaded by the
launched program. In this case, it is the *.dat file that contains the heating and cooling season
schedule data. The third argument is a justification (LEFT, RIGHT, or CENTER) for the bitmap
image.

The only other thing that the TRNSED programmer must do in order to implement the clickable
button is to make sure that APPLINK1 in the TRNEdit File: Setup Menu is directed to
SeasonsScheduler.exe. The Link Tab would be set as follows:

Figure 1.2-4: The TRNEdit Links Setup

When the end user clicks on the button labeled “Conditioning Seasons,” c:\Trnsys17\Tess
Models\Plugins\SeasonsScheduler.exe is launched with the file c:\Trnsys17\AppsDat\seas.dat.”
Once the user has made and saved their changes to the slider values, SeasonsScheduler
records those changes in the .dat file. Later in the TRNSED input file, the same file is ASSIGNed
to a logical unit number. This data file is read by Type515 during the simulation and the Type
outputs appropriate values of the beginning and end of the heating and cooling seasons for the
simulation.

14
TessLibs 17 – Applications Library Mathematical Reference

2.2.1.4. File Format

Type515 transfers data by means of a text file with the extension *.hsc. Normally there is no need
to modify the file’s contents because the plugin and thermosched.exe are designed to read from
and write to the file. For reference sake, however, the file syntax is shown below.
TRNSYS17 1.00a !header
91 ! day of the year on which the heating season ends.
305 ! day of the year on which the heating season begins.
109 ! day of the year on which the cooling season begins.
323 ! day of the year on which the cooling season ends.

15
TESSLibs 17 – Applications Library Mathematical Reference

1.3. Type 516: Multiple Day Scheduler

The Multiple Schedules utility programs (Type516.exe and MultSched.exe) and TRNSYS
Type516 are used in conjunction with one another to input schedules with a Weekday, Saturday,
and Sunday basis. It should be noted that while temperature notation is used throughout this
documentation, there is no inherent reason why Type516 cannot be used to schedule any type of
data desired by the user. Type516 differs from Type517 only in that it allows for different
schedules to be set for weekdays, Saturdays and Sundays. Type517 applies the same schedule
regardless of the day of the week.

Two applications are provided: Type516.exe is a plugin for use with the TRNSYS Simulation
Studio while MultSched.exe is designed for use in distributable TRNSED applications. The first
section of the Detailed Description here below provides the user with information on manipulating
Type516.exe and MultSched.exe since operationally they are identical. Type516.exe and
MultSched.exe differ only in the format of data that they pass to the program that called them. A
second section describes the use of Type516 and Type516.exe within the TRNSYS Simulation
Studio environment. The third section of the Detailed Description describes the application of
MultSched.exe in TRNSED distributable applications.

1.3.1. Mathematical Description

2.3.1.1. Use of the Scheduler Programs

In the text box at the top of the screen, is displayed the name of the file which will store the values
and be read in by TRNSYS as shown in Figure 1.3-1. The file name can be typed directly into the
text box or it can be selected by pushing the “Browse” button to the right of the text box. Note that
the complete path name must be entered correctly for TRNSYS to find the file.

Figure 1.3-1: Data File Name and Location

The next three input boxes are used to set the sliders for input as shown in Figure 1.3-2. The first
two set the minimum and maximum values for the allowable input range and the third sets the
number of intervals between the max and min. For example, if the minimum is 20, the maximum
is 30, and the number of intervals is 10, then the user is able to specify any integer between 20
and 30.

Figure 1.3-2: Monthly Slider Value Parameters

The schedule values are entered with the sliders and input boxes in the middle of the screen as
shown in Figure 1.3-3. Selecting the appropriate tab determines if the values are being input for
the Weekday, Saturday, or Sunday schedule. The schedule values may be entered in two
different methods: by moving the sliders or by entering the values directly into the input boxes.
The two methods are equivalent and will enter the same values into the schedule file. The 12

16
TessLibs 17 – Applications Library Mathematical Reference

hours before noon are input with the top set of sliders and the 12 hours after noon are input with
the bottom set.

Figure 1.3-3: Hourly Sliders

Finally the user has two methods of leaving the Multiple Schedules program. By selecting the
“OK” button the entered data is saved to the designated output file. By selecting the “Cancel”
button the values are not written to the file.

2.3.1.2. Implementation of Type516.exe and the Type516 Component in the


Simulation Studio

Type516.exe is a Simulation Studio plugin. Plugins offer an alternative method for entering
parameters and inputs. Once Type516 has been placed in a Studio project, double click the
component as you normally would to enter its parameter and input initial values. The window that
pops up should look like that shown in Figure 1.3-4. Clicking the icon in the lower left hand corer
of the window will launch Type516.exe, allowing you to set the appropriate schedule.

17
TESSLibs 17 – Applications Library Mathematical Reference

Figure 1.3-4: Data Entry when a Plugin is Available

2.3.1.3. Implementation of MultSched.exe and the Type516 Component in


TRNSED

While TRNSED is a powerful tool for taking user supplied data and inserting it into the appropriate
spot in a TRNSYS simulation input file, for some types of data, TRNSED’s built in syntax can be
cumbersome for the end user. For example, if the TRNSED programmer wishes to allow the end
user to enter a heating or cooling set point schedule, s/he is limited to using groups controlled by
a radio buttons, or to adding enough sequential numerical value fields into the TRNSED interface
to accommodate the entire schedule. Type516 and its companion program (multsched.exe) offer
an alternative; the TRNSED programmer can provide the end user with a clickable button in the
TRNSED interface. When the end user clicks that button, the multsched application is launched
and the end user can set up the schedule of hourly temperature set points using sliders. The
following example shows a possible implementation in TRNSED. Please refer to the
TRNSED/TRNEdit manual for more information regarding the syntax used.

Figure 1.3-5 shows what the TRNSED end user might see in this example’s implementation of
Type516. The text and button in the figure below are contained in bitmap images called
Hstat.bmp and Cstat.bmp.

Figure 1.3-5: A Clickable Button in TRNSED. Clicking the button launches the MultSched.exe
Application

The TRNSED source required to create Figure 1.3-5 is as follows:

18
TessLibs 17 – Applications Library Mathematical Reference

*|[TSTAT|Building Thermostat Parameters


*|<APPLINK2> c:\Trnsys17\images\HstatB.bmp file= c:\Trnsys17\AppDat\hstat.dat LEFT
*|<APPLINK2> c:\Trnsys17\images\CstatB.bmp file= c:\Trnsys17\AppDat\cstat.dat LEFT
ASSIGN c:\Trnsys17\AppDat\hstat.dat 21
ASSIGN c:\Trnsys17\AppDat\hstat.dat 22
*|]

. . .

UNIT 15 TYPE 516 - WEEKLY HEATING SET POINT FORCING FUNCTION SCHEDULER (MULTSCHED.EXE)
PARAMETERS 2
21 !logical unit of data file
1 !day of the week on which the simulations starts

UNIT 20 TYPE 516 - WEEKLY COOLING SET POINT FORCING FUNCTION SCHEDULER (MULTSCHED.EXE)
PARAMETERS 2
22 !logical unit of data file
1 !day of the week on which the simulations starts

In the above, each of the <APPLINK2> keywords takes three arguments. The first argument is
the location of the clickable bitmap image that will be displayed in TRNSED view. When clicked,
the executable program associated with APPLINK2 (in this case MultSched.exe) will be launched
and will load the file indicated by the second argument. In this case, it is the *.dat file that contains
the hourly data. The third argument is a justification (LEFT, RIGHT, or CENTER) for the bitmap
image.

The only other thing that the TRNSED programmer must do in order to implement the clickable
button is to make sure that APPLINK2 in the TRNEdit File: Setup Menu is directed to
MultSched.exe. The Link Tab might be set as follows:

Figure 1.3-6: The TRNEdit Links Setup

When the end user clicks on one of the two buttons, c:\Trnsys17\Tess
Models\Plugins\MultSched.exe is launched with either the file “c:\Trnsys17\AppDat\hstat.dat” or
with “c:\Trnsys17\AppDat\cstat.dat.” Once the user has made and saved their changes to the
slider values, MultSched records those changes in the appropriate .dat file. Later in the TRNSED
input file, the same files are ASSIGNed to logical unit numbers. The data files are read by
Type516 during the simulation and the Type outputs appropriate values of the heating or cooling
set points for each hour of the simulation.

2.3.1.4. File Format

Type516 transfers data by means of a text file with the extension *.sl7. Normally there is no need
to modify the file’s contents because the plugin and MultThermoSched.exe are designed to read
from and write to the file. For reference sake, however, the file syntax is shown below.
TRNSYS17 1.00a !header

19
TESSLibs 17 – Applications Library Mathematical Reference

0 ! minimum slider value


1 ! maximum slider value
100 ! number of intervals allowed between the minimum and maximum slider values.
0.32 ! slider value for midnight to 1AM Monday through Friday.
0.23 ! slider value for 1AM to 2AM Monday through Friday.
0.26 ! slider value for 2AM to 3AM Monday through Friday.
0.22 ! slider value for 3AM to 4AM Monday through Friday.
0.2 ! slider value for 4AM to 5AM Monday through Friday.
0.4 ! slider value for 5AM to 6AM Monday through Friday.
0.2 ! slider value for 6AM to 7AM Monday through Friday.
0.5 ! slider value for 7AM to 8AM Monday through Friday.
1 ! slider value for 8AM to 9AM Monday through Friday.
1 ! slider value for 9AM to 10AM Monday through Friday.
1 ! slider value for 10AM to 11AM Monday through Friday.
1 ! slider value for 11AM to noon Monday through Friday.
1 ! slider value for noon to 1PM Monday through Friday.
1 ! slider value for 1PM to 2PM Monday through Friday.
1 ! slider value for 2PM to 3PM Monday through Friday.
1 ! slider value for 3PM to 4PM Monday through Friday.
0.5 ! slider value for 4PM to 5PM Monday through Friday.
0 ! slider value for 5PM to 6PM Monday through Friday.
0 ! slider value for 6PM to 7PM Monday through Friday.
0 ! slider value for 7PM to 8PM Monday through Friday.
0 ! slider value for 8PM to 9PM Monday through Friday.
0 ! slider value for 9PM to 10PM Monday through Friday.
0 ! slider value for 10PM to 11PM Monday through Friday.
0 ! slider value for 11PM to midnight Monday through Friday.
0 ! slider value for midnight to 1AM Saturday.
0 ! etc.
0
0
0
0
0
0
0
0
0.5
0.5
0.5
0.5
0.5
0.5
0
0
0
0
0
0
0
0 ! slider value for 11PM to midnight Saturday.
0 ! slider value for midnight to 1AM Sunday.
0 ! etc.
0
0
0
0
0
0
0
0
0
0
0.25
0.25
0.25
0.25
0
0
0
0

20
TessLibs 17 – Applications Library Mathematical Reference

0
0
0
0 ! slider value for 11PM to midnight Sunday.

21
TESSLibs 17 – Applications Library Mathematical Reference

1.4. Type 517: Single Day Scheduler

The Daily Schedule utility programs (Type517.exe and Sched.exe) and TRNSYS Type517 are
used in conjunction with one another to input a 24-hour schedule. The same schedule is repeated
for every day of the simulation. It should be noted that while temperature notation is used
throughout this documentation, there is no inherent reason why Type517 cannot be used to
schedule any type of data desired by the user. Type517 differs from Type516 only in that it does
not allows for different schedules to be set for weekdays, Saturdays and Sundays. Type517
applies the same schedule regardless of the day of the week.

Two applications are provided: Type517.exe is a plugin for use with the TRNSYS Simulation
Studio while Sched.exe is designed for use in distributable TRNSED applications. The first
section of the Detailed Description here below provides the user with information on manipulating
Type517.exe and Sched.exe since operationally they are identical. Type517.exe and Sched.exe
differ only in the format of data that they pass to the program that called them. A second section
describes the use of Type517 and Type517.exe within the TRNSYS Simulation Studio
environment. The third section of the Detailed Description describes the application of Sched.exe
in TRNSED distributable applications.

1.4.1. Mathematical Description

2.1.1.1. Use of the Scheduler Programs

In the text box at the top of the screen, is displayed the name of the file which will store the values
and be read in by TRNSYS as shown in Figure 1.4-1. The file name can be typed directly into the
text box or it can be selected by pushing the “Browse” button to the right of the text box. Note that
the complete path name must be entered correctly for TRNSYS to find the file.

Figure 1.4-1: Data File Name and Location

The next three input boxes are used to set the sliders for input as shown in Figure 1.4-2. The first
two set the minimum and maximum values for the allowable input range and the third sets the
number of intervals between the max and min. For example, if the minimum is 20, the maximum
is 30, and the number of intervals is 10, then the user is able to specify any integer between 20
and 30.

Figure 1.4-2: Monthly Slider Value Parameters

The schedule values are entered with the sliders and input boxes in the middle of the screen as
shown in Figure 1.4-3. The schedule values may be entered in two different methods: by moving
the sliders or by entering the values directly into the input boxes. The two methods are equivalent
and will enter the same values into the schedule file. The 12 hours before noon are input with the

22
TessLibs 17 – Applications Library Mathematical Reference

top set of sliders and the 12 hours after noon are input with the bottom set. The first slider (in the
top left) sets the value for the period between midnight and 1 AM. Thus the hour displayed above
each slider is the time at the end of the hour for which the value has been set.

Figure 1.4-3: Hourly Sliders

Finally the user has two methods of leaving the Daily Schedules program. By selecting the “OK”
button the entered data is saved to the designated output file. By selecting the “Cancel” button
the values are not written to the file.

2.1.1.2. Implementation of Type517.exe and the Type517 Component in the


Simulation Studio

Type517.exe is a Simulation Studio plugin. Plugins offer an alternative method for entering
parameters and inputs. Once Type517 has been placed in a Studio project, double click the
component as you normally would to enter its parameter and input initial values. The window that
pops up should look like that shown in Figure 1.4-4. Clicking the icon in the lower left hand corer
of the window will launch Type517.exe, allowing you to set the appropriate schedule.

23
TESSLibs 17 – Applications Library Mathematical Reference

Figure 1.4-4: Data Entry when a Plugin is Available

2.1.1.3. Implementation of Sched.exe and the Type517 Component in TRNSED

While TRNSED is a powerful tool for taking user supplied data and inserting it into the appropriate
spot in a TRNSYS simulation input file, for some types of data, TRNSED’s built in syntax can be
cumbersome for the end user. For example, if the TRNSED programmer wishes to allow the end
user to enter a heating or cooling set point schedule, s/he is limited to using groups controlled by
a radio buttons, or to adding enough sequential numerical value fields into the TRNSED interface
to accommodate the entire schedule. Type517 and its companion program (sched.exe) offer an
alternative; the TRNSED programmer can provide the end user with a clickable button in the
TRNSED interface. When the end user clicks that button, the Sched application is launched and
the end user can set up the schedule of heating and cooling set points using sliders. The
following example shows a possible implementation in TRNSED. Please refer to the
TRNSED/TRNEdit manual for more information regarding the syntax used.

Figure 1.4-5 shows what the TRNSED end user might see in this example’s implementation of
Type517. The text and button in the figure below are contained in bitmap images called
Hstat.bmp and Cstat.bmp.

Figure 1.4-5: A Clickable Button in TRNSED. Clicking the button launches the Sched.exe Application

The TRNSED source required to create Figure 1.4-5 is as follows:


*|[TSTAT|Building Thermostat Parameters
*|<APPLINK2> c:\trnsys17\images\HstatB.bmp file= c:\trnsys17\AppDat\hstat.dat LEFT

24
TessLibs 17 – Applications Library Mathematical Reference

*|<APPLINK2> c:\trnsys17\images\CstatB.bmp file= c:\trnsys17\AppDat\cstat.dat LEFT


ASSIGN c:\trnsys17\AppDat\hstat.dat 21
ASSIGN c:\trnsys17\AppDat\hstat.dat 22
*|]

. . .

UNIT 15 TYPE 517 - HEATING SET POINT FORCING FUNCTION SCHEDULER (SCHED.EXE)
PARAMETERS 1
21 !logical unit of data file

UNIT 20 TYPE 517 - COOLING SET POINT FORCING FUNCTION SCHEDULER (SCHED.EXE)
PARAMETERS 1
22 !logical unit of data file

In the above, each of the <APPLINK2> keywords takes three arguments. The first argument is
the location of the clickable bitmap image that will be displayed in TRNSED view. When clicked,
the executable program associated with APPLINK2 (in this case Sched.exe) will be launched and
will load the file indicated by the second argument. In this case, it is the *.dat file that contains the
hourly data. The third argument is a justification (LEFT, RIGHT, or CENTER) for the bitmap
image.

The only other thing that the TRNSED programmer must do in order to implement the clickable
button is to make sure that APPLINK2 in the TRNEdit File: Setup Menu is directed to Sched.exe.
The Link Tab might be set as follows:

Figure 1.4-6: The TRNEdit Links Setup

When the end user clicks on one of the two buttons, c:\Trnsys17\Tess Models\Plugins\Sched.exe
is launched with either the file “c:\Trnsys17\AppDat\hstat.dat” or with
“c:\Trnsys17\AppDat\cstat.dat.” Once the user has made and saved their changes to the slider
values, Sched records those changes in the appropriate .dat file. Later in the TRNSED input file,
the same files are ASSIGNed to logical unit numbers. The data files are read by Type517 during
the simulation and the Type outputs appropriate values of the heating or cooling set points for
each hour of the simulation.

2.1.1.4. File Format

Type517 transfers data by means of a text file with the extension *.sld. Normally there is no need
to modify the file’s contents because the plugin and MultThermoSched.exe are designed to read
from and write to the file. For reference sake, however, the file syntax is shown below.
TRNSYS17 1.00a !header
0 ! minimum slider value
1 ! maximum slider value
100 ! number of intervals allowed between the minimum and maximum slider values.
0.32 ! slider value for midnight to 1AM.

25
TESSLibs 17 – Applications Library Mathematical Reference

0.23 ! slider value for 1AM to 2AM.


0.26 ! slider value for 2AM to 3AM.
0.22 ! slider value for 3AM to 4AM.
0.2 ! slider value for 4AM to 5AM.
0.4 ! slider value for 5AM to 6AM.
0.2 ! slider value for 6AM to 7AM.
0.5 ! slider value for 7AM to 8AM.
1 ! slider value for 8AM to 9AM.
1 ! slider value for 9AM to 10AM.
1 ! slider value for 10AM to 11AM.
1 ! slider value for 11AM to noon.
1 ! slider value for noon to 1PM.
1 ! slider value for 1PM to 2PM.
1 ! slider value for 2PM to 3PM.
1 ! slider value for 3PM to 4PM.
0.5 ! slider value for 4PM to 5PM.
0 ! slider value for 5PM to 6PM.
0 ! slider value for 6PM to 7PM.
0 ! slider value for 7PM to 8PM.
0 ! slider value for 8PM to 9PM.
0 ! slider value for 9PM to 10PM.
0 ! slider value for 10PM to 11PM.
0 ! slider value for 11PM to midnight

1.4.2. Normalized Scheduler: Type517-Normalized

In addition to the standard Type517 Scheduler, there is Type517-Normalized proforma which will
open another plugin. However, this plugin has the “Normalize” button to normalize the profile to 1
(the sum of all 24 values will equal 1). This is an excellent tool for creating normalized occupancy,
equipment, and water draw profiles. With the normalized output of this component, the user can
create an EQUATION block to scale and yield the product with this normalized value.

26
TessLibs 17 – Applications Library Mathematical Reference

1.5. Type 518: Monthly Scheduler

The Monthly Values utility programs (Type518.exe and MonthSched.exe) are used in conjunction
with TRNSYS Type 518 to input schedules that change on a monthly basis.

Two applications are provided: Type518.exe is a plugin for use with the TRNSYS Simulation
Studio while MonthSched.exe is designed for use in distributable TRNSED applications. The first
section of the Detailed Description here below provides the user with information on manipulating
Type518.exe and MonthSched.exe since operationally they are identical. Type518.exe and
MonthSched.exe differ only in the format of data that they pass to the program that called them. A
second section describes the use of Type518 and Type518.exe within the TRNSYS Simulation
Studio environment. The third section of the Detailed Description describes the application of
MonthSched.exe in TRNSED distributable applications.

1.5.1. Mathematical Description

2.1.1.5. Use of the Monthly Scheduler Programs

In the text box at the top of the screen, is displayed the name of the file which will store the values
and be read in by TRNSYS as can be seen in Figure 1.5-1. The file name can be typed directly
into the text box or it can be selected by pushing the “Browse” button to the right of the text box.
Note that the complete path name must be entered correctly for TRNSYS to find the file.

Figure 1.5-1: Location and Name of Monthly Schedule Data File

The next three input boxes are used to set the sliders for input as shown in Figure 1.5-2. The first
two set the minimum and maximum values for the allowable input range and the third sets the
number of intervals between the max and min. For example, if the minimum is 20, the maximum
is 30, and the number of intervals is 10, then the user is able to specify any integer between 20
and 30.

Figure 1.5-2: Monthly Slider Value Parameters

The sliders and input boxes for the twelve months are displayed next, as shown in Figure 1.5-3.
The schedule values may be entered in two different methods: by moving the sliders or by
entering the values directly into the input boxes. The two methods are equivalent and will enter
the same values into the schedule file.

27
TESSLibs 17 – Applications Library Mathematical Reference

Figure 1.5-3: Monthly Sliders

The drop down box at the bottom of the screen (Figure 1.5-4) is used to designate to TRNSYS
whether the entered data should be considered as constant for the entire month at the supplied
values or should be interpolated between the months such that the entered value is the average
value over the month.

Figure 1.5-4: Interpolation Scheme for Monthly Values

Finally the user has two methods of leaving the Monthly Values program. By selecting the “OK”
button the entered data is saved to the designated output file. By selecting the “Cancel” button
the values are not written to the file.

2.1.1.6. Advanced Uses

The display of the MonthSched or Type518 program can be controlled based on the information
passed to the program (i.e. the command line). The file name, the minimum value, the maximum
value, and the number of intervals may all be passed to the program with the use of the
appropriate keyword. For the file name the keyword is “file=”, for the minimum value it is “min=”,
for the maximum value it is “max=” and for the number of intervals it is “inter=”. If multiple
keywords are to be used, they should be comma delimited without any spaces. In addition to
setting the values, passing the range and interval numbers also signal the program that these
values are no longer user inputs. If a value is specified then the input box will not be displayed on
the screen when the program is running. Specifying the file name will cause all of the values to
be read in from the file (if it is an existing file), but will not change the appearance of the display.
The user will still be able to specify the output file name and the range values. If the file is
specified along with any of the range values, the values out of the file will be the values used, but
the program will be signaled to not display that particular input. In this manner the range input
boxes can be controlled even when the values are read out of a file.

28
TessLibs 17 – Applications Library Mathematical Reference

2.1.1.7. Implementation of Type518.exe and the Type518 Component in the


Simulation Studio

Type518.exe is a Simulation Studio plugin. Plugins offer an alternative method for entering
parameters and inputs. Once Type518 has been placed in a Studio project, double click the
component as you normally would to enter its parameter and input initial values. The window that
pops up should look like that shown in Figure 1.5-5. Clicking the icon in the lower left hand corer
of the window will launch Type518.exe, allowing you to set the appropriate schedule.

Figure 1.5-5: Data Entry when a Plugin is Available

2.1.1.8. Implementation of MonthSched and the Type518 Component in


TRNSED

While TRNSED is a powerful tool for taking user supplied data and inserting it into the appropriate
spot in a TRNSYS simulation input file, for some types of data, TRNSED’s built in syntax can be
cumbersome for the user. For example, if the TRNSED programmer wishes to allow the end user
to enter monthly average values of ground reflectance, s/he is limited to either putting predefined
values of ground reflectance into a pull down menu or into a group controlled by a radio button, or
to adding 12 sequential numerical value fields into the TRNSED interface, one for each ground
reflectance value. Type518 and its companion program (monthsched.exe) offer an alternative; the
TRNSED programmer can provide the end user with a clickable button in the TRNSED interface.
When the end user clicks that button the monthsched application is launched and the end user
can set up the schedule of ground reflectances using sliders. The following example shows a
possible implementation in TRNSED. Please refer to the TRNSED/TRNEdit manual for more
information regarding the syntax used.

Figure 1.5-6 shows what the TRNSED end user might see in this example’s implementation of
Type518. The text and button in the figure below are contained in a bitmap image called
GrndRefB.bmp

29
TESSLibs 17 – Applications Library Mathematical Reference

Figure 1.5-6: A Clickable Button in TRNSED. Clicking the button launches the MonthSched.exe
Application

The TRNSED source required to create Figure 1.5-6 is as follows:

*|[GroundReflectanceDisplay|Ground Reflectance Values


*|<APPLINK3> c:\Trnsys17\images\GrndRfB.bmp
file=c:\Trnsys17\AppDat\T518dat.slm,min=0,max=1,inter=10 LEFT
ASSIGN "c:\Trnsys17\AppDat\T518dat.slm" 24
*|]

...

UNIT 25 TYPE 518 - MONTHLY FORCING FUNCTION SCHEDULER (MONTHSCHED.EXE)


PARAMETERS 1
24 !logical unit of data file

In the above, the <APPLINK3> keyword takes three arguments. The first argument is the location
of the clickable bitmap image that will be displayed in TRNSED view. When clicked, the
executable program associated with APPLINK3 (in this case MonthSched.exe) will be launched
with the second argument. The second argument is the file that should be loaded by the launched
program. In this case, it is the *.slm file that contains the monthly schedule data. The third
argument is a justification (LEFT, RIGHT, or CENTER) for the bitmap image.

The only other thing that the TRNSED programmer must do in order to implement the clickable
button is to make sure that APPLINK3 in the TRNEdit File: Setup Menu is directed to
MonthSched.exe. The Link Tab might be set as follows:

Figure 1.5-7: The TRNEdit Links Setup

When the end user clicks on the button labeled “GroundReflectance,” c:\Trnsys17\Tess
Models\Plugins\MonthSched.exe is launched with the file c:\Trnsys17\AppDat\T518dat.slm.”
Once the user has made and saved their changes to the slider values, MonthSched records
those changes in the .slm file. Later in the TRNSED input file, the same file is ASSIGNed to a
logical unit number. This data file is read by Type518 during the simulation and the Type outputs
appropriate values of the ground reflectance for each hour of the simulation.

30
TessLibs 17 – Applications Library Mathematical Reference

2.1.1.9. File Format

Type518 transfers data by means of a text file with the extension *.slm. Normally there is no need
to modify the file’s contents because the plugin and thermosched.exe are designed to read from
and write to the file. For reference sake, however, the file syntax is shown below.
TRNSYS17 1.00a ! header
0 ! 0 or 1 depending on the drop down menu selection (0:constant, 1: interpolate)
0 ! minimum value for sliders.
12 ! maximum value for sliders.
100 ! number of values between the minimum and maximum values
1 ! value of the first slider.
2 ! value of the second slider.
3 ! value of the third slider.
4 ! value of the fourth slider.
5 ! value of the fifth slider.
6 ! value of the sixth slider.
7 ! value of the seventh slider.
8 ! value of the eighth slider.
9 ! value of the ninth slider.
10 ! value of the tenth slider.
11 ! value of the eleventh slider.
12 ! value of the twelfth slider.

31
TESSLibs 17 – Applications Library Mathematical Reference

1.6. Type 519: Holiday Scheduler

The Holiday Scheduler utility programs (Type519.exe and Scheduler.exe) and TRNSYS Type
519 are used in conjunction with one another to input and read a holiday schedule. A holiday
schedule denotes which days of the year are holidays. This type of schedule is very useful when
trying the match the actual operation of a building or calibrate a simulation to measured data or
when switching between “occupied” and “unoccupied” building schedules.

Two applications are provided: Type519.exe is a plugin for use with the TRNSYS Simulation
Studio while Scheduler.exe is designed for use in distributable TRNSED applications. The first
section of the Detailed Description here below provides the user with information on manipulating
Type519.exe and Scheduler.exe since operationally they are identical. Type519.exe and
Scheduler.exe differ only in the format of data that they pass to the program that called them. A
second section describes the use of Type519 and Type519.exe within the TRNSYS Simulation
Studio environment. The third section of the Detailed Description describes the application of
Scheduler.exe in TRNSED distributable applications.

1.6.1. Mathematical Description

2.1.1.10. Use of the Scheduler Programs

The Scheduler program has multiple input screens. The first screen is used to maintain the file
that stores the holiday schedule and to set the period of the schedule, as shown in Figure 1.6-1.

Figure 1.6-1: Schedule Duration

At the top of the screen shown in Figure 1.6-1 is the file menu which controls the selection of the
file that will store the values and be read in by TRNSYS as well as the control of the program.
The user can select “Open” from the menu to open an existing file, “Save” to save the current
values to a file, or “Exit” to leave the program.

The period of the schedule is set by selecting the starting month and entering the starting year
and the schedule length in months. Schedules can be as short as a single month or as long as 2

32
TessLibs 17 – Applications Library Mathematical Reference

years (24 months). If the period selected contains the February of a leap year, a warning
message will appear telling the user that a leap day is included in the schedule. It is important to
note this fact and to make sure that appropriate weather data and simulation lengths that also
include a leap day are used in TRNSYS.

Once the schedule period has been entered, pressing the “Set Schedule” button will activate the
second input screen where the actual schedule can be selected.

Figure 1.6-2: Specification of Holidays

At the top of the screen the current month and year being specified is displayed. In addition the
month number of the schedule is also displayed. This value is not necessarily the month of the
year, but denotes which month in the schedule sequence it is.

On the left side of the window is the calendar for that specific month. This calendar is used to
select which days are holidays and to display the currently selected holidays. The days which
have been selected as holidays are displayed in red and non-holidays in white. To change a day
from non-holiday to holiday or vice versa, simply click on the day using the mouse.

On the right side of the screen are some selection shortcuts. To automatically select all weekend
days as holidays select the “Weekends” check box. Un-selecting the checkbox will set all the
weekend days to non-holidays. Selecting the “Standard US Holidays” checkbox will automatically
select all of the official US Federal holidays as scheduled holidays. Again un-selecting the
checkbox will set the holidays to non-holidays. Pressing the “Reset” button will set all of the days
in the schedule period to non-holidays.

The buttons at the bottom of the window control the active month of the schedule. Pressing the
“Back” and “Next” buttons will navigate through the various months in the schedule period. If the
currently active month is either the first or last month in the period the appropriate button will be
inactive.

Pressing the “Finished” button at the lower right of the window will return to the first input screen
where the file can be saved and the program exited.

2.1.1.11. Implementation of Type519.exe and the Type519 Component in the


Simulation Studio

Type519.exe is a Simulation Studio plugin. Plugins offer an alternative method for entering
parameters and inputs. Once Type519 has been placed in a Studio project, double click the
component as you normally would to enter its parameter and input initial values. The window that

33
TESSLibs 17 – Applications Library Mathematical Reference

pops up should look like that shown in Figure 1.6-3. Clicking the icon in the lower left hand corer
of the window will launch Type519.exe, allowing you to set the appropriate schedule.

Figure 1.6-3: Data Entry when a Plugin is Available

2.1.1.12. Implementation of Scheduler.exe and the Type519 Component in


TRNSED

While TRNSED is a powerful tool for taking user supplied data and inserting it into the appropriate
spot in a TRNSYS simulation input file, for some types of data, TRNSED’s built in syntax can be
cumbersome for the end user. One of the most difficult types of data to enter into TRNSED is the
schedule of holidays and weekends during which a building’s heating and cooling set points might
be set in an energy saving mode. Type519 and its companion program (scheduler.exe) offer an
alternative; the TRNSED programmer can provide the end user with a clickable button in the
TRNSED interface. When the end user clicks that button, the Scheduler application is launched
and the end user can set up the schedule of holidays and weekends for an entire year. The
following example shows a possible implementation in TRNSED. Please refer to the
TRNSED/TRNEdit manual for more information regarding the syntax used.

Figure 1.6-4 shows what the TRNSED end user might see in this example’s implementation of
Type519. The text and button in the figure below are contained in a bitmap image called
holiday.bmp.

Figure 1.6-4: A Clickable Button in TRNSED. Clicking the button launches the MultSched.exe
Application

34
TessLibs 17 – Applications Library Mathematical Reference

The TRNSED source required to create Figure 1.6-4 is as follows:

*|[HoliDisplay|Building Occupancy Schedule


*|<APPLINK4> c:\Trnsys17\images\holiday.bmp file=c:\Trnsys17\AppDat\T519dat.hol RIGHT
ASSIGN "c:\Trnsys17\AppssDat\T519dat.hol " 25
*|]

...

UNIT 30 TYPE 519 - ON/OFF DAILY FORCING FUNCTION (SCHEDULER.EXE)


PARAMETERS 2
25 !logical unit of data file
1 !day of the week on which the simulations starts

In the above, the <APPLINK4> keyword takes three arguments. The first argument is the location
of the clickable bitmap image that will be displayed in TRNSED view. When clicked, the
executable program associated with APPLINK4 (in this case Scheduler.exe) will be launched and
will load the file indicated by the second argument. In this case, it is the *.hol file that contains the
holiday data. The third argument is a justification (LEFT, RIGHT, or CENTER) for the bitmap
image.

The only other thing that the TRNSED programmer must do in order to implement the clickable
button is to make sure that APPLINK2 in the TRNEdit File: Setup Menu is directed to
Scheduler.exe. The Link Tab might be set as follows:

Figure 1.6-5: The TRNEdit Links Setup

When the end user clicks on the button, c:\Trnsys17\Tess Models\Plugins\Scheduler.exe is


launched with the file “c:\Trnsys17\AppDat\T519dat.hol.” Once the user has made and saved
their changes to the slider values, Scheduler records those changes in the appropriate .hol file.
Later in the TRNSED input file, the same files are ASSIGNed to logical unit numbers. The data
files are read by Type519 during the simulation and the Type outputs appropriate values
indicating whether the current day is a holiday, a weekend, or a weekday.

2.1.1.13. File Format

Type519 transfers data by means of a text file with the extension *.hol. Normally there is no need
to modify the file’s contents because the plugin and thermosched.exe are designed to read from
and write to the file. For reference sake, however, the file syntax is shown below.
0 2012 12 ! starting month; starting year; length of schedule (in months)
1 !
114 ! number of holidays in the file
1 ! day of the year for the first holiday
3 ! day of the year for the second holiday
4 ! etc.

35
TESSLibs 17 – Applications Library Mathematical Reference

36
TessLibs 17 – Applications Library Mathematical Reference

1.7. Type 520: Multiple Thermostat Controls

The Multiple Thermostat Controls utility programs (Type520.exe and MultThermoSched.exe) and
their companion component Type520 are used in conjunction with one another to define a set
point schedule that changes based on a weekday, Saturday, and Sunday basis. A set point
schedule consists of a heating set point and setback temperatures, a cooling set point and setup
temperatures, and the hours during which they apply. While this documentation has been written
using temperature set points as an example, it should be noted that there is nothing inherent
about that MultThermoSched program that forces it to be used only for temperatures. It should
also be noted that the difference between Type520 and Type514 is that Type520 allows for
differing schedules during weekdays, on Saturdays and on Sundays while Type514 applies the
same schedule regardless of the day of the week.

Two applications are provided: Type520.exe is a plugin for use with the TRNSYS Simulation
Studio while MultThermoSched.exe is designed for use in distributable TRNSED applications.
The first section of the Detailed Description here below provides the user with information on
manipulating Type520.exe and MultThermoSched.exe since operationally they are identical.
Type520.exe and MultThermoSched.exe differ only in the format of data that they pass to the
program that called them. A second section describes the use of Type520 and Type520.exe
within the TRNSYS Simulation Studio environment. The third section of the Detailed Description
describes the application of MultThermoSched.exe in TRNSED distributable applications.

1.7.1. Mathematical Description

2.5.1.1. Use of the Scheduler Programs

At the top of the screen is the File menu which controls the selection of the file that will store the
values and be read in by TRNSYS as well as the control of the program. The user can select
“Open” from the menu to open an existing file, “Save” to save the current values to a file, or “Exit”
to leave the program. Selecting the appropriate tab determines if the values are being input for
the Weekday, Saturday, or Sunday set point schedule.

The two vertical bars on the screen shown in Figure 1.7-1 are used to set the times when the
different set points are used, with heating being set on the left hand bar and the cooling on the
right hand. The period when the set point temperature is used is set by the middle section of the
bar (red part in heating and blue part in cooling). The sections at the top and bottom of the bar
denote times when the setback (in heating) or setup (in cooling) temperatures are used. The
sections of the bar are changed by grabbing the separation lines with the mouse and moving the
lines to the desired time. When the mouse cursor is moved over a separation line so that it can
be selected the cursor changes from the arrow ( ) to the pointing finger ( ). The line can then
be moved by clicking and moving the mouse while holding the mouse button down. When
selected the cursor will change to the closed hand ( ). While the separation lines are moving
the time values on the right side of the bar will change to denote the time being set. Times can
be set at 15 minute intervals.

37
TESSLibs 17 – Applications Library Mathematical Reference

Figure 1.7-1: Thermostat Control

The heating set point and setback temperatures are set in the text boxes on the bottom left of the
window and the cooling set point and setup temperature in the textboxes on the right bottom of
the window.

2.5.1.2. Implementation of Type520.exe and the Type520 Component in the


Simulation Studio

Type520.exe is a Simulation Studio plugin. Plugins offer an alternative method for entering
parameters and inputs. Once Type520 has been placed in a Studio project, double click the
component as you normally would to enter its parameter and input initial values. The window that
pops up should look like that shown in Figure 1.7-2. Clicking the icon in the lower left hand corer
of the window will launch Type520.exe, allowing you to set the appropriate schedule.

38
TessLibs 17 – Applications Library Mathematical Reference

Figure 1.7-2: Data Entry when a Plugin is Available

2.5.1.3. Implementation of MultThermoSched.exe and the Type520


Component in TRNSED

While TRNSED is a powerful tool for taking user supplied data and inserting it into the appropriate
spot in a TRNSYS simulation input file, for some types of data, TRNSED’s built in syntax can be
cumbersome for the end user. For example, if the TRNSED programmer wishes to allow the end
user to enter a heating or cooling set point schedule, s/he is limited to using groups controlled by
a radio buttons, or to adding enough sequential numerical value fields into the TRNSED interface
to accommodate the entire schedule. Type520 and its companion program
(MultThermoSched.exe) offer an alternative; the TRNSED programmer can provide the end user
with a clickable button in the TRNSED interface. When the end user clicks that button, the
MultThermoSched application is launched and the end user can set up heating and cooling set
points, heating setback tand cooling set up temperatures and the times during which these are
active using a dedicated graphical interface. The following example shows a possible
implementation in TRNSED. Please refer to the TRNSED/TRNEdit manual for more information
regarding the syntax used.

Figure 1.7-3 shows what the TRNSED end user might see in this example’s implementation of
Type520. The text and button in the figure below are contained in a bitmap image called
HtCl.bmp.

Figure 1.7-3: A Clickable Button in TRNSED. Clicking the button launches the MultThermoSched.exe
Application

The TRNSED source required to create Figure 1.7-3 is as follows:

39
TESSLibs 17 – Applications Library Mathematical Reference

*|[HeatCoolDisplay|Heating and Cooling Set Points


*|<APPLINK4> c:\trnsys17\images\HtCl.bmp file= c:\trnsys17\AppDat\T520dat.mts RIGHT
ASSIGN "c:\trnsys17\AppDat\T520dat.mts" 26
*|]

UNIT 35 TYPE 520 - HEATING/COOLING SET POINT SCHEDULER (MULTTHERMOSCHED.EXE)


PARAMETERS 2
26 !logical unit of data file
1 !day of the week on which the simulations starts

In the above, the <APPLINK4> keyword takes three arguments. The first argument is the location
of the clickable bitmap image that will be displayed in TRNSED view. When clicked, the
executable program associated with APPLINK4 (in this case MultThermoSched.exe) will be
launched and will load the file indicated by the second argument. In this case, it is the *.mts file
that contains the schedule data. The third argument is a justification (LEFT, RIGHT, or CENTER)
for the bitmap image.

The only other thing that the TRNSED programmer must do in order to implement the clickable
button is to make sure that APPLINK4 in the TRNEdit File: Setup Menu is directed to
MultThermoSched.exe. The Link Tab might be set as follows:

Figure 1.7-4: The TRNEdit Links Setup

When the end user clicks on the button in the TRNSED display, c:\Trnsys17\Tess
Models\Plugins\MultThermoSched.exe is launched with either the file
“c:\Trnsys17\AppDat\T520dat.mts.” Once the user has made and saved their changes to the
slider values, MultThermoSched records those changes in the appropriate .mts file. Later in the
TRNSED input file, the same files are ASSIGNed to logical unit numbers. The data file is read by
Type520 during the simulation and the Type outputs appropriate values of the heating or cooling
set points for each hour of the simulation.

2.5.1.4. File Format

Type520 transfers data by means of a text file with the extension *.mts. Normally there is no need
to modify the file’s contents because the plugin and thermosched.exe are designed to read from
and write to the file. For reference sake, however, the file syntax is shown below.
TRNSYS17 1.00a ! header
20 !hour of the day (1-24) when the heating setback becomes active (Monday-Friday).
0 !number of qtr hours after the heat setback hour when the setback becomes active (M-F)
8 !hour of the day for the return from heating setback (M-F).
0 !number of qtr hours after the setback return hour when the setback is over (M-F).
20 !heating set point temperature (M-F) (user specified units)
10 !heating set back temperature (M-F) (user specified units)
17 !hour of the day when the cooling setup becomes active (M-F)
0 !number of qtr hours after the cooling setback hour when setup becomes active (M-F).
7 !hour of the day for the return from cooling setup (M-F)

40
TessLibs 17 – Applications Library Mathematical Reference

0 !number of quarter hours after the setup return hour when the setup is over (M-F).
25.5 !cooling set point temperature (M-F) (user specified units)
40 !cooling setup temperature (M-F) (user specified units)
20 !hour of the day (1-24) when the heating setback becomes active (Saturday).
0 !number of qtr hours after the heat setback hour when the setback becomes active (Sa)
8 !hour of the day for the return from heating setback (Sa).
0 !number of qtr hours after the setback return hour when the setback is over (Sa).
20 !heating set point temperature (Sa) (user specified units)
10 !heating set back temperature (Sa) (user specified units)
17 !hour of the day when the cooling setup becomes active (Sa)
0 !number of qtr hours after the cooling setback hour when setup becomes active (Sa).
7 !hour of the day for the return from cooling setup (Sa)
0 !number of quarter hours after the setup return hour when the setup is over (Sa).
25.5 !cooling set point temperature (Sa) (user specified units)
40 !cooling setup temperature (Sa) (user specified units)
20 !hour of the day (1-24) when the heating setback becomes active (Sunday).
0 !number of qtr hours after the heat setback hour when the setback becomes active (Su)
8 !hour of the day for the return from heating setback (Su).
0 !number of qtr hours after the setback return hour when the setback is over (Su).
20 !heating set point temperature (Su) (user specified units)
10 !heating set back temperature (Su) (user specified units)
17 !hour of the day when the cooling setup becomes active (Su)
0 !number of qtr hours after the cooling setback hour when setup becomes active (Su).
7 !hour of the day for the return from cooling setup (Su)
0 !number of quarter hours after the setup return hour when the setup is over (Su).
25.5 !cooling set point temperature (Su) (user specified units)
40 !cooling setup temperature (Su) (user specified units)

41

You might also like