• Non ci sono risultati.

2.3 Survey of available codes for fluid systems modeling

2.3.2 Trnsys ®

Trnsys® is a simulation program primarily used in the fields of renewable energy engineering and building simulation for passive as well as active solar design. Trnsys® is a commercial software package developed at the University of Wisconsin. One of its original applications was to perform dynamic simulation of the behaviour of a solar hot water system for a typical meteorological year so that the long-term cost savings of such a system could be ascertained. 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 DLL-based architecture allows users and third-party developers to easily add custom component models, using all common programming languages (C, C++, Pascal®, Fortran®, etc.). In addition, Trnsys® can be easily connected to many other applications, for pre- or postprocessing or through interactive calls during the simulation (e.g. Microsoft Excel®, Matlab®, Comis®, etc.).

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 high flexibility, and facilitates the addition to the program of mathematical models not included in the standard Trnsys® library. Trnsys® in fact offers the possibility to the user to include own components written in Fortran® and translated with the Compaq Visual Fortran® compiler 6.6 or the Intel Visual Fortran® compiler.

Trnsys® is devoted to analyses of systems whose behaviour is dependent on the passage of time, in the scale of hours days or multiples. Main applications of the software include: solar systems (solar thermal and photovoltaic systems), low energy buildings and HVAC systems, renewable energy systems, cogeneration, fuel cells.

It is often used to assess new energy concepts, from simple solar domestic hot water systems to the design and simulation of buildings and their equipment, including control strategies, occupant behavior, alternative energy systems.

The simulation engine is programmed in Fortran and is called by an executable program, TRNExe, which also implements the online plotter which is used to visualize the time pattern of the signals of interest.

The Trnsys® package includes:

 The Simulation Studio: a graphical front-end that houses all aspects of the Trnsys® simulation procedure;

 TRNEdit: a specialized solution for turning the simulation into a stand alone, distributable application;

 TRNBuild: a graphical input program for describing multizone buildings;

 FORTRAN source code for all components used by Trnsys® (except Type 56 – Multizone Building Model).

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

OVERVIEW ON MODELING OF THERMO-FLUID SYSTEMS

23 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.

The simulation engine is programmed in Fortran and the source is distributed and accessible. The engine is compiled into a Windows Dynamic Link Library (DLL), TRNDll. The Trnsys® kernel reads all the information on the simulation (which components are used and how they are connected) in the Trnsys® input file, known as the deck file (*.dck). It also opens additional input files (e.g. weather data) and creates output files.

The simulation engine is called by an executable program, TRNExe, which also implements the online plotter, a very useful tool that allows to view output variables during a simulation.

The Trnsys® type 56 also turns to be really useful in order to assess the thermal and cooling loads of a building of known features and despite the implementation is not always intuitive it comes out to be extremely useful because of the capability to be easily coupled to energy conversion system and the steams of hot/cold fluids can be passed from the block representing the heating/cooling devices to the building.

The Trnsys® software package has been used within few application in the field of energy systems [10-12]. It has been found that the software turns to be quite flexible and feasible for overall evaluations of energy networks and consequent economic analyses of different practical solutions to be analyzed, especially in the long time range (i.e. one year of simulation).

Fig. 2.5 for example reports the Trnsys® Simulation Studio interface of a system where a residential building has been modelled recurring to the type 56 component and different lay-outs have been considered for serving the heating/cooling demands. In the reported example a ground source heat pump system based on geothermal loops is considered for both heating and cooling purposes.

The model indeed produced some overall representation in the year behaviour of the complete system but the features of the components do not allow a deep insight of the characteristics of the different energy conversion systems, as the heat pump in this case.

CHAPTER TWO

24

Fig. 2.5.Trnsys® model of a ground source heat pump heating/cooling system [12].

Despite its extreme flexibility Trnsys® displays some limits with some components of the standard libraries. A simple topic as a cogeneration plant applied to the tertiary sector placed some difficulties because of limitations in the maximum allowed size of the engine units [10]. Also the mathematical model upon which some models are created, if proper for an overall representation of the performance of the component on montly-yearly based periods, seems quite poor. Taking again as example the model of cogenerator, it is simply based on a generic characteristic curve that describes the mechanical power generated with respect to the actual fuel consumption. The model proposed is based upon the Willans line method, approach that has been also followed by the research group for overall analysis of the yearly performances of a cogenerator applied to the University of Parma campus through a simple m-code script [13,14]. The model therefore is purely algebraic black-box and do not allow any understanding of the possible interaction of the engine with other componensts or does not take into account of dependency in

OVERVIEW ON MODELING OF THERMO-FLUID SYSTEMS

25 the performances from external factors as air inlet temperature, it also does not allow to assess dynamic responses.

Another aspect to be considered is that Trnsys® standard libraries are more focused on HVAC systems for building applications rather than for power generating systems, which are the focus of the present work.

Trnsys®, while being a good tool for assessing the long term overall energy fluxes that involve heating and cooling applications to building systems, does not however appear to be the proper tool when it comes to component design and also the libraries available are not indicated for power systems design, which is the main topic of interest for the present work.