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

Re: [TRNSYS-users] REFPROP and TRNSYS



First of all, I thank QiChao Zhu, Edward Halawa, and Werner Keilholz for their useful commentary on interfacing TRNSYS with C++.   I now have TRNSYS happily running with Microsoft Visual Studio 2008.

 

I have a problem in interfacing it to REFPROP (Version 8.0).  I am posting with the hope someone may have encountered this problem before; or they may be able to shed some light regardless.

 

QUESTION #1: Has anyone created a TRNSYS component that is defined by a MS Visual C++ DLL which itself queries the REFPROP.DLL?  If so, what MS Visual Studio Version was it?  The REFPROP Manual says that their example C++ files were tested with Microsoft VS 2003 edition.  I may try to find a 2003 edition of the MS VS but then again this may not work either because this could be a REFPROP-TRNSYS interface idiosnycracy.

 

QUESTION #2: Regardless of your answer to the above question, can you comment on the following sequence of events?

 

·         I export my TRNSYS Component to C++ (Microsoft Visual Studio 2008) – No problem

·         I add the lines with REFPROP definitons and with the REFPROP initialisation function (its name is SETUPdll).

·         I reiterate that I have nothing about REFPROP except the call to the SETUPdll function.

·         I compile and link and create the ‘component.LIB’ file --- No problem

·         I run the TRNSYS Project.  Big Problem.  I get the following TRNSYS error in a separate error box and the TRNSYS aborts the calculation:

o    TRNEXE – Access violation at address 00000000.  Read of address 0000000.

 

Thank you.

 

 

PS: If you are interested, the free download of the MS Visual Studio Express Edition 2005 did work with TRNSYS.  But it failed to compile the REFPROP example C++ file because the VS Express Edition had no WINDOWS.H file.  I think it was possible to download an Environment package (1.5 gigabytes) to provide that file among other things.  I switched to MS Visual Studio 2008 because I found out that we had a site licens

 

 

 

H Gurgenci, +61 7 3365 3607,Rm:43-208, http://www.uq.edu.au/geothermal/gurgenci-blog

 

From: David Bradley [mailto:bradley@tess-inc.com]
Sent: Friday, 2 April 2010 7:04 AM
To: Hal Gurgenci
Cc: trnsys-users@cae.wisc.edu
Subject: Re: [TRNSYS-users] REFPROP and TRNSYS

 

Hal,
  There was a connection between TRNSYS 15 and REFPROP  although it was never (to the best of my knowledge) part of the official package.  The connection was built on the concept of Type61 (calling external DLLs ) and a piece of code called refprop.for. It also required a REFPROP license (and the corresponding REFPROP.dll). I imagine that the connection could probably be revived for TRNSYS 16. I notice on the NIST website that you can purchase the REFPROP (Fortran) sourcecode so I am not entirely sure what the advantage there is to the previous implementation of calling the REFPROP DLL.
Kind regards,
 David


Hal Gurgenci wrote:

I would like to use REFPROP to calculate the fluid properties while using TRNSYS.  I understand this is possible but I could not find a reference that tells me how.

 

Is there any place where I can find information on using REFPROP from within TRNSYS?

 

Professor H Gurgenci, +61 7 3365 3607,Building 43, Room 208

h.gurgenci@uq.edu.au  -o-  http://www.uq.edu.au/geothermal/gurgenci-blog 

Director, Queensland Geothermal Energy Centre of Excellence, 

The University of Queensland, Brisbane

CRICOS Provider Code: 00025B

 

 


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



-- 
***********************************************************************
Thermal Energy System Specialists (TESS), LLC 
David BRADLEY                      22 N. Carroll Street - Suite 370 
Partner                            Madison, WI 53703 
                                   USA
P: +1.608.274.2577 
F: +1.608.278.1475
E-mail: bradley@tess-inc.com 
Web Pages:  http://www.tess-inc.com    and      http://www.trnsys.com
 
***********************************************************************