This Quick SysML Diagram Tutorial is designed for Astah beginners to learn the basic operations of drawing SysML diagrams using Astah. We will create 8 types of SysML diagrams that are based on the samples from the SysML 1.5 specification developed by the Object Management Group (OMG).

section divider

1. Download Astah

First of all, you will need a tool. If you don’t have Astah yet, please download a free trial. There are two editions that support SysML diagrams:

  • Astah SysML – A lightweight SysML modeling tool
  • Astah System Safety – Includes all the features that Astah SysML has and more (GSN, STAMP/STPA, SCDL)

If you don’t need the additional diagram types in Astah System Safety, choose Astah SysML.

section divider

2. Create a new project

After installing Astah, launch it. When you start Astah SysML for the first time, you see this blank screen.
Astah SysML Blank Screen

Click the top-left icon to create a new project.
Create a new project

The left pane opens:
Structure Tree in Astah SysML

The new project includes pre-installed models in a package, as shown below.
Pre-installed SysML models

section divider

Astah User Interface

Astah SysML consists of five sections:

Astah SysML user interface overview
  1. Main Menu: The basic menus.
  2. Project View: This pane consists of three views: Structure Tree, Diagram List and Search.
  3. Property View: Where you edit the details of the selected model.
  4. Diagram Editor: The canvas where you create diagrams.
  5. Extra View: This pane opens only if you have enabled plug-ins that require this extra pane.

Astah System Safety looks slightly different. If you are using Astah System Safety, see the Astah System Safety user interface.

section divider

Let’s create SysML diagrams!

The sample project you will create demonstrates the requirements, design and analysis of a hybrid SUV using SysML. The sample diagrams are from the SysML 1.5 specification. Let’s start drawing a SysML Block Definition Diagram now.

section divider

Block Definition Diagram

Let’s create the following Block Definition Diagram. It is part of the “Values And Units” diagram in “Sample.axmz”, which is included in the Astah installation folder.

SysML Block Definition Diagram Sample

Download Sample File

  1. Go to [Diagram] – [Block Definition Diagram] from the main menu.
    Create SysML Block Definition Diagram

Alternatively, create one from the context menu in the tree view.
Create Block Definition Diagram from Tree

Once a diagram is created, you see a tool palette in the diagram editor. You create objects by choosing them from this palette.
Block Definition Diagram Tool Bar

Name this diagram “Modeling Domain”.

1. Create “Automotive Value Types” package

Select [Package] from the tool palette and click on the diagram to create a package. Rename it “Automotive Value Types”.

2. Create Value Types

Now create Value Types within this package. Select “Value Type” from the tool palette, click inside the package, and name it “Accel”. Then create five more Value Types (“Real”, “Horsepwr”, “Vel”, “TM” and “Dist”).

3. Color & Align Objects

Now color and align the objects for a better-looking diagram. To change an object’s color, select the objects and choose a color from the color palette. To align objects, use the [Alignment] menu, or move the objects and place them along the alignment guide lines.

4. Create Generalizations

Create Generalizations between the ValueTypes. Choose “Generalization” from the tool palette and click both ValueTypes to connect them.
Generalization button in the tool palette

Alternatively, select “Generalization” from the mini icons around the object (the Suggest feature) and click the other end directly.

5. Show properties inside the ValueType

You can choose which property information to show inside ValueType objects, such as “Operation”, “Property”, and “Value Type”. To change the visibility, right-click on the ValueType and select the property you want to add from [Compartment Visibility].

You can also do this from the diagram’s [Initial Visibility] tab:

  1. Click on the diagram.
  2. Go to the diagram’s Property View (the bottom-left pane).
  3. Select the [Initial Visibility] tab, check the properties you want to show in the diagram, and click the [Apply to existing elements] button.

6. Create Units

Before creating Units, create another package, “Automotive Units”. Then create Units inside the package. You can find “Unit” in the dropdown menu shown below.
Create New Unit

Create “g”, “mph”, “ft”, “hp” and “sec” Units in the same way you created the ValueTypes earlier.
SysML Units in the diagram

7. Create QuantityKinds

Right-click the “Automotive Value Types” package in the tree view and click [Create Model] – [QuantityKind] to create QuantityKinds.
Create Quantity Kinds

Create QuantityKinds named “Acceleration”, “Distance”, “Mass”, “Power”, “Pressure”, “Velocity” and “Volume”.
QuantityKinds in the structure tree

section divider

So far, we have defined the ValueTypes, Units and QuantityKinds required to design the SUV. Now let’s define the fuel supply system of the PowerSubsystem with the following Block Definition Diagram.

SysML Block Definition Diagram Sample

Download Sample file

Create an HSUV Block

Right-click on the project root in the structure tree and select [Create Model] – [Block] to create a new block, then name it “HSUV”.
Create HSUV Block Models

Create a new Block Definition Diagram under [HSUV] block

Now right-click on the [HSUV] block in the tree, go to [Create Diagram] – [Block Definition Diagram] and name it “PowerSubsystem Fuel Flow Definition”.
Create New Block Definition Diagram

Create Blocks first, then define details

Click the “Block” button in the tool palette, then click on the blank diagram.
Block button in the tool palette

Create four Blocks: “FuelFlow”, “FuelTankAssembly”, “InternalCombustionEngine”, and “PowerSubsystem”.

Tip: You can also double-click on the BDD to create new Blocks.

Add a Stereotype to the FuelFlow Block

Add a “flowSpecification” stereotype to the FuelFlow block. You can add stereotypes in the Property View of the FuelFlow block.

Create a new Package and Value Type

Now create an “HSUVStructure” package in the tree and add a “Fuel” ValueType. Then drag this ValueType onto the “PowerSubsystem Fuel Flow Definition” BDD.

Create Associations between Blocks

You can create associations between SysML blocks by choosing a type of association line from the tool palette.
Create Association Type

In this case, choose Composition (black diamond) with an arrow, click the “PowerSubsystem” block, then “FuelTankAssembly”. Create another one from the “PowerSubsystem” block to “InternalCombustionEngine”.

Set Association End Name

Set association end names for the association lines. First, select the line between “FuelTankAssembly” and “PowerSubsystem”, open the [Association End A] tab, and set its name to “ft”. Then set “ice” for the line to “InternalCombustionEngine”.

Add FlowProperties

To add FlowProperties to Blocks, you first need to show the FlowProperty compartment in the SysML block. Right-click the “FuelTankAssembly” block and select [Compartment Visibility] -> [Flow Property].
Flow Property Compartment

The Flow Property compartment is now shown in the Block. Hover the mouse over the compartment: a blue plus icon appears. Click it to add a new Flow Property to the block.
Add models by using Draw Suggest Feature

  1. Add a “fuelSupply” flow property to the “FuelTankAssembly” block. Set “Fuel” as its type and “in” as its direction.
  1. Add a “fuelReturn” flow property to the same Block, with “Fuel” as its type and “out” as its direction.

Add the rest of the value properties in the same way.
Add Value Properties

section divider

Add Ports

Now add Ports to the Blocks. Select [Port] from the tool palette and click the “FuelTankAssembly” block.

Add Ports

A Port appears on the block. To set its details, go to the bottom-left pane and set the port name to “FuelTankFitting”. Choose “FuelFlow” as its type from the dropdown list. Arrows appear in the box, showing the flow properties of the FuelFlow block. Then check the “isConjugated” box.

Create another Port on “InternalCombustionEngine” with “ICEFuelFitting” as its name and “FuelFlow” as its type.

Adding ValueTypes in a Different Way

Let’s add ValueTypes in another way. Right-click the “Automotive Value Types” package in the structure tree, select [Create Model] – [ValueType] from the pop-up menu, and rename it to “Temp”.
Add Value Types

Create a “Press” value type in the same way. Then select the “Fuel” ValueType on the diagram and select the “Attribute” tab in the Property View. Click the “Add” button, enter the name “temperature” and change the type to “Temp”. Similarly, add another attribute, enter “pressure” as its name and select “Press” as its type.

Now it’s done!