While SysML Parametric Diagrams can be used well for modelling networks of equations from Mathematica code, they are not well suited for modelling functions that leverage objects of MTools classes as arguments.
SysML Parametric Diagrams do not have a natural way of modelling the creation of objects. It can be done with some effort, but not in a way that reflects the modelled Mathematica code in a natural way. And it's particularly difficult to make such Parametric Diagrams executable in a tool like Magic Model Analyst® (Cameo Simulation Toolkit®).
The image shows modelling a psychrometrics (humid air physics) scenario using Webel MPsy
objects for Mathematica. It is enough to document the parameter dependencies as an "analysis" diagram, but the approach shown is not recommended.
Specifying values in SysML Parametric Diagrams can also be a bit "clunkier" than in SysML Activity Diagrams, which offer the ValuePin.
SysML Parametric Diagrams don't have direct access to Operations on a Block (you have to mimic each existing Operation with a ConstraintBlock bound to a derived value property).
And SysML Parametric Diagrams are also not the best at modelling complex logic or conditional logic (although some simpler conditional cases can be handled easily enough).
Therefore, when modelling Mathematica functions that use MTools classes, or when modelling networks of functions with complex logic, SysML Activity Diagrams are preferred, as they have more natural support for object creation, can easily include CallBehaviorActions and CallOperationActions, and can handle complex logic cases.
And the same calculations can ultimately be performed also in SysML Activity Diagrams in Magic Model Analyst® (Cameo Simulation Toolkit®).
To see the same psychrometrics case using Webel MPsy
objects modelled as SysML Activity Diagrams please visit: