tutorials:sesamx-step-by-step-guide

# SesamX input file step by step guide

This tutorial showcases how to write consistent SesamX input files from a beginner point of view. Together, we will write a complete input file setting up a simple shell model, and running a linear static resolution under a membrane solicitation. Along the way we will also discuss some Sesamx basic features (data persistence, units management, …).

The model studied is made of 6 nodes and 2 quad shell elements. The material applied is linear elastic.

You can find all the relevant data related to this tutorial at the end of this page.

First, let's talk about writing proper SesamX input file.

The major SesamX design philosophy is to follow an object paradigm. A SesamX model is made of objects (loads, constraints, solutions, …) that you can manipulate. you can think of these objects as data containers. You 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
MODEL: MY_MODEL
CONCENTRATED
FORCE: 10000.,0.,0.
MOMENT: 0.,0.,0.
# 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.

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

SesamX handles units natively. You do not need to feed consistent data. A partial recap of the default units used is provided below.

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

Of course, you are free to define your own units. To make things easier, SesamX always outputs a summary of the units used while running an input file.

First of all, a database file must be created. This file will then contain all the data about the model we are about to create (the mesh, the loads, the solutions and so on). To define a database we simply need to use the USE-DATABASE function:

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

During this tutorial, we are only going to manipulate this database through SesamX. However, you can notice that the database file format is HDF5. It is a open format which allows you to manipulate the model data independently of SesamX (with a custom script for instance).

The next step is to create a model, using the following cards:

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

You need to provide the type of model you want to create (here FEM) and whether you want to erase it if it already exists.

You can create multiple models in the same SesamX database, each with a different name.

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 a .med file.

A selection is composed of nodes and elements. Here we are defining 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
NODES-LIST
IDS: 5,6

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

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.

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-PROPERTIESwe can define multiple materials and properties at once. 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.

In this example we are assigning a $10000 N$ nodal force along the $x$ direction on the nodes 5 and 6 belonging to the selection LOAD_SELE. We use the CREATE-LOAD function.

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

And we are clamping the nodes 1 and 4 belonging to the selection BOUND_SELE. We use the CREATE-CONSTRAINT function.

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.

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
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-TOLand SPC-R-TOL are the stiffness tolerances used for this singularity detection.

Be careful, only local singularities can be fixed automatically but not global ones!

This function will result in the creation of a solution object that contains the displacements at the nodes. This solution object is then the entry point to the post-processing.

## Post process the results

Visualization of data is performed through the OUTPUT-IMAGE function, 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_TRANSin the image file) and the stress field (named MY_STRESSin the image file) from the solution MY_SOL.

The output file format is also HDF5.

You can refer to the documentation in order to submit this input file, and visualize the results. You should visualize the following model and deformation.

From now on, you should feel comfortable reading the SesamX user manual to strengthen your skills. You can also consult our other tutorials.

• tutorials/sesamx-step-by-step-guide.txt