Converting mass and charge using SysML Parametrics

Gallery
Tutorial

Ideally, one would compute as many values as possible across the entire model from minimal provided data, without repeating any data values (so that the model data is completely DRY).

However, because this is primarily a SysML Parsing Analysis tutorial, rather than simply removing the multiple existing redefinitions of the charge:Charge value property, and instead relying throughout on a derived, computed version of /charge:Charge via block Particle, a separate calculation target /calcCharge:Charge is used. This way the snippet references to the redefined value property versions can be preserved, and we can compare the values in the stated versions with the calculated versions.

The following can also be computed: /calcIsCharged:Boolean and /calcIsNeutral:Boolean. And /calcRestEnergy:RestEnergy can be calculated from the stated mass:ParticleMass.

The entire sequence is reproduced:

Click on the image to view it full size

At the top is a BDD with some physical constants collected in a block Constants (with values elicited from some Wikipedia snippets).

The BDD for block Particle shows how it carries constraint properties for ConstraintBlocks with equations for the conversions and Boolean tests. The constraint parameters are then bound to values in the SysML Parametrics diagram using BindingConnectors.

The computation can be run from instances using Magic Cyber-Systems Engineer ® (Cameo Systems Modeler®) or Magic Model Analyst® (Cameo Simulation Toolkit®) :

At the bottom a BDD shows the populated instances e-:Electron and e+:Positron. The correspondence between the values in the calculated versions and the stated versions of the charge-related value properties is exact; the correspondence for the rest energy calculation is quite good.

Up next
Notes
Snippets (quotes/extracts)
Visit also
Visit also (backlinks)
Related slides (includes other tutorials)
Related slides (backlinks, includes other tutorials)