Contrib:KeesWouters/stress 2D3D

From CAELinuxWiki
Jump to: navigation, search

The extraction of stresses for an assembly of solids and shells

[For Code Aster 10 see remark at the end of this contribution.]

To start with, this contribution mainly focuses on the use of Salome and Code Aster, not on the results and the mechanical justifications of the code that has been used. So no guarantee that the results will be correct up to the fifth decimal place, which they are not. I do hope though that this information is useful. For me it has been, because I had to think about some commands and look through the documentation and learn from that. In case of mistakes, errors or remarks, please notify me, or better, you are invited to correct or edit them yourself. Enjoy.

The geometry, mesh and astk files

The geometry, mesh and command files are entirely based on the solid connecting between the shell and volumes elements described here [1].

The geometry is defined in a python script (for download see end of this contribution) and can be loaded into Salome Geometry module by File --> Load script (or ctrl T in the object browser window). Right click Refresh or push F5 after loading if necessary.

Kw overview geom.jpg

The command file is split in two sections: the first part is the main calculation part and the second part is the retrieval of the stresses in the shell and volume elements. Therefore the first part consists of


and the second part contains


which makes it much faster to change parts in the latter command file. The output of the first calculation is used in the retrieval of the stresses, so the ASTK file is slightly different:

Kw astk stress.png

Note that constr7.base is now read (D) in stead of write (R).

The corresponding part of the export files:
main calculation

F mail <path>/ D 20
F comm <path>/sigma7_start.comm D 1
F erre <path>/constr7.err R 9
F mess <path>/constr7.mess R 6
F resu <path>/ R 8
R base <path>/constr7.base R 0

extraction of the stresses

R base <path>/constr7.base D 0
F comm <path>/sigmaxx7.comm D 1
F erre <path>/constr7.err R 9
F mess <path>/constr7mess R 6
F resu <path>/ R 8
F mmed <path>/ R 21
F mast <path>/table7.txt R 26

The last line is to write some displacement at the top of the shell to a file.

The determination of the stresses

The main calculation - first part

To recall, in the first command file the last command that generates the result COQres is:


The extraction of the stresses - general

In the second part the displacements, the main stresses and the equivalent stresses are determined. The equivalent stresses are: von Mises, Tresca, principle stresses I1, I2 and I3, (signed) von Mises SG and TRSIG. The main stresses are Sxx, Syy, Szz, Sxy, Sxz and Syz in the local coordinate system. For volume elements this is the global coordinate system. For shell elements this is determined by the key word ANGLE or VECTEUR in the AFFE_CARA_ELEM command.

By default the local x axis coincides with the global x axis but this can (and sometimes needs to) be changed. In this example, the global x axis coincides with the normal vector of the shell, so it needs to be changed. The command VECTEUR=(0,1,0)*) changes the global y axis (vector [0,1,0]) to the local x axis. Instead of VECTEUR, ANGL_REP can be used).

-*) Note that the projection of VECTEUR on the shell defines the local x axis. The local z axis is the normal of the shell plane. Then the local y axis is also defined.
In this case of the shell we have: the bending stresses in the shell is Syy. For the block element the bending stress is Szz. Because of the shell theory Szz of the shell is zero.

global  local
  x       z   (defined by the normal of the shell)
  y       x   (defined by projection of VECTEUR=[0,1,0])
  z       y   (orthonormal to local x and z)

And the command to define the shell:


The extraction of the stresses - commands

The second part of the command file in detail is:

# 1) 
             REPE_COQUE=_F(NIVE_COUCHE='SUP',),#this determines layer of EQUIvalent stresses 'EQUI_ELNO_SIGM'
             OPTION=('SIGM_ELNO_DEPL',),       #includes data for 'DEPL' and 'SIGM_NOEU_DEPL'
# 2) 
# 3)
# 4)

# 5)
# 6)
# 7)
# 8)
IMPR_RESU(UNITE=21,  # [should be replaced by default UNITE=80, also in ASTK]

Command overview:

  • Command #1) is sufficient to determine the displacement of the the structure.
  • Commands #2,3,4) determine the equivalent and element stresses in the three layers of the shell: INF, MOY and SUP [(inferieur, moyen and superieur), inside, centre and outside), direction depending on the normal direction of the shell).
  • Commands #5,6,7) translate these stresses to the nodal points suitable for writing to a med file. The option 'SIGM_NOEU_DEPL' determines the standard stresses (Sij); the option 'EQUI_NOEU_SIGM' determines the equivalent stresses (von Mises, etc).
  • Command #8) writes the displacements and stresses to the file. The standard and equivalent stresses at the three different layers (INF, MOY and SUP), in total six stress fields with each six components.

Displacement and stresses:

  • The option 'SIGM_ELNO_DEPL' in commands 1-4) is needed for the displacements 'DEPL' and 'SIGM_NOEU_DEPL' (standard stresses) in the commands 5-8.
  • The option 'EQUI_ELNO_SIGM' in commands 1-4) is needed for the 'EQUI_NOEU_SIGM' (equivalent stresses) in the commands 5-8.


  • The standard stresses SIGM Sij are determined by the corresponding stress field COQresI, COQresM and COQresP in the local coordinate system.
  • The equivalent stresses EQUI Sequi appear to be determined by the command number 1). The command REPE_COQUE=_F(NIVE_COUCHE='SUP',), determines the layer of this field. Strange! (In case of pure bending like this example both INF and SUP layers show the same equivalent stresses. The layer MOY is basically without stress.)
  • The field SIGMA_ELNO_COQU might be used here, but I did not try (normally this means I do not know how to apply it, or it does not work as I expected it to do, ...).
  • Apparently the shell mesh with 7 node (TRIA7) poses no problem to correctly show the results in Salome. There is no need to project the fields to a 6 node mesh [....].

The pictures

Kw syy shell block 600.jpg

stresses Syy for the shell and Szz for the block

Kw stress vmises 600.jpg

stresses and displacements
left and centre model - von Mises stresses for inner and outer layer of the shell (identical). The maximum von Mises stresses (corresponding to Szz) at the bottom of the block are roughly 70 MPa.
right model: x displacements

Kw sigmasyy 3layers 600.jpg

stresses Syy in shell inner, centre and outer layer

The stresses according to shell theory

The maximum momemt Mo in the shell is 2*Fo*Lo = 2*10*17 = 340 Nmm
The stresses varies linear along the thickness (1 mm) of the shell - maximum stress at the edge is Syyo
Mo = (b*Syyo*t^2)/6 - width b (8 mm) and the thickness t (1 mm) of the shell
--> Syyo = 6*Mo/(b*t^2) = 255 MPa

solid block
The maximum momemt Mbo in the block is 2*Fo*(Lo+Lb) = 2*10*(17+23) = 800 Nmm
--> Syybo = 3*Mo/(b*t^2) = 6*800/(8*3^2) ~ 67 MPa (thickness t is 3 mm)

This corresponds with the calculated results from Code Aster - neglecting local influences of the interaction region of the solid nodes between the shell and solid elements.

Download files

This zip contains the following files:

  • python geometry and mesh files (load in Salome by File --> Load script (cntrl T)) and right select refresh (F5) in the object browser). Export the mesh constr in the mesh module to for further processing by Code-Aster, controlled by ASTK.
  • command files:
  • sigma7_start.comm command files for Code-Aster, main calculation
  • sigmaxx7.comm command files for Code-Aster, extraction of stresses
  • astk files:
  • start7.astk start file, file control by ASTK, run this before
  • sigmaxx7.astk, extraction of stresses, file control by ASTK
  • table7.txt, text file with nodal displacements of nodes Nforce.

The result file after running start7.astk and sigmaxx7.astk, can be viewed in the post processor module of Salome by File --> Import --> or cntrl I in the object browser.

Note on Code Aster 10

Code Aster 10+ is stricter then CA9- with respect to the MODI_MAILLAGE keyword in CREA_MAILLAGE. In case no TRIA6 or QUAD8 elements are available in the mesh, change near line 10 in the command file sigma7_start.comm:


to, for QUAD8 mesh only:


or, for TRIA6 mesh only: