DEBUT(IGNORE_ALARM='UTILITAI4_2');

MAIL=LIRE_MAILLAGE(UNITE=20,
                   FORMAT='MED',);

MODELE=AFFE_MODELE(MAILLAGE=MAIL,
                   AFFE=_F(TOUT='OUI',
                           PHENOMENE='MECANIQUE',
                           MODELISATION='3D',),);


MAT1=DEFI_MATERIAU(ELAS=_F(E=210000,
                          NU=0.3,
                          RHO=7.87E-3,),);

MAT2=DEFI_MATERIAU(ELAS=_F(E=100,
                          NU=0,
                          RHO=0,),);


chm=AFFE_MATERIAU(MAILLAGE=MAIL,
                    AFFE=(_F(GROUP_MA='situ',
                            MATER=MAT1,),
                         _F(GROUP_MA='bane',
                            MATER=MAT2,),),);



BLOCAGE=AFFE_CHAR_MECA(MODELE=MODELE,
                       DDL_IMPO=(
                           _F(GROUP_MA='kotei',
                              DX=0.0,
                              DY=0.0,
                              DZ=0.0,),
                           ),
                       FORCE_FACE=_F(GROUP_MA='riki',
                                     FX=1,),);



ASSEMBLAGE(MODELE=MODELE,
           CHAM_MATER=chm,
           CHARGE=BLOCAGE,
           
           NUME_DDL=CO('NUMEDDL'),
           MATR_ASSE=(_F(MATRICE=CO('RIGIDITE'),
                         OPTION='RIGI_MECA',),
                      _F(MATRICE=CO('MASSE'),
                         OPTION='MASS_MECA',),
                     ),
          );



vect=CALC_VECT_ELEM(OPTION='CHAR_MECA',
                    CHARGE=BLOCAGE,);

vecta=ASSE_VECTEUR(VECT_ELEM=vect,
                     NUME_DDL=NUMEDDL,);

#振動数0Hz~1Hzまで0.01Hz刻み
freq=DEFI_LIST_REEL(DEBUT=0.00,
                     INTERVALLE=_F(JUSQU_A=1,
                                   PAS=0.01,),);


MODES=DYNA_LINE_HARM(MATR_MASS=MASSE,
                        MATR_RIGI=RIGIDITE,
                        LIST_FREQ=freq,
                        EXCIT=_F(VECT_ASSE=vecta,
                                 COEF_MULT=1.0,),);




MODES=CALC_CHAMP(reuse=MODES,
                 RESULTAT=MODES,
                 CONTRAINTE=('SIEF_ELGA'),);

IMPR_RESU(FORMAT='MED', 
          UNITE=80,
          RESU=_F(MAILLAGE=MAIL,
                  RESULTAT=MODES,
                  PARTIE='REEL',
                  NOM_CHAM='DEPL',),);

IMPR_RESU(FORMAT='MED',
          UNITE=81,
          RESU=_F(MAILLAGE=MAIL,
                  RESULTAT=MODES,
                  PARTIE='IMAG',
                  NOM_CHAM='DEPL',),);



FIN();
