News
Introduction to Code-Aster. Explanation of graphical interface and basic command
In our previous tutorial on how to perform a study with heat transfer in OpenFOAM, we have already talked about the SALOME-MECA software, very useful for meshing geometric bodies for later simulations. This software also has a powerful FEM module called Code-Aster, developed by the French company Électricité de France. The Code-Aster module allows solving multiple finite element problems such as mechanical, thermal, vibration, acoustic analysis …
In this tutorial we will explain the basic “workflow” to follow to carry out a simulation, briefly explaining the program’s interface, as well as the main commands.
Índice de contenidos
Main interface.
The graphical interface is divided into different areas. On the far left we can see three tabs called “History view”, “Case view” and “Results”. We will start by commenting on the second, “Case view”, which can be considered the main interface or the simulation definition interface, shown below.
In the upper area we find the toolbars and some shortcuts to different basic options of the program. Below this, we find the toolbars with the different commands that will define our simulation. As can be seen, each of these bars is conveniently identified with the name of the specific step to be followed within the simulation “workflow” (“Mesh”, “Model definition”, “Material” …). Furthermore, they appear in the logical order to follow when defining a simulation, from left to right.
In the central area we have the visualization screen, where we will observe the mesh that we are going to simulate, accompanied by the corresponding toolbar with the different visualization options that these types of programs have.
In the left area we find three different blocks. The first corresponds to the working tree with the different commands that we have specified, grouped by folders with the same name as the toolbars in the upper area (“Mesh”, “Model definition”, “Material” …).
The second block shows the input / output files of the group that we have selected in the first block. For example, in the case of the image, when the “Mesh” block is selected, the mesh file that we have loaded for this project is shown.
The third block shows the code version of all the commands that we have entered in the group that we have selected. It should be noted that the Code-Aster software did not initially have a graphical interface and the simulation definition had to be done exclusively through the use of code. The graphical interface is responsible for generating this code in a much more user-friendly way. In fact, at any time it is possible to switch between the graphic version and the code version by right-clicking on any group in the first block and selecting the “Text mode” context menu option.
Finally, in the right area of the interface, all the options and configurations will be shown to correctly define the commands that we are going to introduce.
Basic workflow.
Once the program’s graphical interface has been understood, the procedure to follow to define a simulation is always the same.
1. Select from the upper command toolbar the command that we are going to configure. This will be added to the tree in the left area.
2. Double click on the added command in the tree in the left area. In this way, the command configuration area in the right area will open.
3. Command configuration in the right area, adding as many options as necessary. To finish, click on “Apply” and “OK”.
4. Confirm in the lower block of the left area that the configured commands have been correctly entered in text format.
Main commands.
In this section we are going to comment on the main and most basic commands within the groups in the upper area. It should be noted that, being a program developed by a French company, the original name of each command is in that language.
- “Mesh”. Here we find several basic options to obtain a mesh. The most common way to start is to read the mesh that we have previously created in the SALOME mesh module. For that, the command “LIRE_MAILLAGE” must be used. With this command we can also select a mesh from an external file, indicating its location.
- “Model definition”. In this group we will find the commands to define the global simulation model. That is, if it is going to be a mechanical, acoustic, thermal simulation, if the model is going to be 3D or 2D, etc. The most common thing here, for the most basic simulations, is to use the AFFE_MODELE command.
- “Material”. We will define here the material or materials to be used in the simulation, specifying in each one of them how many properties we consider appropriate. The two basic commands to be known are DEFI_MATERIAU and AFFE_MATERIAU, with which we will define the material and assign it to an area of the geometric model, respectively.
- “Functions and lists”. This group allows creating lists of values that can later be used in the analyses to be carried out, for example, in carrying out a frequency response analysis, we can define a list of integers with the frequencies at which we want the calculations to be made. To create a list of integers, which is the simplest, use the DEFI_LIST_REEL command.
- “BC and Load”. In this set, the commands related to the definition of the boundary conditions of our geometric model and the application of loads are grouped. Its main command, if we are doing a mechanical simulation, is AFFE_CHAR_MECA.
- “Pre-Analysis”. It includes commands necessary to create mathematical elements to solve the main analysis. The most common command to use here is ASSEMBLAGE, used to create mass, stiffness, and damping matrices for acoustic or vibration problems.
- “Analysis”. The main analysis of the simulation is defined (static, dynamic, linear, non-linear …). To perform a simple mechanical linear simulation, use MECA_STATIQUE.
- “Post processing”. The main analysis will only perform the basic calculations for that analysis. If we want to obtain results derived from the main ones, and the program can calculate them, we must specify them using one of the commands in this group. For example, if we want to calculate some structural criteria, like that of Von Mises, we must use the CALC_CHAMP command.
- “Fracture and Fatigue”. Commands used to perform fracture and fatigue calculations. The main command is CALC_FATIGUE.
- “Output”. Finally, the commands related to obtaining the final results of the analyses are grouped here. We must specify the output format, location, etc. The main command in this case is IMPR_RESU.
So far the introductory tutorial to the graphical interface and the main Code-Aster commands. In future tutorials we will explain how to configure the main commands presented to perform a simple linear structural simulation.