<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Times New Roman","serif";
color:windowtext;
font-weight:normal;
font-style:normal;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Times New Roman","serif";
color:windowtext;
font-weight:normal;
font-style:normal;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:1710493751;
mso-list-type:hybrid;
mso-list-template-ids:-309549082 -933342448 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'>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.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'>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.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'>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.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'>QUESTION #2: Regardless of your answer to the above question,
can you comment on the following sequence of events?<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'><o:p> </o:p></span></p>
<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Symbol;color:windowtext'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'>I export my TRNSYS Component to C++ (Microsoft Visual Studio
2008) – No problem<o:p></o:p></span></p>
<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Symbol;color:windowtext'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'>I add the lines with REFPROP definitons and with the REFPROP
initialisation function (its name is SETUPdll). <o:p></o:p></span></p>
<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Symbol;color:windowtext'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'>I reiterate that I have nothing about REFPROP except the call
to the SETUPdll function.<o:p></o:p></span></p>
<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Symbol;color:windowtext'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'>I compile and link and create the ‘component.LIB’ file --- No
problem<o:p></o:p></span></p>
<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Symbol;color:windowtext'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'>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:p></o:p></span></p>
<p class=MsoListParagraph style='margin-left:72.0pt;text-indent:-18.0pt;
mso-list:l0 level2 lfo1'><![if !supportLists]><span style='font-size:10.0pt;
font-family:"Courier New";color:windowtext'><span style='mso-list:Ignore'>o<span
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:"Times New Roman","serif";color:windowtext'>TRNEXE
– Access violation at address 00000000. Read of address 0000000.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'>Thank you.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'>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<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span style='font-size:8.0pt;font-family:"Arial","sans-serif"'>H
Gurgenci, </span><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>+61 7 3365 3607,Rm:</span><span style='font-size:8.0pt;
font-family:"Arial","sans-serif"'>43-208, <a
href="http://www.uq.edu.au/geothermal/gurgenci-blog">http://www.uq.edu.au/geothermal/gurgenci-blog</a></span><span
style='font-size:8.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p></o:p></span></p>
</div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:windowtext'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> David Bradley [mailto:bradley@tess-inc.com]
<br>
<b>Sent:</b> Friday, 2 April 2010 7:04 AM<br>
<b>To:</b> Hal Gurgenci<br>
<b>Cc:</b> trnsys-users@cae.wisc.edu<br>
<b>Subject:</b> Re: [TRNSYS-users] REFPROP and TRNSYS<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Hal,<br>
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.<br>
Kind regards,<br>
David<br>
<br>
<br>
Hal Gurgenci wrote: <o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif"'>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.</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif"'> </span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif"'>Is
there any place where I can find information on using REFPROP from within
TRNSYS? </span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif"'> </span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:8.0pt;font-family:"Arial","sans-serif"'>Professor
H Gurgenci, +61 7 3365 3607,Building 43, Room 208</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:8.0pt;font-family:"Arial","sans-serif"'><a
href="mailto:h.gurgenci@uq.edu.au" title="mailto:h.gurgenci@uq.edu.au">h.gurgenci@uq.edu.au</a> -o- <a
href="http://www.uq.edu.au/geothermal/gurgenci-blog">http://www.uq.edu.au/geothermal/gurgenci-blog</a>
</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:8.0pt;font-family:"Arial","sans-serif"'>Director,
Queensland Geothermal Energy Centre of Excellence, </span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:8.0pt;font-family:"Arial","sans-serif"'>The
University of Queensland, Brisbane</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:7.0pt;font-family:"Verdana","sans-serif";
color:silver'><a
href="https://exchange.uq.edu.au/exchweb/bin/redir.asp?URL=http://cricos.dest.gov.au/"
target="_blank"
title="https://exchange.uq.edu.au/exchweb/bin/redir.asp?URL=http://cricos.dest.gov.au/">CRICOS</a><b>
Provider Code: 00025B</b></span><o:p></o:p></p>
<p class=MsoNormal> <o:p></o:p></p>
<pre><o:p> </o:p></pre><pre style='text-align:center'>
<hr size=4 width="90%" align=center>
</pre><pre><o:p> </o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>TRNSYS-users mailing list<o:p></o:p></pre><pre><a
href="mailto:TRNSYS-users@cae.wisc.edu">TRNSYS-users@cae.wisc.edu</a><o:p></o:p></pre><pre><a
href="https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users">https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users</a><o:p></o:p></pre><pre> <o:p></o:p></pre>
<p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br>
<br>
<o:p></o:p></span></p>
<pre>-- <o:p></o:p></pre><pre>***********************************************************************<o:p></o:p></pre><pre>Thermal Energy System Specialists (TESS), LLC <o:p></o:p></pre><pre>David BRADLEY 22 N. Carroll Street - Suite 370 <o:p></o:p></pre><pre>Partner Madison, WI 53703 <o:p></o:p></pre><pre> USA<o:p></o:p></pre><pre>P: +1.608.274.2577 <o:p></o:p></pre><pre>F: +1.608.278.1475<o:p></o:p></pre><pre>E-mail: <a
href="mailto:bradley@tess-inc.com">bradley@tess-inc.com</a> <o:p></o:p></pre><pre>Web Pages: <a
href="http://www.tess-inc.com">http://www.tess-inc.com</a> and <a
href="http://www.trnsys.com">http://www.trnsys.com</a><o:p></o:p></pre><pre><o:p> </o:p></pre><pre>***********************************************************************<o:p></o:p></pre></div>
</body>
</html>