Télécharger topoptim_06_Symmetry.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier topoptim_06_Symetry.dgibi
  2. ************************************************************************
  3. ************************************************************************
  4.  
  5. ************************************************************************
  6. ** Topology optimization of a simple 2D structure subjected to a
  7. ** mechanical loading, with a symmetry restriction.
  8. **
  9. ** Author:
  10. ** Guenhael Le Quilliec (LaMe - Polytech Tours)
  11. **
  12. ** Version:
  13. ** V2.0 2025/11/13 Updated to make it compatible with TOPOPTIM V4.0
  14. ** V1.0 2017/04/18 Original version compatible with TOPOPTIM V2.1
  15. ************************************************************************
  16.  
  17. * Plot results
  18. graph0 = FAUX ;
  19.  
  20. * General options
  21. OPTI 'DIME' 2 'MODE' 'PLAN' 'CONT' 'ELEM' 'QUA4' ;
  22.  
  23. * Number of elements
  24. nelx0 = 60 ;
  25. nely0 = 20 ;
  26.  
  27. * Dimensions
  28. l0 = nelx0 * 1.0 ;
  29. h0 = nely0 * 1.0 ;
  30.  
  31. * Mesh
  32. p0 = 0.0 0.0 ;
  33. p1 = 0.0 h0 ;
  34. p2 = l0 0.0 ;
  35. ln0 = DROI nely0 p0 p1 ;
  36. msh0 = ln0 TRAN nelx0 p2 ;
  37. p2 = msh0 POIN 'PROC' p2 ;
  38.  
  39. * Model and material
  40. mod0 = MODE msh0 'MECANIQUE' 'ELASTIQUE' ;
  41. mat0 = MATE mod0 'YOUN' 210.0e9 'NU' 0.3 ;
  42.  
  43. * Boundary conditions and loading
  44. bc0 = (BLOQ 'UX' ln0) ET (BLOQ 'UY' p2) ;
  45. load0 = FORC (0.0 -1.0) p1 ;
  46.  
  47. * Finite element model table
  48. mdl0 = TABL ;
  49. mdl0.'MODELE' = mod0 ;
  50. mdl0.'CARACTERISTIQUES' = mat0 ;
  51. mdl0.'BLOCAGES_MECANIQUES' = bc0 ;
  52. mdl0.'CHARGEMENT' = load0 ;
  53.  
  54. * Optimization table
  55. tab0 = TABL ;
  56. tab0.'TRAC' = graph0 ;
  57. tab0.'RESOLUTION_LINEAIRE' = mdl0 ;
  58. tab0.'FRACTION_VOLUME_LIMITE' = 0.5 ;
  59. tab0.'RESTRICTIONS' = TABL ;
  60. tab0.'RESTRICTIONS'.(1) = TABL ;
  61. tab0.'RESTRICTIONS'.(1).'TYPE' = MOT 'SYME_DROI' ;
  62. tab0.'RESTRICTIONS'.(1).'POIN1' = (p1 / 2.0) ;
  63. tab0.'RESTRICTIONS'.(1).'POIN2' = (p1 / 2.0) PLUS p2 ;
  64. *tab0.'FILTRE' = MOT 'EDP' ;
  65. *tab0.'FILTRE_EDP_RAYON' = 2.0 * l0 / (FLOT nelx0) ;
  66. *tab0.'FILTRE' = MOT 'CHAPEAU' ;
  67. *tab0.'FILTRE_CHAPEAU_RAYON' = 2.5 * l0 / (FLOT nelx0) ;
  68. *tab0.'FILTRER' = MOT 'DENSITE' ;
  69. *tab0.'OPTIMISEUR' = MOT 'MMA' ;
  70.  
  71. * Optimization
  72. TOPOPTIM tab0 ;
  73.  
  74. * Plot final topology (physical density)
  75. topo0 = tab0.'TOPOLOGIE'.(tab0.'CYCLE') ;
  76. topomsh0 = tab0.'MAILLAGE'.(tab0.'CYCLE') ;
  77. SI graph0 ;
  78. TRAC (REDU topo0 topomsh0) (REDU mod0 topomsh0)
  79. (PROG 0.0 'PAS' (1.0 / 56.0) 1.0)
  80. 'TITR' 'Topologie finale' ;
  81. FINS ;
  82.  
  83. * Plot output evolutions
  84. SI graph0 ;
  85. REPE loop0 (DIME tab0.'EVOLUTIONS_SAUVEES') ;
  86. evoname0 = EXTR tab0.'EVOLUTIONS_SAUVEES' &loop0 ;
  87. DESS tab0.'EVOLUTIONS'.evoname0 'POSY' 'EXCE'
  88. 'TITR' (CHAI 'Evolution de' ' ' evoname0
  89. ' au cours des cycles d''optimisation') ;
  90. FIN loop0 ;
  91. FINS ;
  92.  
  93.  
  94. FIN ;
  95.  
  96.  
  97.  

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