DEBUT(LANG='EN')

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

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

materK = DEFI_MATERIAU(ECRO_LINE=_F(D_SIGM_EPSI=200.0,
                                    SY=235.0),
                       ELAS=_F(E=206000.0,
                               NU=0.3),
                       META_LEMA_ANI=_F(C_A=0.0,
                                        C_M=0.0,
                                        C_MXX_XX=1.0,
                                        C_MXY_XY=0.75,
                                        C_MXZ_XZ=0.75,
                                        C_MYY_YY=1.0,
                                        C_MYZ_YZ=0.75,
                                        C_MZZ_ZZ=1.0,
                                        C_N=0.0,
                                        C_Q=0.0,
                                        F1_A=0.0,
                                        F1_M=0.0,
                                        F1_N=0.0,
                                        F1_Q=0.0,
                                        F2_A=0.0,
                                        F2_M=0.0,
                                        F2_N=0.0,
                                        F2_Q=0.0,
                                        F_MXX_XX=1.0,
                                        F_MXY_XY=0.75,
                                        F_MXZ_XZ=0.75,
                                        F_MYY_YY=1.0,
                                        F_MYZ_YZ=0.75,
                                        F_MZZ_ZZ=1.0))

fieldmat = AFFE_MATERIAU(AFFE=_F(MATER=(materK, ),
                                 TOUT='OUI'),
                         MAILLAGE=mesh,
                         MODELE=model)

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

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

func = 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', )),
                      FORCE_FACE=_F(FY=1000.0,
                                    GROUP_MA=('saika', )),
                      MODELE=model)

resnonl = STAT_NON_LINE(CHAM_MATER=fieldmat,
                        COMPORTEMENT=_F(DEFORMATION='PETIT',
                                        ITER_INTE_MAXI=20,
                                        ITER_INTE_PAS=0,
                                        RELATION='VMIS_ISOT_LINE',
                                        TOUT='OUI'),
                        CONVERGENCE=_F(ITER_GLOB_MAXI=1000,
                                       RESI_GLOB_RELA=0.0001),
                        EXCIT=_F(CHARGE=load,
                                 FONC_MULT=func),
                        INCREMENT=_F(LIST_INST=listr),
                        METHODE='NEWTON',
                        MODELE=model,
                        NEWTON=_F(MATRICE='TANGENTE',
                                  REAC_ITER=1))

unnamed = CALC_CHAMP(CONTRAINTE=('SIGM_NOEU', ),
                     CRITERES=('SIEQ_NOEU', ),
                     DEFORMATION=('EPSI_NOEU', ),
                     FORCE=('REAC_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'),
                   RESULTAT=unnamed)),
          UNITE=2)

FIN()
