Nastran to Code_Aster: hyperelasticity

In this post we will see how to model hyperelasticity in a large deformation problem.

This case is taken from a publicy available example on the internet, but the original source is probably this one, for all due credit.

To read this article one will need some knowledge both in Nastran and in Code_Aster.

Large scale deformation of a hyperelastic material

The translation between Nastran and Code_Aster can be made by using the following correspondances :

Nastran keywordCode_Aster keyword
BEGIN DEBUT
SOL 106 + SUBCASESTAT_NON_LINE(EXCIT=_F(FONC_MULT))
TIME 30 See “prob5.export” file, line “A tpmax 30
NLPARMDEFI_LIST_REEL, DEFI_LIST_INST
PARAM LGDISPSTAT_NON_LINE(COMPORTEMENT)
SPC, SPCDAFFE_CHAR_MECA(DDL_IMPO)
MPCAFFE_CHAR_MECA(LIAISON_DDL)
MATHPDEFI_MATERIAU(ELAS_HYPER), STAT_NON_LINE(COMPORTEMENT)
CHEXASee “prob5.mail” file:  HEXA8
PLSOLIDAFFE_CARA_ELEM(MASSIF=_F(GROUPMA)), STAT_NON_LINE(COMPORTEMENT)
GRIDSee “prob5.mail” file: COOR_3D
ENDDATAFIN

Here are Code_Aster results :

1:1 deformation of a block

Here is a table of comparison between Nastran and Code_Aster results for this case (Nastran values are taken from the pdf file above) :

NodeNastran DispCode_Aster DispDiff %
N2 DY
N3 DY
N6 DY
N7 DY
-0.619702-0.617467400020.36%
N5 DZ
N6 DZ
N7 DZ
N8 DZ
0.6197020.617467400020.36%

First of all, let’s see the Nastran code (file “prob5.dat”) for this example :

ID NAS103 WORKSHOP 5 SOLUTION
SOL 106
TIME 30
CEND
TITLE = SIMPLE TENSION
SUBTITLE = DISPLACEMENT CONTROL MPCs + 1 SPCD
DISP = ALL
MPC=100
SUBCASE 100 $ UNIAXIAL TENSION
 NLPARM=10
 SPC=100
 LOAD=1000
BEGIN BULK
CHEXA   1       1       1       2       3       4       5       6        +00000P
++00000P7       8
GRID    1               0.      0.      0.              123456
GRID    2               1.      0.      0.              23456
GRID    3               1.      1.      0.              3456
GRID    4               0.      1.      0.              13456
GRID    5               0.      0.      -1.             12456
GRID    6               1.      0.      -1.             2456
GRID    7               1.      1.      -1.             456
GRID    8               0.      1.      -1.             1456
MATHP   1       1.52238 .25472  1777.1  0.0     0.0     0.00000          +000001
++000001        2       1                                                +000002
++000002-.001955
MPC     100     2       1       1.      7       1       -1.
MPC     100     3       1       1.      7       1       -1.
MPC     100     3       2       1.      7       2       -1.
MPC     100     4       2       1.      7       2       -1.
MPC     100     5       3       1.      7       3       -1.
MPC     100     6       1       1.      7       1       -1.
MPC     100     6       3       1.      7       3       -1.
MPC     100     8       2       1.      7       2       -1.
MPC     100     8       3       1.      7       3       -1.
NLPARM  10      48              AUTO    1                       YES
PARAM   LGDISP  1
PARAM   POST    -1
PLSOLID 1       1
SPC     100     7       1
SPCD    1000    7       1       6.
ENDDATA

n Code_Aster, you will need to create distinct files for the mesh and the commands. We will need to treat this problem as a two-dimensional one and create contact zones.

Let’s start with the main mesh file (file “prob5.mail”) :

 TITRE
prob5
SIMPLE TENSION                                                     
 FINSF

 COOR_3D
 N1        0.00000000000000E+00  0.00000000000000E+00  0.00000000000000E+00
 N2        0.00000000000000E+00  1.00000000000000E+00  0.00000000000000E+00
 N3        1.00000000000000E+00  1.00000000000000E+00  0.00000000000000E+00
 N4        1.00000000000000E+00  0.00000000000000E+00  0.00000000000000E+00
 N5        0.00000000000000E+00  0.00000000000000E+00 -1.00000000000000E+00
 N6        0.00000000000000E+00  1.00000000000000E+00 -1.00000000000000E+00
 N7        1.00000000000000E+00  1.00000000000000E+00 -1.00000000000000E+00
 N8        1.00000000000000E+00  0.00000000000000E+00 -1.00000000000000E+00
 FINSF
 
 HEXA8   
 M9       N1       N4       N3       N2       N5       N8       N7      
          N6      
 FINSF
 
 GROUP_MA
 PROP_1                  
 M9      
 FINSF
 
 FIN

Then, the command file (file “prob5.comm”) :

#Vega++ version 2.5
#Aster version STABLE
DEBUT(PAR_LOT='NON', IGNORE_ALARM=('SUPERVIS_1'))
MAIL=LIRE_MAILLAGE(FORMAT='ASTER',VERI_MAIL=_F(VERIF='OUI',));

MODMECA=AFFE_MODELE(MAILLAGE=MAIL,
                    AFFE=(
                          _F(GROUP_MA='PROP_1',
                             PHENOMENE='MECANIQUE',
                             MODELISATION=('3D',)),
                          ),
                    );

# Material original id 1
M42=DEFI_MATERIAU(
                 ELAS_HYPER=_F(
                         C10=1.52238,
                         C01=0.25472,
                         C20=-0.001955,
                         RHO=0,
                         K=1777.1,
                         ),
                 );

CHMAT=AFFE_MATERIAU(MAILLAGE=MAIL,
                    AFFE=(
                          _F(MATER=M42,GROUP_MA=('PROP_1',),),
                          ),
                    );

CAEL=AFFE_CARA_ELEM(MODELE=MODMECA,
                    MASSIF=(
                            _F(GROUP_MA='PROP_1',
                               ANGL_REP=(0.,0.,0.,),),
                            ),
                    );

BL66=AFFE_CHAR_MECA(MODELE=MODMECA,
                   DDL_IMPO=(
                             _F(NOEUD=('N1', ),DX=0, DY=0, DZ=0 ),
                             _F(NOEUD=('N3', ),DZ=0 ),
                             _F(NOEUD=('N4', ),DY=0, DZ=0 ),
                             _F(NOEUD=('N8', ),DY=0 ),
                             _F(NOEUD=('N6', ),DX=0 ),
                             _F(NOEUD=('N2', ),DX=0, DZ=0 ),
                             _F(NOEUD=('N5', ),DX=0, DY=0 ),                             
                             ),
                   );

# ConstraintSet original id : 100
BL67=AFFE_CHAR_MECA(MODELE=MODMECA,
                   LIAISON_DDL=(
                                _F(NOEUD=('N2', 'N7', ),
                                   DDL=('DY', 'DY', ),
                                   COEF_MULT=(1, -1, ),
                                   COEF_IMPO=0),
                                _F(NOEUD=('N3', 'N7', ),
                                   DDL=('DY', 'DY', ),
                                   COEF_MULT=(1, -1, ),
                                   COEF_IMPO=0),
                                _F(NOEUD=('N7', 'N8', ),
                                   DDL=('DX', 'DX', ),
                                   COEF_MULT=(-1, 1, ),
                                   COEF_IMPO=0),
                                _F(NOEUD=('N3', 'N7', ),
                                   DDL=('DX', 'DX', ),
                                   COEF_MULT=(1, -1, ),
                                   COEF_IMPO=0),
                                _F(NOEUD=('N4', 'N7', ),
                                   DDL=('DX', 'DX', ),
                                   COEF_MULT=(1, -1, ),
                                   COEF_IMPO=0),
                                _F(NOEUD=('N6', 'N7', ),
                                   DDL=('DY', 'DY', ),
                                   COEF_MULT=(1, -1, ),
                                   COEF_IMPO=0),
                                _F(NOEUD=('N6', 'N7', ),
                                   DDL=('DZ', 'DZ', ),
                                   COEF_MULT=(1, -1, ),
                                   COEF_IMPO=0),
                                _F(NOEUD=('N7', 'N8', ),
                                   DDL=('DZ', 'DZ', ),
                                   COEF_MULT=(-1, 1, ),
                                   COEF_IMPO=0),
                                _F(NOEUD=('N5', 'N7', ),
                                   DDL=('DZ', 'DZ', ),
                                   COEF_MULT=(1, -1, ),
                                   COEF_IMPO=0),
                               ),
                   );

CHMEC62=AFFE_CHAR_MECA(MODELE=MODMECA,
                   DDL_IMPO=(
                             _F(NOEUD=('N7',),DX=6, ),
                             ),
                      );

# Analysis original id : 100
LST00036=DEFI_LIST_REEL(
                        DEBUT = 0,
                        INTERVALLE = _F(JUSQU_A = 1,
                                        NOMBRE = 48
                                        ),
                        );

LAUTO32=DEFI_LIST_INST(METHODE='AUTO', DEFI_LIST=_F(LIST_INST=LST00036,),);
RAMP32=DEFI_FONCTION(NOM_PARA='INST', PROL_DROITE='LINEAIRE', VALE=(0,0.0,1,1.0,));
RESU32=STAT_NON_LINE(MODELE=MODMECA,
                    CHAM_MATER=CHMAT,
                    CARA_ELEM=CAEL,
                    EXCIT=(
                           _F(CHARGE=CHMEC62,FONC_MULT=RAMP32),# Original id:1000
                           _F(CHARGE=BL66),# Original id:0
                           _F(CHARGE=BL67),# Original id:100
                           ),
                    COMPORTEMENT=(
                          _F(GROUP_MA='PROP_1',RELATION='ELAS_HYPER',DEFORMATION='GROT_GDEP',),
                           ),
                    INCREMENT=_F(LIST_INST=LAUTO32,),
                    ARCHIVAGE=_F(LIST_INST=LST00036,),
                    NEWTON=_F(REAC_ITER=1,),
                    SOLVEUR=_F(RENUM='PORD',METHODE='MUMPS'),
                    );

IMPR_RESU(FORMAT='RESULTAT',
          RESU=(
                _F(RESULTAT=RESU32, NOM_CHAM='DEPL', VALE_MAX='OUI', VALE_MIN='OUI',),
                ),
          );

IMPR_RESU(FORMAT='MED',UNITE=80,
          RESU=(
                _F(RESULTAT=RESU32, NOM_CHAM='DEPL',),
                ),
          );

FIN()

You will also need a file to keep everything together ( file “prob5.export”). This file is the one needed to start the calculation on command line (“as_run prob5.export”) :

P actions make_etude
P mode interactif
P mpi_nbcpu 1
P mpi_nbnoeud 1
P ncpus 1
P version stable
A memjeveux 375.0
A tpmax 30
P memjob 524288
P tpsjob 6
F comm prob5.comm D 1
F mail prob5.mail D 20
F mess prob5.mess R 6
F resu prob5.resu R 8
F rmed prob5.rmed R 80

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s