* COUPLER PROCEDUR NOBODY 92/01/01 00:00:00 001 * *********************************************************; * THE PROCEDURE ' C O U P L E R ' *; *********************************************************; * SYNTAXE * _______ * * GEO2 (RAC1) = COUPLER (GEO1) PO1 CARCOQ (N) (MOT1) ; * * This procedure generates the GEO2 translated from GEO1 * according to half the thickness of each element in GEO1. * It also generates the geometry RAC1 for the use with the * finite element RACO. * * In INPUT * * GEO1 - Object MAILLAGE containing the shell geometry * Need to be given only when the MAILLAGE support * of the CARCOQ is different from GEO1. * * PO1 - Object POINT containing the eyepoint to define * the direction in which fluid is present. * * CARCOQ - Object CHAMELEM containing the caracteristics * of GEO1. * * N - Object ENTIER containing any positive integer. * It is an optional parameter to indicate the inve- * rsion of the fluid boundary with respect to shell * geometry GEO1. * * MOT1 - Object MOT. Optioal word equal to 'RAC' to indicate * the RACCORD geometry RAC1 is required. * * In OUTPUT * * GEO2 - Object MAILLAGE containing the traslated geometry. * ********************************************************************* * * 'PLUS'SING THE GIVEN MAILLAGE * 'SINON' ; *** AFFS1 = 'EXTR' CARCOQ AFFE ; *** S1 = 'EXTR' AFFS1 'MAIL' ; 'FINSI' ; * * GENERATION OF THE RACCORD * RACTR IS THE POINTER FOR THE GENERATION * 'SI' ( 'EGA' RR MO1) ; RACTR = 1 > 0 ; 'FINSI' ; 'FINSI' ; * *VECX,VECY ----- NORMALISED,UNADJUSTED VECTOR COMPONENTS IN X & Y * FOR EVERY ELEMENT AT EACH NODE *AX,AY ----- FINAL VECTOR COMPONENTS AT EACH NODE IN X & Y *THIC ----- ELEMENT THICKNESSES ASSOCIATED WITH EACH NODE *CCC ----- POINTER FOR NODE 'DEPL'ACING * *INITIALISATION OF THE TABLES * I = 0; 'REPE' BLOC1 NN ; AX.NNO = 0.0 ;VECX.NNO = 0.0 ;THIC.NNO = 0.0 ; AX.NN1 = 0.0 ;VECX.NN1 = 0.0 ;THIC.NN1 = 0.0 ; AY.NNO = 0.0 ;VECY.NNO = 0.0 ;CCC.NNO = 999; AY.NN1 = 0.0 ;VECY.NN1 = 0.0 ;CCC.NN1 = 999; 'FIN' BLOC1; * * CALCULATIONS START * I = 0; 'REPE' BLOC2 NN ; I = I '+' 1; * *'REDU'CTION OF THE INDIVIDUAL ELEMENT THICKNESSES FROM CHAMELEM CARA * TIC = TIC '*' 0.5 ; * *EPS1 IS THE TOLERANCE USED FOR THE COMPARISION OF FLOTTANTS * EPS1 = TIC '*' 0.0001 ; X21 = X2 - X1 ;Y21 = Y2 - Y1 ; X31 = X3 - X1 ;Y31 = Y3 - Y1 ; *LIST X21;LIST Y21 ;LIST X31;LIST Y31 ; LENG = ( X21 '*' X21) '+' (Y21 '*' Y21 ); LENG = LENG '**' 0.5 ; ZVEC3 = (X21 '*' Y31) '-' (Y21 '*' X31 ) ; VECX.P1 = (-1) '*' Y21 '*' TIC '/' LENG ; VECY.P1 = X21 '*' TIC '/' LENG ; * *MAKING THE DIRECTION OF VECX & VECY SAME AS THAT OF ZVEC3 * TR1 = ZVEC3 '<' 0 ; SI TR1 ; VECX.P1 = (-1) '*' VECX.P1 ; VECY.P1 = (-1) '*' VECY.P1 ; FINSI ; VECX.P2 = VECX.P1 ; VECY.P2 = VECY.P1 ; * * COUP2 --- LOOP FOR ADJUSTING VECX & VECY ACCORDING TO THE ADJACENT * ELEMENT THICKNESS OR SLOPE * NCOU2 = 0 ; 'REPE' COUP2 2 ; NCOU2 = NCOU2 '+' 1 ; A1 = AX.P1 ; A2 = AY.P1 ; A3 = VECX.P1 ; A4 = VECY.P1; XX1 = X1 ; YY1 = Y1 ; THIC1 = THIC.P1 ; THIC2 = TIC ; 'SI' (NCOU2 'EGA' 2) ; A1 = AX.P2 ; A2 = AY.P2 ; A3 = VECX.P2 ; A4 = VECY.P2; XX1 = X2 ; YY1 = Y2 ; THIC1 = THIC.P2 ; THIC2 = TIC ; 'FINSI' ; * * TR2 --- LOGICAL VALUE FOR COMPARING THE (NORMALISED VECTOR/THICNESS) * OF THE ADJACENT ELEMENTS . ( in case of NO SLOPE BUT ONLY THICKNESS * CHANGE) * TR2 = 1 < 0 ; EPS2 = EPS1 '*' TIC ; 'SI' (THIC1 'NEG' 0.0) ; AA1 = A1 '/' THIC1; AA2 = A2 '/' THIC1; AA3 = A3 '/' THIC2; AA4 = A4 '/' THIC2; TR2 = ( (AA1 'EGA' AA3 EPS2) 'ET' (AA2 'EGA' AA4 EPS2) ); FINSI ; REPE BLOC3 1 ; TR3 = ( (A1 'EGA' A3 EPS1) 'ET' (A2 'EGA' A4 EPS1) ); 'SI' TR3 ; *'MESS' 'ENTER SI TR3 . THE VECTOR FOR THIS NODE, WHICH IS EQUAL '; *'MESS' 'TO THE PRESENT CALCULATED VECX.P1.... IS AVAILABLE '; D1 = A3 ; D2 = A4 ; 'QUIT' BLOC3 ; 'SINO' ; *'MESS' ' ENTER SINON TR3. THIS NODE IS EITHER NEW OR HAS GOT'; *'MESS' ' A CHANGE OF SLOPE OR THICKNESS'; 'SI' TR2; *'MESS' 'ENTER SI TR2 . THERE IS A THICKNESS CHANGE BUT NO SLOPE '; *'MESS' 'CHANGE AT THIS NODE '; D1 = (a1 '+' A3 ) * 0.5 ; D2 = (a2 '+' A4 ) * 0.5 ; 'QUIT' BLOC3 ; 'SINO' ; TR4 = ( (A1 'EGA' 0. EPS1) 'ET' (A2 'EGA' 0. EPS1) ); 'SI' TR4 ; *'MESS' ' ENTER SI TR4. THIS IS A NEW NODE'; D1 = A3 ; D2 = A4 ; 'QUIT' BLOC3 ; 'SINO' ; *'MESS' ' ENTER SINON TR4. THIS NODE HAS CHANGE OF SLOPE'; PP1 = X1 '+' A1 ; QQ1 = Y1 '+' A2 ; PP2 = X1 '+' A3 ; QQ2 = Y1 '+' A4 ; TR41 = A2 'EGA' 0.0 EPS1 ; 'SI' TR41 ; X = PP1 ; Y = (A3 '*' PP2) '+' (A4 '*' QQ2) '-' (A3 '*' PP1) ; Y = Y '/' A4; 'FINS' ; TR42 = A4 'EGA' 0.0 EPS1 ; 'SI' TR42; X = PP2 ; Y = (A1 '*' PP1) '+' (A2 '*' QQ1) '-' (A1 '*' PP2) ; Y = Y '/' A2; 'FINS' ; TR43 = ( ('NON' TR41) 'ET' ('NON' TR42) ) ; 'SI' TR43 ; DUMMY = (A1 '/' A2) '-' (A3 '/' A4) ; X = (A1 '*' PP1 '/' A2) '+' QQ1 '-' QQ2 '-' (A3 '*' PP2 '/' A4) ; X = X '/' DUMMY ; Y = (A1 '*' PP1 '/' A2) '+' QQ1 '-' (A1 '*' X '/' A2) ; 'FINS'; D1 = X '-' X1 ; D2 = Y '-' Y1; 'FINS' ; 'FINS' ; 'FINS'; 'FIN' BLOC3 ; 'SI' (NCOU2 'EGA' 1) ; AX.P1 = D1 ; AY.P1 = D2 ; 'FINSI' ; 'SI' (NCOU2 'EGA' 2) ; AX.P2 = D1 ; AY.P2 = D2 ; 'FINSI' ; 'FIN' COUP2 ; * * KEEPING TRACK OF THICKNESSES AT VARIOUS NODES FOR COMPARISION IN TR2 * THIC.P1= TIC ; THIC.P2= THIC.P1 ; 'FIN' BLOC2 ; * * CHECK TO SEE WHETHER INVERSION OF THE MAILLAGE IS REQUIRED * 'FINS' ; * *'DEPL'ACING EVERY NODE ; 'ELEM' & 'POIN' OPTIONS ARE USED BECAUSE * 'POIN' DOES NOT IDENTIFY THE CORRECT NODE IN A GENERAL CASE * I=0; REPE bloc3 NN ; I = I + 1; V1= (AX.P1 AY.P1); V2= (AX.P2 AY.P2); 'SI' (CCC.P1 'EGA' 999); DEPL P1 VM V1; * RESETTING THE POINTER CCC.P1=0; 'FINSI'; 'SI' (CCC.P2 'EGA' 999); DEPL P2 VM V2; * RESETTING THE POINTER CCC.P2=0; 'FINSI'; 'FIN' BLOC3; * RETURNING THE MAILLAGE * * RETURNING THE RACO AFTER CHECKING WHETHER IT HAS BEEN ASKED FOR * 'SI' (RACTR) ; 'RESP' RAC2 ; 'FINSI' ; * 'FINP' ;
© Cast3M 2003 - Tous droits réservés.
Mentions légales