Contrib:KeesWouters/stress 2D3D

From CAELinuxWiki
Revision as of 15:45, 11 December 2009 by Keeswouters (Talk | contribs) (''The geometry, mesh and command files'')

Jump to: navigation, search

The connection between shell and solid elements

[under construction .... not finished yet ... might be usable though ... ]

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.

[As usual, the files that define the geometry, mesh and command files can be found at the end of this contribution ... to be done.]

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, 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 standard 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 sometines need to be changed. In this case 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. The z axis is always normal to the shell plane, so the local y axis is also defined. Instead of VECTEUR, ANGL_REP can be used.

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

In this model the bending stresses in the shell is Syy. For the block element the bending stress is Szz. Because of the shell theory the Szz of the shell is zero.

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,
         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) determine translate these stresses to the nodal points and suitable to be used for writing to a med file. The option SIGM_NOEU_DEPL' determines the standard stresses (Sij) and 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.

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).
  • 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 solid coque3d sigma all 400.jpg


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.
  • sigma7_start.comm command files for Code-Aster, main calculation
  • sigmaxx7.comm command files for Code-Aster, extraction of stresses
  • 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.