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 or Post 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

Fprime_function, Solar thermal collector

1 Posts
2 Users
0 Reactions
404 Views
0
Topic starter

Dear TRNSYS Community, 

 
I would like to obtain the efficiency coefficients of a glazed solar collector for flow rates other than the tested flow rate. So, I tried to create a type based on Type 1, and include the calculated coefficients aa, bb, cc, and F_prime as outputs. When I attempt to compile and create the .dll file, it throws this error: undefined reference to 'fprime_function'. How can I resolve this? 
 
Also, I'm curious to know how this function corrects the coefficients of quadratic efficiency coefficients. I found a mention of this function inside TrnsysFunction.F90, but wasn't able to see its details. The correction method of Solar Thermal Processes [Duffie and Beckman-1991] seems to be applicable to only the 1st order efficiency equations.
 
Thanks,
Shayan Davani
1 Answer
0

Hello Shayan,

See my reply here to another user who also wanted to re-compile Type 1 to produce different outputs and ran into the same problem with the Fprime_function. I assume you are trying to re-compile using TypeStudio? I think, since Type 1 references functions in SolarCalcs.lib, the two files have to be compiled together, which unfortunately is not something TypeStudio allows. I recommend downloading Microsoft Visual Studio with the Intel Fortran compiler to edit and re-compile a version of Type 1 directly within the TRNdll64.dll package. See the second answer here for instructions to download and install Visual Studio and the Intel Fortran compiler. There's also an introduction to compiling TRNSYS Types in Visual Studio in this video:  https://www.youtube.com/watch?v=fZ5-zSC094Q.

You are correct, the correction method used by Duffie and Beckman only applies to the 1st order efficiency equation. We did a lot of work about 13 years ago to derive the correct second-order correction factor, which is housed in SolarCalcs.lib and doesn't make its source code available to users. Basically, we follow the same derivation method Duffie and Beckman used for their 1st-order correction factor (beginning from the theoretical equation for the energy balance on a fluid element), only we used an energy balance with 2nd order loss coefficients on the fluid element instead of just the 1st order loss coefficient. We also accounted for the fact that (T_coll - T_amb)^2 in the second order efficiency equation is actually (T_coll - T_amb)*ABS(T_coll - T_amb), else the efficiency trends the wrong direction when the ambient air temperature is greater than the collector temperature. 

Share: