[WSG21] Daily Study Group: System Modeler for Engineering

Are you using Mathematica 12.2 as well? I suspect the Mathematica instance is not able to connect to System Modeler.

Try running this in a new Mathematica instance:

Needs["PacletManager`"];
PacletDirectoryLoad["/path/to/your/SystemModeler/Mathematica/"];
RebuildPacletData[]

and then run this:

SystemModeler[{"WSMExercises.Ex6.MyModels.Inerter"}]

I suspect this issue is also related to the previous comment.

Maybe that sentence is better understood after watching you in the lesson, which my good fortune didn’t permit in these dreadfully busy times. Achieved the same graph as in the notebook by dragging “car dynamics” from the plot area of the “pinned” simulation … onto the car dynamics graph created from the simulation with the inerter. Which seems different than the wording in the notebook.

Confirm using 12.2 .

Successful exectution of :

Needs["PacletManager`"]; 
PacletDirectoryLoad[  "C:\\Program Files\\Wolfram Research\\SystemModeler 12.2\\Mathematica\\"];
RebuildPacletData[]

Not successful with SystemModeler[{“WSMExercises.Ex6.MyModels.Inerter”}]

Tried PackletFind[“SystemModeler”] without success.

Hi John,

Please drop me a mail at ankitn@wolfram.com and we can schedule a zoom meeting to troubleshoot this issue.

Thanks,
Ankit

Thanks for pointing that out. I will correct it in the notebook.

This particular CreateSystemModel problem may be independent of the issue with the link to System Modeler. @John Burgers could you close all your wolfram applications, open Mathematica and run the following:

SystemModelSimulate["IntroductoryExamples.HelloWorld"]

Looking at the output might give us some information on whether there is a deeper issue with your setup not allowing us to run the executables that correspond to a built model. Then, can you run

CreateSystemModel["MyBall", Ball[]]

Does this return the unevaluated CreateSystemModel function call or does it return a SystemModel? My suspicion is that in your wingnut call, the symbol wingnut was somehow not set to the corresponding shape and the model was not created at all. So if this works, then it would be worth checking the wingnut shape was used properly in the original question. If this does return a SystemModel then could you try

SystemModel["MyBall","ModelicaDisplay"]

Conventionally, if the model exists, this should return a display, regardless of whether your link to System Modeler is working or not. Let us know how this goes.

SystemModelSimulate[“IntroductoryExamples.HelloWorld”]

returns a SystemModelSimulationData object.

CreateSystemModel["MyBall", Ball[]]

returns a SystemModel object

SystemModel["MyBall","ModelicaDisplay"]

displays the Modellica text for it.

Does this mean that SystemModeler is installed so that It operates well on it’s own?

SystemModeler[{"WSMExercises.Ex6.MyModels.Inerter"}]

returns with error
SystemModel::nomod: The model WSMExercises.Ex6.MyModels.Inerter was not found.

Whereas,

SystemModeler["IntroductoryExamples.HelloWorld"]

successfully launches SystemModeler with that example.

Does this mean that the installation of SystemModeller isn’t properly known to Mathematica, in a way that causes Mathematica to not find the files WSMExercises … ?

Apology for so many questions from me, perhaps one of the few newbies on the topic.
Also was too busy to attend the thermal modellng session.

My question, the assignment asks to change the walls with “Ventilation” components. But I don’t find such a component in “College thermal” nor by query of the packages which i’ve so far installed, Modellica, Modellica services, ModelPlug, Complex

Thanks for any tips.

Then the most probable reason is that the model “Inerter” does not exist in the MyModels package of WSMExercises. This exercise is dependant on the notebook titled, “4. Create components using text (inerter)”, where we create the inerter model and save it in the MyModels package of Exercise 5. Try running this instead:

SystemModeler["WSMExercises.Ex5.MyModels.Inerter"]

The “Ventilation” component is simply an instance of “ThermalConductor” component from the Modelica->Thermal->HeatTransfer->Components package.

Session recordings from the Study Group can be watched from the webinar landing pages. (Registration is required.).

Right, considering the results of your calls it seems that 1) your Mathematica and System Modeler are linked properly and 2) when you get messages of models not existing it’s important to check that the model exists and that, in the case of library models, that the library has been loaded.

Dear Ankit,

Why if I carry out the following simulation command doesn’t work

In[5]:= SystemModelPlot["WSMExercises.Ex3.MyModels.ElectricKettle"]

it complains with:
“SystemModelPlot::nov: A list of variables to plot is required.”
But the simulation is correct because

In[8]:= SystemModelPlot["WSMExercises.Ex3.MyModels.ElectricKettle", "water.T"]

returns the correct plot.
Even thought if I execute the solutions example

In[9]:= SystemModelPlot["WSMExercises.Ex3.Solutions.ElectricKettle"]

it is not mandatory to say “water.T” variable
I don’t understand why.
Thanks for any clue.
Regards,

Ankit, it appears that the correct answer to problem 4 of the second quiz for the Daily Study Group for System Modeler for Engineering is actually 1.7 mol/l for G6P, but the automatic grader thinks the correct answer is 1.28 mol/l, which is not for G6P but for F6P. The problem requires the final concentration for G6P, not F6P. Thanks, Bob

Yes, you are correct. The right answer is 1.7 mol/l. I will fix it tomorrow.

Hi Gustavo,

My guess is that you have not saved your plot as a Model plot. You can do it by right-clicking on the plot and selecting “Add plot to model”. You might also check the option “Default plot” while naming your plot and save the model.

Thank you, Ankit. Bob

Hello Ankit, or Sergio, I’ve completed Quiz_1 and Quiz_2. Was there anything else I needed to complete to finish the study group assignments ? Thanks for the Introduction to System Modeler. John Burgers.

Attending the Daily Study Group or watching the recordings and passing the two quizzes are the requirements to earn your certificate of completion. The deadline to pass quizzes in April 24, and certificates will be generated and sent to you by email after that date. Thanks to everyone who contributed to this Study Group!