[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] R: Create a new type



Tiziano,
  If I may ask, it seems to me that a rain water storage tank could be modeled using Type39 variable volume liquid storage tank. I'd be interested to know what features type39 is lacking for the application that you are working on.
Kind regards,
 David


On 4/23/2012 03:40, Tiziano Terlizzese wrote:
Dear all,

I'm trying to create a new type, a water tank, using g95 as compiler. Running my script into g95 (the script is in attachment) the only error I get now is  "undefined reference to `trnsysfunctions_MP_getsimulationstarttime'”. 
Any suggestion? 
Thanks,

Tiziano 

Università di Bologna
Dipartimento di Ingegneria Energetica Nucleare e del Controllo Ambientale - DIENCA
Via del Risorgimento, 2 - 40136
Bologna - Italia
________________________________________
Inizio: jeannieboef [jeannieboef@googlemail.com]
Inviato: venerdì 30 marzo 2012 18.24
Fine: David BRADLEY
Cc: Tiziano Terlizzese; trnsys-users@cae.wisc.edu
Oggetto: Re: [TRNSYS-users] Create a new type

Beware! I'm currently trying with g95. As a start the guidelines are
good, but I have found a few problems that are not mentioned there.
Find the gg95 google group. search for DMOD to find my conversation. I
have also posted to this group, but I'm having a bouncing problem atm.
Since that guild has been written there have been updates to the
constants, data, and functions modules  which should be included in
your type code. I would take the source code for these and adjust and
compile them one by one until they compile without error. As I've
said, my type compiles fine and runs, but is not working properly. I
suspect the problem is with the old !DEC$ attributes dllexport::...
statement which is ignored as a comment by g95. The gcc 4.x.x
directive has suggested !gcc$ as an easy replace for !DEC$, which
works a little better, but I'm still having problems. The type
subroutine and some functions are missing an entry point pointer and
information gets lost. I've not solved this issue yet and am a bit out
of my depth here. I think a basic input output function will work fine
without the pointers.

Let me know if anyone has working compiled by g95 source code to
share. I'll post mine when and if it ever works.

goodluck

Sent from my iPhone

On 30.03.2012, at 17:19, David BRADLEY <d.bradley@tess-inc.com> wrote:

Tiziano,
 I am not entirely sure that I understand your question. Fortran 90
is a language while Compaq Visual Fortran is a compiler. Most Types
in Trnsys16 were written Fortran77 language conventions but some
where written using Fortran90 conventions; the two language
conventions should be able to interact with each other without
problems.

 Whichever set of language conventions you choose, you need some
kind of compiler that can create a DLL containing the source code
for your Type. Some users have succeeded in using the free G95
compiler to make user Types. There is a tutorial available at: http://sel.me.wisc.edu/trnsys/downloads/tutorials_and_examples/tutex17.htm
. While the tutorial is written based on Trnsys17, most of it
applies to Trnsys16 as well.

Kind regards,
David

On 3/30/2012 04:14, Tiziano Terlizzese wrote:
Dear trnsys users,

I need to create a new type, a rain water tank. It seems that the
only way to create a new type is to have at disposal COMPAQ Visual
Fortran. Is that correct? Can't you use FORTRAN 90 instead of
compaq visual fortran?
The problem I faced in using fortran 90 is that transys constants
are not already implemented into it. Is there a way out that won't
imply to buy Compaq Visual Fortran? I have TRNSYS 16 version.

Thank you in advance for your help.
Greetings,

Tiziano Terlizzese

Università di Bologna
Dipartimento di Ingegneria Energetica Nucleare e del Controllo
Ambientale - DIENCA
Via del Risorgimento, 2 - 40136
Bologna - Italia
_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@cae.wisc.edu
https://mailman.cae.wisc.edu/listinfo/trnsys-users

--
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
22 North Carroll Street - suite 370
Madison, WI  53703 USA

P:+1.608.274.2577
F:+1.608.278.1475
d.bradley@tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com

_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@cae.wisc.edu
https://mailman.cae.wisc.edu/listinfo/trnsys-users


_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@cae.wisc.edu
https://mailman.cae.wisc.edu/listinfo/trnsys-users

-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
22 North Carroll Street - suite 370
Madison, WI  53703 USA

P:+1.608.274.2577
F:+1.608.278.1475
d.bradley@tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com