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.
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.
Type of simulation
A new window will pop up and we must now choose the type of model that we want to create. For most cases and for this test, “Generic IMPETUS Project” is the most suitable alternative. We can also name our project and set the desired location. For this tutorial, we will name it: ProjectFun. We will also have the possibility to a add new or existing analysis, or to start with an empty project. In this case, we choose 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. Lets just proceed with the default values and click OK.
The final step is to define a unit system, termination time, output frequency, and contact defintion. Let’s use 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.
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, we have a command file named
main.k. By selecting an element from the tree, the most relevant information will be shown in the 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.
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:
*PARAMETER tend = 0.01 , "Termination time" num_imp = 100 , "Number of .imp files" num_ascii = 1000 , "Number of .out time steps" num_db = 0 , "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" *UNIT_SYSTEM SI *TIME [%tend] *OUTPUT [%tend/%num_imp], [%tend/%num_ascii], [%tend/%num_db] , , , , [%nres] # # --- MESH --- # *COMPONENT_SPHERE "Sphere" 1, 1, 4 [-%R], 0, 0, [%R] *COMPONENT_BOX "Stick" 2, 2, 1, 1, 20 0, [-%w/2], 0, [%w], [%w/2], [%L] *CHANGE_P-ORDER ALL, 0, 3 *SMOOTH_MESH ALL, 0, 45 # # --- MATERIAL --- # *MAT_MOONEY_RIVLIN 1, 1500.0, 1.0e8 1.0e5, 1.0e5, 1.0e2 *MAT_RIGID 2, 7800.0 # # --- PART --- # *PART "Sphere" 1, 1 "Stick" 2, 2 # # --- INITIAL CONDITION --- # *INITIAL_VELOCITY P, 1, [%v0] # # --- CONTACT --- # *CONTACT "Universal contact" 1 ALL, 0, ALL, 0 *END
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.
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).
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.
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.