[TRNSYS-users] Types programming: Types-Kernel interface explanation

Soppelsa Anton Anton.Soppelsa at eurac.edu
Fri Mar 15 03:34:28 PDT 2013


Dear TRNSYS users,

I have been looking for a while to the seventh section of the TRNSYS 17 manual in order to understand how and why the kernel calls a type in the way it does.

Notwithstanding my experience with simulation software like Matlab/Simulink, Scilab/XCos, Ptolemy II, I still have difficulties in understanding some aspects of the TRNSYS callbacks interface, e.g.:


1)      What's the purpose of the inter-step calls (iterations)

2)      Why they need to be exactly 3 (as I understood from the manual).

3)      How the kernel make use of the vector dTdt (which I would have called dxdt).

4)      Whether my understanding that Types can be used to implement the following mathematical models: y = g(x, u, t), dxdt = fc(x, u, t) (or x(t+1) = fd(x(t), u(t), t) in case of discrete systems), where t is the time, u is the input vector, x is the state vector and y is the output vector is correct.

Can anybody suggest me what is the right section of the manual to find an answer to these questions? I had no luck reading the programmer´s guide section of the manual.
A second point is that I found puzzling the code example published therein. In the first time I though that my doubts where related to my scarce knowledge of the Fortran language (I am a C/C++ programmer) so I raised a point in a programmer community http://stackoverflow.com/questions/15414277/where-does-fortran-store-local-variables .  It turned out that the code published in the manual (which contains a pattern which I noticed has widespread to many other types) seems to rely on a Fortran language "feature" which is considered "bad programming practice", is compiler-dependent and may not be supported any more in the future.

As it seem to me impossible that such a "bomb" is present in the program without affecting the TRNSYS community I kindly ask the help of a TRNSYS expert to clarify this point.

Does anybody know if there a trnsys-devel mailing list?

Sincerely,
  AS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20130315/13eba45c/attachment-0005.htm>


More information about the TRNSYS-users mailing list