In this model two tanks filled with unequal amounts of a fluid are connected at the bottom of each tank by a pipe. The flow of the fluid from the tank with more fluid to the tank with less fluid is modeled in SysML, where it can be exported into Modelica or Simulink/Simscape for simulation. There are 5 SysML diagrams in this model:

  1. TwoTanksComponents Block Definition Diagram: This diagram contains a block describing the Tank class and its properties, a block describing the Pipe class and its properties, and interface block describing the conserved substance flow rate and potential to flow. 


  2. TwoTankConstraints Block Definition Diagram: Mathematical expressions are provided in constraint blocks PipeConstraint  and TankConstraint  to show the relationship between the flow and pressure of the conserved substance (the fluid) that goes through Tank and Pipe components.


  3. Tank Parametric Diagram: The constraint parameters (variables in the mathematical expressions of the constraints) of the TankConstraint  constraint block are bound to the properties of the Tank  block (from the TwoTanksComponents block definition diagram).

  4. Pipe Parametric Diagram: The constraint parameters (variables in the mathematical expressions of the constraints) of the PipeConstraint constraint block are bound to the properties of the Pipe block (from the TwoTanksComponents  block definition diagram).
  5. ConnectedTanksIBD Internal Block Diagram: This diagram is a part of the ConnectedTanks block. The interconnections between the blocks and ports are shown in this diagram. There are two part properties (fluidReservoir1 and fluidReservoir2) of type Tank and a part flowMedium of type Pipe as well as ports that determine the interface between the tanks and pipe where the fluid flows through (characterized by flow rate and potential to flow in the connectors between the ports).