* TOPOPTIM PROCEDUR FD218221 23/11/29 21:15:13 11799 ************************************************************************ ** Topology optimization procedure. ** ** Author: ** Guenhael Le Quilliec (LaMe - Polytech Tours) ** ** Version: ** 3.0 2021/04/15 Improving the structure of TOPOPTIM for developers ** and adding a new filtering function. ** 2.4 2021/04/14 Fixing an issue with TET4 in frozen area ** 2.3 2021/03/19 Modification of default value of 'OC_L2' ** 2.2 2018/02/09 Make it compatible with the new version of TOPOSAUV ** allowing early stop and restart of the optimization ** 2.1 2017/11/11 Compliant mechanism output displacement maximization ** 2.0 2017/04/18 Geometric restrictions, non-linear, multiobjective, ** multiphysic, customizable topology optimization ** 1.1 2015/11/02 Check if volume fraction > proportion of frozen area ** 1.0 2014/04/28 Linear mono-objective topology optimization ************************************************************************ MESS '| |' ; MESS '| |' ; MESS '| DEBUT DE LA PROCEDURE |' ; MESS '| |' ; MESS '| ______ ______ ______ ______ ______ ______ __ __ __ |' ; MESS '| \ \_\ \ \_____\\ \_\ \ \_____\\ \_\ \ \_\ \ \_\\ \_\ \ \_\ |' ; MESS '| _______________________________________________________________ |' ; MESS '| |' ; MESS '| |' ; * Preprocessing * ************* TOPOBOOT tab0 ; * Information * *********** TOPOINFO tab0 ; * Tables wtab0 = tab0.'WTABLE' ; bool0 = wtab0.'BOOL' ; * Initializations ********************************************************************** * OPTIMIZATION LOOP * ********************************************************************** REPE loop0 (tab0.'MAX_CYCLES' - wtab0.'CYCLE' + 1) ; * Initializations xOld0 = wtab0.'TOPOLOGIE' ; wtab0.'OBJECTIF' = 0.0 ; * Update factor values * ******************** TOPOFCTR Tab0 ; * Density fields * ************** TOPODENS Tab0 ; * Mesh, model, material and contact of active zone * ************************************************ TOPOACTI Tab0 ; * Solve FE problem(s) * ******************* TOPORESO tab0 ; * User defined procedure * ********************** SI tab0.'PROCEDURE_TOPOPERS' ; TOPOPERS tab0 ; FINS ; * Calculate the objective value and the sensitivity field * ******************************************************* TOPOSENS tab0 ; * Add some restrictions * ********************* * Sensitivity filtering * ********************* TOPOFILT tab0 ; * Topology update * *************** TOPOLOGY tab0 ; * Compute the change * Number of active elements * Save progression information Lstobj0 = Lstobj0 ET wtab0.'OBJECTIF' ; Lstchg0 = Lstchg0 ET wtab0.'CHANGE' ; Lstp0 = Lstp0 ET wtab0.'FACTEUR_P' ; Lstq0 = Lstq0 ET wtab0.'FACTEUR_Q' ; Lstnbel0 = Lstnbel0 ET nbel0 ; * Save output data * **************** TOPOSAUV tab0 ; * Save the number of the last completed cycle tab0.'CYCLE' = wtab0.'CYCLE' ; * Plot to screen tmp1 = wtab0.'TOPOLOGIE' ; SI bool0.'ZONE_FIGEE' ; tmp1 = tmp1 + wtab0.'UN'.(2) ; FINS ; SI bool0.'MECANIQUE' ; tmp2 = wtab0.'MECANIQUE'.'MODELE'.'A' ; SINO ; tmp2 = wtab0.'THERMIQUE'.'MODELE'.'A' ; FINS ; SI ((NON bool0.'CAS_MULTIPLES') ET (NON bool0.'MECANISME') ET bool0.'MECANIQUE' ET bool0.'PASAPAS') ; FINS ; FINS ; * Write progression to screen 'FORMAT' '(ES14.7E2)' wtab0.'OBJECTIF' '|' 'FORMAT' '(ES14.7E2)' wtab0.'CHANGE' '|' 'FORMAT' '(ES14.7E2)' wtab0.'FACTEUR_P' '|' 'FORMAT' '(ES14.7E2)' wtab0.'FACTEUR_Q' '|' nbel0*77) ; FINS ; * Convergence test SI ((wtab0.'CHANGE' < tab0.'CRITERE') OU (EGA wtab0.'CYCLE' tab0.'MAX_CYCLES')) ; tab0.'CONVERGENCE' = wtab0.'CHANGE' < tab0.'CRITERE' ; QUIT loop0 ; FINS ; * Write progression to screen (After the convergence test in case of step by step resolution since there will be a summary at the end) MESS '| |' ; MESS '| |' ; MESS '| |' ; nbel0*76 '|'*79) ; MESS '| |' ; FINS ; * Number of the next cycle wtab0.'CYCLE' = wtab0.'CYCLE' + 1 ; FIN loop0 ; ********************************************************************** * END OPTIMIZATION LOOP * ********************************************************************** * Cleaning * Write information to screen MESS '| |' ; MESS '| |' ; FIN loop0 ; FINS ; SI tab0.'CONVERGENCE' ; SINO ; MESS ' Nombre maximum de cycles d''optimisation atteint.' ; FINS ; MESS '| |' ; MESS '| |' ; MESS '| T O P O P T I M |' ; MESS '| |' ; FINP ;
© Cast3M 2003 - Tous droits réservés.
Mentions légales