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.
I have some experimental data (over several months) of the output of a solar thermal collector. I do not have the collector caracteristics or parameters (optical efficiency, a1, a2 and even IAM i.e. b0). Is there any tool in TRNSYS to perform a kind of inverse technique to estimate the parameters?
The way that I usually do this is to use TRNOpt (part of the TESS Optimization library). Essentially you can define a cost function (in your case, it will be the difference between the measured and the simulated result) and you define the parameters that you want TRNOpt to vary (as well as their limitations). TRNOpt will run as many simulations as it needs in order to minimize the value of the cost function.
kind regards,
David
@davidbradley Thank you for this suggestion. I am not familiar with TRNOpt but I have seen that we have it. I will install GenOpt and try. However, given my first readings and your feedback, it seems that the cost function would be a kind of final value. For instance the annual useful energy output, the annual solar fraction or energy efficiency. I was wondering if it would work in my case. I have the values of the collector outlet temperature every hour, i.e. 8760 values. The same for other variables. So, what I was imagining is to find the value of parameters (optical efficiency, a1, a2 and even IAM i.e. b0) so that the "error" between the simulated outlet temperatures for example and the measured one is minimised all over the year. I hope I am clear.
@ken What we typically do when we tune parameters to match measured data is calculate a cost function at each time step in an equation block, for example T_error = DataFlag*ABS(T_out - T_measured)**2 , then integrate the cost function over the simulation and set the optimization to try to minimize the cost function. You can use any cost function you like, of course; the example here is nice because squaring the difference between T_out and T_measured assigns a proportionally higher cost to larger deviations, and the DataFlag can be set to 0 to exclude "bad" data points for comparison, such as gaps in the measured data.
I would caution against trying to optimize too many parameters at once; TRNOpt/GenOpt can work really well for optimizing one or two parameters at a time, but more than that and they tend to settle into local sub-valleys and miss the bigger-picture optimal combination(s). I don't know for sure that you'll find that to be the case, but it wouldn't hurt to start by focusing on the one or two parameters to which the simulation is most sensitive (maybe a0 and b0, or a0 and a1) and take an educated guess at the rest of the unknowns, then once that optimization completes you can set the first parameters studied to their optimized values and run another optimization and see how sensitive the results are to the remaining unknown parameters.