Télécharger topoptim_05.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier topoptim_05.dgibi
  2. ************************************************************************
  3. ************************************************************************
  4.  
  5. ************************************************************************
  6. ** Topology optimization of a simple 2D structure subjected to a
  7. ** mechanical loading, with penalty factor, GSF, a hole and an frozen
  8. ** area.
  9. **
  10. ** Author:
  11. ** Guenhael Le Quilliec (LaMe - Polytech Tours)
  12. **
  13. ** Version:
  14. ** V2.0 2017/04/18 Updated to make it compatible with TOPOPTIM V2.0
  15. ** V1.0 2014/04/28 Original version compatible with TOPOPTIM V1.0
  16. ************************************************************************
  17.  
  18. graph0 = FAUX ;
  19.  
  20. * General options
  21. OPTI 'DIME' 2 'MODE' 'PLAN' 'CONT' 'ELEM' QUA4 ;
  22.  
  23. * Mesh
  24. p0 = 0.0 0.0 ;
  25. p1 = 0.0 60.0 ;
  26. p2 = 30.0 0.0 ;
  27. p3 = 0.0 30.0 ;
  28. p4 = 30.0 25.0 ;
  29. p5 = 15.0 15.0 ;
  30. p6 = 19.0 15.0 ;
  31. lgn0 = DROI 60 p0 p1 ;
  32. lgn1 = DROI 30 p3 p1 ;
  33. ELIM lgn0 lgn1 0.01 ;
  34. msh0 = TRAN lgn0 30 p2 ;
  35. tmp0 = msh0 POIN 'SPHE' p5 p6 4.0 ;
  36. tmp0 = msh0 ELEM 'APPU' 'STRI' tmp0 ;
  37. msh0 = DIFF msh0 tmp0 ;
  38.  
  39. p2 = msh0 POIN 'PROC' p2 ;
  40. msh1 = msh0 POIN 'DROI' p3 p4 2.5 ;
  41. msh1 = msh0 ELEM 'APPU' 'STRI' msh1 ;
  42.  
  43. * Model and material
  44. mod0 = MODE msh0 'MECANIQUE' 'ELASTIQUE' ;
  45. mat0 = MATE mod0 'YOUN' 210.0e9 'NU' 0.3 ;
  46.  
  47. * Boundary conditions and loading
  48. bc0 = BLOQ 'UX' 'UY' lgn1 ;
  49. load0 = FORC (1.0 0.0) p2 ;
  50.  
  51. * Factor evolutions
  52. pfct0 = EVOL 'MANU' 'CYCLES' (PROG 5 15) 'P' (PROG 1.0 3.0) ;
  53. qfct0 = EVOL 'MANU' 'CYCLES' (PROG 10 90) 'Q' (PROG 1.0 5.0) ;
  54.  
  55. * Finite element model table
  56. mdl0 = TABL ;
  57. mdl0.'MODELE' = mod0 ;
  58. mdl0.'CARACTERISTIQUES' = mat0 ;
  59. mdl0.'BLOCAGES_MECANIQUES' = bc0 ;
  60. mdl0.'CHARGEMENT' = load0 ;
  61.  
  62. * Optimization table
  63. tab0 = TABL ;
  64. tab0.'RESOLUTION_LINEAIRE' = mdl0 ;
  65. tab0.'ZONE_FIGEE' = msh1 ;
  66. tab0.'TAUX_FILTRAGE' = 10 ;
  67. tab0.'FACTEUR_P' = pfct0 ;
  68. tab0.'FACTEUR_Q' = qfct0 ;
  69. tab0.'TRAC' = graph0 ;
  70.  
  71. * Optimization
  72. TOPOPTIM tab0 ;
  73.  
  74. * Plot to screen
  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. FINS ;
  81.  
  82. FIN ;
  83.  
  84.  
  85.  
  86.  

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