# [WSG21] Daily Study Group: System Modeler for Engineering

Posted 2 years ago
11738 Views
|
38 Replies
|
7 Total Likes
|
 A new Daily Study Group on model-based systems engineering starts next week. Certified instructor @Ankit Naik will lead the group with assistance from MathCore engineers. See details about daily topics and sign up: https://wolfr.am/UoUvzCnD
38 Replies
Sort By:
Posted 2 years ago
 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!
Anonymous User
Anonymous User
Posted 2 years ago
 Hello Ankit, or Sergio, I've completed Quiz1 and Quiz2. Was there anything else I needed to complete to finish the study group assignments ? Thanks for the Introduction to System Modeler. John Burgers.
Posted 2 years ago
 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
Posted 2 years ago
 Yes, you are correct. The right answer is 1.7 mol/l. I will fix it tomorrow.
Posted 2 years ago
 Thank you, Ankit. Bob
Posted 2 years ago
 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,
Posted 2 years ago
 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.
Anonymous User
Anonymous User
Posted 2 years ago
 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, ComplexThanks for any tips.
Posted 2 years ago
 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.).
Posted 2 years ago
 Can you help me understand In[23] failed? I tried both with and with out system model GUI launched, with the same result. In[23]:= CreateSystemModel["WSMExercises.Ex7.MyModels.Wingnut", wingnut]; In[24]:= SystemModel["WSMExercises.Ex7.MyModels.Wingnut", "ModelicaDisplay"] During evaluation of In[24]:= SystemModel::nomod: The model WSMExercises.Ex7.MyModels.Wingnut was not found. Out[24]= SystemModel["WSMExercises.Ex7.MyModels.Wingnut", "ModelicaDisplay"]
Posted 2 years ago
 I suspect this issue is also related to the previous comment.
Posted 2 years ago
 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.
Posted 2 years ago
 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 ... ?
Posted 2 years ago
 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"]
Posted 2 years ago
 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.
Posted 2 years ago
 Should this command open a System Modeler (GUI) session?SystemModeler[{"WSMExercises.Ex6.MyModels.Inerter"}]SystemModeler::ncor: SystemModeler is a full graphical modeling and simulation environment available in the Wolfram SystemModeler product.
Posted 2 years ago
 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"}]
Posted 2 years ago
 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.
Posted 2 years ago
 Hi John,Please drop me a mail at ankitn@wolfram.com and we can schedule a zoom meeting to troubleshoot this issue.Thanks, Ankit
Posted 2 years ago
 Not clear to me what this means ...Drag and drop the new Car dynamics graphic over the old one. The F1 car has changed its behavior.Help > Documentation Center > Simulation Center - Plot Windows had nothing to say about this.Help?
Posted 2 years ago
 "Drag and drop the new Car dynamics graphic over the old one. The F1 car has changed its behavior.": You need to drag the plot named "Car dynamics" present inside the Model Plots section in the Experiment Browser. To create this plot, please refer to the notebook titled, "4. Create components using text (inerter)".
Posted 2 years ago
 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.
Posted 2 years ago
 Thanks for pointing that out. I will correct it in the notebook.
Posted 2 years ago
 Ex 4 Pendulum. Not sure what you mean by "Add this as a model plot, calling it Pendulum angle." Does that mean Wolfram system Modeler Simulation Center > Plot > Add Plot to Model ... ?
Posted 2 years ago
 Yes
Posted 2 years ago
 Ex 4 Pendulum. Y(x) plot of pendulum.r[1], pendulum.r[2] results in horizontal line pendulum.r[2]=0 for range -222e-18< pendulum.r[1]<+222e-18. Is there an instruction in the training I missed?
Posted 2 years ago
 I can show it again during the review session today.
Posted 2 years ago
 Thanks, Was watching you in today's review session, I must have missed it. Model looks exactly like the exercise sheet 3. "Create components and animations Exercise 4 Pendulum" On simulation the animation shows a swinging pendulum Y[x] plot show nothing. time plot shows r2[t]=1 constant r1[t]=0 constant. What might be wrong?
Anonymous User
Anonymous User
Posted 2 years ago
 I think to have figured this out. By changing the position reference the plot looks like that of the lesson.Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.world
Posted 2 years ago
 The "Component Properties" pop up window runs the height of my screen and beyond the screen bottom. Attempt to resize the window fail with the pop up disappearing resulting in system modeler "Model Center" lock up. The only solution I can find is a Task Manager stop process. Any suggestions?
Posted 2 years ago
 Can I know which version of System Modeler and which OS are you using?
Anonymous User
Anonymous User
Posted 2 years ago
 system modeler 12.2 build 9 OS Win 10.0 Thanks
Posted 2 years ago
 Hi Sergio - thanks. That was what i was looking for. RTFM helps more often than not.
Posted 2 years ago
 Hi Ulf, In these cases a good source of information is the library documentation. Check the documentation in Modelica.Mechanics.Translational.UsersGuide. Specifically, I can here point you to the online versions of the documentation, such ashttps://reference.wolfram.com/system-modeler/libraries/Modelica/Modelica.Mechanics.Translational.UsersGuide.Overview.htmlwhere you find By convention in this library, the connector characterized as a filled green square is called flangea and placed at the left side of the component in the "design view" and the connector characterized as a non-filled green square is called flangeb and placed at the right side of the component in the "design view". The two connectors are completely identical, with the only exception that the graphical layout is a little bit different in order to distinguish them for easier access of the connector variables. and inhttps://reference.wolfram.com/system-modeler/libraries/Modelica/Modelica.Mechanics.Translational.UsersGuide.SignConventions.htmlwhere you find information of the purpose of the arrow, which is basically to provide some help in establishing the signs of vector quantities and its relation to the physical system in which they are implemented.
Posted 2 years ago
 There are different types of connectors in one domain (i.e. flangea resp flangeb in the mechanical translational domain). Could you please explain which connector has to be connected to which connector? For example: what is different when flangeb of a spring is connected to flangeb of a mass in comparison when flangeb of a spring is connected to flangea of a mass? There is also an arrow shown in the icons of Mechanics-Translational-Models. For example at the Mechanic-Translational-Model Spring and Mass and Damper and ElastoGap the arrow is always directed from a flangea to flangeb. What is the purpose or the concept behind this arrow?
Anonymous User
Anonymous User
Posted 2 years ago
 Hi Ankit, Can you provide a quick guide to obtaining and installing the requisite C++ compiler? What was on the Mathematica site wasn't easy enough for me. I'm not at all familiar with that. I presume it is free? Thank-you.
Posted 2 years ago
 Hi,Can you tell me which version of System Modeler and which OS are you using?Can you try to use the following reference: https://reference.wolfram.com/system-modeler/UserGuide/InstallationandSetup.htmlYes, the C++ compiler is free.Regards, Ankit
Posted 2 years ago
 We are excited to host this! If you are new to System Modeler or an experienced user (and want a refresher), then this study group is relevant for you. I will be joined by my colleagues @Leonardo Laguna Ruiz and @Sergio Vargas.