Télécharger topoptim_04.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier topoptim_04.dgibi
  2. ************************************************************************
  3. ************************************************************************
  4.  
  5. ************************************************************************
  6. ** Topology optimization of a simple 2D structure subjected to a
  7. ** multicase mechanical loading.
  8. **
  9. ** Author:
  10. ** Guenhael Le Quilliec (LaMe - Polytech Tours)
  11. **
  12. ** Version:
  13. ** V2.0 2017/04/18 Updated to make it compatible with TOPOPTIM V2.0
  14. ** V1.0 2014/04/28 Original version compatible with TOPOPTIM V1.0
  15. ************************************************************************
  16.  
  17. graph0 = FAUX ;
  18.  
  19. * General options
  20. OPTI 'DIME' 2 'MODE' 'PLAN' 'CONT' 'ELEM' QUA4 ;
  21.  
  22. * Mesh
  23. p0 = 0.0 0.0 ;
  24. p1 = 0.0 10.0 ;
  25. p2 = 10.0 0.0 ;
  26. lgn0 = DROI 30 p1 p0 ;
  27. msh0 = TRAN lgn0 30 p2 ;
  28. p2 = msh0 POIN 'PROC' p2 ;
  29. p3 = msh0 POIN 'PROC' (10.0 10.0) ;
  30.  
  31. * Model and material
  32. mod0 = MODE msh0 'MECANIQUE' 'ELASTIQUE' ;
  33. mat0 = MATE mod0 'YOUN' 210.0e9 'NU' 0.3 ;
  34.  
  35. * Boundary conditions and multicase loading
  36. bc0 = BLOQ 'UX' 'UY' lgn0 ;
  37. load0 = TABL ;
  38. load0.(1) = FORC (0.3 0.6) p2 ;
  39. load0.(2) = FORC (0.0 1.0) p3 ;
  40.  
  41. * Finite element model table
  42. mdl0 = TABL ;
  43. mdl0.'MODELE' = mod0 ;
  44. mdl0.'CARACTERISTIQUES' = mat0 ;
  45. mdl0.'BLOCAGES_MECANIQUES' = bc0 ;
  46. mdl0.'CHARGEMENT' = load0 ;
  47.  
  48. * Optimization table
  49. tab0 = TABL ;
  50. tab0.'RESOLUTION_LINEAIRE' = mdl0 ;
  51. tab0.'FRACTION_VOLUME' = 0.5 ;
  52. tab0.'TRAC' = graph0 ;
  53.  
  54. * Optimization
  55. TOPOPTIM tab0 ;
  56.  
  57. * Plot to screen
  58. topo0 = tab0.'TOPOLOGIE'.(tab0.'CYCLE') ;
  59. topomsh0 = tab0.'MAILLAGE'.(tab0.'CYCLE') ;
  60. SI graph0 ;
  61. TRAC (REDU topo0 topomsh0) (REDU mod0 topomsh0)
  62. (PROG 0.0 'PAS' (1.0 / 56.0) 1.0) ;
  63. FINS ;
  64.  
  65. FIN ;
  66.  
  67.  
  68.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales