* TOPOVISU PROCEDUR FD218221 25/12/18 21:15:15 12429 ************************************************************************ ** Procedure called by TOPOPTIM to display results on-the-fly at the end ** of each cycle. ** ** Author: ** Guenhael Le Quilliec (LaMe - Polytech Tours) ** ** Version: ** 1.0 2025/11/13 Previously defined directly in TOPOPTIM. Now shows ** von Mises stress field when any stress constraint ** is active and improved for compatibility with ** TOPOPTIM V4.0. ************************************************************************ DEBP TOPOVISU tab*'TABLE' ; * Input data * ********** Wtab = tab.'WTABLE' ; Ltab = Wtab.'LOGIQUE' ; visu = Wtab.'VISU' ; * Number of cycles since the last call to TOPOPTIM nbritr = Wtab.'ITERATION' ; * Initialization * ************** SI (nbritr EGA 1) ; * Title of any printable variables * -------------------------------- * Create the title line * --------------------- pos = 8 ; SI (EGA varnam 'NB_ACTIVE_ELEM') ; pos = pos + 10; SINO ; pos = pos + 14; FINS ; FIN itr1 ; * Save the cursor position * ------------------------ visu.'POSITION' = pos ; * Title, separation line and history table for PASAPAS * ---------------------------------------------------- FIN itr1 ; visu.'LIGNE_PASAPAS' = line ; FINS ; FINS ; FINS ; * Save progression information and prepare new string to print * ************************************************************ pos = 8 ; * Update its value if it is 'FRACTION_VOLUME' or 'TEMPS_CYCLE' SI (EGA varnam 'FRACTION_VOLUME') ; modD = Wtab.'MODELE_D' ; matD = Wtab.'CARACTERISTIQUES_D' ; Wtab.'VOLUME_TOTAL_D' ; FINS ; FINS ; SI (EGA varnam 'TEMPS_CYCLE') ; FINS ; SI (EGA varnam 'NB_ACTIVE_ELEM') ; pos = pos + 10; SINO ; SI (EGA varnam 'TEMPS_CYCLE') ; pos = pos + 14; SINO ; 'FORMAT' '(ES13.6E2)' Wtab.varnam /(pos+1) ; pos = pos + 14; FINS ; FINS ; FINS ; FIN itr1 ; visu.'HISTORIQUE'.nbritr = print ; FINS ; * On-the-fly field visualization * ****************************** * TODO to be improved for 3D * Model * ----- SI Ltab.'MECANIQUE' ; modA = Wtab.'MECANIQUE'.'MODELE_A' ; SINO ; modA = Wtab.'THERMIQUE'.'MODELE_A' ; FINS ; * Topology * -------- SI Ltab.'ZONE_FIGEE' ; * Combine the Y field on D with the unitary field on F * This creates a 2-zone field merged into a single zone * field using to REDU SINO ; FINS ; * Deformed mesh * ------------- SI ((NON Ltab.'CAS_MULTIPLES') ET (NON Ltab.'MECANISME') tmp = Wtab.'RESOLUTION_A'.'MAX_ID' ; SINO ; modYA = modA ; FINS ; * Microscopic von Mises * --------------------- SI Ltab.'CONTRAINTE_SIGMA_VM' ; * Microscopic von Mises on A * Remark: values on F (if present) will be set to 0.0 * Deformed mesh SI ((NON Ltab.'CAS_MULTIPLES') ET (NON Ltab.'MECANISME') tmp = Wtab.'RESOLUTION_A'.'MAX_ID' ; SINO ; modvnmA = modA ; FINS ; * Copy the von Mises field & model on the top of the topology SINO ; FINS ; * Rescaling of the topology field * max = MAXI micvnmA ; max = tab.'SIGMA_VM_LIMITE' ; YA = (YA * (max - min)) + min ; * Rename field component * Plot von Mises (top) and topology (bottom) SINO ; * Plot topology FINS ; FINS ; * Print progression to screen * *************************** SI ((nbritr EGA 1) OU Ltab.'CAS_MULTIPLES') ; MESS visu.'TITRE'; FINS ; MESS print ; SI (Ltab.'STOP' OU Ltab.'CAS_MULTIPLES') ; MESS visu.'TITRE'; FINS ; SINO ; SI (NON Ltab.'STOP') ; MESS visu.'TITRE_PASAPAS' ; MESS print ; SINO ; MESS visu.'TITRE_PASAPAS'; REPE itr1 nbritr ; FIN itr1 ; FINS ; FINS ; * Write last information before leaving * ************************************* SI Ltab.'STOP' ; * Summary * ------- FINS ; MESS 'Bilan :' ; SI tab.'CONVERGENCE' ; SINO ; FINS ; SINO ; FINS ; MESS '| F I N D E L A P R O C E D U R E T O P O P T I M |' ; SINO ; MESS '| P R O C E D U R E T O P O P T I M : F I N D E L A R E P R I S E |' ; FINS ; FINS ; FINP ;
© Cast3M 2003 - Tous droits réservés.
Mentions légales