E+ Knowledge Base

[this page is under construction]

TRNSYS support

Due to demand for using jEPlus functions with TRNSYS simulations, we have started working on developing a jEPlus-style wrapper for TRNSYS.


TRNSYS is a transient systems simulation program with a modular structure. It recognizes a system description language in which the user specifies the components that constitute the system and the manner in which they are connected. The TRNSYS library includes many of the components commonly found in thermal and electrical energy systems, as well as component routines to handle input of weather data or other time-dependent forcing functions and output of simulation results. The modular nature of TRNSYS gives the program tremendous flexibility, and facilitates the addition to the program of mathematical models not included in the standard TRNSYS library. TRNSYS is well suited to detailed analyses of any system whose behaviour is dependent on the passage of time. TRNSYS has become reference software for researchers and engineers around the world. Main applications include: solar systems (solar thermal and photovoltaic systems), low energy buildings and HVAC systems, renewable energy systems, cogeneration, fuel cells.

TRNSYS Project

TRNSYS consists of a suite of programs: The TRNSYS Simulation Studio, the simulation engine (TRNDll.dll) and its executable (TRNExe.exe), the Building input data visual interface (TRNBuild.exe), and the Editor used to create stand-alone redistributable programs known as TRNSED applications (TRNEdit.exe).

A TRNSYS project is typically setup by connecting components graphically in the Simulation Studio. Each Type of component is described by a mathematical model in the TRNSYS simulation engine and has a set of matching Proforma's in the Simulation Studio The proforma has a black-box description of a component: inputs, outputs, parameters, etc. The Simulation Studio generates a text input file for the TRNSYS simulation engine. That input file is referred to as the deck file.

Model Structure

TRNSYS is a modular program in which models of individual energy system components are written and then connected together to form an overall system model. These models can be based on fundamental principles or formulated from empirical performance data for a given system component. The component inputs and outputs are linked together in a TRNSYS deck file (.dck) to form a large set of algebraic and differential equations describing the entire system required for simulation. TRNSYS decks can also be formatted as TRNSED files (.trd). A TRNSED file is a user-friendly front-end for the TRNSYS deck which allows a non-expert to operate the simulation without knowledge of the details of the syntax required by TRNSYS.

Running TRNSYS

TRNSYS must be properly installed, it means that: “Exe” folder, “UserLib” folder and “user17.id” file have to work correctly and are located in the same directory (or folder) for each project.

It is possible to run TRNSYS in batch mode with the command line:

“..\Exe\TRNExe.exe” “model.dck” /h


“..\Exe\TRNExe.exe” “model.trd” /h

The “/h” switch makes TRNSYS completely invisible (you can check that it is running by launching Windows' task manager and look for a process called TRNExe).

Output file(s)

User specified file name(s) using a 'printer' type. Format is user-defined; CSV format is preferred.

a very useful tool that allows you to view dozens of output variables during a simulation.

Use Basement and Slab with jEPlus

pre-calculate basement manually, and inject the result into your idf model. Here are the steps, although I haven't tested it:

1. Find a file named 'Epl-run.bat' in the EnergyPlus folder; open it in a text editor

2. go to section 8 towards the end of this file, the block reads:

  :  8.  Clean up directory.
  IF EXIST eplusout.inp DEL eplusout.inp
  IF EXIST eplusmtr.inp DEL eplusmtr.inp
  IF EXIST in.idf       DEL in.idf
  IF EXIST in.imf       DEL in.imf
  IF ...

comment out the line “IF EXIST in.idf DEL in.idf”, to “: IF EXIST in.idf DEL in.idf”

3. Run your model with EP-launch

4. In the output directory, find the file named 'in.idf', and open it in a text editor

5. The last part of this file should contain Basement output, starting with:

   ! ========================================================================
   ! The following was created by the Basement preprocessor program.
   ! Weather File Location=Chicago Ohare Intl Ap IL USA TMY3
    surfPropOthSdCoefBasementAvgWall,    !- Name
    0.0,                                 !- Combined Convective Radiative Film Coefficient

Copy this part into your original idf model.

6. Check whether the Basement related blocks in your original model are still there in 'in.idf'; if they've gone, remove them from your original model.

You model should be ready for parametrics, now. If you need to use a different weather file, you will need to go through the above process again. To use the Slab program, the process is similar.

If you do have parameters in basement design, you can pre-calculate all options in this way, save each time the Basement output block in a separate text file, and use EP-Macro to include it. Which file to include can then be controlled by a jEPlus parameter.

Use ReadVarsESO

Use EP-Macro

Use EnergyPlus EMS

How to split a large model

Run period parallelization

Model options affecting results


Simulation time step

Convergence tolerance

Sensitivity to 'default' parameters