Difference between revisions of "Contrib:KeesWouters/stress 2D3D"

From CAELinuxWiki
Jump to: navigation, search
m (''Download files'')
m ('''The extraction of the stresses - general''')
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==''The extraction of stresses for an assembly of solids and shells''==
 
==''The extraction of stresses for an assembly of solids and shells''==
  
['''nearly finished yet ... might be usable though ... ''']
+
['''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
 
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
Line 53: Line 53:
 
==''The determination of the stresses''==
 
==''The determination of the stresses''==
 
==='''The main calculation - first part'''===
 
==='''The main calculation - first part'''===
To recall, the first command file the last command that generates the result ''COQres'' is:
+
To recall, in the first command file the last command that generates the result ''COQres'' is:
  
 
  COQres=MECA_STATIQUE(MODELE=COQmodel,
 
  COQres=MECA_STATIQUE(MODELE=COQmodel,
Line 63: Line 63:
 
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.  
 
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.  
  
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 need 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).
+
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.<br>
 
-*) 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.<br>
In this case we have for the shell: 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.
+
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
 
  global  local
Line 135: Line 135:
 
                 OPTION=('SIGM_NOEU_DEPL','EQUI_NOEU_SIGM',),);
 
                 OPTION=('SIGM_NOEU_DEPL','EQUI_NOEU_SIGM',),);
 
  # 8)
 
  # 8)
  IMPR_RESU(UNITE=21,
+
  IMPR_RESU(UNITE=21, # [should be replaced by default UNITE=80, also in ASTK]
 
           FORMAT='MED',
 
           FORMAT='MED',
 
           RESU=(_F(MAILLAGE=COQmesh,
 
           RESU=(_F(MAILLAGE=COQmesh,
Line 164: Line 164:
 
* The standard stresses SIGM Sij are determined by the corresponding stress field COQresI, COQresM and COQresP in the local coordinate system.
 
* 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 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, it does not work as expected, ...).
+
* 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 [....].
 
* 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 [....].
  
Line 211: Line 211:
  
  
'''Note on Code Aster 10:'''<br>
+
=='''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:
 
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:
  

Latest revision as of 17:48, 24 July 2010

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

DEBUT();
....
FIN();

and the second part contains

POURSUITE();
....
FIN();

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>/constr.med 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>/con7resu.med 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>/con7resu.med R 8
F mmed <path>/con7block.med 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:

COQres=MECA_STATIQUE(MODELE=COQmodel,
                     CHAM_MATER=material,
                     CARA_ELEM=shellch,
                     EXCIT=_F(CHARGE=bc_force,),);

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:

shellch=AFFE_CARA_ELEM(INFO=1,MODELE=COQmodel,
                      COQUE=_F(GROUP_MA=('shell',),
                               EPAIS=1.000,
                               VECTEUR=(0,1,0),),);
                               #ANGL_REP=(0,0,),),);

The extraction of the stresses - commands

The second part of the command file in detail is:

POURSUITE();
# 1) 
COQres=CALC_ELEM(reuse=COQres,
             MODELE=COQmodel,
             CHAM_MATER=material,
             RESULTAT=COQres,
             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'
             EXCIT=_F(CHARGE=bc_force,),);
# 2) 
COQresI=CALC_ELEM(MODELE=COQmodel,
                 CHAM_MATER=material,
                 RESULTAT=COQres,
                 REPE_COQUE=_F(NIVE_COUCHE='INF',),
                 OPTION=('SIGM_ELNO_DEPL','EQUI_ELNO_SIGM'),
                 EXCIT=_F(CHARGE=bc_force,),);
# 3)
COQresM=CALC_ELEM(MODELE=COQmodel,
                 CHAM_MATER=material,
                 RESULTAT=COQres,
                 REPE_COQUE=_F(NIVE_COUCHE='MOY',),
                 OPTION=('SIGM_ELNO_DEPL','EQUI_ELNO_SIGM',),
                 EXCIT=_F(CHARGE=bc_force,),);
# 4)
COQresP=CALC_ELEM(MODELE=COQmodel,
                 CHAM_MATER=material,
                 RESULTAT=COQres,
                 REPE_COQUE=_F(NIVE_COUCHE='SUP',),
                 OPTION=('SIGM_ELNO_DEPL','EQUI_ELNO_SIGM',), 
                 EXCIT=_F(CHARGE=bc_force,),);


# 5)
COQresP=CALC_NO(reuse=COQresP,
               RESULTAT=COQresP,
               OPTION=('SIGM_NOEU_DEPL','EQUI_NOEU_SIGM'),);
# 6)
COQresM=CALC_NO(reuse=COQresM,
               RESULTAT=COQresM,
               OPTION=('SIGM_NOEU_DEPL','EQUI_NOEU_SIGM'),);
# 7)
COQresI=CALC_NO(reuse=COQresI,
               RESULTAT=COQresI,
               OPTION=('SIGM_NOEU_DEPL','EQUI_NOEU_SIGM',),);
# 8)
IMPR_RESU(UNITE=21,  # [should be replaced by default UNITE=80, also in ASTK]
         FORMAT='MED',
         RESU=(_F(MAILLAGE=COQmesh,
                  RESULTAT=COQres,
                  NOM_CHAM=('DEPL',),),
               _F(MAILLAGE=COQmesh,
                  RESULTAT=COQresP,
                  NOM_CHAM=('SIGM_NOEU_DEPL','EQUI_NOEU_SIGM',),),
               _F(MAILLAGE=COQmesh,
                  RESULTAT=COQresM,
                  NOM_CHAM=('SIGM_NOEU_DEPL','EQUI_NOEU_SIGM',),),
               _F(MAILLAGE=COQmesh,
                  RESULTAT=COQresI,
                  NOM_CHAM=('SIGM_NOEU_DEPL','EQUI_NOEU_SIGM',),),
                  ),);

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.

Note:

  • 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

shell
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

Media:kw_stress7.zip

This zip contains the following files:

  • gm_coq3d_solid3.py 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 constr.med 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, con7block.med can be viewed in the post processor module of Salome by File --> Import --> con7block.med 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:

COQmesh=CREA_MAILLAGE(MAILLAGE=meshinit,
                   MODI_MAILLE=(_F(TOUT='OUI',OPTION='QUAD8_9',),
                                _F(TOUT='OUI',OPTION='TRIA6_7',),),);

to, for QUAD8 mesh only:

COQmesh=CREA_MAILLAGE(MAILLAGE=meshinit,
                   MODI_MAILLE=(_F(TOUT='OUI',OPTION='QUAD8_9',),),);

or, for TRIA6 mesh only:

COQmesh=CREA_MAILLAGE(MAILLAGE=meshinit,
                   MODI_MAILLE=(_F(TOUT='OUI',OPTION='TRIA6_7',),),);