Skip to content
SysML v2 (structure) templates

SysML v2 — Fuel System, Wired Correctly

The reference model, and the one to copy. A tank, a pump and an engine joined by a typed fuel interface, with the filler neck as a boundary port of the vehicle. Every port opposes the port it meets, every interface binds its ends in the order its definition declares, the payload conforms, and the item arriving at the boundary continues to something inside. Reports clean — and the figure is byte-for-byte the same as the next template's, which does not.

Template previewSysML v2 (structure)
FuelSysteminterconnectionVehicleinteriortankToPumppumpToEngineFueltank: TankoutletfillPointpump: Pumpinletoutletbaseengine: EngineinletfootfillEvery one of the 10 checks that had something to run on came back clean, over 8 definitions, 15 features and 4 connections. Theother 3 found nothing to examine — that is silence, not a pass.GAPNo connection joins two related port definitions that share a directed feature, so there was no direction to compare.GAPNothing here redefines anything, so there was no replacement to verify.GAPNothing here redefines a feature a supertype declares, so there was no narrowing to verify.OKAll 17 declared types resolve to a definition in this document, so every check below had the definition it needed to read.OKAll 8 connection ends resolve to a feature that exists, so every line drawn lands on something the document declares.OKAll 3 connections between two ports of one definition oppose them, or join ports with no direction to get backwards. Connections between ports ofDIFFERENT definitions are the next check's business, not this one's.OKAll 2 typed connections bind the number of ends their definitions declare, with each port conforming to the end it sits at, in declared order.OKThe one flow leaves a feature that can emit and arrives at one that can accept, conjugation included.OKThe one payload conforms to what its destination accepts, by a specialization this document declares.OKAll 8 ports are named by a connection, interface or flow.OKThe one inbound item at a composite part's boundary continues to something inside.OKThe composition tree over 4 part definitions is acyclic, so every definition here can be built. References were excluded, correctly: a reference cycle isan ordinary bidirectional association.OKEvery line was read and no cap bit: the 8 definitions above are the whole document, so the counts are totals rather than floors.

Make it your own.

package FuelSystem {

  item def Fuel;

  // A port with no directed features is a structural attachment — a bolt
  // pattern. It has no direction to get backwards, and this engine never
  // accuses one.
  port def MountPoint;

  // The contract. This is the ONLY place a direction is stated, and it
  // sits in a box the interconnection view does not draw.
  port def FuelPort {
    out item feed  : Fuel;
    in  item spill : Fuel;
  }

  // The pairing, in declared END ORDER. Nothing on the page shows this.
  interface def FuelLine {
    end supplier : FuelPort;
    end consumer : ~FuelPort;
  }

  part def Tank {
    port outlet    : FuelPort;
    port fillPoint : ~FuelPort;
  }

  part def Pump {
    port inlet  : ~FuelPort;
    port outlet : FuelPort;
    port base   : MountPoint;
  }

  part def Engine {
    port inlet : ~FuelPort;
    port foot  : MountPoint;
  }

  part def Vehicle {
    // A boundary port: unconnected on the OUTSIDE is correct here, and
    // inside the vehicle it is where fuel arrives from.
    port fill : ~FuelPort;

    part tank   : Tank;
    part pump   : Pump;
    part engine : Engine;

    interface tankToPump   : FuelLine connect tank.outlet  to pump.inlet;
    interface pumpToEngine : FuelLine connect pump.outlet  to engine.inlet;

    connect pump.base to engine.foot;

    flow of Fuel from fill.feed to tank.fillPoint.feed;
  }
}