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).
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:
If you aren’t interested in any other diagram types that Astah System Safety has, go with Astah SysML.
2. Then you will be taken to the Download page – click [Download] for Astah SysML.
Once you complete the installation of Astah, launch Astah.
When you start Astah SysML for the first time, you may get this blank screen.
Click the top-left icon to create a new project.
Then the left pane will open:
The newly created project includes pre-installed models in a package as shown below.
Astah SysML consists of five sections:
The appearance in Astah System Safety is a bit different. If you are using Astah System Safety, please read here.
The sample project you will be creating is to demonstrate the requirements, design and analysis of a hybrid SUV vehicle using SysML. Sample diagrams are from SysML 1.5 specification.
Let’s start drawing a SysML Block Definition Diagram now.
Let’s create the following Block Definition Diagram.
This is a part of “Values And Units” diagram from “Sample.axmz” that is included in the Astah Installation folder.
Or you could create one from the context menu in the tree view.
Once a diagram is created, you will see a tool palette on the diagram editor.
You will be creating objects by choosing ones from this palette.
Let’s name this diagram as “Modeling Domain”.
Select a [Package] from a tool palette and click on a diagram.
Then a package is created. Rename it as “Automotive Value Types”.
Now you want to create Value Types within this package.
Select “Value Type” from the tool palette and click inside the package and name it as “Accel”.
Once it’s done, create 5 more Value Types (“Real”, “Horsepwr”, “Vel”, “TM” and “Dist”).
Now color the objects and align them for a better-looking diagram.
To change the object color, simply select objects and choose the color from the color palette.
To align objects, you can use [Alignment] menu or just move around the objects and place them as the auto-layout assist lines suggest.
Create Generalizations between the ValueTypes.
You can choose the “Generalization” from the tool palette and click both ValueTypes to connect.
Or, you could select the “Generalization” from the mini icon (it is called “Suggest Feature”) and directly click to the other end.
You can decide what property information to show inside in the ValueType Objects such as “Operation”, “Property”, and “Value Type”. In order to change the visibility within the ValueType Objects, right-click on the ValueType and select the property you want to add from [Compartment Visibility].
This can be also done from Diagram’s [Initial Visibility] tab.
1. Click on a diagram
2. Go to the diagram’s property view (the left-bottom pane)
3. Select [Initial Visibility] tab, and tick the boxes of the property you want to show in the diagram and click [Apply to existing elements] button.
Before creating Units, let’s create another package “Automotive Units” first.
Then create “Units” inside the package. You can find “Unit” from the dropdown menu as below .
Create “g”, “mph”, “ft”, “hp” and “sec” Units just like how you created the ValueTypes earlier.
Right-click on “Automotive Value Types” package in the tree view and click [Create Model] – [QuantityKind] to create QuantityKinds.
Create ones and name them as “Acceleration”, “Distance”, “Mass”, “Power”, “Pressure”, “Velocity”, “Volume”.
So far, we have defined the ValueTypes, Units and QuantityTypes that are required to design SUV vehicles.
Now let’s define the fuel supply system of PowerSubSystem for SUVs with the following Block Definition Diagram.
Right-click on the project root in the structure tree and select [Create Model] – [Block] to create a new block, then name it as “HSUV”.
Now right-click on the [HSUV] block in the tree, go to [Create Diagram] – [Block Definition Diagram] and name it as “PowerSubsystem Fuel Flow Definition”.
Click “Block” button in the tool palette and click on the blank diagram.
Create 4 Blocks – “FuelFlow”, “FuelTankAssembly”, “InternalCombustionEngine”, and “PowerSubsystem”.
※ You can actually double-click on the BDD to create new Blocks.
Add a “flowSpecification” stereotype to a FuelFlow block.
You can add Stereotypes from the property view of the FuelFlow block.
Now create a “HSUVStructure” package in the tree and add “Fuel” ValueType.
Then drag this ValueType to the “PowerSubsystem Fuel Flow Definition” BDD.
You can create associations between SysML blocks by choosing a type of association line from the tool palette.
In this case, choose the Composition (black diamond) with an arrow and
click “PowerSubsystem” block, then “FuelTankAssembly”.
Create another from “PowerSubsystem” block to “InternalCombustionEngine”.
Set Association Name for association lines.
First, you pick the line between “FuelTankAssembly” and “PowerSystem”, open [Association End A] tab and set its name as “ft”. And set “ice” for the one with “InternalCombustionEngine”.
In order to add FlowProperties to Blocks, you first need to add FlowProperty compartment within a SysML block.
Right-click on a “FuelTankAssembly” block and select [Compartment Visibility] -> [Flow Property].
Now Flow property compartment is added within a Block. Place a mouse over the compartment.
A blue plus icon appears. By clicking this icon, you can add a new Flow Property to this block.
1. Add “fuelSupply” flow property to “FuelTrankAssembly” block, Set “Fuel” as its type and specify “in” as its direction.
2. Add “fuelReturn” flow property to the same Block with “Fuel” type and “out” direction.
Add the rest of the value properties in the same way.
Now let’s add Ports to Blocks.
Simply select [Port] from the tool palette, and click “FuelTankAssembly” block.
Now a Port appears on the block, let’s set the details.
To do so, go to the left-bottom pane and set the port name as “FuelTankFitting”.
Choose its type “FuelFlow” from the pulldown list. Now arrows appear within the box – it expresses the specified flow property of FuelFlow block. Now tick the “isConjugated” box.
Create another Port to “InternalCombustionEngine” with “ICEFuelFitting” as name and “FuelFlow” as its type.
Let’s try adding ValueTypes in another way.
Right-click on the “Automotive Value Types” package in the structure tree, select [Create Model] – [ValueType] from the pop-up menu, and rename it to “Temp”.
Create a “Press” value type in the same way.
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!