5.8. TRNSYS

TRNSYS is a software package consisting of a graphical front-end ( TRNSYS Simulation Studio) to graphically create a simulation, an interface for the TRNSYS multi-zone building (TRNBuild/Type56), a Google SketchUp plugin for creating the multi-zone building envelope (TRNSYS3D), and a tool for manually editing the TRNSYS input files and creating stand-alone TRNSYS-based applications (TRNEdit/TRNSED). TRNSYS takes a modular, black box component approach to developing and solving simulations: the outputs of one component are sent to the inputs of another component.

[Note]Note
  • Using TRNSYS in the BCVTB requires advanced TRNSYS knowledge and skills. A BCVTB user that is new to TRNSYS should first learn to use TRNSYS before attempting to use TRNSYS in BCVTB.

  • The TRNSYS interface and example has only been tested on Windows 32 bit.

  • The TRNSYS dlls types (Type6666.dll, Type6667.dll) need to be requested from your TRNSYS provider.

  • Prior to using TRNSYS with the BCVTB, adjust the path of the TRNSYS executable in bcvtb/bin/systemVariables-windows.properties, and restart the BCVTB.

This example is available in the directory examples/TRNSYS17-room. The application is a heating control for two rooms.

In Ptolemy II, a PID controller is implemented. For a given control action, TRNSYS computes the room temperature and sends it to the BCVTB.

Start the TRNSYS Simulation Studio and open the bld_hvac example project (see Figure 5.27) This simple project contains two components: the BCVTB component which controls the communication between TRNSYS and BCVTB and a simple building component which takes control signals as inputs and calculates the resultant zone temperatures.


The BCVTB component (Type 6666) controls how the variables are communicated between TRNSYS and the BCVTB. There are 3 parameters: the number of variables passed to the BCVTB, the number of variables received from the BCVTB, and the number of TRNSYS timesteps per data exchange with the BCVTB. By double clicking the icon for the BCVTB component the window for setting these parameters is displayed (see
Figure 5.28). In this example there are 2 variables passed to BCVTB (the zone temperatures), 2 variables passed back to TRNSYS (the control signals) and the data exchange occurs at every timestep.


The outputs from the BCVTB component are connected to the inputs simple building component and vice versa using the usual TRNSYS linking process (see
Figure 5.29 for an example).


Once the project is completed in the Simulation Studio, the dck file for the project must be created. (The BCVTB uses the dck file directly to run the TRNSYS simulation and not the Studio project file (tpf file).) The dck file is written by the pen icon on the left side of the Simulation Studio window.