SystemModeler Link >

WSMSimulationData

WSMSimulationData[...]
represents Modelica simulation data.
  • In standard output format, only the simulation interval and the number of variables in a object are printed explicitly.
  • gives a list of possible properties.
  • Properties of simulation data are obtained from .
  • Properties of the simulated model:
"VariableNames"dependent variables in the model
"ParameterNames"parameter variables in the model
"ModelName"fully qualified name of the model
  • Properties specific to the simulation:
"SimulationInterval"simulation interval
"NumberOfEvents"number of events in the simulation
  • For simulations with animation information, returns a Graphics3D at time t.
  • Properties related to values of variables and parameters:
{"v1","v2",...}simulation for , , ...
{"p1","p2",...}parameter value for , , ...
  • Simulation results for variables are returned as functions that can be evaluated for any time t.
  • Simulation results from object sd can be evaluated at a point t with .
  • Complete lists of simulation results and parameter values:
"VariableValues"simulations
"ParameterValues"parameters
  • Lists of simulation results from sd can be evaluated at a point t with .
  • Variables depend on parameters ; the sensitivity of a variable to a parameter is the partial derivative . Sensitivities can be computed using WSMSimulateSensitivity.
  • Sensitivities can be accessed by the property .
  • Properties related to sensitivities include:
"SensitivityNames"variable parameter sensitivities
"SensitivityValues"sensitivities
Load Wolfram SystemModeler Link:
Simulate a model:
Get all variable names in the model:
Get the trajectory of one variable:
Get trajectories for all variables:
Show the simulation interval:
Simulate a model:
Get parameter names:
Pick out parameters:
Load Wolfram SystemModeler Link:
In[1]:=
Click for copyable input
 
Simulate a model:
In[1]:=
Click for copyable input
Out[1]=
Get all variable names in the model:
In[2]:=
Click for copyable input
Out[2]=
Get the trajectory of one variable:
In[3]:=
Click for copyable input
Out[3]=
Get trajectories for all variables:
In[4]:=
Click for copyable input
Out[4]=
Show the simulation interval:
In[5]:=
Click for copyable input
Out[5]=
 
Simulate a model:
In[1]:=
Click for copyable input
Out[1]=
Get parameter names:
In[2]:=
Click for copyable input
Out[2]=
Pick out parameters:
In[3]:=
Click for copyable input
Out[3]=
Get a list of all possible properties of a simulation data object:
Simulate a model:
Get all variable names in the model:
Get all parameter names in the model:
Pick out variables and parameters:
Get the functions for two variables:
The values of two parameters:
Show the time interval of the simulation:
Use variable and parameter rules to get data:
Pick out simulation trajectories for two variables:
Get replacement rules for all parameters in the model:
Simulate with sensitivities:
Get simulation and sensitivity values:
Find the nominal value of the parameter:
Plot the variation for :
Simulate a model:
Plot a variable and use the model name as a label:
Simulate a model:
Get a variable:
Use the simulation interval property to specify a plot interval:
Simulate a model with events:
Study the complexity by looking at the number of events during simulation:
Generate a 3D graphic of a multi-body system at time :
Show an animation of the system, fixing the plot range with Show:
Variable names can use the format returned from WSMModelData:
The result is the same:
Compute the inverse function to an InterpolatingFunction from :
Simulate the model:
Pick out one InterpolatingFunction and compute its inverse:
Plot the result:
Find maximas in a simulation:
Simulate the model:
Search for the highest points:
Show the results:
Analyze several variables:
Use several simulations:
Calculate a number of metrics for simulation data:
Plot the function:
Calculate the 1-norm :
The 2-norm :
The RMS-norm :
Total variation :
Simulate bouncing balls dropped from different heights:
Animate the balls and their height in a plot:
Visualize with ParametricPlot3D:
Standard output form of is shortened:
The first element is the simulation interval:
The second is the number of variables:
can be created in SystemModeler and imported into Mathematica: