Welcome to the TRNSYS Users Forum.

The forum is a place where people can interact and have discussions about different topics involving the use of the TRNSYS software package. Here you can post topics for discussion or questions on using TRNSYS and get advice from other users or TRNSYS experts. This forum is not intended for detailed technical support. Users should contact their distributor’s hotline for such assistance.

Some tips for success on using the forum:

  • Follow the Forum Rules posted in Forum Administration.
  • There are categories for different types of topics and questions. Post your topic or question into the proper category.
  • Before posting a topic or question search the existing topics  (and the TRNSYS Users listserv archive) to see if a similar topic or question has already been answered.
  • Use a descriptive topic name. Don’t use attention getting subjects, they don’t get attention and only annoy people.
  • State the version of TRNSYS and which add-ons your are using.
  • Include enough specific details for your topic of question to be answered. Just posting “Why am I getting an error?” without describing the specific error and what you are trying to do when you get the error will not receive a response that fixes your issue.
  • Remember when people help you, they are doing you a favor. Be patient, help people out by posting good descriptions of what you need help with, and be polite even if a response does not solve your issue.
  • Moderators may edit your post for clarity or move your topic to a more appropriate category.

Notifications
Clear all

I want to call Refprop in TRNSYS 18 , I'm working on a system i have liquid air, propane, methanol, thermal oil, to adjust using all these fluids, I want to learn how to combine Refprop with Trnsys 18?

11 Posts
2 Users
0 Likes
164 Views
0
Topic starter

call Refprop in TRNSYS 18

5 Answers
0

@gehadrabee24 A long time ago (in v16 I think) there was a link between Trnsys and Refprop but it was not maintained. Typically we steer people toward using the call to CoolProp in v18. The call to CoolProp is done from inside a Type to return properties of the fluid of interest. CoolProp can return properties for air (although I did not dig deep enough to find out over what temperature range), methanol, and n-propane. Thermal oil is a somewhat generic term for a number of different substances. You can investigate what substances CoolProp can handle by visiting http://www.coolprop.org/fluid_properties/PurePseudoPure.html#list-of-fluids

One thing that you need to be very careful about is that most Trnsys components make the assumption that liquid properties such as the specific heat and the density are constant over the temperature range that will be encountered during a simulation. To take a very simplistic example, the equation q = mDot * Cp * (T2-T1) is an implementation of q = mDot * Cp * dT/dt that assumes Cp and density to be constants. If they are not then you have to rederive the fundamental energy balance taking into account the d(mDot)/dt and the d(Cp)/dt terms.

kind regards,

 David

 

0
Topic starter

so I have to download coolprop and make a type on trnsys  by Fortran to call coolprop in trnsys? or there is a type already?

0

coolprop is called from inside a Type. You can refer to the 07-ProgrammersGuide.pdf in the documentation set for how to implement the call.

kind regards,

 David

 

Gehad Azmy Topic starter 28/02/2024 12:06 pm

@davidbradley Hey David, I found that cool prop cannot help me with liquid air properties, so I have to use Refprop with TRNSYS 18, can you suggest a simple way to use it ?
Best Regards,
Gehad.

0
Topic starter

Okay, I found it. So, if I want to call the properties of certain fluid in a heat exchanger, I should open the Fortran code of the type and edit it, adding the call of cool prop right? 

Best Regards,

Gehad

DavidBradley 06/03/2024 1:08 pm

@gehadrabee24 That is correct. Once you edit the code you'll need to recompile it and recreate the dll in which it lives. It may be simpler to make a copy of the Type that you are modifying, give it a new number, make your change, and then compile it as a stand alone component using the TypeStudio (07-ProgrammersGuide). Type numbers 201-300 are reserved for user-written components. If you do make a new Type, you'll also need to make a copy of the Type's proforma, save it with a new name and edit it so that it knows the Type number of the modified component.

Gehad Azmy Topic starter 06/03/2024 1:12 pm

I was waiting for your response to tell you that cool prop doesn’t have liquid air properties on trnsys, so I’ll go back to refprop 10, you know how to call it in trnsys code?

DavidBradley 06/03/2024 1:34 pm

@gehadrabee24 the call to refprop was a feature of Trnsys15. It was a piece of code that could be added in and compiled with the rest of the Trnsys code as an interface between a Type and the 32-bit version of Refprop. If modern Refprop still has the same hook that it allows it to be called the way that Trnsys used to call it then the interface subroutine would have to be updated/rewritten after which a Type could then be written to call it. I will check and see if the source code of the interface is still around.
kind regards,
David

0

@gehadrabee24

Hi Gehad,

My apologies for the delay in getting back to you. I was checking to make sure it is okay to make the code available. If you can please send me a direct email (techsupport@tess-inc.com) then I will send you the code for the link between Trnsys15 and REFPROP.

kind regards,

 David

 

 

Share: