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

Pmesh = LIRE_MAILLAGE(identifier=u'1:1',
                      FORMAT='MED',
                      UNITE=4)

b_mesh = LIRE_MAILLAGE(identifier=u'2:1',
                       FORMAT='MED',
                       UNITE=20)

mesh = ASSE_MAILLAGE(identifier=u'3:1',
                     MAILLAGE_1=Pmesh,
                     MAILLAGE_2=b_mesh,
                     OPERATION='SUPERPOSE')

model = AFFE_MODELE(identifier=u'4:1',
                    AFFE=(_F(GROUP_MA=('box', ),
                             MODELISATION=('3D', ),
                             PHENOMENE='MECANIQUE'),
                          _F(GROUP_MA=('plateface', ),
                             MODELISATION=('DKT', ),
                             PHENOMENE='MECANIQUE')),
                    MAILLAGE=mesh)

elempro0 = AFFE_CARA_ELEM(identifier=u'5:1',
                          COQUE=_F(EPAIS=0.01,
                                   GROUP_MA=('plateface', )),
                          MODELE=model)

mater = DEFI_MATERIAU(identifier=u'6:1',
                      ELAS=_F(E=200000.0,
                              NU=0.3))

fieldmat = AFFE_MATERIAU(identifier=u'7:1',
                         AFFE=_F(MATER=(mater, ),
                                 TOUT='OUI'),
                         MODELE=model)

load = AFFE_CHAR_MECA(identifier=u'8:1',
                      DDL_IMPO=_F(DRX=0.0,
                                  DRY=0.0,
                                  DRZ=0.0,
                                  DX=0.0,
                                  DY=0.0,
                                  DZ=0.0,
                                  GROUP_MA=('faceedges', )),
                      FACE_IMPO=_F(DZ=-1.0,
                                   GROUP_MA=('topface', )),
                      MODELE=model)

CHNOR = CREA_CHAMP(identifier=u'9:1',
                   GROUP_MA=('contact1', ),
                   MODELE=model,
                   OPERATION='NORMALE',
                   TYPE_CHAM='NOEU_GEOM_R')

contact = AFFE_CHAR_MECA(identifier=u'10:1',
                         LIAISON_MAIL=_F(CHAM_NORMALE=CHNOR,
                                         EPAIS=0.01,
                                         GROUP_MA_MAIT=('box', ),
                                         GROUP_NO_ESCL=('contact1', ),
                                         TYPE_RACCORD='COQUE_MASSIF'),
                         MODELE=model)

reslin = MECA_STATIQUE(identifier=u'11:1',
                       CARA_ELEM=elempro0,
                       CHAM_MATER=fieldmat,
                       EXCIT=(_F(CHARGE=load),
                              _F(CHARGE=contact)),
                       MODELE=model)

reslin = CALC_CHAMP(identifier=u'12:1',
                    reuse=reslin,
                    CONTRAINTE=('SIGM_ELNO', ),
                    RESULTAT=reslin)

IMPR_RESU(identifier=u'13:1',
          FORMAT='MED',
          RESU=_F(RESULTAT=reslin),
          UNITE=3)

FIN(identifier=u'14:1',
    )
