[TRNSYS-users] C++ Type in TRNSYS solving Differential equations
Yuichi Yasuda via TRNSYS-users
trnsys-users at lists.onebuilding.org
Tue Dec 20 16:17:43 PST 2016
Patix,
I wonder that the TRNSYS developer group does not provide perfect
TRNSYS.H. Why??
Anyway, I think that all arguments must be declared as a pointer, unless
they are declared as a Value in FORTRAN.
Try the following declaration.
extern "C" __declspec(dllimport) void _cdecl SOLVEDIFFEQ(double* aa,
double* bb, double* INIT_VALUE, double* END_VALUE, double* AVG_VALUE);
I have posted some articles for C++ component on my blog. Please check
these articles if you like.
Unfortunately, these are written in Japanese. Try to read them with
Google translation tool.
https://kankyoukei.blogspot.jp/2016/04/trnsyscc6.html
https://kankyoukei.blogspot.jp/2016/04/trnsys-cc7.html
Regards,
Yuichi Yasuda
On 2016/12/20 20:36, Patxi Sorbet Presentacion via TRNSYS-users wrote:
>
> 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_cdeclSOLVEDIFFEQ(doubleaa,
> doublebb, 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
>
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at lists.onebuilding.org
> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
--
株式会社クアトロ
http://qcd.co.jp/
ホームページリニューアルしました!!
安田 雄市
TEL 03-5768-6744
FAX 03-5768-6745
e-mail: yasuda at qcd.co.jp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20161221/df159434/attachment.htm>
More information about the TRNSYS-users
mailing list