DEBUT(LANG='FR')

mesh = LIRE_MAILLAGE(FORMAT='MED',
                     UNITE=2)

model = AFFE_MODELE(AFFE=_F(MODELISATION=('3D', ),
                            PHENOMENE='MECANIQUE',
                            TOUT='OUI'),
                    MAILLAGE=mesh)

#comment: kou = DEFI_MATERIAU(ECRO_LINE=_F(D_SIGM_EPSI=0.01,
#comment:                                  SIGM_LIM=235.0,
#comment:                                  SY=235.0),
#comment:                     ELAS=_F(E=205000.0,
#comment:                             NU=0.3))

mater = DEFI_MATER_GC(ACIER=_F(D_SIGM_EPSI=0.0001,
                               E=205000.0,
                               NU=0.3,
                               SIGM_LIM=235.0,
                               SY=235.0))

fieldmat = AFFE_MATERIAU(AFFE=_F(MATER=(mater, ),
                                 TOUT='OUI'),
                         MODELE=model)

#comment: func = DEFI_FONCTION(NOM_PARA='EPSI',
#comment:                      NOM_RESU='SIGM',
#comment:                      VALE=(0.01, 235.0, 0.1, 236.0))

listr = DEFI_LIST_REEL(DEBUT=0.0,
                       INTERVALLE=_F(JUSQU_A=1.0,
                                     PAS=0.02))

times = DEFI_LIST_INST(DEFI_LIST=_F(LIST_INST=listr),
                       METHODE='MANUEL')

func0 = DEFI_FONCTION(NOM_PARA='INST',
                      VALE=(0.0, 0.0, 1.0, 1.0))

load = AFFE_CHAR_MECA(DDL_IMPO=_F(DX=0.0,
                                  DY=0.0,
                                  DZ=0.0,
                                  GROUP_MA=('kotei', )),
                      MODELE=model)

load0 = AFFE_CHAR_MECA(FORCE_FACE=_F(FY=-8.0,
                                     GROUP_MA=('saika', )),
                       MODELE=model)

resnonl = STAT_NON_LINE(CHAM_MATER=fieldmat,
                        COMPORTEMENT=_F(DEFORMATION='PETIT',
                                        RELATION='VMIS_ISOT_LINE',
                                        TOUT='OUI'),
                        CONVERGENCE=_F(ITER_GLOB_MAXI=100,
                                       RESI_GLOB_RELA=1e-06),
                        EXCIT=(_F(CHARGE=load),
                               _F(CHARGE=load0,
                                  FONC_MULT=func0)),
                        INCREMENT=_F(LIST_INST=times),
                        METHODE='NEWTON',
                        MODELE=model,
                        NEWTON=_F(MATRICE='TANGENTE',
                                  REAC_ITER=1))

unnamed = CALC_CHAMP(CHAM_MATER=fieldmat,
                     CONTRAINTE=('SIGM_NOEU', ),
                     CRITERES=('SIEQ_NOEU', ),
                     DEFORMATION=('EPSI_NOEU', 'EPSP_NOEU'),
                     MODELE=model,
                     RESULTAT=resnonl)

IMPR_RESU(FORMAT='MED',
          RESU=(_F(NOM_CHAM=('DEPL', ),
                   RESULTAT=resnonl),
                _F(NOM_CHAM=('EPSP_NOEU', 'EPSI_NOEU', 'SIEQ_NOEU', 'SIGM_NOEU'),
                   RESULTAT=unnamed)),
          UNITE=80)

FIN()
