Download soudage.dgibi

Back to the list

* fichier :  soudage.dgibi
*----------------------------------------------------
* calcul simplifie du depot d'un cordon de soudure :
*    on realise litteralement des depots de matiere chaude
*    le long d 'un chanfrein. Le materiau est de l inox.
*
*  ce jeu de donnees comprend notamment : 
*   une boucle de construction du maillage 3D (plaque+depots)
*       et d attribution des modeles
*   une etude sur le choix des modeles plastiques et viscoplastiques
*   (avec VISK2 disponible en 1/1/1999)
*   une procedure pour realiser les depots successifs : construction
*     de la table pour PASAPAS avec mise a jour des modeles, chargements
*     et conditions aux limites. Un temps de latence de 2s est arbitrairement
*     observe.
*   une procedure pour le refroidissement apres depot : idem
*   une procedure pour le trace des temperatures et du Von Mises des 
*     contraintes a chaque depot
*
*  le calcul thermo-mecanique couple consiste en la reactualisation
*   des caracteristiques materiaux a chaque pas de temps
*   les aspects thermo-metallurgiques ne sont pas pris en compte
*   au 1/1/1999
*  le trace final est realise en animation
* 
*  Cet exemple comprend un mode mise au point -> misopoin = vrai ;
*  Le calcul complet est tres gourmand en ressources informatiques
*-----------------------------------------------------------------
*-----------------------------------------------------------------
* Simplified calculation of welding :
*    The deposits of hot material ate readily simulated,
*     along a V-notched plate. Austenitic steel is concerned.
*
*  This data file includes : 
*  a loop which enables the 3D meshing (plate+deposits)
*    and set the models
*  a study on the opportunity to use either elastoplastic or viscoplastic
*    models (particularly VISK2 available 1/1/199)
*  a procedure which enables the stepwise deposits : defines the TABLE object
*    for PASAPAS, and updates models, loadings and boundary conditions.
*    It is arbitrary chosen a duration of 2s for the deposit.
*  a procedure to compute the cooling down : idem
*  a procedure which shows the thermal and Von Mises fields after each deposit
*
*  The thermo-mechanical coupling consists of the material characteristics
*    updating. The thermo-metallurgical aspects are not taken into account
*    (1/1/1999).
*  Finally an animated view of the calculation is presented.
* 
*  This example includes a tuning mode -> misopoin = vrai ;
*  The complete calculation is quite a heavy computer job
*------------------------------------------------------------------
tit_ref = 'soudure / ' ;
opti dime 2 elem seg2 ;
mo_mode = parf ;
misopoin = vrai ;
si misopoin ;
 opti trac x ;
sinon ;
 opti trac psc sauv 'soudure.k2000' ;
finsi ;
graph = 'N' ;    monop=faux;
*------------------------------------------------------------------
* parametres
*------------------------------------------------------------------
* epaisseur de la tranche elementaire
epais_z = 0.01 ;
* nombre de tranches (hormis 2 tranches de bord)
si misopoin ;
 n_tra1 = 10 ;
sinon ;
 n_tra1 = 200 ;
finsi ;
* temperature des depots (C)
tempdepo = 1500. ;
* duree du depot (s)
duredepo = 2. ;
* coefficient pour les traces
t_coef = table ;
t_coef . defo1 = 2. ;
*------------------------------------------------------------------
*                   CARACTÉRISTIQUES MATERIAU                       
*                   MATERIAL CHARACTERITICS    
*------------------------------------------------------------------
*   evolution des caracteristiques avec la temperature ;                
*   TABLE POUR LA VISUALISATION
 TAB1 = TABLE;                                                             
 TAB1.1 = 'MARQ LOSA';                                                     
 TAB1.2 = 'MARQ TRIA';                                                                                                                        
                                                                       
*       capacite volumique                                              
                                                                       
ltmpt1 = prog 20. 100. pas 100. 1400. 1450.  3000.;                     
                                                                       
lscapa = prog 3594.5 3902.6 4157.4 4309.6 4442.9 4467.6                 
4491.6 4590.4 4696.8 4907.5 4950. 4990. 5043. 5054.2                    
5071.5  5088. 5088.;                                                    
                                                                       
*     conversion en USI                                                 
lscapa = lscapa * 1.e3;                                                 
evlcapa = evol manu 'T' ltmpt1 'C' lscapa ;                             
*dess evlcapa titre 'Capacaité volumique' nclk TAB1 ;                          

*       conductivite                                                    
                                                                       
lscondu = prog 14. 15.2 16.6 17.9 19.2 20.6 21.8 23.1 24.3 26.          
27.3 28.1 29.9 32. 34. 49. 49.;                                 
lscondu = lscondu  ;                                                    
                                                                       
evlcond = evol manu 'T' ltmpt1 'K' lscondu  ;                            
*dess evlcond titre 'Conductivite' nclk TAB1 ;                                 

*       coefficient de convection avec l'exterieur                      
he1 = 30. ;
                                                                                                                        
*       module d'YOUNG    
ltmpt2 = prog 0. 100. 200. 300. 400.  500.  600.            
              700. 750. 1200. 1350. 3000. ;                             
lyoung = (prog 197. 191.5 184. 176.5 168.  160.  151. 142.5        
               135. 50. 10. 1. ) * 1.d9 ;                          
evlyoun = evol manu 'T' ltmpt2 'YOUN' lyoung ;                          
*dess evlyoun titre 'Module d Young' nclk TAB1 GRIL;                               
* coefficient d ecrouissage
evlh = evolm manu 'T' ltmpt2 'H' (lyoung*0.0001) ;
                                                       
*       coefficient de POISSON                          *
ltmpt3 = prog 0. 23.8 148.9 260. 371. 482.2 593. 704. 1400.             
              1450. 3000. ;                                             
lnu = prog 0.26 0.26 0.26 0.3 0.34 0.3 0.32 0.31 0.31 0.49 0.49 ;       
evlnu = evol manu 'T' ltmpt3 'NU' lnu ;                                 
*dess evlnu titre 'Coefficient de Poisson' nclk TAB1 GRIL;                         

*       limite élastique                                                
ltmpt4 = prog 0.  100. 200. 250. 300. 350.  400.  500.  600.       
             700. 800. 900. 1000. 1100. 1200. 1400. 1450. 3000. ;         
lsigy = prog 260. 206. 173. 162.5 155. 147. 140.  130.   123.5     
             116. 106. 88. 60. 26. 10. 1. 1. 1.;       
lsigy = lsigy * 1.d6 ;                                                  
evly = evol manu 'T' ltmpt4 'SIGY' lsigy ;                              
*dess evly titre 'Limite elastique' nclk TAB1 GRIL;      
*
*  module visqueux 
evlhvis = evol manu 'T' ltmpt2 'HVIS' (lyoung*0.1) ;

* coefficient eta
ev_eta = evol manu 'T' ltmpt2 'ETA' (lyoung*0.1*15.) ;

* coefficient n
ev_n2 = evol manu 'T' (prog 0. 3000.) 'N' (prog 1. 1.) ;   
                       
*       dilatation thermique moyenne reference 20°                                           
ltmpt7 = prog 0. 200. 400. 600. 800. 1000. 1400. 1450. 3000. ;                
lalpha1 = prog 15.4 16.6 17.5 18.4 19.0 19.4 19.6 19.6 19.6;                 
lalpha1 = lalpha1 * 1.d-6 ;                                             
evalpha1 = evol manu  'T' ltmpt7 'ALPH' lalpha1 ;                       
*dess evalpha1 titre 'Alpha'  TAB1 GRIL nclk ;    
*-----------------------------------------------------------------
* procedure attribution modele
* procedure to set the models
*-----------------------------------------------------------------
debproc at_moma mail_u*maillage ;
* definit le modele thermomecanique
si (ega mo_mode cine) ; 
mo1 =   (modele mail_u mecanique 
  elastique isotrope plastique cinematique cons meca)
 et (modele mail_u thermique isotrope cons ther) ;
ma1 = (mate (extr mo1 cons meca)
  'YOUN' evlyoun 'NU' evlnu 'SIGY' evly 'H' evlh 'ALPH' evalpha1)
 et (mate (extr mo1 cons ther)
      'C' evlcapa 'K' evlcond 'RHO' 1.) ;
finsi ;
si (ega mo_mode parf) ; 
mo1 =   (modele mail_u mecanique 
  elastique isotrope plastique parfait cons meca)
 et (modele mail_u thermique isotrope cons ther) ;
ma1 = (mate (extr mo1 cons meca)
  'YOUN' evlyoun 'NU' evlnu 'SIGY' evly 'ALPH' evalpha1)
 et (mate (extr mo1 cons ther)
      'C' evlcapa 'K' evlcond 'RHO' 1.) ;
finsi ;
si (ega mo_mode visk2) ;
mo1 =   (modele mail_u mecanique 
  elastique isotrope viscoplastique visk2 cons meca)
 et (modele mail_u thermique isotrope cons ther) ;
ma1 = (mate (extr mo1 cons meca)
  'YOUN' evlyoun 'NU' evlnu 'SIGY' evly 'H' evlh 'ALPH' evalpha1
    'HVIS' evlhvis 'ETA' ev_eta 'N' ev_n2 )
 et (mate (extr mo1 cons ther)
      'C' evlcapa 'K' evlcond 'RHO' 1.) ;
finsi ;
si (ega mo_mode viscp) ;
  mo1 = (modele mail_u mecanique elastique isotrope
     viscoplastique parfait cons meca)
     et (modele  mail_u thermique isotrope cons ther) ;
  ma1 = (mate (extr mo1 cons meca) 
  'YOUN' evlyoun 'NU' evlnu 'SIGY' evly 'ALPH' evalpha1
   'K' 2.d8 'N' 1.)
  et (mate (extr mo1 cons ther) 'C' evlcapa 'K' evlcond 'RHO' 1.) ;
finsi ;
*
finproc mo1 ma1 ;
*-----------------------------------------------------------------
* tranche maillage elementaire
* plate slice  mesh
*------------------------------------------------------------------
* densites utilisées
si misopoin ;
d0 = 5.d-3 ; d1 = d0 ; d2 = d0 ; d22 = d0 ;
d3 = 20.d-3 ; d4 = d3 ; d5 = d3 ;
sinon ;
*  coeff Arnaud
si faux ;
d0 = 0.5d-3 ;  
d1 = 0.6d-3 ;
d2 = 1.d-3 ;
d22 = 2.d-3 ;          
d3 = 5.d-3 ;                                                            
d4 = 8.d-3 ; 
d5 = 8.d-3 ;
finsi ;
d0 = 0.5d-3 ;  
d1 = 0.6d-3 ;
d2 = 1.d-3 ; 
d22 = 5.d-3 ;
d3 = 20.d-3 ; d4 = 20.d-3 ; d5 = 20.d-3 ;                                                           
finsi ;

*  points
dens d0 ; ori = 0. 0. ;                                                           
* chanfrein
pchfr0 = 0. 6.d-3 ;                                                     
dens d22 ; pchfr1 = 6.3d-3 30.d-3 ;                                      
dens d1 ; pchfr2 = 3.9d-3 5.25d-3 ;
dens d1 ; pchfr3 = 4.1054d-3  6.75d-3 ;    
* comparaison FRAMATOME
p_c = pchfr1 ; p_g = 11d-3 0. ; p_f = 11d-3 30.d-3 ;
p_tc1 = 6.5d-3 5d-3 ;                                   

* attention contrairement a Arnaud la penetration/deformation
* surface inferieure du chanfrein n'est pas prise en compte
* la passe initiale n'est pas calculee
* le premier depot correspond a H(1) - H(initiale) ou H est la hauteur
* bain  -- depot de la premiere passe profondeur 26.1                     
dens d0 ; p1b1 = 0. 3.9d-3 ;                                            
dens d0 ; p1b2 = 3.4d-3 3.9d-3 ;                                        
dens d0 ; p1b3 = 3.4d-3 0. ;                                            
dens d0 ; p1b4 = 0. 2.d-3 ;                                             
                                                                     
* bain -- depot de la seconde passe profondeur 25.7    
* notation Arnaud modifiees                     
dens d1 ; p2b1 = 0. 4.3d-3 ;                                            
dens d1 ; p2b2 = 3.6d-3 4.3d-3 ;                                        
 p2b3 = p1b2 ;                                            
 p2b4 = p1b1 ;                                            
                                                                       
* bain -- depot de la troisieme passe profondeur 24.75                        
* notation Arnaud modifiees                     
dens d1 ; p3b1 = 0. 5.25d-3 ;                                           
dens d1 ; p3b2 = pchfr2 ;                                       
 p3b3 = p2b2 ;                                           
 p3b4 = p2b1 ;  

* bain -- depot de la quatrieme passe  profondeur 23.25                                     
dens d1 ; p4b1 = 0. 6.75d-3 ;                                           
dens d1 ; p4b2 = pchfr3 ;                                       
 p4b3 = p3b2 ;                                           
 p4b4 = p3b1 ;  
                                                                                                                                              
* reste de la plaque                                                    
dens d22 ; ppl1 = 12.d-3 30.d-3 ; 
dens d1 ; ppl3b3 = 3.9d-3 0. ;                                        
dens d1 ; ppl2 = 12.d-3 0. ;                                            
dens d2 ; ppl3 = 30.d-3 0. ;                                            
dens d3 ; ppl4 = 30.d-3 30.d-3 ;                                        
dens d4 ; ppl5 = 50.d-3 30.d-3 ;                                        
dens d4 ; ppl6 = 50.d-3 0. ;                                            
dens d5 ; ppl7 = 100.d-3 0. ;                                           
dens d5 ; ppl8 = 100.d-3 30.d-3 ;                                       


                                                                       
*       CONTOURS                                                        
                                                                       
l1b1 = d  p1b2 p1b1 ;                                                   
l1b2 = d  p1b1 p1b4  ; l_l1b2 = l1b2 ;                                                  
l1b3 = c  p1b4 pchfr0 p1b2 ;                                            
l1b4 = d  p1b4 ori ; l_l1b4 = l1b4 ;                                                  
l1b5 = d  ori p1b3 ;                                                    
l1b6 = d  p1b3 p1b2 ;                                                   

l2b1 = d p2b2 p2b1 ;   
l2b2 = d p2b1 p2b4 ; l_l2b2 = l2b2 ; 
l2b3 = inve l1b1 ;
l2b4 = c p2b3 pchfr0 p2b2 ;                       

l3b1 = d p3b2 p3b1 ;
l3b2 = d p3b1 p3b4 ; l_l3b2 = l3b2 ; 
l3b3 = inve l2b1 ;                                            
l3b4 = d   p3b3 p3b2 ; 
*l3b5 = d   p1b3 p3b3 ;                                                  
l3b5 = d   p1b3 ppl3b3 ; 
l3b6 = d ppl3b3 p3b2 ;  

l4b1 = d p4b2 p4b1 ;
l4b2 = d p4b1 p4b4 ; l_l4b2 = l4b2 ;
l4b3 = inve l3b1 ;                                            
l4b4 = d p4b3 p4b2 ; 
                                               
                                                                       
lchfr1 = d  pchfr1 pchfr3 d pchfr2  ;                                            
*lchfr2 = c  pchfr2 pchfr0 p3b2 ;                                        
lchfr3 = c  p3b2   pchfr0 p1b2 ;                                        
lchfr4 = c  p2b2   pchfr0 p1b2 ;                                        
                                                                       
lpl1 = d  ppl3b3 ppl2  ;                                                  
lpl2 = d  ppl2 ppl1  ;                                                  
lpl3 = d  ppl1 pchfr1 ;                                                 
lpl4 = d  ppl2 ppl3 ;                                                   
lpl5 = d  ppl3 ppl4 ;                                                   
lpl6 = d  ppl4 ppl1 ;                                                   
lpl7 = d  ppl6 ppl5 ;                                                   
lpl8 = d  ppl6 ppl7 ;                                                   
lpl9 = d  ppl7 ppl8 ;                                                   
lpl10 = d ppl8 ppl5 ;                                                   
lpl11 = d ppl3 ppl6 ;                                                   
lpl12 = d ppl5 ppl4 ;                                                   

lplbas  = lpl8 et lpl11 et lpl4 et lpl1 et l3b5 et l1b5 ;
                                                                       
* ligne horizontale
lhoriz = l3b5 et l1b5 et lpl1 et lpl4 et lpl11 et lpl8 ;

*       SURFACES                                                        
                                                                       
opti elem qua4 ; 

                                                       
sdepot1 = surf (l1b1 et l1b2 et l1b3 ) coul jaune ; 
sdepot2 = surf (l2b1 et l2b2 et l2b3 et l2b4) coul vert ;                               
sdepot3 = surf (l3b1 et l3b2 et l3b3 et l3b4) coul rose ;                               
sdepot4 = surf (l4b1 et l4b2 et l4b3 et l4b4) coul bleu ;                               
stalon1 = surf (l1b4 et l1b5 et l1b6 et (inve l1b3)) coul bleu ;                  
sbain1 = sdepot1 et stalon1 ;                         

opti elem tri3 ;                  
*spl1 = surf (l3b5 et l3b4 et lchfr3 et (inve l1b6)) ;  
spl1 = surf (l3b5 et  l3b6 et l3b4 et l2b4 et (inve l1b6)) ;  
opti elem qua4 ;                                                                         
*spl3 = surf ( (inve l3b4) et lpl1 et lpl2 et lpl3 et lchfr1 et 
*             lchfr2 )  ;                                                        
spl3 = surf ( l3b6 et lpl1 et lpl2 et lpl3 et lchfr1 ) ;                                                        
spl4 = surf (lpl4 et lpl5 et lpl6 et lpl2) ;                            
spl5 = surf ((inve lpl5) et lpl11 et lpl7 et lpl12) ;                   
spl6 = surf (lpl8 et lpl9 et lpl10 et (inve lpl7)) ;                    
                                                                       
* evaluation du maillage                                                

                                                                       
*       surface complete 
sur0 = spl1 et spl3 et spl4 et spl5 et spl6 coul rouge ; 
sur_t = sdepot4 et sdepot3 et sdepot2 et sbain1 et sur0 ;   
sur1 = sbain1 et sur0 ;                
titr 'Maillage 2D de la plaque + depots ' (nbno sur_t) ' noeuds ' 
 (nbelem sur_t) ' elements' ;                                                                 
p_tc1 = point sur_t proc p_tc1 ;                                                               
p_f = point sur_t proc p_f ; p_g = point sur_t proc p_g ;
*trac (sur_t) ;
                                                                      
*  surface complete sans le metal depose                                
sur2 = stalon1 et sur0 ;                
*trac sur2 titr 'sur2'  ;    
                                                    
* surface sans le metal liquide 
sur3 = sur0 ;    
*trac sur3 titr 'sur3' ;  
*
*       contours pour la convection                                     
                                                                       
ctr1a = contour sur1 coul vert ;                                                  
ctr1b = diff ctr1a  ( l1b1 et l1b2 et l1b4 et l1b5 et lpl9 ) ;          
ctr1d = diff ctr1a   (l1b2 et l1b4 et lpl9) ;                           
*trac ctr1b nclk;                                                        
*trac ctr1d nclk;                                                        
                                                                      
*-----------------   VOLUMES    ---------------------------------
opti dime 3 elem cub8 ;
t_oeil = table ;
t_oeil . 1 = -1.3322     2.2028     -4.3278 ;
t_oeil . 2 = -4.0225     2.1934     -1.0511 ;
t_oeil . 3 = -.38324     .52515     -2.3239 ;
t_oeil . 4 = -1.6814     1.8311     -1.5466 ;

e_z = 0. 0. epais_z ;
*        
vsur0 = sur0 volu trans 1 e_z  ; 
vdepot1 = sdepot1 volu trans 1 e_z ;
vdepot2 = sdepot2 volu trans 1 e_z ;
vdepot3 = sdepot3 volu trans 1 e_z ;
vdepot4 = sdepot4 volu trans 1 e_z ;
vtalon1 = stalon1 volu trans 1 e_z ;
vbain1 = vtalon1 et vdepot1 ;
* volume complet
vsur_t = vdepot4 et vdepot3 et vdepot2 et vbain1 et vsur0 ;   
vsur1 = vbain1 et vsur0 ;                
titr 'Maillage 3D de la plaque + depots ' (nbno vsur_t) ' noeuds ' 
 (nbelem vsur_t) ' elements' ;                                                                 
*trac (vsur_t) ;
* volume complet sans le metal depose                                
vsur2 = vtalon1 et vsur0 ;                
*trac vsur2 titr 'vsur2'  ;    
* volume sans le metal liquide 
vsur3 = vsur0 ;    
*trac vsur3 titr 'vsur3' ;  

*  surfaces pour la convection et conditions aux limites
opti elem qua4 ;                                    
ctr1a = ctr1a trans 1 e_z ; elim (vsur_t et ctr1a) 1.e-6 ;
ctr1b = ctr1b trans 1 e_z ; elim (vsur_t et ctr1b) 1.e-6 ;          
ctr1d = ctr1d trans 1 e_z ; elim (vsur_t et ctr1d) 1.e-6 ; 
* 
l2b4 = l2b4 trans 1 e_z ; l3b4 = l3b4 trans 1 e_z ;
l4b4 = l4b4 trans 1 e_z ; 
* 
l1b1 = l1b1 trans 1 e_z ; l2b1 = l2b1 trans 1 e_z ; 
l3b1 = l3b1 trans 1 e_z ; l4b1 = l4b1 trans 1 e_z ;                   
*
l1b4 = l1b4 trans 1 e_z ; l1b2 = l1b2 trans 1 e_z ;
l2b2 = l2b2 trans 1 e_z ; l3b2 = l3b2 trans 1 e_z ;
*
l1b3 = l1b3 trans 1 e_z ; l2b3 = l2b3 trans 1 e_z ;
l3b3 = l3b3 trans 1 e_z ; 
l4b3 = l4b3 trans 1 e_z ; 
*
l4b2 = l4b2 trans 1 e_z ;
*
su_9 = lpl9 trans 1 e_z ; elim (vsur_t et su_9) 1.e-6 ;
*
lp1b4 = p1b4 d 1 (p1b4 plus e_z) ; 
lp2b4 = p2b4 d 1 (p2b4 plus e_z) ; 
lp3b4 = p3b4 d 1 (p3b4 plus e_z) ; 
lp4b4 = p4b4 d 1 (p4b4 plus e_z) ; 
elim (vsur_t et lp1b4 et lp2b4 et lp3b4 et lp4b4) 1.e-6 ;
elim 1.e-6 (vsur1 et l1b1 et l1b2 et l1b3 et l1b4) ;
*------------------------------------------------------------------
* table chanfrein
* maillage total
* global meshing
*------------------------------------------------------------------
chanfrei = table ;
chanfrei . tranches = table ;
chanfrei . tranches . initial = table ;
chanfrei . tranches . initial . mail = vsur2 ;
chanfrei . tranches . initial . modele 
   chanfrei . tranches . initial . caracteristiques = 
       at_moma chanfrei . tranches . initial . mail  ;
*
chanfrei . maillage = chanfrei . tranches . initial . mail ;
chanfrei . modele = chanfrei . tranches . initial . modele ;
chanfrei . caracteristiques = 
              chanfrei . tranches . initial . caracteristiques ;
s1b4 = l1b4 ;
*
repeter b_mail n_tra1 ;
ve_tra = &b_mail * e_z ;
ovsur2 ovdep ol1b3 ol1b2 ol1b4 = 
        vsur2 vdepot1 l1b3 l1b2 l1b4 plus ve_tra ;
*
chanfrei . tranches . &b_mail = table ;
chanfrei . tranches . &b_mail . mail = ovsur2 ;
chanfrei . tranches . &b_mail . modele 
     chanfrei . tranches . &b_mail . caracteristiques  = 
         at_moma chanfrei . tranches . &b_mail . mail ;
*
chanfrei . maillage = chanfrei . maillage et 
            chanfrei . tranches . &b_mail . mail  ;
chanfrei . modele = chanfrei . modele et
            chanfrei . tranches . &b_mail . modele ;
chanfrei . caracteristiques = chanfrei . caracteristiques et
           chanfrei . tranches . &b_mail . caracteristiques ;
s1b4 = s1b4 et ol1b4 ;
*
chanfrei . tranches . &b_mail . depots = table ;
chanfrei . tranches . &b_mail . depots . 1 = ovdep ;
chanfrei . tranches . &b_mail . interfaces = table ;
chanfrei . tranches . &b_mail . interfaces . 1 = ol1b3 ;
chanfrei . tranches . &b_mail . surf_bloc_meca = ol1b2 ;
chanfrei . tranches . &b_mail . blocages_mecaniques = 
    bloq chanfrei . tranches . &b_mail . surf_bloc_meca ux ;
*
si (&b_mail > 1) ;
  elim 1.e-5 (chanfrei . tranches . &b_mail . depots . 1
    et chanfrei . tranches . (&b_mail-1) . depots . 1) ;
finsi ;
*
fin b_mail ;
*
ovsur2 ol1b4 = vsur2 l1b4 plus ((n_tra1+1)*e_z);
chanfrei . tranches . final = table ;
chanfrei . tranches . final . mail = ovsur2 ;
chanfrei . tranches . final . modele 
   chanfrei . tranches . final . caracteristiques =
       at_moma chanfrei . tranches . final . mail ;
*
chanfrei . maillage = chanfrei . maillage et
             chanfrei . tranches . final . mail ;
elim 1.e-5 chanfrei . maillage ;
chanfrei . modele = chanfrei . modele et
            chanfrei . tranches . final . modele ;
chanfrei . caracteristiques = chanfrei . caracteristiques et
           chanfrei . tranches . final . caracteristiques ;
s1b4 = s1b4 et ol1b4 ; elim 1.e-6 s1b4 ;
chanfrei . surf_bloc_meca = s1b4 ;
chanfrei . blocages_mecaniques = (bloq ori depla )
             et (bloq s1b4 ux) et (bloq sur1 uz) ;
*+++++++++++++
titre (et tit_ref ' / maillage initial / noeuds = ')  
      (nbno chanfrei . maillage) ;
si (neg graph 'N') ;
  trac t_oeil . 3 cach chanfrei . maillage ;
finsi ;
*------------------------------------------------------------------
* procedure de depot
*  deposit procedure
*------------------------------------------------------------------
debproc depocord tstru*table t_oeil*table t_coef*table ;
*-----------------------------
* realise les depots elementaires
* achieves elementary deposits
* en entree : table tstru
* input : table tstru
*      'MAILLAGE' : maillage courant / instant global mesh
*      'TRANCHES', TABLE des donnees, indicee par
*          'INITIAL', 1...N,'FINAL' de sous indices
*                  'DEPOTS', TABLE
*                  'INTERFACES', TABLE
*                  'SURF_BLOC_MECA', MAILLAGE
*                  'INTERFACES', TABLE
*                  'BLOCAGES_MECANIQUES', RIGIDITE
*
*      'TEMPERATURES', CHPOINT
*      'DEPLACEMENTS', CHPOINT
*      'CONTRAINTES', MCHAML
*      'DEFORMATIONS_INELASTIQUES', MCHAML
*      'VARIABLES_INTERNES', MCHAML
*      'BLOCAGES_MECANIQUES', RIGIDITE
*      'SURF_BLOC_MECA', MAILLAGE
*      'DEPOT_INI', ENTIER indice du depot initial / initial deposit
*      'DEPOT_FIN', ENTIER indice du depot final / final deposit
*      'ILFOSOVE', LOGIQUE sauvegarde ou non / to save or not 
*      'ILFOTRACE', LOGIQUE dessine ou non / to picture or not
*      'DELTA_T', FLOTTANT pas de temps / time step
* en sortie : table tstru
* output : table tstru
*      'SAUVEGARDE', TABLE des sauvegardes, indicee par un entier,
*             de sous-indices
*                   'TITRE', TEXTE 
*                   'MAILLAGE', MAILLAGE
*                   'TEMPS', LISTREEL chronologie du depot / deposit chronology
*                   'MODELE', MMODEL
*                   'CARACTERISTIQUES', MCHAML
*                   'TEMPERATURES', TABLE
*                   'DEPLACEMENTS', TABLE
*                   'CONTRAINTES', TABLE
*                   'DEFORMATIONS_INELASTIQUES', TABLE
*                   'VARIABLES_INTERNES', TABLE
*      'TEMPS', LISTREEL chronologie de tout le calcul / global chronology
*-----------------------
mess '     §§§§ debut depot cordon / deposit start §§§§    ' ;
nd1 = tstru . depot_ini ; nd2 = tstru . depot_fin ;
si (nd2 < nd1) ;
  mess ' ordre des depots non-prevu ! / incorrect order for deposits' ;
  quitter depocord ;
finsi ;
si (non (existe tstru temps)) ;
  tstru . temps = prog ;
finsi ;
*++++++++++
repeter b_depo (nd2 - nd1 + 1) ;
ndk = nd1 + &b_depo - 1 ;
mess ' numero depot : ' ndk ;
* initialise le depot
* initializes deposit
mail_u1 = inte (changer tstru . tranches . ndk . depots . 1 poi1)
       (changer tstru . maillage poi1) ;
mail_u = diff (changer tstru . tranches . ndk . depots . 1 poi1) 
           mail_u1 ;
*mail_u = diff (changer tstru . tranches . ndk . depots . 1 poi1) 
*              (changer tstru . tranches . ndk . interfaces . 1 poi1) ;
chtedepo = manu chpo 1 mail_u T tempdepo nature diffuse ;
chdedepo = manu chpo 3 mail_u ux 0. uy 0. uz 0. nature diffuse ;
mod_u mat_u = at_moma tstru . tranches . ndk . depots . 1 ;
chsmdepo = zero (extr mod_u cons meca) contrain ;
chdfdepo =  zero (extr mod_u cons meca) definela ;
chvidepo = zero (extr mod_u cons meca) varinter ;
*+++++++++++
* chargement 
* loadings
blte1 = bloq T mail_u ;
imblte1 = depi blte1 tempdepo ;
si ((dime tstru . temps) ega 0) ;
 t_ini = 0. ;
sinon ;
 t_ini = extr tstru . temps (dime tstru . temps) ;
finsi ;
lt_dep = prog t_ini pas tstru . delta_t (t_ini+2.) ;
lt_o = prog (dime lt_dep)*1. ;
ev_dep = evol manu lt_dep lt_o ;
cha_dep = char timp ev_dep imblte1 ;  
*
sur_conv = enve (tstru . maillage et 
                tstru . tranches . ndk . depots . 1) ;
sur_conv = diff sur_conv (tstru . surf_bloc_meca et
                tstru . tranches . ndk . surf_bloc_meca) ;
mod_conv = mode sur_conv thermique convection cons ther ;
mat_conv = mate mod_conv h he1 ;
cht_conv = manu chpo sur_conv 1 T 20. ;
ev_conv = evol manu 't (s)' lt_dep 'Te (oC)' lt_o ;
cha_conv = char teco ev_conv cht_conv ;
*+++++++++++
* prepare la table pour pasapas
* PASAPAS table
tdep = table ; tdep.'PROCESSEURS' = MOT 'AUTOMATIQUE';
tdep . modele = tstru . modele et mod_u et mod_conv ; 
tdep . caracteristiques = tstru . caracteristiques et mat_u 
       et mat_conv ;
tdep . blocages_thermiques = blte1 ;
tdep . blocages_mecaniques = tstru . blocages_mecaniques et
           tstru . tranches . ndk . blocages_mecaniques ;
tdep . chargement = cha_dep et cha_conv ;
tdep . temps_calcules = lt_dep ;
tdep . procedure_thermique = DUPONT ;
tdep . talpha_reference = 20. ;
tdep . temps = table ;
tdep . temps . 0 = extr lt_dep 1 ;
tdep . temperatures = table ;
tdep . temperatures . 0 = tstru . temperatures et chtedepo ;
tdep . deplacements = table ;
tdep . deplacements . 0 = tstru . deplacements + chdedepo ;
tdep . contraintes = table ;
tdep . contraintes . 0 = tstru . contraintes et chsmdepo ;
tdep . deformations_inelastiques = table ;
tdep . deformations_inelastiques . 0 = chdfdepo 
   et tstru . deformations_inelastiques ;
tdep . variables_internes = table ;
tdep . variables_internes . 0 = chvidepo 
   et tstru . variables_internes ;
TMASAU=table;
tdep . 'MES_SAUVEGARDES'=TMASAU;
TMASAU .'DEFTO'=VRAI;
TMASAU .'DEFIN'=VRAI;   
*+++++++++++
* execute
* run
pasapas tdep ;
*list (maxi tdep . temperatures . 2 sans (mots lx)) ;
*list (mini tdep . temperatures . 2 sans (mots lx)) ;
*mailtra = extr tdep . modele mail ;
*trac t_oeil . 2 cach (redu tdep . temperatures . 1 mailtra) mailtra ;
*+++++++++++
* actualise tstru
* update tstru
tstru . temps = tstru . temps et lt_dep ;
lt1 = dime tdep . temps ;
lt1 = lt1 - 1 ;
tstru . modele = tstru . modele et mod_u ;
tstru . caracteristiques = tstru . caracteristiques et mat_u;
tstru . maillage = tstru . maillage et
           tstru . tranches . ndk . depots . 1 ;
tstru . surf_bloc_meca = tstru . surf_bloc_meca et
           tstru . tranches . ndk . surf_bloc_meca ;
tstru . blocages_mecaniques = tdep . blocages_mecaniques ;
tstru . temperatures = tdep . temperatures . lt1 ;
 si vrai ;
tstru . deplacements = copie tdep . deplacements . lt1 ;
tstru . contraintes = copie tdep . contraintes . lt1 ;
tstru . deformations_inelastiques = 
        copie tdep . deformations_inelastiques . lt1 ;
tstru . variables_internes = copie tdep . variables_internes . lt1 ;
 finsi ;
*
si tstru . ilfosove ;
  si (non (existe tstru sauvegarde)) ;
    tstru . sauvegarde = table ;
  finsi ;
  tsauv = tstru . sauvegarde ;
  nds = (dime tsauv) + 1 ;
  tsauv . nds = table ;
  tsauv . nds . titre = texte 'depot tranche ' ndk ;
  tsauv . nds . maillage = tstru . maillage ;
  tsauv . nds . temps = tdep . temps ;
  tsauv . nds . modele = tdep . modele ;
  tsauv . nds . temperatures = tdep . temperatures ;
  tsauv . nds . deplacements = tdep . deplacements ;
  tsauv . nds . contraintes = tdep . contraintes ;
  tsauv . nds . variables_internes = tdep . variables_internes ;
  tsauv . nds . deformations_inelastiques = 
                              tdep . deformations_inelastiques ;
finsi ;  
*++++++
* dessine
* picture
si (tstru . ilfotrace) ;
bodes1 tstru t_oeil t_coef ;
finsi ;
*
fin b_depo ;
* 
mess '     §§§§ fin depot cordon / deposit end §§§§    ' ;
finproc ;
*------------------------------------------------------------------
* procedure de refroidissement
* cooling down procedure
*------------------------------------------------------------------
debproc refroidi tstru*table t_oeil*table t_coef*table ;
*-----------------------------
* refroidissement de la structure
* final structure cooling down 
* en entree : table tstru
* input : table tstru
*      'MAILLAGE' : maillage courant / istant global mesh
*      'TEMPERATURES', CHPOINT
*      'DEPLACEMENTS', CHPOINT
*      'CONTRAINTES', MCHAML
*      'DEFORMATIONS_INELASTIQUES', MCHAML
*      'VARIABLES_INTERNES', MCHAML
*      'BLOCAGES_MECANIQUES', RIGIDITE
*      'ILFOSOVE', LOGIQUE sauvegarde ou non / to save or not
*      'ILFOTRACE', LOGIQUE dessine ou non / to picture or not 
*      'TEMPS_CALCULES', LISTREEL temps de refroidisssement/ cooling time 
*      'TEMPS_SAUVES', LISTREEL idem, facultatif / optional
* en sortie : table tstru
* output : table tstru
*      'SAUVEGARDE', TABLE des sauvegardes, indicee par des entiers,
*             de sous-indices
*                   'TITRE', TEXTE 
*                   'MAILLAGE', MAILLAGE
*                   'TEMPS', LISTREEL chronologie du refroidissement 
*                   'MODELE', MMODEL
*                   'CARACTERISTIQUES', MCHAML
*                   'TEMPERATURES', TABLE
*                   'DEPLACEMENTS', TABLE
*                   'CONTRAINTES', TABLE
*                   'DEFORMATIONS_INELASTIQUES', TABLE
*                   'VARIABLES_INTERNES', TABLE
*      'TEMPS', LISTREEL chronologie du calcul
*-----------------------
mess '     §§§§ debut refroidissement / cooling beginning §§§§    ' ;
si (non (existe tstru temps)) ;
  tstru . temps = prog ;
finsi ;
*++++++++++
* chargement
si ((dime tstru . temps) ega 0) ;
 t_ini = 0. ;
sinon ;
 t_ini = extr tstru . temps (dime tstru . temps) ;
finsi ;
lt_dep = (prog (dime tstru . temps_calcules)*t_ini)
           + tstru . temps_calcules  ;
si (existe tstru temps_sauves) ;
lt_sauv = (prog (dime tstru . temps_sauves)*t_ini)
           + tstru . temps_sauves ;
finsi ;
lt_o = prog (dime tstru . temps_calcules)*1. ;
ev_dep = evol manu lt_dep lt_o ;
*
sur_conv = enve tstru . maillage ; 
mod_conv = mode sur_conv thermique convection cons ther ;
mat_conv = mate mod_conv h he1 ;
cht_conv = manu chpo sur_conv 1 T 20. ;
ev_conv = evol manu 't (s)' lt_dep 'Te (oC)' lt_o ;
cha_conv = char teco ev_conv cht_conv ;
*+++++++++++
* prepare la table pour pasapas
tref = table ;
tref . modele = tstru . modele et mod_conv ; 
tref . caracteristiques = tstru . caracteristiques et mat_conv ;
tref . blocages_mecaniques = tstru . blocages_mecaniques ;
tref . chargement = cha_conv ;
tref . temps_calcules = lt_dep ;
si (existe tstru temps_sauves) ;
 tref . temps_sauves = lt_sauv ;
finsi ;
tref.'MONO'=monop;
tref . procedure_thermique = DUPONT ;
tref . talpha_reference = 20. ;
tref . temps = table ;
tref . temps . 0 = extr lt_dep 1 ;
tref . temperatures = table ;
tref . temperatures . 0 = tstru . temperatures ;
tref . deplacements = table ;
tref . deplacements . 0 = tstru . deplacements ;
tref . contraintes = table ;
tref . contraintes . 0 = tstru . contraintes ;
tref . deformations_inelastiques = table ;
tref . deformations_inelastiques . 0 = 
              tstru . deformations_inelastiques ;
tref . variables_internes = table ;
tref . variables_internes . 0 = 
              tstru . variables_internes ;
TMASAU=table;
tref . 'MES_SAUVEGARDES'=TMASAU;
TMASAU .'DEFTO'=VRAI;
TMASAU .'DEFIN'=VRAI;         
*+++++++++++
* execute
pasapas tref ;
*+++++++++++
* actualise tstru
tstru . temps = tstru . temps et lt_dep ;
lt1 = dime tref . deplacements ;
lt1 = lt1 - 1 ;
tstru . deplacements = tref . deplacements . lt1 ;
tstru . temperatures = tref . temperatures . lt1 ;
tstru . contraintes = tref . contraintes . lt1 ;
tstru . deformations_inelastiques = 
               tref . deformations_inelastiques . lt1 ;
tstru . variables_internes = tref . variables_internes . lt1 ;
si tstru . ilfosove ;
  si (non (existe tstru sauvegarde)) ;
    tstru . sauvegarde = table ;
  finsi ;
  tsauv = tstru . sauvegarde ;
  nds = (dime tsauv) + 1 ;
  tsauv . nds = table ;
  tsauv . nds . titre = refroidissement ;
  tsauv . nds . maillage = tstru . maillage ;
  tsauv . nds . temps = tref . temps ;
  tsauv . nds . modele = tref . modele ;
  tsauv . nds . temperatures = tref . temperatures ;
  tsauv . nds . deplacements = tref . deplacements ;
  tsauv . nds . contraintes = tref . contraintes ;
  tsauv . nds . variables_internes = tref . variables_internes ;
  tsauv . nds . deformations_inelastiques = 
                              tref . deformations_inelastiques ;
finsi ;  
*
*++++++
* dessine
si (tstru . ilfotrace) ;
bodes1 tstru t_oeil t_coef ;
finsi ;
*
mess '     §§§§ fin refroidissement / cooling end §§§§    ' ;
finproc ;
*------------------------------------------------------------------
* procedure de traces
*------------------------------------------------------------------
debproc bodes1 tstru*table t_oeil*table t_coef*table ;
*--------------------------------------------
* traces isovaleurs
*------------------
n_oeil = dime t_oeil  ;
mailtra1 = enve tstru . maillage ;
* temperature
l_temp = prog 100. 200. 300. 400. 500. 600. 700. 800. 900. 1000.
 1100. 1200. 1300. 1400. ;
dep1 = redu tstru . deplacements mailtra1 ;
defte1 = defo dep1 mailtra1 t_coef . defo1 vert 
  (redu tstru . temperatures mailtra1) ;
tstru . deformee_thermique = tstru . deformee_thermique et defte1 ; 
titre (et tit_ref ' / temperature ') ; 
si (neg graph 'N') ;
trac t_oeil . 3 cach defte1 ;
finsi ; 
* vmises
l_vm = prog 25. 50. 75. 100. 125. 150. 175. 200. 250. 300. 350. 400. 
 450. 500. ;
momec1 = (extr tstru . modele cons meca) ;
vm1 = vmis momec1 tstru . contraintes / 1.e6  ;
chpvm1 = redu (changer vm1 momec1 chpo) mailtra1 ;
defvm1 = defo dep1 mailtra1 t_coef . defo1 chpvm1 ;
tstru . deformee_mecanique = tstru . deformee_mecanique et defvm1 ;
titre (et tit_ref ' / von mises (MPa) ') ; 
si (neg graph 'N') ;
  trac t_oeil . 3 cach  defvm1 ;
finsi ;
*
finproc ;
*------------------------------------------------------------------
*------------------------------------------------------------------
* execution 
* run
*------------------------------------------------------------------
chanfrei . temperatures = manu chpo 1 chanfrei . maillage T 20. 
         nature diffuse ;
chanfrei . deplacements = manu chpo 3 chanfrei . maillage
           ux 0. uy 0. uz 0. nature diffuse;
chanfrei . contraintes = zero 
          (extr chanfrei . modele cons meca) contrain ;
chanfrei . deformations_inelastiques =  zero 
         (extr chanfrei . modele cons meca)  definela ;
chanfrei . variables_internes =
              zero (extr chanfrei . modele cons meca) varinter ; 
chanfrei . depot_ini = 1 ;
si misopoin ;
  chanfrei . depot_fin = 1 ;
sinon ;
  chanfrei . depot_fin = n_tra1 ;
finsi ;
chanfrei . ilfosove = faux ;
chanfrei . ilfotrace = vrai ;
si misopoin ;
  chanfrei . delta_t = 2. ;
sinon ;
  chanfrei . delta_t = 1. ;
finsi ;
*
mailtra1 = enve chanfrei . maillage ;
* temperature
dep1 = redu chanfrei . deplacements mailtra1 ;
defte1 = defo dep1 mailtra1 t_coef . defo1 vert 
  (redu chanfrei . temperatures mailtra1) ;
chanfrei . deformee_thermique = defo dep1 mailtra1 t_coef . defo1 vert 
  (redu chanfrei . temperatures mailtra1) ;
*
momec1 = (extr chanfrei . modele cons meca) ;
vm1 = vmis momec1 chanfrei . contraintes / 1.e6  ;
chpvm1 = redu (changer vm1 momec1 chpo) mailtra1 ;
chanfrei . deformee_mecanique = defo dep1 mailtra1 
              t_coef . defo1 chpvm1 ;
*
depocord chanfrei t_oeil t_coef ;
*++++++++++++++++++
si faux ;
chanfrei . depot_ini = 2 ;
chanfrei . depot_fin = 2 ;
depocord chanfrei t_oeil t_coef ;
finsi ;
*++++++++++++++++++
si misopoin ;
* chanfrei . temps_calcules = prog 0.  pas 1. 10.; 
* refroidi chanfrei t_oeil t_coef ;
sinon ; 
  chanfrei . temps_calcules = prog 0. pas 1. 120. ;
  refroidi chanfrei t_oeil t_coef ;
finsi ;
*++++++++++++++++++
*bodes1 chanfrei t_oeil t_coef ;
*
*sauv chanfrei t_oeil l_vm l_temp ;
* 
si (neg graph 'N') ;
  trac chanfrei . deformee_thermique cach t_oeil . 3 anim ;
  trac chanfrei . deformee_mecanique cach t_oeil . 3 anim ;
finsi ;
*------------------------------------------------------------------
test1 = extr (chanfrei . temperatures) t ppl3 ;
si ((abs(test1 - 20.)) > 10.) ;
 erre 5 ;
sinon ;
 erre 0 ;
finsi ;

fin ;
 

 

 

 

 

 

 

 

© Cast3M 2003 - All rights reserved.
Disclaimer