DEBUT(LANG='FR')

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

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

mokuzai = DEFI_MATERIAU(ELAS_ORTH=_F(E_L=350.0,
                                     E_N=7000.0,
                                     E_T=350.0,
                                     G_LN=467.0,
                                     G_LT=467.0,
                                     G_TN=467.0,
                                     NU_LN=0.016,
                                     NU_LT=0.016,
                                     NU_TN=0.016,
                                     RHO=3.8e-10))

kouzai = DEFI_MATERIAU(ELAS=_F(E=200000.0,
                               NU=0.3,
                               RHO=7.8e-09))

jelly = DEFI_MATERIAU(ELAS=_F(E=7.0,
                              NU=0.4,
                              RHO=3.8e-10))

fieldmat = AFFE_MATERIAU(AFFE=(_F(GROUP_MA=('kasouy', 'moku1', 'kasouzai2', 'moku2', 'kasouzai3', 'moku3', 'kasouzai4', 'moku4', 'kasouzai5', 'moku5', 'kasouzai6', 'moku6', 'kasou1', 'kasou2', 'kasou3', 'kasou12', 'kasou4', 'kasou5', 'kasou6', 'kasou7', 'kasou8', 'kasou9', 'kasou10', 'kasou11'),
                                  MATER=(mokuzai, )),
                               _F(GROUP_MA=('torasu_sankakunuki_T1', 'torasu_sankakunuki_T2', 'torasu_sankakunuki_T3', 'torasu_sankakunuki_T4', 'taikeikou', 'taikeikou2', 'taikeikou3', 'taikeikou4', 'taikeikou5', 'taikeikou6', 'taikeiku7', 'taikeikou8', 'taikeikou9'),
                                  MATER=(kouzai, )),
                               _F(GROUP_MA=('kesyou_ue_per', 'kesyou_sita_per', 'mokutiban1_per', 'mokutiban2_per', 'kesyou1_per', 'kesyou2_per', 'mokutihuku'),
                                  MATER=(jelly, ))),
                         MAILLAGE=mesh,
                         MODELE=model1)

load = AFFE_CHAR_MECA(DDL_IMPO=(_F(DX=0.0,
                                   DY=0.0,
                                   DZ=0.0,
                                   GROUP_MA=('kousokusen1', )),
                                _F(DX=0.0,
                                   DY=0.0,
                                   GROUP_MA=('kousokusen2', ))),
                      MODELE=model1)

ASSEMBLAGE(CHAM_MATER=fieldmat,
           CHARGE=(load, ),
           MATR_ASSE=(_F(MATRICE=CO('mass'),
                         OPTION='MASS_MECA'),
                      _F(MATRICE=CO('stifness'),
                         OPTION='RIGI_MECA')),
           MODELE=model1,
           NUME_DDL=CO('nddl'))

modes0 = CALC_MODES(CALC_FREQ=_F(NMAX_FREQ=10),
                    MATR_MASS=mass,
                    MATR_RIGI=stifness,
                    OPTION='PLUS_PETITE',
                    SOLVEUR=_F(METHODE='MUMPS',
                               NPREC=8,
                               RENUM='AUTO'),
                    TYPE_RESU='DYNAMIQUE',
                    VERI_MODE=_F(STOP_ERREUR='NON'))

IMPR_RESU(FORMAT='MED',
          RESU=_F(NOM_CHAM=('DEPL', ),
                  RESULTAT=modes0),
          UNITE=3)

FIN()
