* fichier : tubeaxi.dgibi ************************************************************************ ************************************************************************ ****************************************************************** * CALCUL DU TUBE A CHOC * * FORMULATION VF COMPRESSIBLE EXPLICITE * * DIFFERENTS SOLVEURS * * 'MODE' 'AXIS' * * * * A. BECCANTINI TTMF FEVRIER 2004 * ****************************************************************** * GRAPH = VRAI ; GRAPH = FAUX ; * *** Methodes possibles : * * 'VANLEER' * 'VLH ' * 'HUSVLH ' * 'GODUNOV' * 'AUSMPLUS' METO = 'VLH' ; LOGSO = VRAI ; SAFFAC = 0.5 ; NITER = 100000 ; TFINAL = 0.2 ; ************ * MAILLAGE * ************ RAF = 1 ; NX= 50 '*' RAF ; L = 1.0D0 ; DX = 0.5 '*' L '/' NX ; BM1 = DX (-0.5 '*' L) ; B0 = DX 0.0 ; B1 = DX (0.5 '*' L) ; * A0B0 = A0 'DROIT' 1 B0 ; A1B1 = A1 'DROIT' 1 B1 ; AM1BM1 = AM1 'DROIT' 1 BM1 ; * DOM1 = A0B0 'REGLER' NX AM1BM1 ; DOM2 = A0B0 'REGLER' NX A1B1 ; * DOMTOT = DOM1 'ET' DOM2 ; 'ELIMINATION' DOMTOT (DX '/' 100.) ; MDOMTOT = TDOMTOT . 'QUAF' ; MDOM1 = TDOM1 . 'QUAF' ; MDOM2 = TDOM2 . 'QUAF' ; * ******* Creation de la ligne Utilisée pour le Post-Traitement * reliant les points centres * CENCOR = 'COORDONNEE' 2 (TDOMTOT . 'CENTRE') ; IAUX = (2 * NX) - 1 ; COURB = PINI 'DROIT' IAUX PFIN; 'SI' GRAPH ; 'TRACER' (DOMTOT 'ET' (COURB 'COULEUR' ROUG)) 'TITR' '2D domain' ; 'FINSI' ; ************************************************************ * CONDITIONS INITIALES ET LIMITES. * ************************************************************ gamgd = 1.4D0; * *** Etat gauche * rog = 1.0 ; pg = 1.0 ; retg = (pg '/' (gamgd '-' 1.0)) ; * *** Etat droite * rod = 1.0D-1 ; pd = 1.0D-1; retd = (pd '/' (gamgd '-' 1.0)) ; * *** gamma * * *** ro * 'SCAL' rod 'NATU' 'DISCRET') ; * *** ro u, ro v * 'NATU' 'DISCRET') ; * *** ro e * 'SCAL' retd 'NATU' 'DISCRET') ; ******************************************************** *** CREATION DE 'MODE' POUR GRAPHIQUER LE CHAMELEM *** ******************************************************** * 'SI' GRAPH ; * *** CREATION DE CHAMELEM * 'FINSI' ; * **** Les gradients * GRADP ALP COEFSCAL = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'NOLIMITE' GRADV ALV COEFVECT = 'PENT' $DOMTOT 'CENTRE' 'EULEVECT' 'NOLIMITE' * Initialisation of ALP to 0 (for first order computations) ALP = ALP '*' 0.0 ; * **** Le calcul * TPS = 0.0 ; DTMIN = 0.0 ; FGEO = (TDOMTOT . 'XXSUR2D') '/' (TDOMTOT . 'XXVOLUM') ; 'TEMPS' 'ZERO' ; * 'REPETER' BL1 NITER ; * **** Primitive variables * 'SI' LOGSO ; GRADR ALR = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR' GRADP ALP = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR' GRADV ALV = 'PENT' $DOMTOT 'CENTRE' 'EULEVECT' 'LIMITEUR' $DOMTOT RN GRADR ALR VN GRADV ALV PN GRADP ALP GAMN ; * ROF VITF PF GAMF = 'PRET' 'PERFMONO' 2 2 * $DOMTOT * RN GRADR ALR * VN GRADV ALV * PN GRADP ALP * GAMN (DTMIN '/' 2) ; 'SINON' ; $DOMTOT RN VN PN GAMN ; 'FINSI' ; ROF VITF PF GAMF ; DT_CON = SAFFAC '*' DELTAT ; * **** The time step linked to tps * * **** Total time step * * *** AXI * Contribution of pressure * Warning: at first order, ALP initialised to 0 * * RESIP = ('NOMC' 'RUX' (PN '*' FGEO)) ; * * **** Increment of the variables (convection) * RESIDU = DTMIN '*' (RESIDU '+' RESIP) ; * TPS = TPS '+' DTMIN ; RN = RN '+' DRN ; GN = GN '+' DGN ; RETN = RETN '+' DRETN ; * 'SI' (((&BL1 '/' 20) '*' 20) 'EGA' &BL1) ; 'MESSAGE' ('CHAINE' 'ITER =' &BL1 ' TPS =' TPS) ; 'FINSI' ; 'SI' (TPS '>EG' TFINAL) ; 'QUITTER' BL1 ; 'FINSI' ; 'FIN' BL1 ; 'TEMPS' ; * ***** On calcule les variables primitive * * **** La vitesse dans le repaire tube * VNN = VNY ; VNT = VNX ; GNN = VNN * RN; GNT = VNT * RN; * *** GRAPHIQUE DES SOLUTIONS * 'SI' (GRAPH); * *** CREATION DE CHAMELEM * 'FINSI' ; * *** Objects evolutions * 'SI' LOGSO ; IE = 2 ; 'SINON' ; IE = 1 ; 'FINSI' ; IT = 1 ; SS = 'COORDONNEE' 2 Courb; x0 = 'MINIMUM' lxx; x1 = 'MAXIMUM' lxx; tro = CHAINE '1D ' METO ' : RO IT ' IT ' IE ' IE ' tmps ' TPS ' elem ' 'CUB8' ; tu = CHAINE '1D ' METO ' : U IT ' IT ' IE ' IE ' tmps ' TPS ' elem ' 'CUB8' ; tv = CHAINE '1D ' METO ' : V IT ' IT ' IE ' IE ' tmps ' TPS ' elem ' 'CUB8' ; SI GRAPH; 'DESSIN' evv 'TITRE' tv 'XBOR' x0 x1; FINSI; tp = CHAINE '1D ' METO ' : P IT ' IT ' IE ' IE ' tmps ' TPS ' elem ' 'CUB8' ; ls = lro '**' gamgd; ls = lp '/' ls; ts = CHAINE '1D ' METO ' : s IT ' IT ' IE ' IE ' tmps ' TPS ' elem ' 'CUB8' ; * *** Solution analytique * -0.37000 -0.35000 -0.33000 -0.31000 -0.29000 -0.27000 -0.25000 -0.23000 -0.21000 -0.19000 -0.17000 -0.15000 -0.13000 -0.11000 -9.00000E-2 -7.00000E-2 -5.00000E-2 -3.00000E-2 -1.00000E-2; 1.00000E-02 3.00000E-02 5.00000E-02 7.00000E-02 9.00000E-02 0.11000 0.13000 0.15000 0.17000 0.19000 0.21000 0.23000 0.25000 0.27000 0.29000 0.31000 0.33000 0.35000 0.37000 0.39000 0.41000 0.43000 0.45000 0.47000) ; 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 .99193 .85405 .79151 .69598 .64297 .57841 .51997 .45356 .41754 .37307 .33114 .29475 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .28482 .10000 .10000 .10000 .10000 .10000; 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 .99423 .89343 .84619 .77192 .72945 .67635 .62680 .56851 .53588 .49447 .45410 .41786 .40776 .40776 .40776 .40776 .40776 .40776 .40776 .40776 .40776 .40776 .20444 .20444 .20444 .20444 .20444 .20444 .20444 .20444 .20444 .10000 .10000 .10000 .10000 .10000; 0.0 0.0 6.84663E-03 .13185 .19435 .29851 .36173 .44507 .52768 .63185 .69395 .77728 .86406 .94740 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 .97167 0.0 0.0 0.0 0.0 0.0; lsa = lroa '**' gamgd; lsa = lpa '/' lsa; dlp = 'MAXIMUM' (ABS ( lper '-' lpa)); dlu = 'MAXIMUM' (ABS ( luer '-' lua)); dlro = 'MAXIMUM' (ABS ( lroer '-' lroa)); dl = (dlp '+' dlu '+' dlro) '/' 3.0D0; * *** Quelque DESSIN * TAB1=TABLE; TAB1.'TITRE'= TABLE ; TAB1.1='MARQ TRIB REGU'; TAB1.2='MARQ CROI REGU'; SI GRAPH; 'DESSIN' (evro 'ET' evroa) 'TITRE' tro 'XBOR' x0 x1 'LEGE' TAB1; 'DESSIN' (evp 'ET' evpa) 'TITRE' tp 'XBOR' x0 x1 'LEGE' TAB1; 'DESSIN' (evu 'ET' evua) 'TITRE' tu 'XBOR' x0 x1 'LEGE' TAB1; 'DESSIN' (evs 'ET' evsa) 'TITRE' ts 'XBOR' x0 x1 'LEGE' TAB1; FINSI; SI (DLP > 1.0D-1); MESSAGE 'Erreur calcul du tube a choc'; MESSAGE dl; ERREUR 5; FINSI; FIN;
© Cast3M 2003 - Tous droits réservés.
Mentions légales