OpenModelica/C2/Examples-through-OMEdit/English-timed

From Script | Spoken-Tutorial
Revision as of 16:01, 29 December 2017 by Jyotisolanki (Talk | contribs)

Jump to: navigation, search
Time Narration
00:01 Welcome to this spoken tutorial on Examples through OMEdit.
00:06 In this tutorial, we will learn, to open and simulate different Modelica library classes.
00:13 To record this tutorial, I am using : OpenModelica version 1.9.5 and Ubuntu Linux OS 14.04
00:25 But, the process demonstrated in this tutorial is identical in other OS such as- Windows, Mac OS X or FOSSEE OS on ARM.
00:37 To practice this tutorial, you should have OMEdit installed on your system.
00:43 You should also know how to work on the OMEdit window.
00:47 If not, please go through the previous OpenModelica tutorials on this website.
00:53 Let us switch to the OMEdit window.
00:57 On the left side of OMEdit window, we see the Libraries Browser. Here we can see a list of libraries.
01:07 Let us expand the Modelica library. To do this, click on the arrow head to the left of the Modelica library.
01:16 Now I will demonstrate an example from the Electrical library.
01:21 Expand the Electrical library.
01:24 Click on the arrow head to the left of Electrical library.
01:28 Under Electrical, we find Analog library.
01:32 Let's expand the Analog library.
01:35 Once again, we see many different libraries displayed.
01:39 Now, let’s expand the Example library.
01:43 Here we can see different examples of Analog.
01:48 Next, we will open the class named Rectifier.
01:53 Right-click on Rectifier and select Open Class.
01:58 We can also double-click on the class name to open the class.
02:03 Now we are in the Modeling Perspective window.
02:07 By default, the class opens in Diagram View.
02:11 I have already demonstrated how to switch between different views earlier in this series.
02:18 Now let's switch to the Text View by clicking on the Text View icon.
02:24 Here we can see the Modelica code pertaining to the Rectifier class.
02:30 Before simulating a model, we need to check for the correctness of the model.
02:36 To do this, first locate Check All Models button on the toolbar.
02:42 This button has white coloured double ticks on it. Click on it.
02:48 Immediately, the Messages Browser opens at the bottom of the window.
02:54 This will show messages pertaining to the Modelica class.
02:58 Now, let’s try to simulate the model.
03:00 On the toolbar, click on the green coloured arrow button.
03:07 This is the Simulate button which is used to simulate the model.
03:13 We can also press Ctrl and B keys to simulate the model.
03:18 On simulating, a new window opens.
03:21 It shows the compilation process of the class.
03:26 Once the compilation is successful, the output window displays the message: Simulation process finished successfully. Close this window.
03:37 By default, the Plotting Perspective should now open in the OMEdit window.
03:43 If it does not open, click the Plotting button at the bottom right.
03:48 We can also press Ctrl and F3 keys to open the Plotting Perspective.
03:54 Here we can see the simulation results of the Modelica class.
03:59 At the right of the Plotting Perspective, look at the Variables Browser window.
04:05 Under Variables Browser: we will learn to change input variable values of a Modelica class.
04:13 By default, IDC = 500, Losses = 2890.26
04:22 Change the value of IDC and see how the values of Losses change.
04:28 Let us change the value of IDC from 500 to 250.
04:33 and press Enter.
04:37 Go to the top right corner of the window.
04:39 Click Re-simulate button.
04:42 The success message window will open.
04:46 Close this window.
04:48 Once the simulation is completed, note the changes.Losses = 1756.77
04:57 Now let me demonstrate how to generate a plot.
05:01 We will generate a plot between Losses and Time.
05:06 Click on the check box against the Losses variable.
05:10 We can see a plot between Time on the X-axis and Losses on the Y-axis.
05:17 This plot describes the power losses for the diode bridge varying with time.
05:24 By default, the simulation runs from 0 to 0.1 unit time.
05:31 We can vary this interval using the Simulation Setup option.
05:36 To do this, go to the Modeling Perspective.
05:40 Click on the Modeling button.
05:43 Click on the Simulation Setup option on the toolbar.
05:47 The Simulation Setup window opens.
05:50 Here, change the Start Time to 0.01 unit.
05:55 Ensure that Simulate check box is checked.
05:59 And then click on Ok.
06:02 Immediately we see the success message window.
06:06 Close this window.
06:08 The class is re-simulated with a simulation interval of 0.01 to 0.1 unit time.
06:16 Let's delete these results.
06:18 To do so, right-click on Rectifier and then click on Delete Result.
06:26 The result has now been deleted.
06:29 Now I will demonstrate an example from Mechanics library.
06:34 First we will expand the Mechanics library.
06:38 Under Mechanics, we find Multibody library.
06:43 Let's expand the Multibody library also.
06:47 After this, let's expand the Example library.
06:51 Here we can see different examples of Multibody Mechanics.
06:56 Next, we will expand the Elementary library.
07:00 Let us open the class named DoublePendulum.
07:04 To do this, right-click on DoublePendulum and select Open Class.
07:11 The class opens in Text view.
07:14 Now, click on Check All Models button on the toolbar.
07:19 Observe the Messages Browser.
07:22 This will show messages pertaining to the Modelica class.
07:27 Now, let’s try to simulate the model.
07:31 To do so, click on the Simulate button on the toolbar.
07:35 Once the compilation is successful, the Plotting Perspective opens in the OMEdit window.
07:43 Under the Variables Browser, let’s expand the damper variable.
07:49 By default, d = 0.1, relative angular acceleration(a_rel) = 11.567 and relative rotational angle [der(phi_rel)] = 4.1
08:05 Let us change the value of d from 0.1 to 0.05.and press Enter.
08:14 Then click Re-simulate button.
08:17 After completion of the simulation, observe the changes.
08:22 relative angular acceleration (a_rel) = 15.449 and relative rotational angle [der(phi_rel)] = 4.359
08:33 Now, we will generate a plot between relative angular acceleration and Time.
08:40 Click on the check box against a_rel variable.
08:46 We see a plot between Time on the X-axis and a_rel on the Y-axis.
08:54 This plot describes the relative angular acceleration varying with Time.
09:00 By default, the simulation runs from 0 to 3 unit time.
09:06 Let's change this interval.
09:10 To do this, go to the Modeling Perspective.
09:14 Click on Simulation Setup option on the toolbar.
09:18 The Simulation Setup window opens.
09:21 Here change the Start Time to 1 unit and the Stop Time to 5 units.
09:28 Ensure that Simulate check box is checked.
09:32 then click on Ok.
09:35 We get the success message window.
09:37 Close this window.
09:39 The class is re-simulated with a simulation interval of 1 to 5 unit time.
09:45 Once the necessary plot is generated, we can delete the results.
09:50 In the Variable Browser, right click on DoublePendulum.
09:55 Select Delete Result.The result has now been deleted.
10:01 Let's summarize.
10:03 In this tutorial, we have learnt, to open and simulate different Modelica library classes.
10:10 As an assignment: Expand Magnetic library in Modelica
10:16 Simulate SaturatedInductor class in FluxTubes library
10:21 Change the values of a few input variables and re-simulate
10:26 Generate a Parametric plot between i and LossPower of variable r.
10:32 Watch the video available at the following link. It summarizes the Spoken Tutorial project.
10:41 The Spoken Tutorial Project Team: conduct workshops. Gives certificates to those who pass an online test. For more details, please write to us.
10:53 Do you have questions in this Spoken Tutorial? Please visit this site.
11:00 The FOSSEE team coordinates coding of solved examples of popular books. We give honorarium and certificates for those who do this. For more details, please visit this site.
11:15 The FOSSEE team helps migrate commercial simulator labs to OpenModelica.
11:22 We give honorarium and certificates for those who do this. For more details, please visit this site.
10:31 Spoken Tutorial and FOSSEE projects are funded by NMEICT, MHRD, Government of India.
11:40 This tutorial is contributed by Kaushik Datta and Priyam Nayak.

Thanks you for joining.

Contributors and Content Editors

Jyotisolanki, Pratik kamble, Sandhya.np14