WOLFRAM SYSTEMMODELER LINK PACKAGE SYMBOL

WSMConnectComponents

WSMConnectComponents["newmodel",{"c1""comp1",},{"c1.a"->"c2.b",}]
creates the Modelica model "newmodel" by connecting connector a of component c1 with connector b of component c2 etc.

DetailsDetails

  • WSMConnectComponents[newmodel,] returns WSMModelData[newmodel].
  • WSMConnectComponents["PackageA.NewModel",] inserts "NewModel" into "PackageA".
  • The shortest unique component name comp can be used where WSMNames["*.comp"] gives a unique match.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Load Wolfram SystemModeler Link:

In[1]:=
Click for copyable input

Create a simple electrical circuit:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Show the current and voltage in the inductor:

In[4]:=
Click for copyable input
Out[4]=

Use short naming to refer to the Abs and Sine components in Modelica.Blocks:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=