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

USER written component_type

6 Posts
2 Users
0 Reactions
130 Views
0
Topic starter
Dear All,

I am trying to add a user-written component created by someone else into my simulation. I have the .f90, .TMF, and .BMP files. I placed the .f90 files in a folder named "MyType" and used Type Studio to create a .dll file, which was successful. I can see both the Debug and Release subfolders in the user library folder. I then placed the .TMF and .BMP files into the "Performa" folder, and I can see the newly created type in Simulation Studio. However, when I drag this type into the Simulation Studio it crashes.

My question is: are these the correct steps I took, and where might the problem be?

Thanks in advance

3 Answers
0

@adnan

What version of TRNSYS was the proforma created for? What version of TRNSYS are you using? 

It doesn't matter whether you add the proforma first and then the source code, or add the source code first and then the proforma. The Simulation Studio knows nothing of the underlying source code of a Type (or even if the code for that Type exists) until a simulation is run, so if the Studio is crashing just from dragging out the component, there is a problem somewhere within the proforma and/or its bitmap. 

0
Topic starter

@A_Weiss

I am currently using TRNSYS 18.05.0001. The component i am trying to use is created by someone else (link attached), and it might be an old component, and I’m not sure which version it was originally created for. How can I check the version it was made for? Or is there a way to recreate the component for my version of TRNSYS using the existing file?

https://github.com/ltsb-etsmtl/crop-model/tree/main/lettuces-with-growth-model

 

Thanks 

0

@adnan

I tried adding the .tmf file to a Trnsys 18.6 project and had the same issue. I would reach out to the authors of the Type and see if they are able to successfully download the proforma from the repository and add it to a TRNSYS project. 

I did notice some inconsistencies reading the source code of the proforma online - the source code in the folder exports model Type211, but the proforma names Type213 at the top, and further down shows an (archived) link to Type204. Those mismatches wouldn't cause the proforma file to crash the Simulation Studio, but they do suggest the proforma might need some updating. 

If the authors are unresponsive and you still want to move forward with using the Type, you could recreate the proforma. You'd have to read the source code for the parameters/inputs/outputs/derivatives it requires, then create a new proforma (in Simulation Studio, File -> New -> New component) for Type 211 and populate it with the parameters/inputs/outputs/derivatives required by the source code. More guidance on creating a new proforma is available in the ProgrammersGuide.pdf in the Documentation folder of your main TRNSYS directory. 

adnan Topic starter 22/10/2024 7:40 pm

@a_weiss I've already made these corrections by adjusting the equation and updating the type names accordingly. However, I suspect the issue may be due to the type being developed using a different version of TRNSYS, which could be causing the problem. Thank you for your detailed response and for reaching out to the authors for clarification. If you receive any further information, please share it with me. Thanks again

A_Weiss A_Weiss 22/10/2024 7:50 pm

@adnan Sorry, I think that was unclear - I was suggesting that *you* should reach out to the authors of the Type and ask them if they are able to download the proforma from their repository and add it to a project. I am not in contact with the authors of the Type.

adnan Topic starter 22/10/2024 9:32 pm

@a_weiss Sorry My bad, surely I will contact to author or try to create it myself they way you told me. Thanks.

Share: