WSMSimulate


simulates according to experiment settings.


simulates from to .


simulates from to .

DetailsDetails

  • returns a WSMSimulationData object.
  • The refers to the fully qualified Modelica name.
  • The shortest unique model name mmodel can be used where WSMNames["*.mmodel"] gives a unique match.
  • The following options can be given:
  • InterpolationOrderAutomaticcontinuity degree of output between events
    MethodAutomaticwhat simulation method to use
    WSMInitialValuesAutomaticoverriding initial values
    WSMInputFunctionsAutomaticoverriding input values
    WSMParameterValuesAutomaticoverriding parameter values
    WSMProgressMonitorAutomaticcontrol display of progress
  • The option setting Automatic, normally means that the setting is taken from or its experiment setting.
  • Setting WSMParameterValues or WSMInitialValues to runs simulations in parallel, with taking values .
  • WSMInitialValues corresponds to the start property in the Modelica model.
  • WSMInputFunctions->{"var1"->fun1,} uses as the input value for at time t.
  • Method settings take the form Method->"method" or Method->{"method","sub1"->val1,}.
  • The following adaptive step methods can be used:
  • "DASSL"DASSL DAE solver
    "CVODES"CVODES ODE solver
  • Suboptions for adaptive-step methods include:
  • "InterpolationPoints"Automaticnumber of interpolation points
    "Tolerance"10^-6tolerance for adaptive step size
  • The following fixed-step methods can be used:
  • "Euler"explicit Euler's method of order 1
    "Heun"Heun's method of order 2
    "RungeKutta"explicit RungeKutta method of order 4
  • Suboptions for fixed-step methods include:
  • "StepSize"10^-3fixed step size
  • With Method->{"NDSolve",sub1->val1,}, NDSolve is used as the solver. Method options are passed to NDSolve.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Load Wolfram SystemModeler Link:

In[1]:=
Click for copyable input

Simulate a model with the time interval from experiment settings:

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

Do a parameter sweep over a voltage offset:

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

Plot the voltage for all simulations:

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

Use the diagram representation of a model as input:

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

Copy and paste the output above:

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