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. * General options
  18. OPTI 'DIME' 2 'MODE' 'PLAN' 'CONT' 'ELEM' QUA4 ;
  19. OPTI 'TRAC' 'PSC' ;
  20.  
  21. * Mesh
  22. p0 = 0.0 0.0 ;
  23. p1 = 0.0 10.0 ;
  24. p2 = 10.0 0.0 ;
  25. lgn0 = DROI 30 p1 p0 ;
  26. msh0 = TRAN lgn0 30 p2 ;
  27. p2 = msh0 POIN 'PROC' p2 ;
  28. p3 = msh0 POIN 'PROC' (10.0 10.0) ;
  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 multicase loading
  35. bc0 = BLOQ 'UX' 'UY' lgn0 ;
  36. load0 = TABL ;
  37. load0.(1) = FORC (0.3 0.6) p2 ;
  38. load0.(2) = FORC (0.0 1.0) p3 ;
  39.  
  40. * Finite element model table
  41. mdl0 = TABL ;
  42. mdl0.'MODELE' = mod0 ;
  43. mdl0.'CARACTERISTIQUES' = mat0 ;
  44. mdl0.'BLOCAGES_MECANIQUES' = bc0 ;
  45. mdl0.'CHARGEMENT' = load0 ;
  46.  
  47. * Optimization table
  48. tab0 = TABL ;
  49. tab0.'RESOLUTION_LINEAIRE' = mdl0 ;
  50. tab0.'FRACTION_VOLUME' = 0.5 ;
  51.  
  52. * Optimization
  53. TOPOPTIM tab0 ;
  54.  
  55. * Plot to screen
  56. topo0 = tab0.'TOPOLOGIE'.(tab0.'CYCLE') ;
  57. topomsh0 = tab0.'MAILLAGE'.(tab0.'CYCLE') ;
  58. TRAC (REDU topo0 topomsh0) (REDU mod0 topomsh0)
  59. (PROG 0.0 'PAS' (1.0 / 56.0) 1.0) ;
  60.  
  61. FIN ;
  62.  
  63.  
  64.  

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