DEBUT(LANG='EN')

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

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

mater = DEFI_MATERIAU(ECRO_LINE=_F(D_SIGM_EPSI=0.001,
                                   SY=355.0),
                      ELAS=_F(E=205000.0,
                              NU=0.3))

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.001, 355.0, 10.0, 356.0))

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

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=('kotei1', )),
                                _F(DX=0.0,
                                   DY=0.0,
                                   GROUP_MA=('kotei2', ))),
                      FORCE_ARETE=_F(FY=5000.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=0.01),
                        EXCIT=_F(CHARGE=load,
                                 FONC_MULT=func0),
                        INCREMENT=_F(LIST_INST=times),
                        METHODE='NEWTON',
                        MODELE=model,
                        NEWTON=_F(MATRICE='TANGENTE',
                                  REAC_INCR=1,
                                  REAC_ITER=1))

unnamed = CALC_CHAMP(CONTRAINTE=('SIGM_NOEU', ),
                     CRITERES=('SIEQ_NOEU', ),
                     DEFORMATION=('EPSI_NOEU', ),
                     FORCE=('REAC_NODA', 'FORC_NODA'),
                     MODELE=model,
                     RESULTAT=resnonl)

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

FIN()
