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

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



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