Commit 1e335fa8 authored by Tiziano Munaro's avatar Tiziano Munaro
Browse files

Describe co-simulation in OpenModelica

Issue-Ref: 4031
Issue-Url: https://af3-developer.fortiss.org/issues/4031

Signed-off-by: Tiziano Munaro's avatarTiziano Munaro <munaro@fortiss.org>
parent 3534b4cb
af3_faq.html 851f9881df0a7d2093c05bd73aa4e0e404e592db GREEN
example_co-simulation.html 5f53ae41deec804c786c782a819a0ec39057d887 RED
example_co-simulation.html 1c68463b840b76646b218b1549291a24d22165b3 RED
furtherResources.MainPage.html 1d38b2ed28f00c8abed17a5c3aca6316341163f1 GREEN
getting_started.html d2cec69b06162d9b63687b4b8e9cadedabe168a7 GREEN
managing_projects.html f112b5b7db98bd373b870c343ba708e7b9c90aee GREEN
......
......@@ -51,14 +51,14 @@
<h3>AutoFOCUS 3</h3>
<ol>
<li>Export the <b>Input</b> component as FMU: <b>'[Right click on component] &rarr; Export to FMU 2.0'</b></li>
<li>Export the <b>Input</b> component as FMU: <b>'[Right-click on component] &rarr; Export to FMU 2.0'</b></li>
<li>Set the component to be executed at a frequency of <b>100 Hz</b> and store it in the root folder of your workspace.</li>
</ol>
<h3>Overture</h3>
<ol>
<li>Export the <b>NoiseGenerator</b> project as FMU: <b>'[Right click on project] &rarr; Overture FMU &rarr; Export Tool Wrapper FMU'</b></li>
<li>Export the <b>NoiseGenerator</b> project as FMU: <b>'[Right-click on project] &rarr; Overture FMU &rarr; Export Tool Wrapper FMU'</b></li>
<li>The FMU will be stored in <b>'./generated'</b> within the project directory.</li>
</ol>
......@@ -70,17 +70,26 @@
</ol>
<h2>FMI-based Co-Simulation</h2>
<h3>AutoFOCUS 3</h3>
<ol>
<li></li>
</ol>
<h3>OpenModelica</h3>
<ol>
<li></li>
<li>Create a new simulation: <b>'OMSimulator &rarr; New OMSimulator Model'</b></li>
<li>Make sure to set its type to <b>Weakly Coupled</b> (usually selected by default).</li>
<li>Open the top-most component called <b>Root</b> by default and marked with a <b>WC</b>-icon (which stands for <i>Weakly Coupled</i>): <b>Double-click on the component within the Libraries Browser</b>.</li>
<li>Add the tree FMUs previously exported like so: <b>'OMSimulator &rarr; Add SubModel'</b></li>
<li>Connect the output of the input model (exported from AutoFOCUS 3) to the <b>setpoint</b> input of the system model (exported from OpenModelica).</li>
<li>Connect the output of the environment model (exported from Overture) to the <b>disturbance</b> input of the system model (exported from OpenModelica).</li>
<li>Instantiate the model by setting the <b>Fixed Step Size</b> to <b>0.01</b> and the <b>Stop Time</b> to <b>5</b>: <b>'OMSimulator &rarr; Instantiate Model'</b></li>
<li>Simulate the model: <b>'OMSimulator &rarr; Simulate'</b></li>
<li>Switch to the <b>'Plotting'</b> view (should happen automatically).</li>
<li>Visualize the results by selecting the variables of interest in the <b>Variables Browser</b>:
<ol>
<li><b>'[Name of the OMSimulator Model] &rarr; [Name of the root component] &rarr; System &rarr; angle'</b></li>
<li><b>'[Name of the OMSimulator Model] &rarr; [Name of the root component] &rarr; System &rarr; setpoint'</b></li>
<li><b>'[Name of the OMSimulator Model] &rarr; [Name of the root component] &rarr; System &rarr; disturbance'</b></li>
</ol>
</li>
</ol>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment