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

mesh = LIRE_MAILLAGE(identifier=u'1:1',
                     UNITE=2)

model = AFFE_MODELE(identifier=u'2:1',
                    AFFE=_F(GROUP_MA=('BEAM', ),
                            MODELISATION=('POU_D_E', ),
                            PHENOMENE='MECANIQUE'),
                    MAILLAGE=mesh)

elemprop = AFFE_CARA_ELEM(identifier=u'3:1',
                          MODELE=model,
                          ORIENTATION=_F(CARA='VECT_Y',
                                         GROUP_MA=('BEAM', ),
                                         VALE=(0.0, 0.0, 1.0)),
                          POUTRE=_F(CARA=('HY', 'HZ', 'EPY', 'EPZ'),
                                    GROUP_MA=('BEAM', ),
                                    SECTION='RECTANGLE',
                                    VALE=(0.003, 0.02, 0.0015, 0.01)))

steel = DEFI_MATERIAU(identifier=u'4:1',
                      ELAS=_F(E=2.1e+11,
                              NU=0.2,
                              RHO=7850.0))

fieldmat = AFFE_MATERIAU(identifier=u'5:1',
                         AFFE=_F(GROUP_MA=('BEAM', ),
                                 MATER=(steel, )),
                         MAILLAGE=mesh,
                         MODELE=model)

load = AFFE_CHAR_MECA(identifier=u'6:1',
                      DDL_IMPO=_F(GROUP_NO=('FIX', ),
                                  LIAISON='ENCASTRE'),
                      MODELE=model)

ASSEMBLAGE(identifier=u'7:1',
           CARA_ELEM=elemprop,
           CHAM_MATER=fieldmat,
           CHARGE=(load, ),
           MATR_ASSE=(_F(MATRICE=CO('mass'),
                         OPTION='MASS_MECA'),
                      _F(MATRICE=CO('stif'),
                         OPTION='RIGI_MECA')),
           MODELE=model,
           NUME_DDL=CO('nddl'))

unnamed0 = CALC_MODES(identifier=u'10:1',
                      CALC_FREQ=_F(NMAX_FREQ=10),
                      MATR_MASS=mass,
                      MATR_RIGI=stif,
                      NORM_MODE=_F(NORME='MASS_GENE'),
                      TYPE_RESU='DYNAMIQUE')

table = POST_RELEVE_T(identifier=u'11:1',
                      ACTION=_F(GROUP_NO='ALLN',
                                INTITULE='modes',
                                NOM_CHAM='DEPL',
                                OPERATION=('EXTRACTION', ),
                                RESULTAT=unnamed0,
                                TOUT='OUI',
                                TOUT_CMP='OUI'))

IMPR_TABLE(identifier=u'12:1',
           FORMAT='TABLEAU',
           TABLE=table,
           UNITE=8)

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

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