* TOPOPENA PROCEDUR FD218221 25/12/18 21:15:09 12429 ************************************************************************ ** Procedure called by TOPOPTIM to calculate the penalized physical ** density field. ** ** Author: ** Guenhael Le Quilliec (LaMe - Polytech Tours) ** ** Version: ** 4.0 2025/11/10 Renamed TOPOPENA, made compatible with ** TOPOPTIM V4.0, and return derivatives (only ** on D). RAMP penalty function is now available. ** 3.0 2025/11/10 Densities are now given for the entire mesh, ** not only D. ** 2.0 2021/04/22 Fixing an issue when calculating MAX_Z with both ** thermal and mechanical densities. ** 1.0 2021/04/15 Initial version of TOPODENS ************************************************************************ DEBP TOPOPENA tab*'TABLE' ; * General input data * ****************** Wtab = tab.'WTABLE' ; Ltab = Wtab.'LOGIQUE' ; * Mechanical model * **************** SI Ltab.'MECANIQUE' ; ZMD dZMD = TOPOFONC tab.'PENALISATION' 'VALEUR' 'DERIVEE' Wtab.'Y_D' Wtab.'PENALISATION_P' tab.'RAPPORT_RAIDEURS_MECANIQUES' 1.0 ; SI Ltab.'ZONE_FIGEE' ; * Combine the Z field on D with the unitary field on F * This creates a 2-zone field merged into a single zone * field, preserving the original element order using REDU SINO ; ZMB = ZMD ; FINS ; maxZB = ZMB ; maxZD = ZMD ; Wtab.'MECANIQUE'.'Z_B' = ZMB ; Wtab.'MECANIQUE'.'Z_D' = ZMD ; Wtab.'MECANIQUE'.'SENSIBILITE_Z_D' = dZMD ; Wtab.'MAX_Z_B' = maxZB ; Wtab.'MAX_Z_D' = maxZD ; FINS ; * Thermal model * ************* SI Ltab.'THERMIQUE' ; ZTD dZTD = TOPOFONC tab.'PENALISATION' 'VALEUR' 'DERIVEE' Wtab.'Y_D' Wtab.'PENALISATION_P' tab.'RAPPORT_RAIDEURS_THERMIQUES' 1.0 ; SI Ltab.'MECANIQUE' ; ctrmshD = Wtab.'MAILLAGE_GRAVITE_D' ; maxZD = MANU 'CHML' Wtab.'MECANIQUE'.'MODELE_D' 'REPA' 'SCAL' tmp2 'TYPE' 'SCALAIRE' 'GRAVITE' ; * Switch the model of the element field ZTD from Mecha to Therm * ZTD = TOPOCHAN ZTD Wtab.'THERMIQUE'.'MODELE_D' ctrmshD ; ZTD = MANU 'CHML' Wtab.'THERMIQUE'.'MODELE_D' 'TYPE' 'SCALAIRE' 'GRAVITE' ; SI Ltab.'ZONE_FIGEE' ; * Combine the Z field on D with the unitary field on F * This creates a 2-zone field merged into a single zone * field, preserving the original element order using REDU * Same procedure applied to maxZ SINO ; ZTB = ZTD ; maxZB = maxZD ; FINS ; SINO ; SI Ltab.'ZONE_FIGEE' ; * Combine the Z field on D with the unitary field on F * This creates a 2-zone field merged into a single zone * field, preserving the original element order using REDU SINO ; ZTB = ZTD ; FINS ; maxZB = ZTB ; maxZD = ZTD ; FINS ; Wtab.'THERMIQUE'.'Z_B' = ZTB ; Wtab.'THERMIQUE'.'Z_D' = ZTD ; Wtab.'THERMIQUE'.'SENSIBILITE_Z_D' = dZTD ; Wtab.'MAX_Z_B' = maxZB ; Wtab.'MAX_Z_D' = maxZD ; FINS ; FINP ;
© Cast3M 2003 - Tous droits réservés.
Mentions légales