Télécharger topoptim_06.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier topoptim_06.dgibi
  2. ************************************************************************
  3. ************************************************************************
  4.  
  5. ************************************************************************
  6. ** Topology optimization of 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. ** V1.0 2017/04/18 Original version compatible with TOPOPTIM V2.1
  14. ************************************************************************
  15.  
  16. * General options
  17. OPTI 'DIME' 2 'MODE' 'PLAN' 'CONT' 'ELEM' QUA4 ;
  18. OPTI 'TRAC' 'PSC' ;
  19.  
  20. * Mesh
  21. nelx0 = 60 ;
  22. nely0 = 20 ;
  23. p0 = 0.0 0.0 ;
  24. p1 = 0.0 20.0 ;
  25. p2 = 60.0 0.0 ;
  26. lgn0 = DROI nely0 p1 p0 ;
  27. msh0 = TRAN lgn0 nelx0 p2 ;
  28. p2 = msh0 POIN 'PROC' p2 ;
  29.  
  30. * Model and material
  31. mod0 = MODE msh0 'MECANIQUE' 'ELASTIQUE' ;
  32. mat0 = MATE mod0 'YOUN' 210.0e9 'NU' 0.3 ;
  33.  
  34. * Boundary conditions and loading
  35. bc0 = (BLOQ 'UX' lgn0) ET (BLOQ 'UY' p2) ;
  36. load0 = FORC (0.0 -1.0) p1 ;
  37.  
  38. * Finite element model table
  39. mdl0 = TABL ;
  40. mdl0.'MODELE' = mod0 ;
  41. mdl0.'CARACTERISTIQUES' = mat0 ;
  42. mdl0.'BLOCAGES_MECANIQUES' = bc0 ;
  43. mdl0.'CHARGEMENT' = load0 ;
  44.  
  45. * Optimization table
  46. tab0 = TABL ;
  47. tab0.'RESOLUTION_LINEAIRE' = mdl0 ;
  48. tab0.'FRACTION_VOLUME' = 0.5 ;
  49. tab0.'RESTRICTIONS' = TABL ;
  50. tab0.'RESTRICTIONS'.(1) = TABL ;
  51. tab0.'RESTRICTIONS'.(1).'TYPE' = MOT 'SYME_DROI' ;
  52. tab0.'RESTRICTIONS'.(1).'POIN1' = (p1 / 2.0) ;
  53. tab0.'RESTRICTIONS'.(1).'POIN2' = (p1 / 2.0) PLUS p2 ;
  54.  
  55. * Optimization
  56. TOPOPTIM tab0 ;
  57.  
  58. * Plot to screen
  59. topo0 = tab0.'TOPOLOGIE'.(tab0.'CYCLE') ;
  60. topomsh0 = tab0.'MAILLAGE'.(tab0.'CYCLE') ;
  61. TRAC (REDU topo0 topomsh0) (REDU mod0 topomsh0)
  62. (PROG 0.0 'PAS' (1.0 / 56.0) 1.0) ;
  63.  
  64. FIN ;
  65.  
  66.  
  67.  
  68.  

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