[TRNSYS-users] Creating a new Type, using G95 (TRNSYS VERSION 17.02)

Prof. Antonio Marcos Siqueira via TRNSYS-users trnsys-users at lists.onebuilding.org
Thu Jun 9 08:36:03 PDT 2016

*Dear all,
** I'm trying to create a sludge dryer, using g95 as** compiler,
running the following script (compile.bat) into g95**. But, the
Type214.dll WAS NOT CREATED. I am using the steps from the attached
file. What is the problem? My TRNSYS Version is 17.02. My system
computer is Windows 8. Do you have a more simple sollution to create a
new type?  *

G95 -fcase-upper -fno-underscoring -M TrnsysData.for
G95 -fcase-upper -fno-underscoring -M TrnsysFunctions.f90
G95 -fcase-upper -fno-underscoring -M TrnsysConstants.f90
G95 -fcase-upper -fno-underscoring -c TrnsysFunctions.f90
G95 -fcase-upper -fno-underscoring -c TrnsysData.for
G95 -fcase-upper -fno-underscoring -c TrnsysConstants.f90
G95 -fcase-upper -fno-underscoring -shared -mrtd -o Type%TRNSYS_TYPE%.dll
Type%TRNSYS_TYPE%.for TrnsysConstants.o TrnsysFunctions.o TrnsysData.o -L.

Using G95 to create TRNSYS TYPES

1. Download and install G95 from http://www.g95.org/
(Downloads -> binaries, Stable Version 0.91, March 2008,
Self-extracting Windows x86, or just click here :

2. Start TRNSYS Simulation Studio and create a Proforma for your type.
Be sure to set the type number.

3. Save As…  .TMF file into .\Trnsys16\Studio\Proformas (or a
subdirectory thereof)

4. Unzip G95-TRNSYS.zip to a directory you can remember, e.g.
\tmp\G95\Type242. It contains slightly modified versions of the
TrnsysConstants, TrnsysData and TrnsysFunctions modules.

5. Use File/Export As… FORTRAN ; specify the directory you remembered
in step 4. Ignore the warnig about Visual FORTRAN not starting (if you
have Visual FORTRAN, it may start – just close it again). Ignore the
generated .dsw and .opt files.

6. Edit the FORTRAN template file produced to implement your type.
Make sure continuation lines are preceded by 5 space characters, such
in line 68 of the example.
This convention differs from other compilers.

7. Edit the first line of compile.bat to set the correct type number, e.g.

8. Copy your TRNDll.Dll (from .\Trnsys16\Exe) to the directory you
remembered in step 4.

9. Run the Batch file

10. Correct the errors you made in the source code and go back to step 8.

11. Copy the resulting Dll (still from the directory remembered in
step 4), \tmp\G95\Type242\Type242.dll in our example) to

The Proforma can now be used in a simulation project in Simulation
Studio. You can of course automate this using your favourite text
editor, for example.
*Any suggestion?

*Prof. Antonio Marcos de Oliveira Siqueira,*
*Programa de Pós-Graduação em Engenharia Química - PPGEnQ*
*Laboratório de Simulação Numérica e Fenômenos de Transporte - LabSim*
Universidade Federal de Viçosa - UFV
Departamento de Química - DEQ, sala 208
Av. P. H. Rolfs - S/N, Campus Universitário
CEP 36570-900, Viçosa - MG - Brasil
Fone: 31-3899-2370
antonio.siqueira at ufv.br
[image: Rodapé]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20160609/15d9ffe0/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 26929 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20160609/15d9ffe0/attachment-0001.png>

More information about the TRNSYS-users mailing list