SysML v2 Deep Dive 4 min read

Lesson 6: Defining Parts

Lesson 6: Defining Parts

The Blueprint

We have established the "Usage-Focused" mindset. Now, it is time to build. In SysML v1, many structural concepts were commonly modeled using Blocks. In SysML v2, we get mathematically specific. We don't just "block" things out; we strictly separate the definition of a component from its usage in a specific context.

The Concept: The System Blueprint

A Part Definition (part def) is a reusable blueprint. It acts as a black box by specifying externally visible features (like ports), but it also defines its internal structure by specifying owned part usages and their connections. A part def does not represent a specific physical object sitting on a table; it represents the type or class of object.

It does not represent a specific physical object sitting on a table. It represents the type of object.

Think of it like Object-Oriented Programming:

  • Java/C++ Class: public class Drone { Engine e; ... }
  • SysML v2: part def Drone { part engine : Engine; ... }

Defining the Skyzer Drone

Let's build the physical architecture for the Skyzer drone.

Textual Code:

package SkyzerSystem {
    // Import standard library for Quantities
    import ISQ::*;

    // 1. The Definitions (The Component Types)
    part def Payload {
        // Typing by Quantity Kind (Mass), not just a Value
        attribute mass : MassValue; 
    }

    part def FlightControlComputer;

    // 2. The Aggregate Definition (The System)
    part def SkyzerDrone {
        attribute totalMass : MassValue;
        attribute maxSpeed : SpeedValue;

        // Internal Structure (White Box Composition)
        // These are the specific parts inside the drone
        part payload : Payload;
        part flightComputer : FlightControlComputer;

        // Invariant Constraint: 
        // The payload must always be lighter than the total limit.
        assert constraint massLimit { payload.mass < totalMass }
    }
}

Graphical Notation:

Graphical Notation


Deep Dive: What just happened?

  1. part def (Definition): We defined SkyzerDrone as a type. We can now create 100 different drone usages from this one blueprint.
  2. attribute (Properties): We replaced the SysML v1 "Value Property" with attribute. By using ISQ::MassValue, and ISQ::SpeedValue we leverage the standard libraries. The system semantically understands the "Quantity Kind" (Mass) rather than treating it as just a raw number.
  3. part (Usage): Inside the definition, we nested part payload : Payload;. Because it does not use the ref keyword, this structurally asserts a composite usage. It means every instance of a SkyzerDrone contains a payload, and that payload's lifecycle is bound to the drone. In the graphical notation, these nested parts are displayed in the “parts” compartment.
  4. constraint: We defined a constraint expression within the structure.
    • Terminology: In v2, you write a simple boolean expression or predicate (evaluating to True/False) directly in the model.
    • Explicit Assertion: Note that constraints are not implicitly asserted, we must use the assert keyword. A simple constraint is just a calculation; assert makes it a rule that must always be true (an invariant).

The "Parts Tree" (Hierarchy)

In SysML v2, hierarchy is defined by ownership. Textually, by simply nesting part payload inside the curly braces { } of part def SkyzerDrone, you have structurally defined composite ownership. But what does this look like visually?

image2

Understanding the Graphical Notation: Besides displaying the nested parts in the “parts” compartment, SysModeler can also render a tree view of SkyzerDrone. Notice the solid black diamond? SysML v2 still uses the familiar composite aggregation notation from SysML v1 Block Definition Diagrams (BDDs). The difference is that you no longer have to manually draw and connect these diamonds. The textual nesting and the graphical composition edges are strictly synchronized reflections of the exact same underlying Abstract Syntax Tree.

SysML v1 vs. V2 Cheat Sheet

SysML v1SysML v2
«Block»part def (The Definition)
Part Propertypart (The Usage)
Value Propertyattribute
Composition (Black Diamond)Textual nesting { } AND Graphical Black Diamond
Constraint Blockconstraint def (Reusable definition)
Constraint Propertyassert constraint

Next Lesson

We will tackle Composition & Subsetting. How do we handle complex hierarchies like part carEngine subsets engines? We will learn how to build precise component hierarchies and navigate reference versus composite usages.

SysML v2

SysModeler Team

Engineering & Product