DEBUT(LANG='FR')


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

mesh = MODI_MAILLAGE(identifier='1:1',
                     reuse=mesh,
                     MAILLAGE=mesh,
                     ORIE_NORM_COQUE=_F(GROUP_MA=('wall1', 'wall2', 'roof')))

model = AFFE_MODELE(identifier='2:1',
                    AFFE=(_F(GROUP_MA=('roof', ),
                             MODELISATION=('DKT', ),
                             PHENOMENE='MECANIQUE'),
                          _F(GROUP_MA=('wall1', ),
                             MODELISATION=('DKT', ),
                             PHENOMENE='MECANIQUE'),
                          _F(GROUP_MA=('wall2', ),
                             MODELISATION=('DKT', ),
                             PHENOMENE='MECANIQUE')),
                    MAILLAGE=mesh)

elemprop = AFFE_CARA_ELEM(identifier='3:1',
                          COQUE=(_F(COQUE_NCOU=1,
                                    EPAIS=0.001,
                                    GROUP_MA=('roof', ),
                                    INER_ROTA='OUI'),
                                 _F(COQUE_NCOU=1,
                                    EPAIS=0.002,
                                    GROUP_MA=('wall1', 'wall2'),
                                    INER_ROTA='OUI')),
                          MODELE=model)

mater = DEFI_MATERIAU(identifier='4:1',
                      ELAS=_F(E=206000.0,
                              NU=0.3))

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

load = AFFE_CHAR_MECA(identifier='6:1',
                      DDL_IMPO=_F(DRX=0.0,
                                  DRY=0.0,
                                  DRZ=0.0,
                                  DX=0.0,
                                  DY=0.0,
                                  DZ=0.0,
                                  GROUP_MA=('fix1', 'fix2')),
                      LIAISON_MAIL=_F(GROUP_MA_ESCL=('conect2', 'conect1'),
                                      GROUP_MA_MAIT=('roof', ),
                                      TYPE_RACCORD='COQUE'),
                      LIAISON_UNIF=(_F(DDL=('DRX', 'DRY', 'DRZ'),
                                       GROUP_MA=('conect1', )),
                                    _F(DDL=('DRX', 'DRY', 'DRZ'),
                                       GROUP_MA=('conect2', ))),
                      MODELE=model,
                      PRES_REP=_F(GROUP_MA=('roof', ),
                                  PRES=1.0))

reslin = MECA_STATIQUE(identifier='7:1',
                       CARA_ELEM=elemprop,
                       CHAM_MATER=fieldmat,
                       EXCIT=_F(CHARGE=load),
                       MODELE=model)

unnamed1 = CALC_CHAMP(identifier='8:1',
                      CARA_ELEM=elemprop,
                      CHAM_MATER=fieldmat,
                      CONTRAINTE=('SIGM_ELNO', ),
                      CRITERES=('SIEQ_ELNO', ),
                      DEFORMATION=('EPSI_ELNO', ),
                      MODELE=model,
                      RESULTAT=reslin)

unnamed2 = POST_CHAMP(identifier='9:1',
                      EXTR_COQUE=_F(NIVE_COUCHE='SUP',
                                    NOM_CHAM=('SIGM_ELNO', 'EPSI_ELNO', 'SIEQ_ELNO'),
                                    NUME_COUCHE=1),
                      RESULTAT=unnamed1)

unnamed3 = CALC_CHAMP(identifier='10:1',
                      CARA_ELEM=elemprop,
                      CHAM_MATER=fieldmat,
                      CONTRAINTE=('SIGM_NOEU', ),
                      CRITERES=('SIEQ_NOEU', ),
                      DEFORMATION=('EPSI_NOEU', ),
                      MODELE=model,
                      RESULTAT=unnamed2)

IMPR_RESU(identifier='11:1',
          FORMAT='MED',
          RESU=(_F(CARA_ELEM=elemprop,
                   NOM_CHAM=('DEPL', ),
                   RESULTAT=reslin),
                _F(CARA_ELEM=elemprop,
                   NOM_CHAM=('SIGM_NOEU', 'EPSI_NOEU', 'SIEQ_NOEU'),
                   RESULTAT=unnamed3)),
          UNITE=3)

FIN()