DEBUT(identifier='0:1',
      LANG='EN')

mesh = LIRE_MAILLAGE(identifier='1:1',
                     FORMAT='MED',
                     UNITE=20)

model1 = AFFE_MODELE(identifier='2:1',
                     AFFE=_F(MODELISATION=('3D', ),
                             PHENOMENE='MECANIQUE',
                             TOUT='OUI'),
                     MAILLAGE=mesh)

mater2 = DEFI_MATERIAU(identifier='3:1',
                       ELAS=_F(E=200000.0,
                               NU=0.3))

mater1 = DEFI_MATERIAU(identifier='4:1',
                       ELAS=_F(E=200000.0,
                               NU=0.3))

fieldma1 = AFFE_MATERIAU(identifier='5:1',
                         AFFE=_F(MATER=(mater1, ),
                                 TOUT='OUI'),
                         MODELE=model1)

step = DEFI_LIST_REEL(identifier='6:1',
                      DEBUT=0.0,
                      INTERVALLE=_F(JUSQU_A=1.0,
                                    NOMBRE=5))

load2 = DEFI_FONCTION(identifier='7:1',
                      NOM_PARA='INST',
                      VALE=(0.0, 0.0, 1.0, 1.0))

fix = AFFE_CHAR_MECA(identifier='8:1',
                     DDL_IMPO=(_F(DX=0.0,
                                  DY=0.0,
                                  DZ=0.0,
                                  GROUP_MA=('fix', )),
                               _F(DX=0.0,
                                  DY=0.0,
                                  GROUP_MA=('Axis', ))),
                     MODELE=model1)

contact = DEFI_CONTACT(identifier='9:1',
                       FORMULATION='CONTINUE',
                       MODELE=model1,
                       ZONE=_F(CONTACT_INIT='OUI',
                               GROUP_MA_ESCL=('cont_f', ),
                               GROUP_MA_MAIT=('cont_b', )))

load1 = AFFE_CHAR_MECA(identifier='10:1',
                       FORCE_FACE=_F(FZ=-0.25,
                                     GROUP_MA=('Axis', )),
                       MODELE=model1)

resnonl = STAT_NON_LINE(identifier='11:1',
                        CHAM_MATER=fieldma1,
                        COMPORTEMENT=_F(DEFORMATION='PETIT',
                                        RELATION='ELAS',
                                        TOUT='OUI'),
                        CONTACT=contact,
                        CONVERGENCE=_F(ITER_GLOB_MAXI=10,
                                       RESI_GLOB_RELA=1e-06),
                        EXCIT=(_F(CHARGE=fix),
                               _F(CHARGE=load1,
                                  FONC_MULT=load2)),
                        INCREMENT=_F(LIST_INST=step),
                        METHODE='NEWTON',
                        MODELE=model1,
                        NEWTON=_F(MATRICE='TANGENTE',
                                  REAC_INCR=1,
                                  REAC_ITER=1),
                        SOLVEUR=_F(METHODE='MUMPS'))

resnonl = CALC_CHAMP(identifier='12:1',
                     reuse=resnonl,
                     CONTRAINTE=('SIEF_NOEU', ),
                     CRITERES=('SIEQ_NOEU', ),
                     DEFORMATION=('EPSI_NOEU', ),
                     FORCE=('FORC_NODA', 'REAC_NODA'),
                     RESULTAT=resnonl)

IMPR_RESU(identifier='13:1',
          FORMAT='MED',
          RESU=_F(MAILLAGE=mesh,
                  RESULTAT=resnonl),
          UNITE=2)

FIN(identifier='14:1',
    )
