University of Wisconsin-Madison Skip navigationUW-Madison Home PageMy UW-MadisonSearch UW
 

 




TRNSYS Frequently Asked Questions


 

General questions

TRNBuild / Building model (Type 56)

Other standard types

Compiling

Problems with previous versions of TRNSYS (15 and before)

 


 

General questions

Q: Should I start the simulation at hour 1 or hour 0 ?

A: In TRNSYS 16, the start time is the time at which the simulation starts. It is an instantaneous point in time. So a simulation for a whole year would start at 0 and end at hour 8760. A simulation for the month of April would start at hour 2160 and end at hour 2880.

In TRNSYS 15 and before, the definition of the start time was different. In those versions, the start time was the time at the end of the first time step. So a hourly simulation for a year would start at 1 and end at 8760, while the same simulation with a 0.25 h time step would start at 0.25 and end at 8760. In addition, all simulations using hourly data files HAD to start at hour 1.

Q: I have a weather data file, but I don’t know what values to use for the exact SHIFT, latitude (in Type 16) etc., or if my (measured) data is coherent. What can I do to find out ?

A: plot the extraterrestrial versus the measured horizontal radiation. With the plot you can see easily if there is a wrong shift (and even if your latitude is wrong). If the data is "shifted", you can use a "wrong" shift to compensate for it. You may have to adapt your schedules because the hours you simulate are actually "hours and a half" in true local time, but the influence of this is usually not very big. Note that Type 109 automatically reads the latitude, longitude and shift from the data file.

Q: Is it necessary to do pre-calculations ?

A: You have to run the simulation for a given period before the results are "accurate". The reason is that for example Type 56 assumes that the temperature inside walls is the one you give as initial temperature in the zones, and so you have unrealistic initial conditions. In some fancy (and heavy) solar buildings, the memory effect can be several weeks, so indeed a pre-calculation can be necessary. However, a trial and error procedure is often sufficient: First, start the year on a week-end so the first two days are less important for most buildings. Secondly, look to the few first days simulated and see if the building is obviously too warm or too cold at the beginning, and then change the initial temperatures accordingly.

Of course this is only OK for yearly loads calculation. If you are interested in the dynamic behaviour at the beginning of the simulation period, you HAVE to run the simulation before. In that case, you can start the simulation at time= 8425 to have the last two weeks, then the data reader should rewind itself and read line 1 at time 8761. The only post-processing you need to do is remove the warm-up period and subtract 8760 to time.

Q: What constraints should the simulation time step comply to ?

A: The timestep should be 1/n of an hour, where n is an integer. The reason is to make sure that an integer number of time steps will fit into one hour (many things happen at the hour: integration, data reading, etc.).
In TRNSYS 16
the rule is n/m where n and m both are integers. m is forced to be smaller than 1 / (minimum time step), which is currently set to 0.1 sec, i.e. 0.00002777777778 hours (so the denominator must be smaller than 36000). The reason is here again to make sure that we can count on "reaching round numbers at some point inthe simulation". Data readers, Printers and integrators etc. will warn you if their time step is not an integer multiple of the time step (and it's NOT recommended to keep it).

Q: How to optimize my simulations for speed ?

A: You can optimize the 'TRNSYS side' and the 'programming' (FORTRAN, C,...) side. Common tricks for the TRNSYS side include:
- tune GLOBAL cards carfully (convergence limits, integration precission, ...) - the usual precission vs. speed tradeoff
- tune component parameters carefully (minimum number of nodes necessary, ...). This is usually most efficient.
- optimize component order (components which do not compute a lot (printers, onlline, ...) at the end, ...)

In your programming environment (e.g., FORTRAN compiler), make sure you use the 'Release' build (not the debug build) and check 'Optimize for speed' in the settings (e.g. FORTRAN/Optimisations category). Make sure to apply this to ALL modules (modifiy settings for all modules, rebuild all modules). Be careful, however: some unstable third-party types do not support optimization (e.g. Range Check error in type 140). In this case, you can 'locally' deactivate optimization for this type only.

Q: I have a General protection fault when trying to run TRNSYS. What can I do ?

A: This problem may have many different causes. It is close to problems like "out of bounds" situations or "null pointer assignment" problems when writing computer programs. Here are some points that you can check:
- try switching off the "Generate TRNSED command" option (in the Simulation Studio, this is done in the "global information / control card" window, using the button "more information". This brings up a toggle "Write TRNSED commands / Don't write TRNSED commands". Using TRNSED implies the definition of many constants, which might result in an overflow of the internal TRNSYS tables.  To selectively generate these constants, you may also use the locking mechanism in the Studio: for locked variables, no constants are generated.
- check the coherence of simulation start/stop time (and the timestep) with data files used by components like data readers, etc.  Reading past the end of a data file during simulation my cause crashes in some situations.
- use a debugger like the one from Microsoft's "Developper Studio" to go through the source code step by step, while TRNSYS is executing your project. Instructions on using this product with TRNSYS are available on the SEL website.
- Carefully check user-defined components for errors / recompile TRNSYS and all user-defined types on your machine
- restart Windows
- reboot your computer
- contact your TRNSYS distributor and share your pain with them

Q: I have a TRNSYS ERROR 25 when using equations, although the unit used in the equation appears in the deck

A: This problem may be caused when copying equation models between projects, renaming models, or transfering models between projects AFTER the equations have been defined in the equation model.  Delete the equation causing the problem and redefine it.

Q: The meteo files or data generator does not account for extreme situations, like very hot summer days. What can I do to check my building against problems on such days ?

A: The program Meteonorm, a program for generating weather data, can be used for this. It is available from www.meteonorm.com and from some TRNSYS distributors.

Q: What standards does TRNSYS comply to ?

A: TRNSYS has become reference software throughout the world. It is one of the listed simulation programs in the recent European Standards on solar thermal systems (ENV-12977-2). The level of detail of TRNSYS' building model, known as "Type 56", is compliant with the requirements of ANSI/ASHRAE Standard 140-2001. The level of detail of Type 56 also meets the general technical requirements of the European Directive on the Energy Performance of Buildings, which makes TRNSYS a potential candidate for compliance with the directive's implementations in various EU countries.

Q: How can I run TRNSYS (perhaps from another program or batch file) and avoid having to click 'Continue' or 'Yes' at the end of each simulation?

A: From the command line, the "/N" switch is used to tell TRNExe.EXE that you don't want the dialog box at the end of the simulation. For example, to run the input file called C:\Program Files\Trnsys16\Examples\SDHW\SDHW.dck  such that no dialog box is produced at the end of the simulation, the following command line statement would be used:
"C:\Program Files\Trnsys16\Exe\TRNExe.exe" "C:\Program Files\Trnsys16\Examples\SDHW\SDHW.dck" /n
Furthermore, the "/h" switch is also available if you need TRNSYS to run completely in the background (without even creating a Window). The /h switch implies /n and is only applicable to simulations that do not use the online plotter (Type 65):
"C:\Program Files\Trnsys16\Exe\TRNExe.exe" "C:\Program Files\Trnsys16\Examples\SDHW\SDHW.dck" /h

Q: I want to distribute my TRNSYS simulation in TRNSED format to others. What do I have to send to the client?

A: In TRNSYS 16, the "TRNSED/Create Distributable" command in the TRNEdit environment will place all the TRNSYS files needed in the destination folder. You then need to add all the input files, pictures, etc. required by your application. We recommend that you test your application on a different machine or after renaming your Trnsys16 directory to make sure you are not using some files from the TRNSYS installation.

 Q: Does TRNSYS 16 take advantage of 64-bit computer architecture?

A: The current TRNSYS version does not take direct advantage of features that are specific to 64-bit computer architecture. However, TRNSYS will run on a 64-bit machine as far as the Developers are aware. To take advantage of the 64 bit architecture, one first needs a 64 bit FORTRAN compiler. There are several around so if you get TRNSYS to compile with one of these compilers (giving up the Type65 online plotter and on external DLLs not compiled with a 64-bit compiler), then TRNSYS will take advantage of the 64 bit architecture and potentially run faster (see remark at the end).

The current FORTRAN compiler that the Developers use is the Intel Visual FORTRAN compiler. Intel specifically addresses 64 bit architecture issues on its website:  

(http://www.intel.com/technology/64bitextensions/index.htm)

The Intel site information is focused on address space size (how much memory you can manage), which is the main motivation to use 64 rather than 32 bit processors - not so much the potential gains in execution speed (which may even be reduced due to the systematic use of longer words). If it is simulation speed that you are after then multiprocessors are better at gaining speed ( IVF supports them, too).

 

TRNBuild / Building model (Type 56)

Q: How can I delete a GAIN from the TYPES menu in PREBID ?

A: Ih Menu ZONES, OPTIONAL DATA, GAINS; use delete button (D letter)

Q: I am using Type 56 and am getting bad results depending on what START time I use.  What am I doing wrong?

A: (Note: this problem is corrected in recent TRNSYS 15 releases and all TRNSYS 16 releases: Type 56 now generates an error message) The simulation START time must be an integer multiple of the wall TIMEBASE in TRNBuild or the program WILL NOT run correctly. For example, if the wall timebase is 0.5 hours, the simulation start time must be 0.0, 0.5, 1.0, 1.5 etc., or the program will not produce correct results. In fact, it will produce extremely strange results. If you find this hard to believe, change the restaurant example provided with purchase. If you change the timebase to 0.5 and the simulation start times to 0,0.25,0.5,0.75, and 1.0... the results are different for all but the 0,0.5, and 1 cases.

Q: I want to model more than 25 zones with type 56. What do I need to do ?

A: Nothing special – in TRNSYS 16, the number of zones is only limited by system resources. However, if you are new to TRNSYS / type 56, you should carefully consider if you really need that many zones. In most cases, simulations can be simplified a lot by grouping zones. 

Q: How to calculate solar radiation that hits an internal wall in a zone that has no windows, but the sun beam gets there passing through another zone ?

A: TRNSYS 16 introduced the concepts of ‘internal windows’ as well as ‘geosurf’ factors for this situation. The ‘tricks’ needed in earlier versions are no longer necessary !

Q: I have a building description using lots of windows. I would like to try a variant of the system, replacing all windows of one type by another one. Do I have to change the WINDOW type everywhere in the project or is there a trick ?

A: There is always a trick. You can redefine the window - type in the Window manager: open the windows manager; select the window type; click on the "W4-lib" - button; choose the new window type.

Q: What does the default value of the solar absorbtance factors used in PREBID mean ?

A: These factors for the inside (ABS-FRONT) describe the distribution of solar gains that a zone gets through its windows.

The default value of 0.6 is the case for a vertical wall. Other recomended values are

   0.1 for ceilings and
   0.8 for floors

Q: Where can I get the WINDOW program needed to introduce new windows into TrnBuild ?

A: Contact mailto:PLRoss@lbl.gov, mailto:MDRubin@LBL.gov and/or see http://windows.lbl.gov/software/window/window.html

Q: I want to define an airflow from one zone (z1) to another one (z2), without a flow in the other way (from z2 to z1) - i.e. define cross ventilation. Where does the air in z1 come from and how do I define it ?

A: The "coupling air flow" specified for a zone is always the flow into the zone - it CANNOT be negative. To compensate for air leaving a zone, you have to adapt the infiltration rate of the zone (z1, in the example). You always need to specify air coming into a zone (by specifying coupling flowrates, or adapting infiltration rates). Air going out is "removed automatically". (You have to make sure that zones do not "implode"; "exploding" zones are no problem).

Q: I want to model a sloped window as part of a sloped wall in type 56. How does that work ?

A: You have to
- adapt the sky factor for the wall in which the window is
- define a new orientation for this orientation/slope in the TrnBuild "Project Initialization" window, and use it for the wall the window is in
- calculate the orientation / slope with a type 16 / 109 (solar radiation processor) and connect it to type 56.

Q: Does the ESHADE factor cut direct and diffuse radiation in the same way ?

A:   ESHADE reduces both direct and diffuse radiation in the same way.

Q: Heat transfer coefficients are defined by a radiative and a convective part; in TrnBuild, the convective part can be entered. How to input the radiative part ?

A: All surfaces are assumed to be black for long wave radiative exchange and radiative internal gains for surfaces inside the zone. This is a good approximation for most real world cases (exceptions would be huge mirrors or stainless steel panels at inside surfaces or windows with low-E coatings towards the zone). It is not possible to change this assumption easily in type 56. A possible workaround would be to define additional wall gains, but it is usually not worth the effort. All external surfaces are assumed to be grey (E=0.9) for longwave radiation exchange with the sky. The values of longwave emissivity for windows are taken from the “w4-lib.dat” file.        

Question: Is it possible to use different values for Absorption and Emissivity in type 56 ?

A: The longwave absorption and emissivity for opaque walls are assumed to be equal (E=A=1 inside the zone).

Question: How to input latent heat for persons, given in Watt, in TRNBuild ?

A: They can be entered under ‘Other Gains’, under ‘abs. Humidity’. To convert from Watt to kg/hr, use the enthalpy of evaporation constant (2454 kJ/ kg h). E.g., 44 W latent heat => 44 W / 2454 kJ / kg h = 44 / 2454 * 3.6 kJ / kJ * kg / h = 0.06455 kg / h

Q: What is alpha-calculation (in the BUI)  ?

A: These are coefficients for the automatic heat transfer in type 56  like you could do externally with TYPE 80 in previous versions of TRNSYS (15 and earlier).

Q: Type 56: I would like to model very thick (> 50 cm) walls. For this case, TRNSYS (i.e. PREBID) cannot calculate the transfer coefficients. What can I do to work around this problem ?

A: There are 3 strategies :

1. neglect the additional capacitance caused by a thick wall and model it with a thinner       wall (e.g., brick) with the same thermal resistace

2. if you don't want to neglect the capacitance effect, you can lift the timebase in TRNBuild from 1 to 2-3 hours. Beware, however, of the consequences of this:
- the simulation START time (in the deck) in this case should be 0 (not 1)
- the STEP value (in the deck) must be bigger than the default (0.1), at least bigger than 0.5
Check carefully if the results make sense, especially if you are using complicated control strategies etc.

3. You can split the wall in 2 and define a fictitious zone between those two parts. Use very high convection coefficients in the fictitious zone and a very low volume. Always check that the results make sense.

 

Other standard types

Q: When using a type 53, my project crashes at execution time.

A: Check that the external data file for chiller performances does not contain any zero data points; type 53 doesn't accept them. This is a workaround which should be fixed in future versions.

Question: How to connect type 34 to type 56 ?

Answer:   To distinguish between the reduction of direct and diffuse radiation by wingwalls or overhangs ESHADE should not be used ; instead use Type 34.

Procedure:

-          define a new orientation for the shaded window in TrnBuild (e.g. SWINDOW, for a window facing south); this will create 3 new inputs to type 56:

a) ITSWINDOW - Incident Radiation for orientation SWINDOW
b) IBSWINDOW – Incident Beam Radiation for orientation SWINDOW
c) AISWINDOW – Angle of Incidence for orientation SWINDOW

-          use type 34 output 1 for a) and 2 for b)

use type 16 (or 109) output to compute c)

-          make sure type 34 precedes type 56 in the simulation order

 

Compiling

Q: I wrote a new type, recompiled TRNSYS and executed a project using my type; but it looks like it never gets called.

A: Note that in TRNSYS 16, you should create a DLL, using the File/Export As… command from your Proforma. This makes the process of creating a new type fully automatic.

If you create your own workspace or modified the generated source code, this error can occur in the following circumstances:

1. The type in question uses a return statement that does not return the value 1 to the calling program ("return 1").

2. The generated DLL does not contain the type, and no DLL containing the type is found in the UserLib directory. In this case, you get an error message when trying to compile the type or when running the simulation.  (TRNSYS 15 and earlier : Please check carefully about these errors when using the old make tool in IISiBat. The tool always says, "The TRNSYS executable is up to date" at the end of the process. This, however, does not mean that there were no errors during compiling / linking ! A frequent source of problems are file time stamps. In particular during the very first compilation of a new component, the makefile may get confused if no *.obj file exists yet. Make sure the .obj file has been created. Check the time stamps to make sure it was created from *your* .for file. )

3. Certain parameters of the TYPECHECK function can also cause this problem. Try to comment your call to this subroutine if you have it, recompile and link the DLL to check if this is a problem with your type.

4. The generated DLL does not export the type

 

 

Problems with previous versions of TRNSYS (15 and before)

Q: When moving IISiBat windows around the desktop on Windows NT 4.0, the windows appear blank after the move or their content flickers.

A: This problem happened in TRNSYS 14.2 and earlier. To solve it, you can turn off the "show window contents while dragging"option in NT. Right-click on an empty part of the desktop and select 'Properties' from the pop-up menu. Select the 'Plus!' tab and uncheck the box for "show window contents while dragging." After this change, the problem will be solved after the first window resizing of the IISiBat session. We strongly recommend to update to TRNSYS 16.

Q: When I start the PRESIM program, I see the following error messages: "File Error: Cannot find UKLANG.DLL" and "PreSim Startup Error: Can't find language DLL specified in PRESIM.INI".

A: TRNSYS 15 and earlier. Copy the file PRESIM.INI that is located in the \Presim subdirectory to the \Windows directory (if using Windows 95) or the \Winnt directory (if using Windows NT 4.0). Replace the copy of PRESIM.INI already in the destination directory. The version of PRESIM.INI in the destination directory should now have a reference to PUKLANG.DLL rather than UKLANG.DLL (when viewed in any text editor). PRESIM is no longer supported.

Q: If I create the trnlib32.dll file using my Digital Visual Fortran compiler and then try to run my simulation on another computer without the compiler, I get the error message: "Can't find trnlib32.dll."

A: TRNSYS 15 and earlier. When creating the trnlib32.dll file in Digital Visual Fortran, choose the Libraries category under the Fortran tab in the Project Settings menu. Set the "Use Fortran Run-Time Libraries" pull down to "Static" instead of the "DLL" default option.

 

Q: When compiling with MSF 5.1: cannot find ldllfew.lib

A: when installing MSF, use the option "Build WINDOWS Dynamic Link Libraries" (DLL) and "Build combined libraries". Make sure the library builder does not fail at the end of the installation.

Q: When linking with MSF 5.1: unresolved external in ldllfew.lib (crt0, malloc, and lots more)

A: TRNSYS 14 and earlier. Install MSF with the option "NON-C compatible libraries"

Q: When using type 45, TRNSYS insists that the component is not linked, although it appears in the link file.

A: TRNSYS 15 and earlier. Type 45 explicitly calls Type 38 from within the source code. If Type 38 is not linked, this error message will appear. Add Type 38 to the link file manually and rebuild TRNLIB32.DLL.

Q: When starting TRNSYS with IISiBat: can't get required memory space.

A: TRNSYS 14 and earlier. Change the following parameter in your config.sys file on your PC:

command.com /p /e:1024

Q: When starting IISiBat: 'LeLisp - Cannot get required memory space'

A: TRNSYS 14 and earlier.

  • a) IISiBat has not been quit correctly; quit WINDOWS and retry
  • b) WINDOWS swapfile is too small
  • c) less than 16 M RAM installed
  • d) You are trying to run IISiBat on WINDOWS 2000, XP, ME or later. These systems are only supported by TRNSYS 15 and later.

Q: Sometimes, I can open and close a window once, but then it won't reopen again.

A: TRNSYS 14 and earlier. NEVER use the WINDOWS menu or close button to close a window in IISiBat 2; always use the IISiBat 2 closer (the white rectangle on the top left of the window).

Q: When changing the size of a cycle, more/less variables should be shown in the parameter (input, output, derivative) window(s). However, changing the number doesn't work.

A: TRNSYS 14 and earlier. Make sure you hit return after editing the size of the cycle.

Q: I have a ‘Document load failed’ error when opening my project and lost all my work ! I hate TRNSYS !!!

 

A: The 'failed to load/save document' message is a very generic one and can have many

reasons. It basically means that a document file got corrupt, be it by a hardware problem, user action (e.g. modification with a text editor) or a bug. Several situations causing this problems have been fixed in previous TRNSYS versions (TRNSYS 15 and earlier), so you should first be sure to use the latest version of TRNSYS. In TRNSYS 16 all known document load problems have been fixed.

 

Using projects made with previous TRNSYS versions can unfortunately trigger certain ‘Document load failed’ situations (although TRNSYS 16 has build-in ‘repair’ mechanisms which may actually allow you to recover such projects).

 

One situation causing corrupt project which is hard to detect under recent Windows releases is lack of GUI resources. The level of these resources cannot be easily displayed with standard tools delivered by Microsoft. If you suspect this as a potential source of recurring problems in your environment, you may try to reduce the complexity of the data folder (usually \trnsys15\IISiBat3\Data) by removing unused branches. The creation of the Direct Acess menu can indeed consume considerable amounts of resources. The problem usually appears with certain configurations:

1.         few resources in the first place (old machines, bad configuration, …) or

2.         huge resource usage

a) many resource-consuming programs running at the same time – Netscape and Corel Draw have been identified as potential severe competitors for this kind of resource.).

b) installing all available optional libraries available (there’s quite a bunch now…), making copies and keep the entire tree twice, etc.

 

A faster way to save these resources is to switch off the Direct Access Menu (under File/Settings -> Project Tab, uncheck ‘Direct Access Menu’). Strangely the Direct Access Tree View consumes much less resources (because it allocates them dynamically) and need not be switched of. (Note that this mechanism is optimized in TRNSYS 16, so switching off the direct access tool is not necessary / has no influence).

 

To recover a 'lost' project (if you don't have a N-1 version of your .tpf File which still loads ...), you can try to use File/Import TRNSYS input file.

This works if you have run the simulation at least once, since then you have a working deck. Be sure to check if cycles are configured correctly after the import.

 

Note that once a project is corrupt, you should not use (copy, ...) the tpf file any

more.

 

If none of this helps, feel free to provide us with more information to solve any specific problem you may encounter.

 

 

 
 
Mechanical Engineering Department | UW Home