Download spectral.dgibi

Back to the list

* fichier : spectral.dgibi
* calcul spectral sans/avec amortissement, base modale seule.
*
opti dime 3 elem seg2 ;
* 
d_bloq = vrai;
d_graph = faux ; 

p0 = 0. 0. 0. ; e_z = 0. 0. 1. ;
q2 = e_z ; q1 = p0 ;
lig1 = d 20 q2 q1 ;
qf1 = point lig1 proc (0. 0. 0.6) ;

MO1= MODL LIG1 MECANIQUE ELASTIQUE POUT ;         

MATPL1=MATR MO1  YOUNG 2.E10 NU 0.4 RHO 7800;                                 
CARPL1=CARB MO1 SECT 0.1 INRY 2.08E-8 INRZ 3.33E-8                           
TORS 2.41E-7;     
MATE1=MATPL1 ET CARPL1;
***


***

RIGPL1 =RIGI MATE1 MO1 ;                                                    
MASPLA1=MASS MATE1 MO1 ;                                                    
BLOQ2=BLOQ DEPL ROTA Q2 ;
bloq1r = (bloq rota q1)  ; blq1uz = bloq q1 uz ;
bloq1rz = bloq q1 rz ;
blq1ux = bloq q1 ux ; blq1uy = bloq q1 uy ;  
bloq1rx = bloq q1 rx ; bloq1ry= bloq q1 ry ;
*    
*---- 
*  
PR=PROG 0.01 ; n_mv = lect 4 ;

tblsta = table 'LIAISONS_STATIQUES' ;
tblsta . 1 = table ; tblsta . 1 . point_liaison = q1 ;
        si d_bloq ;   tblsta . 1 . ddl_liaison = ux ;
        sinon ;  tblsta . 1 . ddl_liaison = fx ; finsi ;
tblsta . 2 = table ; tblsta . 2 . point_liaison = q1 ;
         si d_bloq ; tblsta . 2 . ddl_liaison = uy ;
         sinon ; tblsta . 2 . ddl_liaison = fy ; finsi ;
tblsta . 3 = table ; tblsta . 3 . point_liaison = q1 ;
         si d_bloq ; tblsta . 3 . ddl_liaison = rx ;
         sinon ; tblsta . 3 . ddl_liaison = mx ; finsi ;

si d_bloq ;
 bliaiq1 =  bloque tblsta ; depi tblsta ;
sinon ;
 force tblsta ;
finsi ;
 si d_bloq ;
* modes vibrations
bl1bloq = bloq1ry et bloq1rz et blq1uz et bliaiq1 ;
MODPLA1=VIBR PROC PR n_mv (RIGPL1 et bl1bloq) 
         MASPLA1 tbas;
* solutions statiques
tbsta = resout (RIGPL1 et bloq1ry et bloq1rz et
        blq1uz et bliaiq1) tblsta ;
react bliaiq1 tbsta ;
 sinon ;
* modes vibrations
MODPLA1=VIBR PROC PR n_mv (RIGPL1 et bloq1rx et bloq1rz et
        blq1uz)  MASPLA1 tbas;
* solutions statiques
tbsta = resout RIGPL1 tblsta ;
 finsi ;

tmod = modpla1 . modes ;
tmod (maspla1 et bl1bloq) * ;

 repeter bmod ((dime modpla1 . modes) - 2) ;
  ind1 = &bmod ;
psta1 = manu poi1  tmod . ind1 . point_repere ;
momoda1 = mode psta1 mecanique elastique modal ;
camoda1 = mate momoda1 freq tmod . ind1 . frequence
                      mass tmod . ind1 . masse_generalisee
                      defo tmod . ind1 . deformee_modale
                      ;
  si (ega 1 ind1) ;
    momod1 = momoda1 ; camod1 = camoda1 ;
  sinon ;
    momod1 = momod1 et momoda1 ; camod1 = camod1 et camoda1 ;
  finsi ;
  def1 = defo tmod . ind1 . deformee_modale lig1 1. vert ;
  def0 = defo tmod . ind1 . deformee_modale lig1 0. bleu ;
  titre ' mode propre ind = ' ind1 ;
 si d_graph ; trac (10. 10. 0.) (def0 et def1) ; finsi ;
 fin bmod ;

riam1 = amor momod1 camod1 ;


* forces

fy1 = manu chpo qf1 fy 1. ; fy1 = fy1 * 1.e4 ;
fy2 = manu chpo q1 fy 1. ; fy2 = fy2 * 1.e4 ;

fq2 = manu chpo q2 fy 1.e4 ;
dq2  = resout (RIGPL1 et bloq1ry et bloq1rz et
        blq1uz et bliaiq1) fq2 ;
maaq2 = manu poi1 (8. 8. 8.) ;


* 
abs_f = prog 0. 1000. ; ord_f = prog 1. 1. ;
ev_xf = evol manu abs_f ord_f ;
fy3 = pjba fy1 momod1 camod1 ; 
cha3 = char meca ev_xf fy3 ;

opti mode freq ;
t_freq = table 'PASAPAS' ;

t_freq . modele = momod1 ;
t_freq . caracteristiques = camod1 ;
t_freq . chargement = cha3 ;

*t_freq . temps_calcules = prog 0. 0.1 ;
pasapas t_freq ;

o_y = prog ;  a_f = prog ; o_alp = prog ;
repeter b_post ((dime t_freq.temps) - 1) ;
 ind1 = &b_post ;
 chdep1 = t_freq . deplacements . ind1 ;
 dep11 = reco t_freq . modele t_freq . caracteristiques chdep1 ;

uu_alp = xty chdep1 chdep1 (mots alfa beta ) (mots alfa beta) ;
o_alp = o_alp et (prog uu_alp) ;

 si faux ;
  deff1 = defo dep11 lig1 1. vert ;
  deff0 = defo dep11 lig1 0. bleu ;
  titre ' reponse frequentielle f = ' t_freq . temps . ind1 ;
  trac (10. 10. 0.) (deff0 et deff1) ;
 finsi ;

 dep11p2 = redu dep11 qf1 ;
 uu_p2 = xty dep11p2 dep11p2 
     (mots uy) (mots uy) ;
 o_y = o_y et (prog uu_p2); 
 a_f = a_f et (prog t_freq . temps . ind1) ;
fin b_post ;
 o_y = o_y ** 0.5 ; 
 o_alp = o_alp ** 0.5 ; 

 ev_dsp0 = evol manu 'FREQ' a_f 'UY qf1' o_y coul vert;
 ev_alp0 = evol manu 'FREQ' a_f 'ALPH' o_alp coul vert;

 si d_graph ;
dess ev_dsp0 logx logy titre 'reponse frequentielle Q2' ;
dess ev_alp0 logx logy titre 'reponse reel modal' ;
 finsi ;
o_y0 = 2671.3    ; o_alp0 = 7973.7 ;
err01 = maxi o_y - o_y0 ; err02 = maxi o_alp - o_alp0 ;

si (((abs err01)  < 1.e-1) et ((abs err02) < 1.e-1)) ;
 erre 0 ; sinon ; erre 5 ; finsi ;
*
*
*
opti mode freq ;
 repeter bmod ((dime modpla1 . modes) - 2) ;
  ind1 = &bmod ;
psta1 = manu poi1  tmod . ind1 . point_repere ;
momoda1 = mode psta1 mecanique elastique modal ;
camoda1 = mate momoda1 freq tmod . ind1 . frequence
                      mass tmod . ind1 . masse_generalisee
                      defo tmod . ind1 . deformee_modale
                      amor 0.05 ;
  si (ega 1 ind1) ;
    momod1 = momoda1 ; camod1 = camoda1 ;
  sinon ;
    momod1 = momod1 et momoda1 ; camod1 = camod1 et camoda1 ;
  finsi ;
  def1 = defo tmod . ind1 . deformee_modale lig1 1. vert ;
  def0 = defo tmod . ind1 . deformee_modale lig1 0. bleu ;
  titre ' mode propre ind = ' ind1 ;
 si d_graph ; trac (10. 10. 0.) (def0 et def1) ; finsi ;
 fin bmod ;

riam1 = amor momod1 camod1 ;

fy6 = fy3 ;
fiy6 = changer fy6 comp (mots falf fbet) (mots ifal ifbe) ;
cha6 = char meca ev_xf (fy6 et fiy6) ;
*list cha6 ;

t_freq = table 'PASAPAS' ;

t_freq . modele = momod1 ;
t_freq . caracteristiques = camod1 ;
t_freq . chargement = cha3 ;

*t_freq . temps_calcules = prog 0. 0.1 ;
pasapas t_freq ;


o_y = prog ; io_y = prog ; a_f = prog ; o_alp = prog ; o_ial = prog ;
o_pha = prog ;
repeter b_post ((dime t_freq.temps) - 1) ;
 ind1 = &b_post ;
 chdep1 = t_freq . deplacements . ind1 ;
 dep11 = reco t_freq . modele t_freq . caracteristiques chdep1 ;

uu_alp = xty chdep1 chdep1 (mots alfa beta ) (mots alfa beta) ;
uu_ial = xty chdep1 chdep1 (mots ialf ibet) (mots ialf ibet) ;
o_alp = o_alp et (prog uu_alp) ;o_ial = o_ial et (prog uu_ial) ;

 si faux ;
  deff1 = defo dep11 lig1 1. vert ;
  deff0 = defo dep11 lig1 0. bleu ;
  titre ' reponse frequentielle f = ' t_freq . temps . ind1 ;
  trac (10. 10. 0.) (deff0 et deff1) ;
 finsi ;

 dep11p2 = redu dep11 qf1 ;
 uu_p2 = xty dep11p2 dep11p2 
     (mots uy iuy ) (mots uy iuy) ;
 im_p2 = xty dep11p2 dep11p2 
     (mots iuy) (mots iuy) ;
 o_y = o_y et (prog uu_p2); io_y = io_y et (prog im_p2) ;
 o_pha = o_pha et 
     (prog ((extr dep11p2 iuy qf1 )/ (extr dep11p2 uy qf1))) ;
 a_f = a_f et (prog t_freq . temps . ind1) ;
fin b_post ;

 o_y = o_y ** 0.5 ; io_y = io_y ** 0.5 ;
 o_alp = o_alp ** 0.5 ; o_ial = o_ial ** 0.5 ; 
 o_pha = atg o_pha ;

 ev_dsp = evol manu 'FREQ' a_f 'UY qf1' o_y ;
     ev_dsp1 = ev_dsp coul rouge ;
 ev_pha = evol manu 'FREQ' a_f 'PHASE' o_pha ; 
     ev_pha1 = ev_pha coul rouge ;
 ev_idsp = evol manu 'FREQ' a_f 'iUY qf1' io_y ;
 ev_alp = evol manu 'FREQ' a_f 'ALPH' o_alp ;
      ev_alp1 = ev_alp coul rouge ;
 ev_ial = evol manu 'FREQ' a_f 'IALP' o_ial ;
      ev_ial1 = ev_ial coul rouge ;

 si d_graph ;
*dess ev_dsp logx logy titre 'reponse frequentielle qf1';
dess (ev_dsp et ev_dsp0) logx logy titre 'reponse frequentielle qf1';
dess ev_pha logx titre 'phase qf1'
*dess ev_idsp logx logy titre 'reponse frequentielle ima qf1' ;
dess (ev_alp et ev_alp0) logx logy titre 'reponse reel modal' ;
dess ev_ial logx logy titre 'reponse ima modal' ;
 finsi ;

o_y3 = 20.666 ;
o_alp3 = 30.549 ;
o_pha3 = 89.434 ;

err1 = (maxi o_y) - o_y3 ; err2 = (maxi o_alp) - o_alp3 ;
err3 = (maxi o_pha) - o_pha3 ;
 
si (((abs err1) < 1.e-1) et ((abs err2) < 1.e-1) et
  ((abs err3) < 1.e-1)) ;
 erre 0 ;  sinon ;  erre 5 ;  finsi ;
*
*
t_freq = table 'PASAPAS' ;
t_freq . chargement = cha6 ;

t_freq . modele = momod1 ;
t_freq . caracteristiques = camod1 ;

*t_freq . temps_calcules = prog 0. 0.1 ;
pasapas t_freq ;


o_y = prog ; io_y = prog ; a_f = prog ; o_alp = prog ; o_ial = prog ;
o_pha = prog ;
repeter b_post ((dime t_freq.temps) - 1) ;
 ind1 = &b_post ;
 chdep1 = t_freq . deplacements . ind1 ;
 dep11 = reco t_freq . modele t_freq . caracteristiques chdep1 ;

uu_alp = xty chdep1 chdep1 (mots alfa beta ) (mots alfa beta) ;
uu_ial = xty chdep1 chdep1 (mots ialf ibet) (mots ialf ibet) ;
o_alp = o_alp et (prog uu_alp) ;o_ial = o_ial et (prog uu_ial) ;

 si faux ;
  deff1 = defo dep11 lig1 1. vert ;
  deff0 = defo dep11 lig1 0. bleu ;
  titre ' reponse frequentielle f = ' t_freq . temps . ind1 ;
  trac (10. 10. 0.) (deff0 et deff1) ;
 finsi ;

 dep11p2 = redu dep11 qf1 ;
 uu_p2 = xty dep11p2 dep11p2 
     (mots uy iuy ) (mots uy iuy) ;
 im_p2 = xty dep11p2 dep11p2 
     (mots iuy) (mots iuy) ;
 o_y = o_y et (prog uu_p2); io_y = io_y et (prog im_p2) ;
 o_pha = o_pha et 
     (prog ((extr dep11p2 iuy qf1 )/ (extr dep11p2 uy qf1))) ;
 a_f = a_f et (prog t_freq . temps . ind1) ;
fin b_post ;

 o_y = o_y ** 0.5 ; io_y = io_y ** 0.5 ;
 o_alp = o_alp ** 0.5 ; o_ial = o_ial ** 0.5 ; 
* ceci n est pas le déphasage relatif --- ici écart 45°
 o_pha = atg o_pha ;

 ev_dsp = evol manu 'FREQ' a_f 'UY qf1' o_y ;
 ev_pha = evol manu 'FREQ' a_f 'PHASE' o_pha ;
 ev_idsp = evol manu 'FREQ' a_f 'iUY qf1' io_y ;
 ev_alp = evol manu 'FREQ' a_f 'ALPH' o_alp ;
 ev_ial = evol manu 'FREQ' a_f 'IALP' o_ial ;

 si d_graph ;
dess (ev_dsp et ev_dsp1 et ev_dsp0) 
     logx logy titre 'reponse frequentielle qf1';
dess (ev_pha et ev_pha1) logx titre 'phase qf1'
*dess ev_idsp logx logy titre 'reponse frequentielle ima qf1' ;
dess (ev_alp et ev_alp1 et ev_alp0) 
     logx logy titre 'reponse reel modal' ;
dess (ev_ial et ev_ial1) logx logy titre 'reponse ima modal' ;
 finsi ;

o_y5 = 29.226 ; o_alp5 = 69.570 ; o_pha5 = 82.335 ;
err5 = (maxi o_y) - o_y5 ; err6 = (maxi o_alp) - o_alp5 ;
err7 = (maxi o_pha) - o_pha5 ;
si (((abs err5) < 1.e-1) et ((abs err6) < 1.e-1) et
  ((abs err7) < 1.e-1)) ;
 erre 0 ;  sinon ;  erre 5 ;  finsi ;


fin ;

 

© Cast3M 2003 - All rights reserved.
Disclaimer