* TOPOCHAR PROCEDUR FD218221 25/12/18 21:15:03 12429 ************************************************************************ ** Procedure called by TOPOPTIM for updating: ** - mechanical and thermal loadings, ** - boundary conditions (mechanical and thermal), ** - compliant mechanism springs. ** ** Author: ** Guenhael Le Quilliec (LaMe - Polytech Tours) ** ** Version: ** 1.0 2024/04/16 Previously part of TOPOBOOT, now called in the ** optimization loop to handle updates (e.g. if ** the loading depends on physical densities). ************************************************************************ * TODO voir pour ne mettre à jour que ce qui le nécessite via TOPOMODI * en particulier si TOPOUPDT est VRAI ? DEBP TOPOCHAR tab*'TABLE' ; * Input data * ********** Wtab = tab.'WTABLE' ; Ltab = Wtab.'LOGIQUE' ; * Loading updates whenever TOPOPTIM is called, or at each cycle if * PROCEDURE_TOPOUPDT is VRAI SI ((EGA Wtab.'ITERATION' 1) OU tab.'PROCEDURE_TOPOUPDT') ; res = Wtab.'RESOLUTION_B' ; * Mechanical boundary conditions nbrbdcM = 0 ; nbrbdcM = 1 ; bdcMB = res.'BLOCAGES_MECANIQUES' ; nbrbdcM = &itr ; FINS ; FIN itr ; SI (EGA nbrbdcM 1) ; bdcMB = bdcMB.(1) ; FINS ; FINS ; FINS ; * Thermal boundary conditions nbrbdcT = 0 ; nbrbdcT = 1 ; bdcTB = res.'BLOCAGES_THERMIQUES' ; nbrbdcT = &itr ; FINS ; FIN itr ; SI (EGA nbrbdcT 1) ; bdcTB = bdcTB.(1) ; FINS ; FINS ; FINS ; * Mechanical and thermal loadings nbrldg = 1 ; ldg = res.'CHARGEMENT' ; nbrldg = &itr ; FINS ; FIN itr ; SI (EGA nbrldg 1) ; ldg = ldg.(1) ; FINS ; FINS ; * Loading modification detection MESS ' alors aussi fournir sa sensibilite.' ; FINS ; FINS ; * Compliant mechanism output loading nbrldg1 = 0 ; SI Ltab.'MECANISME' ; nbrldg1 = 1 ; ldg1 = tab.'MECANISME' ; nbrldg1 = &itr ; FINS ; FIN itr ; SI (EGA nbrldg1 1) ; ldg1 = ldg1.(1) ; FINS ; FINS ; * Mechanism modification detection * SI (NON (EXIS res 'SENSIBILITE_NORMALISEE_MECANISME')) ; MESS ' de la topologie.' ; FINS ; * FINS ; FINS ; * Number and names of components for forces and displacements SI Ltab.'MECANIQUE' ; modMB = Wtab.'MECANIQUE'.'MODELE_B' ; FINS ; * Number and names of components for thermal fluxes and temperatures SI Ltab.'THERMIQUE' ; modTB = Wtab.'THERMIQUE'.'MODELE_B' ; FINS ; * Multiple loads and/or boundary conditions cases Wtab.'NB_CAS' = nbrcas ; Ltab.'CAS_MULTIPLES' = nbrcas > 1 ; SI Ltab.'CAS_MULTIPLES' ; SI (((nbrldg > 1) ET (NEG nbrldg nbrcas)) OU ((nbrldg1 > 1) ET (NEG nbrldg1 nbrcas)) OU ((nbrbdcT > 1) ET (NEG nbrbdcT nbrcas)) OU ((nbrbdcM > 1) ET (NEG nbrbdcM nbrcas))) ; MESS 'Le nombre de cas de charges ne correspond pas au nombre de cas de conditions aux limites.' ' Lorsque superieurs a 1, le nombre de cas de charge et de cas de conditions aux limites doivent correspondre.'; ERRE 'Veuillez verifier vos donnees d''entree.' ; FINS ; * Transform a single load into a table of identical loads SI (EGA nbrldg 1) ; REPE itr nbrcas ; tmp.&itr = ldg ; FIN itr ; ldg = tmp ; FINS ; * Transform a single compliant mechanism load into a table of * identical compliant mechanism loads SI (EGA nbrldg1 1) ; REPE itr nbrcas ; tmp.&itr = ldg1 ; FIN itr ; ldg1 = tmp ; FINS ; * Transform mechanica boundary conditions into a table of identical * mechanical boundary conditions SI (EGA nbrbdcM 1) ; REPE itr nbrcas ; tmp.&itr = bdcMB ; FIN itr ; bdcMB = tmp ; FINS ; * Transform thermal boundary conditions into a table of identical * thermal boundary conditions SI (EGA nbrbdcT 1) ; REPE itr nbrcas ; tmp.&itr = bdcTB ; FIN itr ; bdcTB = tmp ; FINS ; FINS ; Wtab.'CHARGEMENT' = ldg ; SI Ltab.'MECANISME' ; Wtab.'MECANISME' = ldg1 ; FINS ; SI Ltab.'MECANIQUE' ; Wtab.'MECANIQUE'.'BLOCAGES' = bdcMB ; FINS ; SI Ltab.'THERMIQUE' ; Wtab.'THERMIQUE'.'BLOCAGES' = bdcTB ; FINS ; SI Ltab.'MECANIQUE' ; SI Ltab.'THERMIQUE' ; SI Ltab.'CAS_MULTIPLES' ; REPE itr nbrcas ; FIN itr ; SINO ; FINS ; SINO ; Wtab.'MECANIQUE'.'CHARGEMENT' = ldg ; FINS ; FINS ; SI Ltab.'THERMIQUE' ; SI Ltab.'MECANIQUE' ; SI Ltab.'CAS_MULTIPLES' ; REPE itr nbrcas ; FIN itr ; SINO ; FINS ; SINO ; Wtab.'THERMIQUE'.'CHARGEMENT' = ldg ; FINS ; FINS ; * Springs used for compliant mechanism optimization SI Ltab.'MECANISME' ; SI Ltab.'CAS_MULTIPLES' ; REPE itr nbrcas ; SINO ; tmp = ldg.&itr + ldg1.&itr ; FINS ; REPE itr1 nbrcpnM ; REPE itr2 tmp2 ; FIN itr2 ; FIN itr1 ; FIN itr ; SINO ; SINO ; tmp = ldg + ldg1 ; FINS ; REPE itr nbrcpnM ; REPE itr1 tmp2 ; FIN itr1 ; FIN itr ; FINS ; Wtab.'RESSORTS' = spr ; FINS ; FINS ; FINP ;
© Cast3M 2003 - Tous droits réservés.
Mentions légales