What’s New in SystemModeler

Jan Brugård   
Wolfram MatCore AB

Join the Conversation #WolframTechConf

Abstract

SystemModeler is routinely used by the world’s engineering organizations on some of the world’s most complex engineering systems—as well as in fields such as life sciences and social science. We’ve been pursuing the development of what is now SystemModeler for more than 15 years, adding more and more sophistication to the capabilities of the system. 

In this presentation key new features of SystemModeler 5 will be presented, including extended support for model import and export, new model libraries, extensive set of new built-in examples, modular re-configurable of models, and the ability to create a fully computable object representing variations of model parameters.

Brief Introduction

SystemModeler is useful in a wide variety of applications. You can use it to model and analyse the dynamics of anything from the human body, ecosystems, and cars to gas turbines.

The Wolfram Modeling and Simulation Suite is the most complete package for system modeling, simulation and analysis

Fully integrated environment for analyzing, understanding, and quickly iterating system designs.

Makes it possible to optimize your systems, improving quality, decreasing development costs, and driving innovation.

Holistic approach just as the Wolfram Language

Provides the flexibility to add the details needed to get the right fidelity to the model in any combination of domains.

The most accessible system modeling tool

Built-in examples, documentation, on demand tutorials, etc.

Has all the tools for the expert model developer while at the same time being accessible for the model user.

SystemModeler 5—Key New Features

GraphicsGrid[{
{Mouseover[img=,imgWithText[img,"FMI 2"]],
Mouseover[img=,imgWithText[img,"Media Library"]],
Mouseover[img=,imgWithText[img,"Ready-made models"]]},
{Mouseover[img=,imgWithText[img,"Updated diagrams"]],
Mouseover[img=,imgWithText[img,"Configurable models"]],
Mouseover[img=,imgWithText[img,"Package handling"]]},
{Mouseover[img=,imgWithText[img,"Parametric simulation"]],
Mouseover[img=,imgWithText[img,"Easy to get started"]],
Mouseover[img=,imgWithText[img,"Better performance"]]}},
AspectRatio->100/355,Spacings->0,ImageSize->355*3
]

Example—Evaluating Stresses Caused from Expanding Gases

MouseOver

Easily switch between different complexity or designs, such as changing type of tires, brakes or engines.

Import[FileNameJoin[{NotebookDirectory[],"evaluating-stresses-caused-from-expanding-gases//GasTankStress.mo"}],"ModelicaModel"];
WSMModelCenter["GasTankStress.GasTankStressModel"]

See this web example: https://wolfr.am/px46hfQa

Example—Evaluating Stresses Caused from Expanding Gases

MouseOver

Easily switch between different complexity or designs, such as changing type of tires, brakes or engines.

Import[FileNameJoin[{NotebookDirectory[],"sliding-car//SlidingCar.mo"}],"ModelicaModel"];
WSMModelCenter["SlidingCar.Car"]

See this web example: https://wolfr.am/px49CN4g

Example—Hare Lynx

MouseOver

Easily set up your models as functions to be called with new parameter values, can be used to perform model optimization, calibration and verification.

Import[FileNameJoin[{NotebookDirectory[],"hare-lynx--interactively-explore-population-dynamics//HareLynxPopulation.mo"}],"ModelicaModel"]

NotebookOpen[FileNameJoin[{NotebookDirectory[],"hare-lynx--interactively-explore-population-dynamics//HareLynxPopulation.nb"}]];

See this web example: https://wolfr.am/px4fACEW

Performance Increase

MouseOverMouseOver

Data heavy simulations, including Media models, have received a significant speed-up with a factor 2x to 8x. See the comparison graph below.

Updated built-in examples

MouseOver

WSMExamples[]

Thanks!

SystemModeler in Education

Badger

Wednesday, October 18, 2:00 pm

What’s New in SystemModeler

Badger

Thursday, October 19, 2:00 pm

SystemModeler in the Wolfram Language

Little Chief

Thursday, October 19, 4:00 pm

SystemModeler in Industry

Little Chief

Friday, October 20, 9:00 am

SystemModeler Hardware Lab

Basement

All other time

Initialization

Needs["WSMLink`"]

Interactive Visualization

mmodel="HareLynxPopulation";

Import[FileNameJoin[{NotebookDirectory[],"HareLynxPopulation//HareLynxPopulation.mo"}],"ModelicaModel"];
sim=WSMParametricSimulateValue[mmodel,{"hare","lynx"},{"HareInitialPopulation","LynxInitialPopulation","HareBirthFactor","LynxBirthFactor"},WSMProgressMonitor->False];
sim[30000,2000,1.25,0.25];
evaluateParams[pts_,hareBirthFraction_,lynxBirthFraction_]:=Through[Apply[sim,Join[pts,{hareBirthFraction,lynxBirthFraction}]][t]];
intervalTest[pts_]:=pts∈allowedRegion;
updatePlot[]:=simData=Evaluate[evaluateParams[pts,hareBirthFraction,lynxBirthFraction]];
updatePlot[];
pts={100000,1500};
hareBirthFraction=1.25;
lynxBirthFraction=0.25;
allowedRegion=Rectangle[{20000,750},{100000,2000}];
showBoundry=False;
interactiveVisualization=Column[{
Row[{Slider[Dynamic[hareBirthFraction,{Function[val,hareBirthFraction=val],updatePlot[]&}],{1.25,1.5}],Spacer[10],Dynamic["Hare Birth Factor: " <> ToString[Round[hareBirthFraction,0.01]]]}],
Row[{Slider[Dynamic[lynxBirthFraction,{Function[val,lynxBirthFraction=val],updatePlot[]&}],{0.25,0.5}],Spacer[10],Dynamic["Lynx Birth Factor: " <> ToString[Round[lynxBirthFraction,0.01]]]}],
LocatorPane[
Dynamic[pts,{Function[{},showBoundry=True],Function[val,If[intervalTest[val],pts=val]],Function[val,showBoundry=False;If[intervalTest[val],updatePlot[]]]}],
Dynamic[
ParametricPlot[simData,{t,0,15},
ImageSize->500,AspectRatio->1,PlotRange-> {{0,150000},{0,3000}},PlotStyle-> ColorData[97][1],
 Epilog->Join[
If[showBoundry,{LightPink,Opacity[0.4],allowedRegion,Opacity[1]},{}],
Prepend[Table[Tooltip[Arrow[Transpose[simData/.t-> {\[FormalT],\[FormalT]+0.2}]],"Time = "<>ToString[N@\[FormalT]]],{\[FormalT],Subdivide[1,10,9]}],ColorData[97][1]]
],
AxesLabel-> {"Hares","Lynxes"}],
TrackedSymbols:> {simData,showBoundry}]],
Dynamic[Row[{
Labeled[Plot[simData[[1]],{t,0,15},ImageSize->250,AxesLabel->{"Years","Population"}],"Hares"],
Labeled[Plot[simData[[2]],{t,0,15},ImageSize->250,AxesLabel->{"Years","Population"}],"Lynxes"]}],
TrackedSymbols:> {simData}]
}];

Images

imgWithText[img_,text_]:=Show[img,Epilog->Inset[Style[text,"Section"],Background->White]]