SesamX step by step getting started guide

Discover what are the main steps to set up a SesamX model, run a static simulation and output some results.

This article discusses how to set up a SesamX model. Following a simple shell example from input cards definition to output visualization, I will introduce the main mechanisms used by SesamX:

  • how to write an input card,

  • how SesamX works with units,

  • how SesamX stores data,

  • how to create the mesh and the selections,

  • how to create materials and properties on elements,

  • how to create loads and boundary conditions,

  • how to run a linear static resolution,

  • and finally, how to visualize the displacement.

You will find the complete data cards used to run this example in the conclusion as well as a finer model made of thousands of elements. Together, let’s open SesamX!

A simple example

We will study the following shell model, subjected to a membrane solicitation.

Shell simple finite element model

It is made of 6 nodes and 2 linear quad elements. The material applied is linear elastic. We will go through each step necessary to set up this model and solve it with a linear static resolution.

Data cards philosophy

The major SesamX design philosophy is to follow an object paradigm. A SesamX
model is made of objects (loads, constraints, solutions, …) that the
user manipulates. These objects may be seen as data containers. The user can operate on these containers through functions. Eventually, an input file is made of function calls following one another.

Under a function, the data is organized as a tree as can be seen from the following example :

CREATE-LOAD  
  NAME: MY_LOAD  
  MODEL: MY_MODEL
  CONCENTRATED  
    FORCE: 10000.,0.,0.  
    MOMENT: 0.,0.,0.
    ON-NODES-FROM: LOAD_SELE
  # This is a comment line

This card is essentially a CREATE-LOAD function. As its name states, it creates a load named MY_LOAD which belongs to the model MY_MODEL. To do so, it assigns a concentrated force vector on each node of the selection LOAD_SELE. We define some basic vocabulary:

  • CREATE-LOAD is a function. A function is always found at the root level of the input file. A function cannot be nested into another function.

  • CONCENTRATED is a branch. A branch is always found under a function or under another branch and may not be unique. It details how the function must behave.

  • Finally NAME: MY_LOAD is a keyword with an assigned value. A keyword may be found under a branch or directly under a function.

There is no order to observe in the data cards as long as the hierarchy of functions, branches and keywords is respected. However, the input file is sensitive to indentation (space indent). In fact through the indentation, SesamX knows how the data is structured. This may appear as a limitation first but it keeps the input file clean and easy to read by a human as well as efficient to read and write by a program.

You can add comment lines to your input file. A comment line must start with a #, as shown in the previous example.

Eventually, while downloading SesamX you will find into the package a Notepad++ user language cleverly highlighting the SesamX input file.

Units

Unlike most finite element software, SesamX handles units natively. You do not need to feed consistent data. A summary of the units used to decode the data cards is provided at the beginning of the output file. To make things easier to follow, I recall here the default units used:

Physical quantity Unit
Length m
Thickness mm
Translation mm
Rotation °
Modulus GPa
Density Kg/m3
Stress MPa
Strain %
Translational stiffness N/m
Rotational stiffness Nm/rad
Force N
Moment Nm

Database definition

First of all, a database file must be defined. To define a database you simply need to give SesamX a file path as follow:

USE-DATABASE
  PATH="E:\SesamX\batch\sesamx_db.h5"

This database will carry every data related to the model: the mesh, the loads, the solutions and so on.

You can notice that the database file format is HDF5. It is a strong SesamX choice to go for an open database file format that makes it easier for everyone to interact with the model through HDF5 editor or the HDF5 library (for use in personal code). I invite you to check the content of this database later on when you have executed your first data cards.

Model definition

A SesamX database can contain multiple models. The first step is to create a new one.

CREATE-MODEL  
  NAME: MY_MODEL
  NEW  
    TYPE: FEM  
    OVERRIDE: TRUE

You need to provide the type of model you want to create and weather you want to erase it if it already exists or not. Currently we can only create FEM model, this keyword is a provision for future evolutions.

Mesh definition

Next come the mesh definition.

CREATE-SUBMESH  
  MODEL: MY_MODEL
  NODES
    - ID: 1  POINT: 0.,0.,0.
    - ID: 2  POINT: 100.,0.,0.
    - ID: 3  POINT: 100.,100.,0.
    - ID: 4  POINT: 0.,100.,0.
    - ID: 5  POINT: 200.,0.,0.
    - ID: 6  POINT: 200.,100.,0.

  ELEMENTS  
    SHAPE: QD4
    - ID: 1  NODES: 1,2,3,4
    - ID: 2  NODES: 2,5,6,3

A mesh is defined with multiple sub-meshes. Here we create one sub-mesh on the model MY_MODEL. Nodes and elements are provided through a listing of coordinates and connectivities. An alternative syntax allows to import an Abaqus mesh or .med file (have a look at the conclusion to find this second example).

Selection definition

So far, a selection is composed of nodes and elements. We are defining here 3 selections:

  • ALL_SELE with all the nodes and elements of the model,

  • LOAD_SELE with the nodes on which we will apply the loading,

  • BOUND_SELE with the nodes on which we will apply the boundary condition.

CREATE-SELECTION  
  MODEL: MY_MODEL  
  NAME: ALL_SELE
  NODES-LIST
    IDS: 1,2,3,4,5,6
  ELEMENTS-LIST
    IDS: 1,2

CREATE-SELECTION  
  MODEL: MY_MODEL  
  NAME: LOAD_SELE 
  NODES-LIST
    IDS: 5,6

CREATE-SELECTION   
  MODEL: MY_MODEL  
  NAME: BOUND_SELE
  NODES-LIST
    IDS: 1,4

Material and elements property

To define a linear isotropic material we need the Young’s modulus and the Poisson’s ratio. We also provide the density to complete the material definition, even though it is useless for a static resolution.

CREATE-MATERIALS  
  MODEL: MY_MODEL
  ISOTROPIC  
    NAME: MY_MAT
    E: 200.  
    NU: 0.33  
    DENSITY: 1.0E5

To define the shell property only the thickness of the element is needed.

CREATE-PROPERTIES 
  MODEL: MY_MODEL
  SHELL-STANDARD 
    BEHAVIOR: LINEAR  
    NAME: PROP1
    TH: 1.0  
    MATERIAL: MY_MAT
    ON-ELEMENTS-FROM: ALL_SELE

Unlike previous functions, with CREATE-MATERIALS and CREATE-PROPERTIES we can define multiple materials and properties at once. There is nothing particular about the material definition. However, you can notice how to specify the elements on which to apply the property. ON-ELEMENTS-FROM: ALL_SELE means we want to select the elements from the selection ALL_SELE.

Load and constraint definition

In this example we are assigning a \( 10000 N \) nodal force along the \( x \) direction on the nodes number 5 and 6 belonging to the selection LOAD_SELE.

CREATE-LOAD  
  NAME: MY_LOAD  
  MODEL: MY_MODEL
  CONCENTRATED  
    FORCE: 10000.,0.,0.  
    MOMENT: 0.,0.,0.
    ON-NODES-FROM: LOAD_SELE

And we are clamping the nodes number 1 and 4 belonging to the selection BOUND_SELE.

CREATE-CONSTRAINT  
  MODEL: MY_MODEL  
  NAME: MY_CONST
  DISPLACEMENT-SPC
    TX: 0.  
    TY: 0.  
    TZ: 0.  
    RX: 0.  
    RY: 0.  
    RZ: 0.
    ON-NODES-FROM: BOUND_SELE

You can define multiple loads and constraints in your model as long as you provide a distinct name for each.

Static resolution

At this point, we have completed the model definition and we have defined all the physical data necessary to run a static resolution. Which we can do with the following card.

SOLVE-LINEAR-STATIC  
  NAME: MY_SOL  
  MODEL: MY_MODEL
  LOAD: MY_LOAD  
  CONSTRAINT: MY_CONST
  PARAMETERS  
    SPC-T-TOL: 1.0E-8  
    SPC-R-TOL: 1.0E-8

We have to provide the load case and the boundary condition as well as parameters useful for the resolution. By default, SOLVE-LINEAR-STATIC will look for singularities among the degrees of freedom, and fix them in order to solve the problem. The 2 parameters SPC-T-TOL and SPC-R-TOL are the stiffness tolerances used for this singularity detection.

WARNING: Be careful, only local singularities are fixed but not global ones!

SesamX tries to use at most parallelization for heavy computational tasks. And this the case during this resolution (stiffness computation and system inversion).

This solve function creates a solution object that contains the displacement vector of the resolution. This solution object is the entry point to the post-processing.

Post-processing

Visualization of data is performed through the function OUTPUT-IMAGE, in which we specify the information needed. The path to the generated image file as well as the name of the model is required. Then we have to select on which SesamX object we want to output some data, and finally what kind of data is desired.

Let’s take the following example:

OUTPUT-IMAGE  
  PATH: "E:\SesamX\batch\output_img.h5" 
  MODEL: MY_MODEL
  
  SOLUTION
    NAME: MY_SOL
    TRANSLATION
      FIELD-NAME: MY_TRANS
    STRESS
      FIELD-NAME: MY_STRESS

Here we ask SesamX to produce an image file containing the translation field (named MY_TRANS in the image file) and the stress field (named MY_STRESS in the image file) from the solution MY_SOL.

The output file format is also HDF5. You can work on it using you own custom scripts, or using the SesamX Viewer customization embedded into the Salome version bundled in the SesamX installation package.

For instance, you should observe the following nodal translations.

Undeformed mesh
Undeformed mesh

Deformed mesh
Deformed mesh

Output file

Each SesamX run generates an output file. It contains useful information about what SesamX understood from your data cards and what was done. Do not forget to check it after each run to spot if errors or warning were raised.

Conclusion

Without going too deep into the details, this introduction to SesamX gives a nice overview of what are SesamX main features. Following this link, you find the example model data cards. To conclude, you can find a bigger model made of 19000 elements, and how it reads the mesh from an Abaqus input file.

Fine deformed mesh

I hope you had a pleasant read. We apologize for bugs you may encounter using SesamX, it is still in an early development stage. Do not hesitate to contact us for more information or simply to discuss finite elements!


Did you like this content?

Register to our newsletter and get notified of new articles