* fichier : pent3D2.dgibi *********************************************************** **** APPROCHE VF "Cell-Centred Formulation". **** **** OPÉRATEUR PENT, pour le calcul des gradients et **** **** de limiteurs **** **** Cas test: calcul du limiteur en 3D **** **** **** **** A. BECCANTINI, TTMF MAI 1998 **** **** Modif, 10/07/01, syntaxe de PENT changée **** *********************************************************** 'OPTION' 'ELEM' 'CUB8' ; 'OPTION' 'ISOV' 'SULI' ; 'OPTION' 'ECHO' 0; GRAPH = VRAI ; * **** Domaine * A1 = 0.0 0.0 0.0; A2 = 2.0 0.0 0.0; A3 = 2.0 3.0 0.0; A4 = 0.0 2.0 0.0; A5 = 0.0 0.0 2.0; A6 = 2.0 0.0 2.0; A7 = 2.0 3.0 3.5; A8 = 0.0 2.0 3.0; A9 = 6.0 1.0 4.0; A10 = 3.0 1.0 -1.0; A11 = 0.0 -1.0 -1.0; A12 = -1.0 1.0 1.0; A13 = 0.0 -2.0 0.0; A14 = 2.0 4.0 1.0; DOM1= 'MANUEL' 'CUB8' A1 A2 A3 A4 A5 A6 A7 A8; DOM2= 'MANUEL' 'PYR5' A5 A6 A7 A8 A9; DOM3= 'MANUEL' 'PYR5' A2 A3 A7 A6 A10; DOM4= 'MANUEL' 'PYR5' A1 A2 A3 A4 A11; DOM5= 'MANUEL' 'PYR5' A1 A4 A8 A5 A12; DOM6= 'MANUEL' 'PYR5' A1 A2 A6 A5 A13; DOM7= 'MANUEL' 'PYR5' A3 A4 A8 A7 A14; DOMTOT= DOM1 'ET' DOM2 'ET' DOM3 'ET' DOM4 'ET' DOM5 'ET' DOM6 'ET' DOM7; MDOMTOT = TDOMTOT . 'QUAF'; MDOM1 = TDOM1 . 'QUAF'; MDOM2 = TDOM2 . 'QUAF'; MDOM3 = TDOM3 . 'QUAF'; MDOM4 = TDOM4 . 'QUAF'; MDOM5 = TDOM5 . 'QUAF'; MDOM6 = TDOM6 . 'QUAF'; MDOM7 = TDOM7 . 'QUAF'; 'ET' MDOM6 'ET' MDOM7) 1D-6; 'NATU' 'DISCRET' ; 'NATU' 'DISCRET' ; '-' (ZZ '*' ZZ)) 'NATU' 'DISCRET' ; PHI = PHI1 'ET' PHI2 'ET' PHI3 ; GRAPHI ALPHI COEF = 'PENT' $DOMTOT 'CENTRE' 'EULEVECT' 'LIMITEUR' **************************************************** **** Le limiteur: les paramètres géométriques **** **************************************************** xC1 yC1 zC1 = 'COORDONNEE' PCDOM1 ; * **** 1-2 * xA5 yA5 zA5 = 'COORDONNEE' A5 ; xA7 yA7 zA7 = 'COORDONNEE' A7 ; xF2 = (xA5 '+' xA7) '/' 2.0 ; yF2 = (yA5 '+' yA7) '/' 2.0 ; zF2 = (zA5 '+' zA7) '/' 2.0 ; xC2 yC2 zC2 = 'COORDONNEE' PCDOM2 ; xF2 yF2 zF2 = 'COORDONNEE' F2 ; DXC1F2 = xF2 '-' xC1 ; DYC1F2 = yF2 '-' yC1 ; DZC1F2 = zF2 '-' zC1 ; DC1F2 = ((DXC1F2 '**' 2) '+' (DYC1F2 '**' 2) '+' (DZC1F2 '**' 2)) '**' 0.5; DXC2F2 = xF2 '-' xC2 ; DYC2F2 = yF2 '-' yC2 ; DZC2F2 = zF2 '-' zC2 ; DC2F2 = ((DXC2F2 '**' 2) '+' (DYC2F2 '**' 2) '+' (DZC2F2 '**' 2)) '**' 0.5; DTOT2 = DC1F2 '+' DC2F2 ; * **** 1-3 * xA2 yA2 zA2 = 'COORDONNEE' A2 ; xA7 yA7 zA7 = 'COORDONNEE' A7 ; xF3 = (xA2 '+' xA7) '/' 2.0 ; yF3 = (yA2 '+' yA7) '/' 2.0 ; zF3 = (zA2 '+' zA7) '/' 2.0 ; xC3 yC3 zC3 = 'COORDONNEE' PCDOM3 ; xF3 yF3 zF3 = 'COORDONNEE' F3 ; DXC1F3 = xF3 '-' xC1 ; DYC1F3 = yF3 '-' yC1 ; DZC1F3 = zF3 '-' zC1 ; DC1F3 = ((DXC1F3 '**' 2) '+' (DYC1F3 '**' 2) '+' (DZC1F3 '**' 2)) '**' 0.5; DXC3F3 = xF3 '-' xC3 ; DYC3F3 = yF3 '-' yC3 ; DZC3F3 = zF3 '-' zC3 ; DC3F3 = ((DXC3F3 '**' 2) '+' (DYC3F3 '**' 2) '+' (DZC3F3 '**' 2)) '**' 0.5; DTOT3 = DC1F3 '+' DC3F3 ; * **** 1-4 * xA1 yA1 zA1 = 'COORDONNEE' A1 ; xA3 yA3 zA3 = 'COORDONNEE' A3 ; xF4 = (xA1 '+' xA3) '/' 2.0 ; yF4 = (yA1 '+' yA3) '/' 2.0 ; zF4 = (zA1 '+' zA3) '/' 2.0 ; xC4 yC4 zC4 = 'COORDONNEE' PCDOM4 ; xF4 yF4 zF4 = 'COORDONNEE' F4 ; DXC1F4 = xF4 '-' xC1 ; DYC1F4 = yF4 '-' yC1 ; DZC1F4 = zF4 '-' zC1 ; DC1F4 = ((DXC1F4 '**' 2) '+' (DYC1F4 '**' 2) '+' (DZC1F4 '**' 2)) '**' 0.5; DXC4F4 = xF4 '-' xC4 ; DYC4F4 = yF4 '-' yC4 ; DZC4F4 = zF4 '-' zC4 ; DC4F4 = ((DXC4F4 '**' 2) '+' (DYC4F4 '**' 2) '+' (DZC4F4 '**' 2)) '**' 0.5; DTOT4 = DC1F4 '+' DC4F4 ; * **** 1-5 * xA1 yA1 zA1 = 'COORDONNEE' A1 ; xA8 yA8 zA8 = 'COORDONNEE' A8 ; xF5 = (xA1 '+' xA8) '/' 2.0 ; yF5 = (yA1 '+' yA8) '/' 2.0 ; zF5 = (zA1 '+' zA8) '/' 2.0 ; xC5 yC5 zC5 = 'COORDONNEE' PCDOM5 ; xF5 yF5 zF5 = 'COORDONNEE' F5 ; DXC1F5 = xF5 '-' xC1 ; DYC1F5 = yF5 '-' yC1 ; DZC1F5 = zF5 '-' zC1 ; DC1F5 = ((DXC1F5 '**' 2) '+' (DYC1F5 '**' 2) '+' (DZC1F5 '**' 2)) '**' 0.5; DXC5F5 = xF5 '-' xC5 ; DYC5F5 = yF5 '-' yC5 ; DZC5F5 = zF5 '-' zC5 ; DC5F5 = ((DXC5F5 '**' 2) '+' (DYC5F5 '**' 2) '+' (DZC5F5 '**' 2)) '**' 0.5; DTOT5 = DC1F5 '+' DC5F5 ; * **** 1-6 * xA1 yA1 zA1 = 'COORDONNEE' A1 ; xA6 yA6 zA6 = 'COORDONNEE' A6 ; xF6 = (xA1 '+' xA6) '/' 2.0 ; yF6 = (yA1 '+' yA6) '/' 2.0 ; zF6 = (zA1 '+' zA6) '/' 2.0 ; xC6 yC6 zC6 = 'COORDONNEE' PCDOM6 ; xF6 yF6 zF6 = 'COORDONNEE' F6 ; DXC1F6 = xF6 '-' xC1 ; DYC1F6 = yF6 '-' yC1 ; DZC1F6 = zF6 '-' zC1 ; DC1F6 = ((DXC1F6 '**' 2) '+' (DYC1F6 '**' 2) '+' (DZC1F6 '**' 2)) '**' 0.5; DXC6F6 = xF6 '-' xC6 ; DYC6F6 = yF6 '-' yC6 ; DZC6F6 = zF6 '-' zC6 ; DC6F6 = ((DXC6F6 '**' 2) '+' (DYC6F6 '**' 2) '+' (DZC6F6 '**' 2)) '**' 0.5; DTOT6 = DC1F6 '+' DC6F6 ; * **** 1-7 * xA8 yA8 zA8 = 'COORDONNEE' A8 ; xA3 yA3 zA3 = 'COORDONNEE' A3 ; xF7 = (xA8 '+' xA3) '/' 2.0 ; yF7 = (yA8 '+' yA3) '/' 2.0 ; zF7 = (zA8 '+' zA3) '/' 2.0 ; xC7 yC7 zC7 = 'COORDONNEE' PCDOM7 ; xF7 yF7 zF7 = 'COORDONNEE' F7 ; DXC1F7 = xF7 '-' xC1 ; DYC1F7 = yF7 '-' yC1 ; DZC1F7 = zF7 '-' zC1 ; DC1F7 = ((DXC1F7 '**' 2) '+' (DYC1F7 '**' 2) '+' (DZC1F7 '**' 2)) '**' 0.5; DXC7F7 = xF7 '-' xC7 ; DYC7F7 = yF7 '-' yC7 ; DZC7F7 = zF7 '-' zC7 ; DC7F7 = ((DXC7F7 '**' 2) '+' (DYC7F7 '**' 2) '+' (DZC7F7 '**' 2)) '**' 0.5; DTOT7 = DC1F7 '+' DC7F7 ; * **** Composantes à controller * NOMCOM = 'EXTRAIRE' &BLOC1 LISTCOM ; NOMG1 = 'EXTRAIRE' &BLOC1 LISTNG1 ; NOMG2 = 'EXTRAIRE' &BLOC1 LISTNG2 ; NOMG3 = 'EXTRAIRE' &BLOC1 LISTNG3 ; NOMAL = 'EXTRAIRE' &BLOC1 LISTNAL ; PHI1 = 'EXTRAIRE' PHICOM 'SCAL' PCDOM1 ; PHIMAX = 'MAXIMUM' PHICOM; PHIMIN = 'MINIMUM' PHICOM; DPHISTE = PHIMAX '-' PHIMIN; GPHI1X = 'EXTRAIRE' GRAPHI NOMG1 PCDOM1 ; GPHI1Y = 'EXTRAIRE' GRAPHI NOMG2 PCDOM1 ; GPHI1Z = 'EXTRAIRE' GRAPHI NOMG3 PCDOM1 ; * **** 1-2 * DPHI0 = (GPHI1X '*' DXC1F2) '+' (GPHI1Y '*' DYC1F2) '+' (GPHI1Z '*' DZC1F2) ; 'SI' (('ABS' DPHI0) '<EG' (1.D-6*DPHISTE)); AL12 = 1.0D0; 'SINON' ; 'SI' (DPHI0 > 0.0); DPHI = PHIMAX '-' PHI1; AL12 = (DPHI '/' DTOT2) * (DC1F2 '/' DPHI0) ; 'SINON' ; DPHI = PHIMIN '-' PHI1; AL12 = (DPHI '/' DTOT2) * (DC1F2 '/' DPHI0) ; 'FINSI' ; 'FINSI' ; * **** 1-3 * DPHI0 = (GPHI1X '*' DXC1F3) '+' (GPHI1Y '*' DYC1F3) '+' (GPHI1Z '*' DZC1F3) ; 'SI' (('ABS' DPHI0) '<EG' (1.D-6*DPHISTE)); AL13 = 1.0D0; 'SINON' ; 'SI' (DPHI0 > 0.0); DPHI = PHIMAX '-' PHI1; AL13 = (DPHI '/' DTOT3) * (DC1F3 '/' DPHI0) ; 'SINON' ; DPHI = PHIMIN '-' PHI1; AL13 = (DPHI '/' DTOT3) * (DC1F3 '/' DPHI0) ; 'FINSI' ; 'FINSI' ; * **** 1-4 * DPHI0 = (GPHI1X '*' DXC1F4) '+' (GPHI1Y '*' DYC1F4) '+' (GPHI1Z '*' DZC1F4) ; 'SI' (('ABS' DPHI0) '<EG' (1.D-6*DPHISTE)); AL14 = 1.0D0; 'SINON' ; 'SI' (DPHI0 > 0.0); DPHI = PHIMAX '-' PHI1; AL14 = (DPHI '/' DTOT4) * (DC1F4 '/' DPHI0) ; 'SINON' ; DPHI = PHIMIN '-' PHI1; AL14 = (DPHI '/' DTOT4) * (DC1F4 '/' DPHI0) ; 'FINSI' ; 'FINSI' ; * *** 1-5 * DPHI0 = (GPHI1X '*' DXC1F5) '+' (GPHI1Y '*' DYC1F5) '+' (GPHI1Z '*' DZC1F5) ; 'SI' (('ABS' DPHI0) '<EG' (1.D-6*DPHISTE)); AL15 = 1.0D0; 'SINON' ; 'SI' (DPHI0 > 0.0); DPHI = PHIMAX '-' PHI1; AL15 = (DPHI '/' DTOT5) * (DC1F5 '/' DPHI0) ; 'SINON' ; DPHI = PHIMIN '-' PHI1; AL15 = (DPHI '/' DTOT5) * (DC1F5 '/' DPHI0) ; 'FINSI' ; 'FINSI' ; * **** 1-6 * DPHI0 = (GPHI1X '*' DXC1F6) '+' (GPHI1Y '*' DYC1F6) '+' (GPHI1Z '*' DZC1F6) ; 'SI' (('ABS' DPHI0) '<EG' (1.D-6*DPHISTE)); AL16 = 1.0D0; 'SINON' ; 'SI' (DPHI0 > 0.0); DPHI = PHIMAX '-' PHI1; AL16 = (DPHI '/' DTOT6) * (DC1F6 '/' DPHI0) ; 'SINON' ; DPHI = PHIMIN '-' PHI1; AL16 = (DPHI '/' DTOT6) * (DC1F6 '/' DPHI0) ; 'FINSI' ; 'FINSI' ; * **** 1-7 * DPHI0 = (GPHI1X '*' DXC1F7) '+' (GPHI1Y '*' DYC1F7) '+' (GPHI1Z '*' DZC1F7) ; 'SI' (('ABS' DPHI0) '<EG' (1.D-6*DPHISTE)); AL17 = 1.0D0; 'SINON' ; 'SI' (DPHI0 > 0.0); DPHI = PHIMAX '-' PHI1; AL17 = (DPHI '/' DTOT7) * (DC1F7 '/' DPHI0) ; 'SINON' ; DPHI = PHIMIN '-' PHI1; AL17 = (DPHI '/' DTOT7) * (DC1F7 '/' DPHI0) ; 'FINSI' ; 'FINSI' ; * *** ALPHA ELT * ALELT0 = 'EXTRAIRE' ALPHI NOMAL PCDOM1 ; 'SI' (('ABS' (ALELT '-' ALELT0)) > 1.0D-14); 'ERREUR' 5; 'FINSI' ; 'FIN' BLOC1 ; 'FIN' ;
© Cast3M 2003 - Tous droits réservés.
Mentions légales