Télécharger topoptim_02_Binarization.dgibi
* fichier topoptim_02_Binarization.dgibi ************************************************************************ ************************************************************************ ************************************************************************ ** Topology optimization of the MBB beam with variable penalty factor ** and binarization (0-1 design) using either: ** - Q factor (only compatible with OC); ** - projection (preferably with density filtering). ** ** Author: ** Guenhael Le Quilliec (LaMe - Polytech Tours) ** ** Version: ** V4.0 2025/12/15 Updated to make it compatible with TOPOPTIM V4.0 ** V3.0 2021/05/06 Updated to make it compatible with TOPOPTIM V3.0 ** V2.0 2017/04/18 Updated to make it compatible with TOPOPTIM V2.0 ** V1.0 2014/04/28 Original version compatible with TOPOPTIM V1.0 ************************************************************************ * Plot results graph0 = FAUX ; * Binarization by projection proj0 = FAUX ; * General options * Number of elements nelx0 = 90 ; nely0 = 30 ; * Dimensions l0 = nelx0 * 1.0 ; h0 = nely0 * 1.0 ; * Mesh p0 = 0.0 0.0 ; p1 = 0.0 h0 ; p2 = l0 0.0 ; * Model and material * Boundary conditions * Loading * Penalty factor evolution * Finite element model table mdl0.'MODELE' = mod0 ; mdl0.'CARACTERISTIQUES' = mat0 ; mdl0.'BLOCAGES_MECANIQUES' = bc0 ; mdl0.'CHARGEMENT' = load0 ; * Optimization table tab0.'RESOLUTION_LINEAIRE' = mdl0 ; tab0.'FRACTION_VOLUME_LIMITE' = 0.4 ; tab0.'PENALISATION_P' = pnl_p0 ; * Monitor its value *tab0.'FILTRE' = MOT 'EDP' ; *tab0.'FILTRE_EDP_RAYON' = 3.0 * l0 / (FLOT nelx0) ; *tab0.'FILTRE' = MOT 'CHAPEAU' ; *tab0.'FILTRE_CHAPEAU_RAYON' = 3.0 * l0 / (FLOT nelx0) ; *tab0.'OPTIMISEUR' = MOT 'MMA' ; * Personnal procedure to control the on the fly the value of the * projection stiffness DEBP TOPOPERS tab0 ; * Input data Wtab = tab0.'WTABLE' ; Ltab = Wtab.'LOGIQUE' ; * If stop trigger is activated SI (Ltab.'STOP' ET (tab0.'PROJECTION_RAIDEUR' < 512)) ; * Update projection stiffness tab0.'PROJECTION_RAIDEUR' = tab0.'PROJECTION_RAIDEUR' * 2.0 ; * Increase max number of cycles tab0.'MAX_CYCLES' = Wtab.'CYCLE' + 50 ; * Disable stop trigger to continue optimization Ltab.'STOP' = FAUX ; FINS ; FINP ; SI proj0 ; * Density filtering * Initialization of max cycles and projection stiffness tab0.'MAX_CYCLES' = 50 ; tab0.'PROJECTION_RAIDEUR' = 1.0 ; tab0.'PROCEDURE_TOPOPERS' = VRAI ; * Monitor its value SINO ; * Use Gibiane filter tab0.'FILTRE_GIBIANE_TAUX' = 10 ; * OC gray scale factor evolution tab0.'OC_Q' = oc_q0 ; FINS ; * Optimization TOPOPTIM tab0 ; * Plot final topology (physical density) topo0 = tab0.'TOPOLOGIE'.(tab0.'CYCLE') ; topomsh0 = tab0.'MAILLAGE'.(tab0.'CYCLE') ; SI graph0 ; 'TITR' 'Topologie finale' ; FINS ; * Plot output evolutions SI graph0 ; ' au cours des cycles d''optimisation') ; FIN loop0 ; FINS ; FIN ;
© Cast3M 2003 - Tous droits réservés.
Mentions légales