* fichier : domaxi.dgibi ************************************************************************ ************************************************************************ ************************************************************************ ************************************************************************ **** Finite Volume, "Cell-Centred Formulation". **** **** 'MODE' 'AXIS' **** **** We check that 3D axis-symmetrical = 2D 'MODE' 'AXIS' **** **** Operateur 'DOMA' **** **** **** **** A. BECCANTINI, LTMF FEBRUARY 2004 **** ************************************************************************ ************************************************************************ * **** Compatibility check * GRAPH = FAUX ; * **** Nothing from here * 'SI' FAUX ; * **** Till here * 'FINSI' ; * * 1) Mesh with one element * ***************************** **** SEG2 ******************* ***************************** * * P1 = 1.0 2.0 ; P2 = 3.11 4.15 ; * MAIL = P1 'DROIT' 1 P2 ; * MODM = 'MODELISER' MAIL 'EULER' ; QMAIL = TABM . 'QUAF' ; * * XCEN = 'COORDONNEE' 1 CEN1 ; * YCEN = 'COORDONNEE' 2 CEN1 ; XVOL = 'EXTRAIRE' (TABM . 'XXVOLUM') CEN1 'SCAL' ; * ANGLE in degrees TH = ('EXTRAIRE' LISTTH &BLTH) ; LIG1 = MAIL 'TOURNER' (-0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; LIG2 = MAIL 'TOURNER' (0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; MAIL2 = 'REGLER' LIG1 1 LIG2 ; MODM2 = 'MODELISER' MAIL2 'EULER' ; QMAIL2 = TABM2 . 'QUAF' ; 'SI' GRAPH ; 'TRACER' (0.0 0.0 1.0) 'TITR' '3D vs 2Daxi' ; 'FINSI' ; VOL2 = 'EXTRAIRE' (TABM2 . 'XXVOLUM') CEN2 'SCAL' ; XVOL2 = VOL2 '/' ((TH '*' PI) '/' 180) ; ERRO = 'ABS' (XVOL2 '-' XVOL) ; ERRO = ERRO '/' XVOL ; 'FIN' BLTH ; * 'SI' (ERRO > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; 'SI' GRAPH ; (('LOG' LISTER) '/' ('LOG' 10.)) ; 'DESSIN' EVERR 'Error on volume' ; 'FINSI' ; ***************************** **** TRI3 ******************* ***************************** * P1 = 1.0 2.0 ; P2 = 3.11 4.15 ; P3 = 2.0 6.0 ; * MAIL = 'MANUEL' 'TRI3' P1 P2 P3 ; * MODM = 'MODELISER' MAIL 'EULER' ; QMAIL = TABM . 'QUAF' ; * * XCEN = 'COORDONNEE' 1 CEN1 ; * YCEN = 'COORDONNEE' 2 CEN1 ; XVOL = 'EXTRAIRE' (TABM . 'XXVOLUM') CEN1 'SCAL' ; * ANGLE in degrees TH = ('EXTRAIRE' LISTTH &BLTH) ; SUR1 = MAIL 'TOURNER' (-0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; SUR2 = MAIL 'TOURNER' (0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; MODM2 = 'MODELISER' MAIL2 'EULER' ; QMAIL2 = TABM2 . 'QUAF' ; 'SI' GRAPH ; 'TRACER' (0.0 0.0 1.0) 'TITR' '3D vs 2Daxi: centers' ; 'TRACER' (0.0 0.0 1.0) 'TITR' '3D vs 2Daxi: faces' ; 'FINSI' ; * Test on the center position VOL2 = 'EXTRAIRE' (TABM2 . 'XXVOLUM') CEN2 'SCAL' ; XVOL2 = VOL2 '/' ((TH '*' PI) '/' 180) ; ERRO = 'ABS' (XVOL2 '-' XVOL) ; ERRO = ERRO '/' XVOL ; * Test on the face position AA = AA '/' ((TH '*' PI) '/' 180) ; ERROS = 'MAXIMUM' ((AA '-' (TABM . 'XXSURFAC')) '/' AA) 'ABS' ; * Test on NORMAF ERROMA = 'MAXIMUM' (AA '-' (TABM . 'XXNORMAF')) ; 'FIN' BLTH ; * 'SI' (ERRO > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; * 'SI' (ERROS > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; 'SI' (ERROMA > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; 'SI' GRAPH ; (('LOG' LISTER) '/' ('LOG' 10.)) ; 'DESSIN' EVERR 'TITR' 'Error on volume' ; (('LOG' LISTERS) '/' ('LOG' 10.)) ; 'DESSIN' EVERR 'TITR' 'Error on surfaces' ; (('LOG' LISTERM) '/' ('LOG' 10.)) ; 'DESSIN' EVERR 'TITR' 'Error on normals' ; 'FINSI' ; ***************************** **** QUA4 ******************* ***************************** * P1 = 1.01 0.0 ; P2 = 2.01 0.0 ; P3 = 2.0 1.01 ; P4 = 1.0 1.0 ; * MAIL = 'MANUEL' 'QUA4' P1 P2 P3 P4 ; * 'OPTION' 'MODE' 'PLAN' ; MODM = 'MODELISER' MAIL 'EULER' ; XCEN0 = 'MAXIMUM' ('COORDONNEE' 1 (TABM . 'CENTRE')) ; YCEN0 = 'MAXIMUM' ('COORDONNEE' 2 (TABM . 'CENTRE')) ; SUR2D0 = 'MAXIMUM' (TABM . 'XXVOLUM') ; * 'OPTION' 'MODE' 'AXIS' ; MODM = 'MODELISER' MAIL 'EULER' ; QMAIL = TABM . 'QUAF' ; * XCEN2D = 'MAXIMUM' (TABM . 'XCEN2D') ; YCEN2D = 'MAXIMUM' (TABM . 'YCEN2D') ; 'ABS' ; 'SI' (ERRO > 1.0D-8) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; SUR2D = 'MAXIMUM' (TABM . 'XXSUR2D') ; ERRO = 'ABS' (SUR2D '-' SUR2D0) ; 'SI' (ERRO > 1.0D-8) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; * * XCEN = 'COORDONNEE' 1 CEN1 ; * YCEN = 'COORDONNEE' 2 CEN1 ; XVOL = 'EXTRAIRE' (TABM . 'XXVOLUM') CEN1 'SCAL' ; * ANGLE in degrees TH = ('EXTRAIRE' LISTTH &BLTH) ; SUR1 = MAIL 'TOURNER' (-0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; SUR2 = MAIL 'TOURNER' (0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; MODM2 = 'MODELISER' MAIL2 'EULER' ; QMAIL2 = TABM2 . 'QUAF' ; 'SI' GRAPH ; 'TRACER' (0.0 0.0 1.0) 'TITR' '3D vs 2Daxi' ; 'FINSI' ; * Test on center position VOL2 = 'EXTRAIRE' (TABM2 . 'XXVOLUM') CEN2 'SCAL' ; XVOL2 = VOL2 '/' ((TH '*' PI) '/' 180) ; ERRO = 'ABS' (XVOL2 '-' XVOL) ; ERRO = ERRO '/' XVOL ; * Test on the face position AA = AA '/' ((TH '*' PI) '/' 180) ; ERROS = 'MAXIMUM' ((AA '-' (TABM . 'XXSURFAC')) '/' AA) 'ABS' ; * Test on NORMAF ERROMA = 'MAXIMUM' (AA '-' (TABM . 'XXNORMAF')) ; 'FIN' BLTH ; * 'SI' (ERRO > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; * 'SI' (ERROS > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; 'SI' (ERROMA > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; 'SI' GRAPH ; (('LOG' LISTER) '/' ('LOG' 10.)) ; 'DESSIN' EVERR 'TITR' 'Error on volume' ; (('LOG' LISTERS) '/' ('LOG' 10.)) ; 'DESSIN' EVERR 'TITR' 'Error on surfaces' ; (LISTERM) ; 'DESSIN' EVERR 'TITR' 'Error on normals' ; 'FINSI' ; * * 2) Mesh with more than one element * ***************************** **** SEG2 ******************* ***************************** * * P1 = 1.0 2.0 ; P2 = 3.11 4.15 ; DX = 0.1 ; * MAIL = P1 'DROIT' P2 'DINI' DX 'DFIN' DX ; * MODM = 'MODELISER' MAIL 'EULER' ; QMAIL = TABM . 'QUAF' ; * * ANGLE in degrees TH = 1.25 ; LIG1 = MAIL 'TOURNER' (-0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; LIG2 = MAIL 'TOURNER' (0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; MAIL2 = 'REGLER' LIG1 1 LIG2 ; MODM2 = 'MODELISER' MAIL2 'EULER' ; 'SI' GRAPH ; 'TRACER' (0.0 0.0 1.0) 'TITR' '3D vs 2Daxi' ; 'FINSI' ; AA = (TABM . 'CENTRE') 'ET' (TABM2 . 'CENTRE') ; 'ELIMINATION' (TABM . 'CENTRE') (DX '/' 10) (TABM2 . 'CENTRE') ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; XVOL = TABM . 'XXVOLUM' ; XVOL2 = TABM2 . 'XXVOLUM' '/' ((TH '*' PI) '/' 180) ; ERRO = 'MAXIMUM' ((XVOL '-' XVOL2) '/' XVOL) 'ABS' ; 'SI' (ERRO > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; ***************************** **** TRI3 ******************* ***************************** * * Axi * * P1 = 1.0 2.0 ; P2 = 3.11 4.15 ; P3 = 2.0 6.0 ; * DX = 0.1 ; * MAIL = 'SURFACE' ((P1 'DROIT' P2 'DINI' DX 'DFIN' DX) 'ET' (P2 'DROIT' P3 'DINI' DX 'DFIN' DX) 'ET' (P3 'DROIT' P1 'DINI' DX 'DFIN' DX)) 'PLAN' ; * MODM = 'MODELISER' MAIL 'EULER' ; QMAIL = TABM . 'QUAF' ; MOD2 = 'MODELISER' (TABM . 'MAILLAGE') 'THERMIQUE' ; * * * ANGLE in degrees TH = 1.25 ; MAI1 = MAIL 'TOURNER' (-0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; MAI2 = MAIL 'TOURNER' (0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; MODM2 = 'MODELISER' MAIL2 'EULER' ; 'SI' GRAPH ; 'TRACER' (0.0 0.0 1.0) 'TITR' '3D vs 2Daxi' ; 'FINSI' ; AA = (TABM . 'CENTRE') 'ET' (TABM2 . 'CENTRE') ; 'ELIMINATION' (TABM . 'CENTRE') (DX '/' 10) (TABM2 . 'CENTRE') ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; XVOL = TABM . 'XXVOLUM' ; XVOL2 = TABM2 . 'XXVOLUM' '/' ((TH '*' PI) '/' 180) ; ERRO = 'MAXIMUM' ((XVOL '-' XVOL2) '/' XVOL) 'ABS' ; 'SI' (ERRO > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; * **** Test of XXSUR2D * Last test to do * After that, the support of centres is deplaced * (0.0 0.0 0.0) (0.0 1.0 0.0) ; ERRO = 'MAXIMUM' (aa '-' (TABM . 'XXSUR2D')) ; 'SI' (ERRO > 1.0D-8) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; ***************************** **** QUA4 ******************* ***************************** * * Axi * * P1 = 1.0 0.0 ; P2 = 2.0 0.0 ; P3 = 2.0 1.0 ; P4 = 1.0 1.0 ; * DX = 0.1 ; * MAIL = 'SURFACE' ((P1 'DROIT' P2 'DINI' DX 'DFIN' DX) 'ET' (P2 'DROIT' P3 'DINI' DX 'DFIN' DX) 'ET' (P3 'DROIT' P4 'DINI' DX 'DFIN' DX) 'ET' (P4 'DROIT' P1 'DINI' DX 'DFIN' DX)) 'PLAN' ; * MODM = 'MODELISER' MAIL 'EULER' ; QMAIL = TABM . 'QUAF' ; MOD2 = 'MODELISER' (TABM . 'MAILLAGE') 'THERMIQUE' ; * * * ANGLE in degrees TH = 1.25 ; MAI1 = MAIL 'TOURNER' (-0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; MAI2 = MAIL 'TOURNER' (0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; MODM2 = 'MODELISER' MAIL2 'EULER' ; 'SI' GRAPH ; 'TRACER' (0.0 0.0 1.0) 'TITR' '3D vs 2Daxi' ; 'FINSI' ; AA = (TABM . 'CENTRE') 'ET' (TABM2 . 'CENTRE') ; 'ELIMINATION' (TABM . 'CENTRE') (DX '/' 10) (TABM2 . 'CENTRE') ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; XVOL = TABM . 'XXVOLUM' ; XVOL2 = TABM2 . 'XXVOLUM' '/' ((TH '*' PI) '/' 180) ; ERRO = 'MAXIMUM' ((XVOL '-' XVOL2) '/' XVOL) 'ABS' ; 'SI' (ERRO > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; * **** Test of XXSUR2D * Last test to do * After that, the support of centres is deplaced * (0.0 0.0 0.0) (0.0 1.0 0.0) ; ERRO = 'MAXIMUM' (aa '-' (TABM . 'XXSUR2D')) ; 'SI' (ERRO > 1.0D-8) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; ***************************** **** QUA4 and TRI3 ********** ***************************** * * Axi * * P1 = 1.0 1.0 ; P2 = 2.5 0.0 ; P3 = 2.0 1.0 ; P4 = 1.0 2.0 ; * DX = 0.1 ; * MAIL = 'SURFACE' ((P1 'DROIT' P2 'DINI' DX 'DFIN' DX) 'ET' (P2 'DROIT' P3 'DINI' DX 'DFIN' DX) 'ET' (P3 'DROIT' P4 'DINI' DX 'DFIN' DX) 'ET' (P4 'DROIT' P1 'DINI' DX 'DFIN' DX)) 'PLAN' ; 'ERREUR' 21 ; 'FINSI' ; * MODM = 'MODELISER' MAIL 'EULER' ; QMAIL = TABM . 'QUAF' ; MOD2 = 'MODELISER' (TABM . 'MAILLAGE') 'THERMIQUE' ; * * FACE, FACEL and FACEP has the same order * 'REPETER' BL1 NN ; BB = 'CHANGER' AA 'POI1' ; BB = 'CHANGER' AA 'POI1' ; 'SI' (PF1 'NEG' PF2) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; 'SI' (PF3 'NEG' PF2) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; 'FIN' BL1 ; * * SOMMET = 'CHANGER' (TABM . 'MAILLAGE') 'POI1' ; * SOMMET = 'CHANGER' (TABM . 'MAILLAGE') 'POI1' ; 'SI' (NN 'NEG' 0) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; * **** Test of XXDIEMIN * NEL = &BLNEL ; 'SI' GRAPH ; 'FINSI' ; AA = 'CHANGER' AA 'POI1' ; XC = 'COORDONNEE' 1 CC ; YC = 'COORDONNEE' 2 CC ; USDIE = 0.0 ; XP = 'COORDONNEE' 1 PP ; YP = 'COORDONNEE' 2 PP ; NORX = 'EXTRAIRE' (TABM . 'XXNORMAF') PP 'UX' ; NORY = 'EXTRAIRE' (TABM . 'XXNORMAF') PP 'UY' ; DIE = ((XP '-' XC) '*' NORX) '+' ((YP '-' YC) '*' NORY) ; DIE = 'ABS' DIE ; 'FIN' BL1 ; DIEM = 2.0 '/' USDIE ; ERRO = 'ABS' (DIEM '-' ('EXTRAIRE' (TABM . 'XXDIEMIN') CC 'SCAL')) ; ERRO = ERRO '/' DIEM ; * 'SI' (ERRO > 1.0D-6) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; 'FIN' BLNEL ; * * ANGLE in degrees TH = 1.25 ; MAI1 = MAIL 'TOURNER' (-0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; MAI2 = MAIL 'TOURNER' (0.5 * TH) (0.0 0.0 0.0) (0.0 1.0 0.0) ; MODM2 = 'MODELISER' MAIL2 'EULER' ; 'SI' GRAPH ; 'TRACER' (0.0 0.0 1.0) 'TITR' '3D vs 2Daxi' ; 'FINSI' ; * Center of gravity has the same positions AA = (TABM . 'CENTRE') 'ET' (TABM2 . 'CENTRE') ; 'ELIMINATION' (TABM . 'CENTRE') (DX '/' 10) (TABM2 . 'CENTRE') ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; XVOL = TABM . 'XXVOLUM' ; XVOL2 = TABM2 . 'XXVOLUM' '/' ((TH '*' PI) '/' 180) ; ERRO = 'MAXIMUM' ((XVOL '-' XVOL2) '/' XVOL) 'ABS' ; 'SI' (ERRO > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; * * Test on XXSURFAC * AA = AA '/' ((TH '*' PI) '/' 180) ; ERROS = 'MAXIMUM' ((AA '-' (TABM . 'XXSURFAC')) '/' AA) 'ABS' ; 'SI' (ERROS > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; * * Test on XXNORMAF and MATROT * ERRO = 'MAXIMUM' (AA '-' (TABM . 'XXNORMAF')) 'ABS' ; 'SI' (ERRO > 1.0D-4) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; AA = 'PSCAL' (TABM . 'MATROT') (TABM . 'MATROT') ERRO = 'MAXIMUM' AA 'ABS' ; 'SI' (ERRO > 1.0D-6) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; AA = 'PSCAL' (TABM . 'MATROT') (TABM . 'MATROT') ERRO = 'MAXIMUM' (AA '-' 1.0) 'ABS' ; 'SI' (ERRO > 1.0D-6) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; AA = 'PSCAL' (TABM . 'MATROT') (TABM . 'MATROT') ERRO = 'MAXIMUM' (AA '-' 1.0) 'ABS' ; 'SI' (ERRO > 1.0D-6) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; * **** Test graphique * 'SI' FAUX ; 'TRACER' ((TABM . 'MAILLAGE') 'ET' AA) ; 'LISTE' AA ; 'TRACER' ((TABM . 'MAILLAGE') 'ET' BB) ; 'LISTE' BB ; 'FIN' BL1 ; 'OPTION' 'DIME' DIM ; 'FINSI' ; * **** Test of XXSUR2D * Last test to do * After that, the support of centres is deplaced * (0.0 0.0 0.0) (0.0 1.0 0.0) ; ERRO = 'MAXIMUM' (aa '-' (TABM . 'XXSUR2D')) ; 'SI' (ERRO > 1.0D-8) ; 'ERREUR' 'Probleme axi' ; 'FINSI' ; 'FIN' ;
© Cast3M 2003 - Tous droits réservés.
Mentions légales