Message Boards Message Boards

Introducing Modelica Mentor: GPT for Modelica Users

Posted 1 month ago

enter image description here

Modelica is a powerful language for modeling complex systems, but getting started can be daunting. Whether you're stuck on a syntax issue, need help with code snippets, or need help understanding the error messages, having an assistant that can read through specifications and offer relevant guidance is invaluable.

To address this problem, I have created a GPT to assist with Modelica. Modelica Mentor is trained with Modelica resources, ensuring that it prioritizes using specialized information before resorting to more general sources.

Getting started with Modelica Mentor is easy and free. Simply search for "Modelica Mentor" in the Explore GPTs section, and start asking your questions.

enter image description here

Here are a few examples of how Modelica Mentor can be used:

Ask for a Code Snippet

If you are having trouble remembering a syntax, simply ask it to give you a minimal example.

enter image description here

Understand What Code Means

If you're puzzled by a piece of Modelica code, just paste it into the chat and ask for an explanation.

enter image description here

Create a Model

Upload a screenshot or describe the system you want to model, and Modelica Mentor will help you get started with the corresponding Modelica code.

enter image description here

Filter Code

If you have a flat Modelica code (can be obtained from text view in System Modeler) and need to filter it based on certain criteria, like potential or flow variables, Modelica Mentor can do that too.

enter image description here

Code from other programming languages

Of course, if you have a code snippet written in another programming language, Modelica Mentor can assist you in converting into Modelica code.

enter image description here

The model works after making one change. You will need to remove the time variable (t) as time is implicit in Modelica.

While Modelica Mentor is very useful, it's advisable to double-check the answers, especially when dealing with complex or large systems. Keeping your questions short and precise will also help you verify and validate the responses more effectively.

I plan to continuously improve it by adding more examples and expanding its knowledge base. Feel free to give it a try, and any feedback you provide will be greatly appreciated to make it even better.

POSTED BY: Ankit Naik
3 Replies

Hello Ankit. This is quite interesting. Can you provide some supplementary commentary on how the GPT was trained -- or is it using, for example, a vector database at the back end to go through the corpus of Modelica documentation and so on. Looking forward to learning more about the process of setting this up.

POSTED BY: David Reiss

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD

Hi David,

As you rightly pointed out, the GPT is trained with Modelica resources, ensuring that it prioritizes using specialized information before resorting to more general sources

POSTED BY: Ankit Naik
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract