How to setup a simulation using “Project” – Part 1

Back to blog

Simulation using “Project”

In this tutorial, we will guide you on how to setup your first simulation model. There are several ways to create a model, but we will in this guide use the “Project” feature in IMPETUS Afea Solver GUI.

(Updated 20 April 2023)

Understanding the concept

Before we begin, it is important to understand the procedure and how everything is built-up. We recommend all users to read our cookbook document, which describes everything in detail. The document can be found in the link below (can also be found in our support page). This guide will focus solely on the practical side on how to use the software.

User cookbook

Creating a new project

The first thing we see after starting the software, is the Welcome screen. To create a new project, we can click on the “New project” button from the ribbon bar at the top left corner.

New project
Creating a new project

We can now name our project and select the desired location. For this tutorial, we will name it: ProjectFun. It is preselected to create a folder with the project name. We press “OK” to continue.

Assigning project name and location

New analysis

The next screen requires us to create an analysis. The concept of analysis is that a project can handle multiple analyses. For example, analyses can be different variations of a model with different parameters. It can also be used for simulations which require multiple steps, or different models entirely. There are built in templates to choose from here. For most cases and for this non specific model that we will create, “Generic analysis” is the most suitable alternative.

The next step is to define a unit system, termination time, output frequency, and contact defintion. Let’s proceed with the default values here. These values can be changed later on in the command file so it’s not very important to get it correct right now. We let the analysis name be called “run 1” and click “OK” to continue.

Choosing type of simulation

Project view

Project overview

An overview of the project can be found on the left side of the screen. In our example, the project (ProjectFun) consists of one analysis (run1). In run1, we have a command file named main.k. By selecting a branch from the tree, the most relevant information will be shown in the main window.

Main window

If we select the command file main.k, the main window will show an editor with the content of the file. The main window can also show properties for the project itself, or the analysis.

Project view consists of the project overview panel (left) and the main window (right). The content of the main window will depend on the selection from the project tree

Create a simple command file

As stated in the beginning of this tutorial, it will not explain what the different commands are doing. The focus is on the workflow. Lets start by selecting the command file main.k from the project tree under the analysis run1 and add some typical commands and comments:

tend      = 0.01 , "Termination time"
num_imp   = 100  , "Number of .imp files"
num_ascii = 1000 , "Number of .out time steps"
num_db    = 1    , "Number of database and state files"
nres      = 2    , "Number of cyclic alternating files"
R         = 0.02 , "Sphere radius"
L         = 0.2  , "Stick length"
w         = 0.01 , "Stick width"
v0        = 20   , "Impact velocity"
[%tend/%num_imp],  [%tend/%num_ascii],  [%tend/%num_db]
,  ,  ,  ,  [%nres]
# --- MESH ---
1, 1,  4
[-%R], 0, 0,  [%R]
2, 2,  1, 1, 20
0, [-%w/2], 0,  [%w], [%w/2], [%L]
ALL, 0, 3
ALL, 0, 45
# --- MATERIAL ---
1, 1500.0, 1.0e8
1.0e5, 1.0e5, 1.0e2
2, 7800.0
# --- PART ---
1, 1
2, 2
P, 1, [%v0]
# --- CONTACT ---
"Universal contact"
ALL, 0, ALL, 0

Start the simulation

The command file is now in place and we are ready to start the simulation. Simulations can be started by clicking on the “Start simulation” button from the ribbon menu.

Start simulation button

A new dialog window will open up where we can decide on how to start the simulation (e.g. choose compute node and set GPU options).

Start new simulation dialog window

Simulation in progress

We can post process results as soon as we have the first output files, or we can wait for the simulation to finish. The “Post process” button can be found from the ribbon menu.

Simulation finished


This concludes the tutorial on how to setup a simple simulation model. We hope this has been useful and we will add more in-depth tutorials in the near future. Part 2 of the tutorial can be found here.

What did we simulate? Check the video below.

Share this: