using trnshell trnsed _new_.pdf · the open command displays the open dialog box shown in figure 3....

33
Using TRNSHELL & TRNSED The TRNSYS Environment Programs Version 2.0 for Windows 95 and Windows NT 4.0

Upload: others

Post on 12-Nov-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

Using

TRNSHELL&

TRNSEDThe TRNSYS Environment Programs

Version 2.0 for Windows 95 and Windows NT 4.0

Page 2: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

NOTICE:

This version of the TRNSHELL/TRNSED manual is to be used with TRNSYS Versions14.2 for Windows. It is not to be used with versions released prior to January 1996 andhaving version numbers 14.1 or below.

Updates and corrections to this manual may be issued in the future. The user shouldrecord the date these changes are received on the following list.A. (7/94) TRNSHELL Version 1.0B. (1/96) TRNSHELL Version 2.0C. (10/97) Update to TRNSHELL/TRNSED manual to reflect new features

Page 3: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 1

Using

TRNSHELL&

TRNSEDThe TRNSYS Environment Programs

Version 2.0 for Windows 95 and Windows NT 4.0

Programming By:S. A. KleinA. Fiksel

MANUAL CONTRIBUTORS:N.J. Blair

J.W. ThorntonS.A. Klein

W.A. BeckmanP.M. Williams

SOLAR ENERGY LABORATORYUNIVERSITY OF WISCONSIN

1500 ENGINEERING DRIVEMADISON, WI 53706 USA

October 1997

Page 4: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

2 TRNSHELL

TABLE OF CONTENTS

3 PREFACE

4 INTRODUCTION TO TRNSHELL

4 GETTING STARTED

5 FILE MENU

13 EDIT MENU

15 TRNSYS MENU

17 TRNSED

17 TRNSED MENU

21 PARAMETRICS MENU

24 UTILITIES MENU

26 PLOT MENU

28 WINDOWS MENU

30 HELP MENU

33 Appendix I: Programmer’s Guide to TRNSED

49 Appendix II: TRNSED Information Files

Page 5: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 3

PREFACE

This manual and the TRNSHELL program were developed partially under grants from theU.S. Department of Energy. Further information about the program and its availability can beobtained from:

TRNSYS CoordinatorSolar Energy Laboratory1303 Engineering Research BuildingUniversity of Wisconsin-Madison1500 Engineering DriveMadison, WI 53706 USAPhone: (608) 263-1589 or 263-1586Fax: (608) 262-8464

NOTICE:

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

How to Use this ManualThe information presented in this manual is intended to provide a complete TRNSHELL

reference source for the user. The intent of this manual is to help the user achieve proficiencyin the TRNSHELL environment by providing complete descriptions of the various menu itemsand their functions. This manual is not intended to provide detailed information about theTRNSYS simulation software nor any of its other utility programs. Detailed informationconcerning these programs can be found in other parts of the TRNSYS documentation set.

Page 6: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

4 TRNSHELL

INTRODUCTION TO TRNSHELL

TRNSHELL is the menu-driven environment program for TRNSYS that houses editingand plotting functions, context-sensitive help, compiling and linking options, and the TRNSYSprogram. TRNSHELL also houses all of the TRNSYS utility programs, including PRESIM orIISiBat - the graphical preprocessors to TRNSYS, PREBID - the preprocessor to the buildingdescription program, BID - the building input description program, PREP - the transferfunction generator for the single zone model, and DEBUG - the utility program to test user-written component routines. TRNSHELL was written so that all common TRNSYS functionscould be performed simply and easily from one environment program. This version ofTRNSHELL is intended to run on a PC running Windows NT 4.0 or Windows 95.

GETTING STARTED

If properly installed, there is a TRNSYS program group within Windows. TheTRNSHELL executable file is called TRNSHL32.EXE and is located in the directory wherethe TRNSYS package was installed.

The header window will be displayed when TRNSHELL is first started. This windowindicates the version number of the TRNSHELL program plus important licensinginformation. Clicking the OK Button will clear the header and display the menu-drivenTRNSHELL program (Figure 1). From the TRNSHELL menus, users may elect to utilize theediting and plotting functions provided, access the on-line context-sensitive help, compile andlink a TRNSYS subroutine, or run the TRNSYS program or any of its associated utilityprograms.

TRNSHELL menus may be accessed in one of two ways: the menu may be activated byclicking on the name of the menu with the mouse, or the menu may be activated by pressingthe ALT key at the same time as the ‘hot’ letter of the menu command. The ‘hot’ letter of themenu command is the letter in the menu name that is underlined. For example, pressing ALT+ F will open the File menu (F is the hot letter for the File Menu). The F10 key followed byEnter will also pull down a menu. Once one of the menus is open, the --> and <-- keys onthe keyboard will change the menus to the next menu to the right and left respectively. Withthe desired menu open, clicking on the desired menu item with the mouse will activate thatmenu choice. The menu item may also be activated by pressing the ‘hot’ key of the menuchoice (without the ALT key). For example, with the File menu open, pressing the N key willactivate the menu item New and open a blank TRNSYS input file. Some of the more commonmenu items have shortcuts associated with them. For example, the Calculate menu itemlocated under the TRNSYS menu may be quickly chosen by pressing the F8 key (notice thatthe F8 key designation is shown next to the Calculate menu item).

Page 7: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 5

Figure 1: The TRNSHELL environment and menus

In the TRNSHELL program, some of the menu items will not be accessible to the user.Non-accessible menu items are “grayed out” and cannot be chosen. These “grayed out” menuitems can only be chosen when the correct active window is open. For example, theTRNSYS/Compile Module menu item is only available when a Fortran subroutine is open asthe active window.

THE FILE MENU

The File menu is the first menu option on the left of the Menu Bar. The File Menu offerschoices for opening, saving, and printing TRNSHELL files and plots. The importantconfiguration and setup options for TRNSYS are also within the File Menu. The File menucommands are shown in Figure 2 and explained below.

Page 8: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

6 TRNSHELL

Figure 2: The File Menu

File/NewThe New command creates a new window in the TRNSHELL editor. The new window

name is "Untitled.dck" and is initially empty. The New command can be used to create anytype of text file. For example, a TRNSYS input file or Fortran source code file may be typedinto this new window (the type of file is determined by the file extension when saving).

File/OpenThe Open command displays the Open dialog box shown in Figure 3. In this dialog box,

the file to be opened is specified. The Open dialog box contains an input box, a list boxdisplaying the files in the current directory, a box for selecting the type of file to display, a boxfor selecting the directory, and standard Cancel and OK buttons.

By selecting a type of file within the Files of Type box, the file list will be reduced to thosefiles matching the extension of the button selected; .dck for TRNSYS input files, .trd forTRNSED input files, .dek for PRESIM files, .for for Fortran files, .plt for TRNSHELL Plotfiles and .* for All files. For example, clicking on the Fortran selection button will displayonly those files with a .for extension. To select files from a different subdirectory, use theLook in: window to modify the active directory.

The input box is used for entering the name of the file to load or the file name mask to useas a filter for the Files list box (e.g. *.for will list all files with a .for extension). The list boxlists the names of the files in the current directory that match the file name mask in the Filename input box.

Page 9: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 7

Figure 3: The Open dialog window

File/SaveThe Save command saves the active TRNSHELL window and its associated files, if

present, to disk. If the Save command is issued with a TRNSYS input file named TEST.DCKas the active window, the file TEST.DCK will be overwritten. If the file has not previouslybeen saved and has a default name (such as untitled.dck), TRNSHELL opens the Save File Asdialog box so the file may be named and saved in a specified directory or on a specified drive.

File/Save AsThe Save As command displays the Save File As dialog box which contains a file name

input box, a file listing, a directories window, standard OK and Cancel buttons, and a SaveFile as Type box. This dialog box is illustrated in Figure 4. The Save File As input box isused to enter the desired file name to save the file under or the file-mask for the Files list box.A file-name mask is a portion of the file name that may identify one or more files in the currentdirectory. For example, the file-name mask *.dck would display all files in the currentdirectory with a .dck extension. The mask is a useful tool for determining the names of thefiles that have been previously saved.

Page 10: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

8 TRNSHELL

Figure 4: Save File As dialog box

File/PrintThe Print command prints the contents of the current active window using the information

provided in File/Printer Setup. The printer output may be directed to the printer or to a fileas decided in the Printer Setup. The user is presented with a dialog box (shown in Figure 5)containing a list of possible windows to print, a series of arrow buttons, a list of the windowsbeing printed, as well as the usual Cancel and OK buttons. The user can select one or morewindows in the left list. By clicking on the single-arrow button pointing to the right, theselected file(s) are moved to the list of windows that will be printed. By clicking on thedouble-arrow pointing to the right, all the possible windows will be moved to the list ofwindows to print. The arrows buttons pointing to the left perform the reverse functions. Inthe case of printing to a file, the user will be prompted to supply the name of the desiredoutput file using the Save File As dialog box. If no file extension is provided, the defaultextension (.prn) will be provided for all output files.

Page 11: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 9

Figure 5: Print dialog box

File/Printer SetupThis command configures TRNSHELL to operate with the user’s printer device. Figure 6

depicts the Printer Setup box. The Printer Setup is the standard Windows Printer setup box.The printer device, in this figure, is HP LaserJet IIISi Post Script by default, but may bechanged to another printer by selecting a new printer from the pull-down menu next to Name:.Additional changes to the printer setup can be made by clicking on the Properties button.

Figure 6: The Printer Setup Box

File/SetupThis command allows TRNSHELL to be configured to the available equipment of the user

and allows current TRNSYS configurations to be changed. The OK button will set the

Page 12: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

10 TRNSHELL

TRNSHELL options for this session only. The Store button will save settings to the disk sothat they will be in effect the next time TRNSHELL is initiated. The following setup menutabs are available:

File/Setup/ConfigThis command brings up the Configure dialog box, shown in Figure 7, which provides

access to the TRNSYS configuration file, CNFGTR.TRN. The TRNSYS configurationfile is read in by the TRNSYS program each time a simulation is started and is used tocontrol the operation of the TRNSYS program. The configuration file can be changedusing the check boxes provided in the TRNSHELL program or by changing the settings inthe file CNFGTR.TRN using a text editor. If the TRNSHELL program is used, theSTORE button saves the current setting to file. This setting will also be in effect the nexttime TRNSHELL is started.

Figure 7: The TRNSHELL Setup Configure Box

The available TRNSYS settings are described below:

Display Simulation StatusThis box should be left unchecked.

Write TRNSYS HeaderThis box should be left unchecked.

Write Printer LabelsControls the printing of labels from the TYPE 25 printer to all output files(including the plot files). Printer labels may not be desired if the output file is to beexported to a spreadsheet program.

Page 13: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 11

Write Output UnitsControls the printing of units from the TYPE 25 printer to all output files (if unitsare specified in the TYPE 25 section of the input file). Units may not be desirableif the output file is to be exported to a spreadsheet program.

Check for Unlinked SubroutinesWith the release of TRNSYS version 14, all TYPES specified in the TRNSYSinput file are checked to see if they are linked into the current executable program.Removal of this check may result in a program that runs but produces erroneousresults. Refer to Section 3.3.5 of TRNSYS Volume 1, Reference Manual, formore details.

Check Input-Output ConnectionsTRNSYS checks input-output connections to make sure, for example, thattemperatures are connected to temperatures. Although it may slow down thecalculations slightly, input-output checking catches many common mistakes.

Print Warning MessagesControls the printing of the TRNSYS warning messages. Turning off this checkinhibits the error checking capabilities of the TRNSYS program. The only timethat these warning messages should be disabled is during a rerun of an existinginput file that has been properly debugged.

File/Setup/TRNSEDThis menu allows for configuration of the TRNSED editor display and contains settings

for the Make TRNSED File utility. The TRNSED dialogue box is shown in Figure 8.From this menu the user can choose the desired unit system for the values displayed in theTRNSED window. The Units setting selected has no effect on the TRNSYS input file tobe calculated, only on the display of the input file in the TRNSED format.

Also available are options for inputting a file header and special simulation card for theMake TRNSED File operation. If the Header option is selected, the Make TRNSEDFile utility will read information from the file header.txt (in the /trnwin directory) andinsert it into the newly created TRNSED file. The header information will appear in thebeginning of the newly created TRNSED file and contain lines for the author’s name, thename of the system and the date. If the Simulation Card option is selected, thesimulation card in the TRNSYS input file will be replaced with one which allows forspecification of the month, the starting day of the month and the length of the simulationfrom a list of alternatives that appear in pop-up menus. Users wishing to allow for thissimulation card option should make sure that the weather data file supports the range ofsimulation times available. Users should also change the printing, plotting, and integratingtimes to reflect the new simulation times. Refer to the TRNSED menu section later in this

Page 14: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

12 TRNSHELL

document for more information.

Figure 8: The TRNSED Setup Box

File/Setup/CompilerThis option allows users to specify the proper command line statements that will be run

when the TRNSHELL menu commands TRNSYS/Compile Module, TRNSYS/RebuildTRNSYS, and TRNSYS/Execute User Command are chosen. The full command linestatements, including path names and file extensions, should be entered in these fields asshown in Figure 9. The Compile Module command is intended to be that which willcompile a Fortran subroutine that is the active window given its file name as an argument.The Rebuild TRNSYS command is intended to be that which will rebuild the TRNSYSDLL (trnlib32.dll). For more information on compiling Fortran routines and rebuildingthe TRNSYS DLL, refer to Appendix II of the main TRNSYS reference manual and themanual for your Fortran compiler. The Execute User Command field is intended as aconvenient way to execute any desired program or batch file from TRNSHELL. Ifdesired, the Rebuild TRNSYS command can be used for this purpose as well.

Page 15: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 13

Figure 9: The Setup Compiler Information Box

File/Setup/DirectoriesThis option allows users to specify the directories in which TRNSHELL will look for the

various utility programs available under the Utilities menu. These programs includeTRNSYS for Windows (TRNSYS32.EXE), PRESIM or IISiBat, PREBID, BID, PREPand SPREAD. The full directory paths for the various programs should be entered in thesefields. The ability to change these directories allows the user to run with differentTRNLIB32.DLL files with different components in different directories. This featuremight be useful if there are several people working on the same computer. Each personcould have a TRNSYS32.EXE and TRNLIB32.DLL in his own directory and simplychange the setup path.

File/ExitThe Exit command exits the TRNSHELL program and returns the user to Windows. If a

file has been modified without being saved, a prompt to save the file before exiting will bedisplayed by TRNSHELL.

THE EDIT MENU

The Edit menu provides commands for cutting, copying and pasting text into and out ofactive TRNSHELL documents. The user can also do searching and replacing within thedocument. The Edit menu commands are not available with TRNSED files and only the Findcommand is available with the Output and Listing windows. The following is a description ofthe Edit menu commands and their function as shown in Figure 10.

Page 16: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

14 TRNSHELL

Figure 10: The Edit MenuEdit/Cut

Cut will remove selected text from the active editor window and place the text in a storagelocation (the clipboard) from which it can be retrieved or restored with the Edit/Pastecommand. Text may be selected (highlighted) by 'dragging' the mouse (i.e., holding the mousebutton down while moving it to the new location) or by use of the arrow keys while the Shiftkey is depressed.

Edit/CopyThe Copy command leaves the selected text intact but places an exact copy of the text into

the clipboard. To place the copied text into any other document, choose the Edit/Pastecommand.

Edit/PasteThe Paste command inserts the previously selected text from the clipboard into the active

window at the current cursor position.

Edit/ClearThe Clear command removes the selected text from the document but does not put it into

the clipboard. With the Clear feature, the selected text cannot be pasted as it could have if theCut or Copy commands had been chosen. Care should be taken, as the cleared text is notretrievable.

Page 17: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 15

Edit/FindThe Find command displays the Find dialog box, where the desired text to be searched

for is entered. Find will search the active editor window for the entered string, starting at thecursor position and proceeding either toward the top or bottom of the active documentdepending on the Direction selected in the Find dialog box. If found, the cursor will move tothe new location and the selected text will be highlighted. Use the Search Again command tofind the next occurrence of the search string.

Edit/ReplaceThe Replace command displays the Replace dialog box, in which the text to be searched

for and the text to replace it with is entered. Replace will search the active editor window forthe entered string starting at the cursor position and working to the bottom of the document,replacing the selected text with the desired text string.

Edit/Search AgainThe Search Again command repeats the last Find or Replace command. All settings

made in the previous Find dialog box remain in effect when Search Again is chosen.

TRNSYS MENU

The TRNSYS menu offers choices for running the TRNSYS program as well as utilitiesfor managing Fortran subroutines. The TRNSYS menu commands, as shown in Figure 11,are described in this section.

Page 18: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

16 TRNSHELL

Figure 11: The TRNSYS Menu

TRNSYS/CalculateThe Calculate command calls the TRNSYS simulation program with the settings that have

been stored in the File/Setup menu. The Calculate command is disabled unless a file in theactive window has a .DCK, .TRD, or .DEK file extension. This command may also beexecuted using the F8 key. Upon completion of the calculations, TRNSYS will tell the userthe calculations are complete and ask if he would like to exit the program. Clicking “Yes” willreturn the user to the TRNSHELL program where the output may be viewed and resultsplotted, etc.

TRNSYS/Run TableThe Run Table command allows TRNSYS to calculate the results of a series of TRNSYS

simulations stored in a Parametric Table. The Run Table command is disabled unless theparametric table is the active window or the active window is a TRNSED file which has apreviously-created parametric table. Refer to the Parametrics menu for more information.

When Run Table is selected, the TRNSHELL program stores each of the parametric tableentries in a separate input file. TRNSYS will then consecutively execute all created files fromthe parametric table. Thus, the Run Table command is equivalent to repeated TRNSYScalculations of separate input files.

Page 19: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 17

TRNSYS/Compile ModuleThis command allows the TRNSYS source code file in the active window to be compiled

using the File/Setup/Compiler setting. This command is enabled only if the file in the activewindow has a .FOR extension.

TRNSYS/Rebuild TRNSYSThis command allows the user to create a new TRNSYS DLL. The Rebuild TRNSYS

command executes the command line statement which has been entered as a Rebuildcommand in the File/Setup/Compiler setting.

TRNSYS/Execute User CommandThis command allows the user to execute any legitimate command line statement from the

TRNSHELL program. The desired command should be entered into the File/Setup/Compilerinput box including path names and file extensions.

TRNSED

The TRNSED menu offers choices for creating and editing TRNSED input files.TRNSED is a utility program that provides a user-friendly interface to the TRNSYS input file.TRNSYS input files may be modified by the TRNSED programmer to display only selectedinformation, hiding some of the less important details from a user. TRNSED input files mayalso be configured to provide detailed help, unit conversions and input checking capabilities.Please see Appendix I for extensive information about modifying the TRNSYS input file to usethe features of TRNSED.

TRNSED relies on two basic TRNSYS features. The first is that any line in a TRNSYSinput file that begins with an asterisk (*) is interpreted by TRNSYS as a comment. TRNSEDstatements are placed within a TRNSYS input file and since they begin with an asterisk, areignored by TRNSYS. The second feature is that any numerical value in a TRNSYS input filecan be equated with an alpha-numeric name with the EQUATIONS or CONSTANTSstatements as described in Section 2.2.5 of Volume I, TRNSYS Reference Manual. TheTRNSED program can change the information on the EQUATIONS or CONSTANTSstatements immediately preceding the TRNSED command statements, thereby changing thenumerical values which TRNSYS uses in the simulation. The syntax for TRNSED commandsis described in Appendix I.

THE TRNSED MENU

The TRNSED menu provides access to the Make TRNSED File utility and allowsediting of TRNSED input files in standard text format (as opposed to TRNSED format). The

Page 20: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

18 TRNSHELL

TRNSED menu commands, as shown in Figure 12, are described below.

Figure 12: The TRNSED Menu

TRNSED/Make TRNSED FileCreating a TRNSED input file from a TRNSYS input file may involve many steps. To

simplify the process, a utility program called Make TRNSED File is provided whichautomatically creates the TRNSED file from an existing TRNSYS input file.

The Make TRNSED File utility first scans the TRNSYS input file (which must be theactive window) and determines the TRNSYS component subroutines (TYPES) which are tobe used in the simulation. For each type, the information from the corresponding TYPEn.INFfile (where n is an integer from 1 to 300) is read and used to define the default names, unitsand unit conversion factors for each PARAMETER and INPUT for this TYPE (refer toAppendix II of this manual for more details). Once the information files are read, the MakeTRNSED File dialog box will appear.

The Make TRNSED File dialog box contains Units, Parameters, and Inputs boxes plusfour buttons: All, None, OK and Cancel. The description of the boxes and buttons follows(refer to Figure 13).

Page 21: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 19

Figure 13: The List of Units dialog box

Units - A listing of the UNIT-TYPE combinations contained in the TRNSYS input file.Different UNIT-TYPE combinations may be selected by clicking or using the arrow keys andspace bar. The Parameters and Inputs boxes display the information for the currently selectedUNIT-TYPE.

Parameters - A listing of the PARAMETERS for the selected UNIT-TYPE. PARAMETERSthat are not able to be converted to TRNSED format have an asterisk before the description.

Inputs - A listing of the INPUTS for the currently selected UNIT-TYPE. INPUTS that arenot able to be converted to TRNSED format have an asterisk before the description.

All - Selects either the entire set of PARAMETERS or INPUTS for the current UNIT-TYPEdepending on the location of the cursor. If the cursor is in the INPUTS box and the All buttonis clicked, all the INPUTS for the current UNIT-TYPE will be selected for conversion toTRNSED format.

None - Unselect the entire set of PARAMETERS or INPUTS for the current UNIT-TYPEdepending on the location of the cursor. If the cursor is in the INPUTS box and the Nonebutton is clicked, all the INPUTS for the current UNIT-TYPE will be deselected forconversion to TRNSED format.

OK - Informs the Make TRNSED File utility that the user is finished selecting the INPUTSand PARAMETERS to be converted to TRNSED format.

Cancel - Exits the Make TRNSED File utility without making any changes to the input files.

Page 22: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

20 TRNSHELL

A user wishing to create a TRNSED input file from a TRNSYS input file must select thePARAMETERS and INPUTS to be converted to TRNSED format from the lists contained.Only the selected items will be displayed when the input file is shown in TRNSED format. Inthis manner, the programmer may hide some of the less important details from future users anddisplay only those items which are deemed relevant.

Items designated to be converted to TRNSED format are reverse-highlighted fromnonselected items (refer to Figure 13 - selection number 1). The select status of the item maybe switched by clicking the mouse on the description or by pressing the <Space Bar> key. Allof the items for the UNIT may be selected or deselected by using the All or None buttons.

Note that some TYPES, all input and output TYPES for example, do not need to beconverted to TRNSED format. These types are: TYPE 9, TYPE 14, TYPE 15, TYPE 17,TYPE 19, TYPE 24, TYPE 25, TYPE 26, TYPE 27, TYPE 28, TYPE 29, TYPE 40, TYPE41, TYPE 55, TYPE 56 and TYPE 65. These types are simply transferred to the TRNSEDfile without modification.

When the user is finished selecting the INPUTS and PARAMETERS to be converted, theMake TRNSED File utility will replace the selected INPUTS and PARAMETERS withCONSTANTS (section 2.2.5 of Volume I, main TRNSYS Reference Manual). BecauseTRNSED allows users to change only the numerical values of INPUTS and PARAMETERSusing the EQUATIONS or CONSTANTS statements, INPUTS that are connected toOUTPUTS of other UNITS or PARAMETERS that have already been defined usingEQUATIONS or CONSTANTS cannot be converted to TRNSED format. These items aredesignated in the boxes by an asterisk (*) before the INPUT or PARAMETER description(refer to Figure 13 - selection number 2).

Once the desired selections have been made, the information can be saved as a TRNSEDfile by pressing the Done button. A prompt will be displayed for the user to specify the nameof the newly created TRNSED file in the Save File As dialog box. Users should name theTRNSED file with the same prefix as the TRNSYS input file (but with the .TRD extension) toensure that the plot, listing and output windows are available to the TRNSHELL programafter a successful completion of the simulation. If no extension is provided by the user, thedefault extension .TRD will be added by the program. With the specification of the name, thenewly created TRNSED file will appear in the TRNSED window. The newly createdTRNSED file and original TRNSYS files are now separate input files and may be changedindependently.

The selected options from the File/Setup/TRNSED dialog box are in effect in the newTRNSED window. The units setting in the File/Setup/TRNSED dialog box may be changedat any time. However, users wishing to add or delete the TRNSED header or simulation cards

Page 23: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 21

must recreate the TRNSED input file with the new settings.

The Make-TRNSED File utility will rearrange the users input file, placing all TYPESwhich cannot be converted to TRNSED format at the beginning of the input file. Theremaining UNITs will then appear in the TRNSED input file in the order in which they werespecified in the TRNSYS input file. Prior to each UNIT, the EQUATIONS or CONSTANTSused by that UNIT in the TRNSED program will appear.

TRNSED/Edit TRNSED FileWhen opened from the File/Open menu, TRNSED input files are always opened in

TRNSED format (as a result of the ‘*TRNSED’ statement which is the first line of the inputfile). However, TRNSED programmers will usually wish to access the TRNSED input file inregular text mode to add TRNSED comments, add pop-up menus, change units, fix errors,etc. The Edit TRNSED File option is the only way to open the TRNSED input file into texteditor mode in TRNSHELL. The Edit TRNSED File menu will display the Open a Filedialog box which allows for the selection of TRNSED files (those files ending with a .TRDextension by default). To save the modified file, either use the File/Save or File/Save Ascommands. Once the modified TRNSED file has been saved, it can be re-opened into theTRNSED window using the File/Open command.

THE PARAMETRICS MENU

The Parametrics menu contains commands to set up and modify the data in a parametrictable. The parametric table operates in a manner similar to a spreadsheet. The power of theparametric table is that it allows the user to execute repetitive TRNSYS simulations using oneinput file with different values of system variables.

The parametric table option allows users to choose any variable that is defined in the inputfile with a CONSTANTS command and add it to a parametric table. Variables that aredefined with EQUATIONS commands cannot be inserted into a parametric table. Because ofthe distinction between CONSTANTS and EQUATIONS, programmers may specify whichvariables can be selected for inclusion in a parametric table. Neither TRNSYS or TRNSEDcare whether a variable was defined using an EQUATIONS or CONSTANTS command, onlythe Parametrics function does. The Make TRNSED File utility will always write the selectedvariables using the CONSTANTS command. If a programmer wishes to exclude some ofthese variables from possible inclusion in a table, the CONSTANTS specification could bereplaced with an EQUATIONS specification.

The parametric table works in the following way. If the original input file is namedFILE.TRD, N files with the names FILE.TMP, FILE1.TMP, ..., FILEn.TMP are created inthe current directory, where n is the number of runs in the parametric table minus one. Eachfile has a different set of values corresponding to the ones specified in the parametric table.Also, the ASSIGN statements for the TRNSYS output file(s), TRNSYS listing file and

Page 24: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

22 TRNSHELL

TRNSYS plot file are corrected according to the new file name. Thus, if the original file withthe name FILE.TRD happens to have a statement of the form,

ASSIGN FILE.OUT 6

the file created for table run number 5 will have the name FILE4.TMP and will contain thefollowing line:

ASSIGN FILE4.OUT 6

Figure 14: The Parametrics Menu

The plot, listing, output and input files created with a parametric table run areautomatically deleted when a user initiates a new parametric table run. Because of theparametric table naming convention, users should refrain from ending the names of TRNSYSinput files with a number. For example, if a user had an input file named FILE11.TRD, theplot, output and list files from this input file would be deleted if a user ran a 12 row parametrictable of an input file named FILE.TRD since the twelfth run would be named FILE11. Allcells of the parametric table must be filled before running the table.

Page 25: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 23

Figure 15: New Parametric Table Dialog Window

Parametrics/New TableThe number of runs, which corresponds to the number of rows in the table, is entered in

the box at the top of the New Parametric Table dialog window (Figure 15). The list ofvariables available to put in the table appears on the left. This list contains the names of allvariables which are defined by CONSTANTS statements in the input file. The variables whichare to appear in the table are selected from this list. To select a variable, click on its nameusing the mouse. When selecting the variables, the TRNSED description (if any) appearbelow the list. To get these relations correct, the TRNSED input file must be arrangedproperly.

Click the single-arrow button pointing to the right to move the selected variable name tothe list of variables that will appear in the table. Click the double-arrow button pointing to theright to move all the variables to the list of variables that will appear in the table on the right.The variables in the right hand list will appear in the parametric table in the order in which theywere put into the list.

A variable can be removed from the table list on the right by clicking on its name in theright list and then clicking the single-arrow button pointing to the left. Clicking on the double-arrow button pointing to the left will move all the variables in the Parameters in Table windowback to the Parameters in File window. Clicking the OK button will close the NewParametric Table dialog box and bring up the table window with empty value boxes. Thedesired values for the variables may either be directly entered into the table or entered usingthe Alter Values command. Only one parametric table is allowed at any time. When creatinga new parametric table, any existing table is automatically deleted.

Parametrics/Alter TableThe Alter Table dialog provides an automatic way to enter or clear the values of a

Page 26: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

24 TRNSHELL

variable in a parametric table. The Alter Table menu option is only available if the parametrictable is the active TRNSHELL window.

The variable to be changed in the table is selected from the list by clicking on its name withthe mouse or by selecting it using the Up or Down keys. The values for this variable will becleared if the Clear Values control is selected (shown with a black dot in the circle). If SetValues is selected, values for the selected variable will be automatically entered in the tablestarting with the value in the First Value box. Successive values in the table are generated byuse of a last value, increment, or multiplier. Several alterations to the table can be madewithout leaving this window by making changes with the Apply button. Click on the OKbutton when all the changes to the table have been made.

Parametrics/Insert/Delete RunsThe number of runs in an existing Parametric table can be changed at any time by inserting

or deleting one or more runs at the top, bottom, or after a specified run. Users should makesure to fill in the values of the new table entries to avoid TRNSHELL errors. TheInsert/Delete Runs menu option is only available if the parametric table is the activeTRNSHELL window.

Parametrics/Insert-Delete VariablesVariables can be added to or removed from an existing Parametric Table using this

command. In addition, the command allows the order in which variables appear in thecolumns of an existing Parametric Table to be changed without losing any of the values in thetable.

This command operates in exactly the same manner as the New Table command. Allavailable variables will be listed alphabetically in the list on the left. The list on the right willshow the variables in the existing parametric table. Variables may be added or removed asdesired. To change the order in which the variables appear, remove all of the variables andthen add them back in the desired order. Because TRNSHELL is a multiwindowsenvironment, care should be taken not to mix up variables from different files. TheInsert/Delete Variables command is enabled only when the file in the active window is thesame as the one the table has been created in.

THE UTILITIES MENU

The Utilities menu provides choices for various TRNSYS utility programs. The Utilitiesmenu commands, as shown in Figure 16, are described in this section.

Page 27: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 25

Figure 16: The Utilities Menu

Utilities/IISiBat or Utilities/PRESIMThis menu option starts either the IISiBat or the PRESIM program, the graphical

preprocessors for TRNSYS. Refer to the appropriate manual for details about theseprograms. For ease of use, the directory in the File/Setup menu should be changed to\TRNWIN\PRESIM or \TRNWIN\IISIBAT2\MSDOS before calling this program.

Utilities/PREBIDThis command initiates the PREBID program, a pre-processor to the building input

description program (BID). Refer to the PREBID manual for details about the program. Forease of use, the PREBID directory in the File/Setup menu should be changed to\TRNWIN\BID before calling this program.

Utilities/BIDThis command calls the BID program, the building input description program. Refer to

the main TRNSYS reference manual for details about the BID program. For ease of use, theBID directory in the File/Setup menu should be changed to \TRNWIN\BID before calling thisprogram.

Utilities/PREPThis command calls the PREP program, a wall/roof/partition transfer function generator

for use with the single zone model. Refer to the main TRNSYS reference manual for details

Page 28: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

26 TRNSHELL

about the PREP program. For ease of use, the PREP directory in the File/Setup menu shouldbe changed to \TRNWIN\PREP before calling this program.

Utilities/SPREADThis command calls the SPREAD program, a spreadsheet program for use with TRNSYS.

Refer to the online help files for details about the SPREAD program. For ease of use, theSPREAD directory in the File/Setup menu should be changed to\TRNWIN\IISIBAT2\TOOLS if using IISiBat or \TRNWIN\SPREAD if using PRESIMbefore calling this program.

THE PLOT MENU

The Plot menu offers choices for creating plots from TRNSYS plot and output files (thosefiles ending in the .PLT extension or .O extensions). The following section describes the Plotmenu commands as shown in Figure 17.

Figure 17: The Plot Menu

Plot/New PlotThe New Plot command allows tabular data output by TRNSYS to be plotted on the

graphics screen. This command is accessible only if plot data are available. Tabular data ismost often created by the TYPE 25 output device. For best results when plotting, make surethe labels are written to the plot file.

Page 29: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 27

Once the New Plot option is selected, a dialog box will appear in which the variables to beplotted on the X and Y axes are selected from the names in the lists (Figure 18). The listnames correspond to the labels in the plot file. If no labels exist, the variable names will belabeled Column 1, Column 2, etc. To select or deselect a variable, click its name. Selectedvariables are highlighted for distinction. Initially, the first variable (other than time) will beselected. If a user does not wish to plot this variable, it should first be deselected before othervariables are selected.

Figure 18: The New Plot Dialog Window

The Minimum and Maximum fields control the scaling of each axis and may be changed toany value. The default values are the minimum and maximum values for the selected variable.If more than one variable is selected, the user will have to set the minimum and maximumvalues as TRNSHELL only scans the first variable selected for minimum and maximum values.

The two fields to the right of the word ‘Format’ control the format of the numbers appearingin the scale for each axis. The first field will show either N, F, or E. If N is showing, a scalewill not be drawn. F and E format the axes numbers with a fixed number of decimal places orexponential notation respectively. The number of decimal places (for fixed notation) orsignificant figures (for exponential notation) is specified in the second field.

A logarithmic scale may be specified by selecting the log scale control. To select, click onthe control with the mouse or use the Tab key to move the cursor to the control and press thespace bar. The Grid Lines control is selected in the same manner. When selected, dottedgrid lines are drawn on the plot. The number of ticks and grid lines for linear scales may bespecified in the No. of Ticks field. Scaling numbers will be placed at each tick mark along theaxis, provided that there is sufficient space. Log scales will have grid lines at integer values in

Page 30: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

28 TRNSHELL

each decade and scale information at 1, 2, and 5. Plots may be drawn using symbols, lines,colors, or all three, depending on the selection at the middle right of the New Plot dialogwindow. Smoothing of the plot data will be done if the Smooth control is selected.Smoothing is permitted only when the x-axis values are monotonically increasing. Users maychoose the line type, symbol type, and color type by clicking with the mouse on the up anddown arrows to the right of each respective type. When finished specifying the plot format,choose the OK button to display the plot. Double clicking on the plot will allow the user tomodify the plot.

Plot/Overlay PlotThe Overlay Plot command operates in the same manner as the New Plot command. The

difference is that New Plot clears the plot screen before the plot is drawn, whereas theOverlay Plot command places the new plot on an existing plot screen so that multiple plotsmay be shown. Subsequent overlay plot scales may be specified but will not be shown. Eachof the overlaid plots, or the original, can be modified by double-clicking on the plot andentering the Modify Plot Window.

Plot/Modify PlotThis Menu selection accesses the Modify Plot dialog box. The symbol type, line type, and

axis controls can all be modified using this dialog box. This window can also be accessed bydouble-clicking on the plot itself.

THE WINDOWS MENU

The Windows menu contains commands for manipulating and opening various windowsexisting in TRNSHELL. All of the windows have the standard window elements, scroll bars, aclose box and zoom icons. The following section describes the Windows menu commands asshown in Figure 19.

Windows/InputThe Input command will bring the TRNSYS input window to the front and make it the

active window. The file name of the Input file is listed in the menu as well. The input windowshows the information in the TRNSYS input file and can be edited. The Input window menuoption is only available if an already opened TRNSYS input file exists.

Windows/OutputThe Output command will bring the TRNSYS output window or windows to the front

and make it the active window. The file name for the Output file is listed on the same line. Anoutput window shows the information in the TRNSYS output file and cannot be editedalthough it can be searched. The Output window menu option is only available if a TRNSYSoutput file exists and has the same file prefix as the open TRNSYS input file and an extension

Page 31: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 29

beginning with “.O”.

Figure 19: The Windows Menu

Windows/ListingThe Listing command will bring the listing window to the front and make it the active

window. The listing window shows the information in the TRNSYS List File and cannot beedited although it can be searched. The Listing window menu option is only available if aTRNSYS list file exists and has the same file prefix as the open TRNSYS input file.

Windows/TableThe Table command will bring the table window to the front and make it the active

window. The Table menu option is only available if a parametric table has been created forthe open input file.

Windows/DiagramThe Diagram command will bring the diagram window for the active input file to the

graphics screen. To view a diagram window, the diagram must be named with the same prefixas the input file, but with a .BMP or .WMF extension. The Diagram command will displayonly images that were saved in the Bitmap or Windows Metafile file formats. Most PCdrawing programs have the ability to save in Bitmap format.

Windows/Tile

Page 32: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

30 TRNSHELL

The Tile command will display all open files in a format where every file takes up a portionof the window environment.

Windows/CascadeThe Cascade option will stack all open files so that a user can see the title bar of each file.

Windows/List of Recent FilesA list of recently active windows is contained at the bottom of this menu. Any of these

windows can be reopened with this menu.

THE HELP MENU

The Help menu provides access to on-line help in a special Help window. The help systemprovides information on many aspects of the TRNSHELL and TRNSYS programs.Information about TRNSYS component routines is also available. The following sectiondescribes the commands in the Help menu as shown in Figure 20.

Figure 20: The Help Menu

Help/TRNSHELL IndexThis command shows a list of all available TRNSHELL help items. In many cases, the

Page 33: Using TRNSHELL TRNSED _new_.pdf · The Open command displays the Open dialog box shown in Figure 3. In this dialog box, the file to be opened is specified. TheOpen dialog box contains

TRNSHELL 31

help information is stored in a tiered format where the user may have to move through severalbroader topics to reach the desired help information. To move forward or backward throughthe help topics, click on the available topics which will appear in a different color (typicallygreen). Additionally, users may press the F1 key at any time to receive context-sensitive help.

Help/TYPES IndexThis command lists all of the TYPES available in TRNSYS 14.2 in a sequential format.

By selecting a given TYPE, the component description for that TYPE is displayed includingthe PARAMETERS, INPUTS and OUTPUTS. This help information provides a quickeranswer than searching through the manuals.

Help/TRNSYS LibraryThe TRNSYS Library command lists the TYPES according to their general function.

Double-clicking on the general function name will list the TYPES corresponding to thatfunction. These TYPES can then be selected to obtain component descriptions in the sameway as the TYPES Index.

Help/TRNSYS Error messagesThis command lists all of the TRNSYS error messages and their possible remedy that the

user may encounter while working with TRNSYS. In many cases, the error message willprovide sample entries that explain the error. The error messages are stored in a tiered formatin order to simplify the display. Users will have to click on the desired topic to move throughthe help system.