[TRNSYS-users] C++ Type in TRNSYS solving Differential equations

Patxi Sorbet Presentacion via TRNSYS-users trnsys-users at lists.onebuilding.org
Tue Dec 20 03:36:00 PST 2016


Hello Everyone,
I'm, currently dealing with the development of a new type, but not in the Fortran-based official way.
Up to now, I have developed several Types in C++ using information from templates that come included in the program folders, and some imagination.
For the moment, things went well this way.
But now I want to solve a differential equation calling the built-in routine SolveDiffEq(AA, BB, TI, TF, TBAR).
I may develop my own Finite difference scheme and go on, but I'm trying to take advantage from that kernel subroutine.
For the moment I have not found the right way (if it exists) to include the routine header in Trnsys.h, for later compiling and running in the generated dll. I guess It should be this way, but it doesn't't work when running trnexe.

extern "C" __declspec(dllimport) void _cdecl SOLVEDIFFEQ(double aa, double bb, double* INIT_VALUE, double* END_VALUE, double* AVG_VALUE);

If anyone has the same concerns, we may interchange information about how creating & compiling Types this way, without purchasing an IVF license. I will be very pleased to share my work.
Thanks in advance
Regards,

----------------------------------------------------------------------
Patxi Sorbet
Research Engineer
Solar Thermal Energy Department
NATIONAL RENEWABLE ENERGY CENTRE
Ciudad de la Innovación, 7 -31621         - Sarriguren (Navarra) Spain
www.cener.com





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20161220/14aa0d64/attachment.htm>


More information about the TRNSYS-users mailing list