* fichier : tubedeto2d2.dgibi ************************************************************************ ************************************************************************ **************************************************************** ***** PROPAGATION D UNE DETONATION DANS UN TUBE ***** ***** MODELE COMBUSTION H2-air de PLEXUS ***** ***** A. BECCANTINI, SFME/LTMF, 15.01.02 ***** **************************************************************** * * The file is divided into 5 parts * * 1) mesh * 2) initial conditions and gas properties * 3) parameters used in the computation * 4) the main part (where the computation is realised) * 5) the post-treatment * 'TRAC' 'X' ; **************************************************************** **************************************************************** ***** 1D mesh ***** **************************************************************** **************************************************************** * * * A6 ---- A5 ------------------- A4 ----------------------- A8 * | | | | * | AR | ZONE1 | ZONE2 | * | | | | * A1 ---- A2 ------------------- A3 ----------------------- A7 * | | | | * | L1 | L2 | L3 | * |<---->|<--------------------->|<----------------------->| * * AR = activation region * ZONE1 * ZONE2 * RAF = 1 ; NL2SL1 = 49 ; NL3SL1 = 100 ; L1 = 0.4 ; L2 = NL2SL1 '*' L1 ; L3 = NL3SL1 '*' L1 ; * If NL2SL1 = 49 and NL3SL1 = 50, then L2 = 19.6, L3 = 20.0 ; N1 = RAF ; N2 = NL2SL1 '*' N1 ; N3 = NL3SL1 '*' N1 ; * For sake of simplicity, we will only consider one mesh in y-direction DX = L1 '/' N1 ; NY = 4 ; NZ = NY ; H1 = NY '*' DX ; A1 = 0.0 0.0 ; A2 = L1 0.0 ; A3 = (L1 '+' L2) 0.0 ; A4 = (L1 '+' L2) H1 ; A5 = L1 H1 ; A6 = 0.0 H1 ; A7 = (L1 '+' L2 '+' L3) 0.0 ; A8 = (L1 '+' L2 '+' L3) H1 ; 'OPTION' 'ELEM' 'SEG2' ; A1A2 = A1 'DROIT' N1 A2 ; A2A3 = A2 'DROIT' N2 A3 ; A3A4 = A3 'DROIT' NY A4 ; A4A5 = A4 'DROIT' N2 A5 ; A5A2 = A5 'DROIT' NY A2 ; A2A5 = 'INVERSE' A5A2 ; A5A6 = A5 'DROIT' N1 A6 ; A6A1 = A6 'DROIT' NY A1 ; A3A7 = A3 'DROIT' N3 A7 ; A7A8 = A7 'DROIT' NY A8 ; A8A4 = A8 'DROIT' N3 A4 ; A4A3 = 'INVERSE' A3A4 ; * **** 2D mesh * * DOM1 is the activation region * DOM2 is zone 1 * DOM3 is zone 2 'OPTION' 'ELEM' 'QUA4' ; DOM1 = 'TRANSLATION' A2A5 N1 ((-1.0 '*' L1) 0.0) ; DOM2 = 'TRANSLATION' A2A5 N2 (L2 0.0) ; DOM3 = 'TRANSLATION' A3A4 N3 (L3 0.0) ; * DOMTOT = total region DOMTOT = DOM1 'ET' DOM2 'ET' DOM3 ; 'ELIMINATION' (1.0D-3 '/' RAF) DOMTOT ; * **** The tables 'DOMAINE' * $DOMTOT = 'MODELISER' DOMTOT 'EULER' ; $DOM1 = 'MODELISER' DOM1 'EULER' ; $DOM2 = 'MODELISER' DOM2 'EULER' ; $DOM3 = 'MODELISER' DOM3 'EULER' ; QDOMTOT = TDOMTOT . 'QUAF' ; QDOM1 = TDOM1 . 'QUAF' ; QDOM2 = TDOM2 . 'QUAF' ; QDOM3 = TDOM3 . 'QUAF' ; 'ELIMINATION' QDOMTOT (0.001 '/' RAF) QDOM1 ; 'ELIMINATION' QDOMTOT (0.001 '/' RAF) QDOM2 ; 'ELIMINATION' QDOMTOT (0.001 '/' RAF) QDOM3 ; * **** MOD1 = model (created just to display the CHAMELEMs) * * **** Line for graphics * 'OPTION' 'ELEM' 'SEG2' ; P1 = (DX '/' 2) (DX '/' 2); P2 = ((L1 '+' L2 '+' L3) '-' (DX '/' 2)) (DX '/' 2); LIGEVO = (P1 'DROIT' (N1 '+' N2 '+' N3 '-' 1) P2) 'COULEUR' 'ROUG' ; * 'OPTION' 'SAUVER' ('CHAINE' 'mesh.sauv_raf' RAF) ; * 'SAUVER' RAF DOMTOT $DOMTOT $DOM1 $DOM2 $DOM3 LIGEVO MOD1 ; **************************************************************** **************************************************************** ***** Initial conditions and gas properties. ***** **************************************************************** **************************************************************** * **** 0 from a numerical point of view * * **** (Non-Uniform) initial conditions.(DOM1 et DOM2) * We compute the conservative variables. * * * Contact discontinuity between DOM2 and DOM3 (same pressure, * different temperature) * 'NATU' 'DISCRET') ; 'NATU' 'DISCRET') ; * We suppose that the combustion is complete everywhere, i.e. the * progress variable is 1 after the detonation transition. * CSIMAX = 'MANUEL' 'CHPO' ('DOMA' $DOMTOT 'CENTRE') 1 'SCAL' 1.0 ; * **** From initial conditions on molar fractions, we duduce * the data for the virtual mixture of burned/unburned * gases * **** Molar fractions (before combustion) * 'NATU' 'DISCRET') ; 'NATURE' 'DISCRET' ; 'NATU' 'DISCRET') ; XN = XH21 'ET' XH2O1 'ET' XO21 ; XN = XN 'ET' XN21 ; * ***** Gas properties * PGAZ = 'TABLE' ; * Polynomial degree of specific heats PGAZ . 'NORD' = 4 ; * Species explicitly treated in the Euler Equations * Species non explicitly treated PGAZ . 'ESPNEULE' = 'N2 '; * Single gases properties PGAZ . 'H2 ' = 'TABLE' ; PGAZ . 'H2O ' = 'TABLE' ; PGAZ . 'N2 ' = 'TABLE' ; PGAZ . 'O2 ' = 'TABLE' ; * R (J/Kg/K) mH2 = 2. '*' 1.00797E-3 ; mo2 = 2. '*' 15.9994E-3 ; mH2O = mh2 '+' (0.5 '*' mo2) ; mN2 = 2 '*' 14.0067E-3 ; RGAS = 8.31441 ; PGAZ . 'H2 ' . 'R' = RGAS '/' mh2 ; PGAZ . 'H2O ' . 'R' = RGAS '/' mh2o ; PGAZ . 'N2 ' . 'R' = RGAS '/' mn2 ; PGAZ . 'O2 ' . 'R' = RGAS '/' mo2 ; * Polynomials regressions coefficients -2.37281455E-07 1.84701105E-11 ; -1.82753232E-08 2.44485692E-12 ; 8.78233606E-09 -3.05514485E-13 ; 2.33636971E-08 -1.53304905E-12; * Formation enthalpies at 0K (J/Kg)) * * h_i(0K) = h_i(T0) '-' \int_0^{T0} cp_i(x) dx * = h_i(T0) '-' (\int_0^{T0} cv_i(x) dx '+' R_i * T0) * PGAZ . 'H2 ' . 'H0K' = -4.195D6 ; PGAZ . 'H2O ' . 'H0K' = -1.395D7 ; PGAZ . 'N2 ' . 'H0K' = -2.953D5 ; PGAZ . 'O2 ' . 'H0K' = -2.634D5 ; * 'OPTION' 'SAUVER' 'gas_properties.sauv' ; * 'SAUVER' PGAZ ; * **** We compute the mass fractions * 'NATURE' 'DISCRET') 'ET' 'NATURE' 'DISCRET') 'ET' 'NATURE' 'DISCRET') 'ET' 'NATURE' 'DISCRET') ; YH21 = (XH21 '*' MH2) '/' MTOT ; YO21 = (XO21 '*' MO2) '/' MTOT ; YN21 = (XN21 '*' MN2) '/' MTOT ; YH2O1 = (XH2O1 '*' MH2O) '/' MTOT ; * **** The conservative variables * ; RN = PINI '/' (RINI '*' TINI) ; * Internal energy Tfois = Tini ; 'REPETER' BL1 ((PGAZ . 'NORD') '+' 1) ; &BL1)) '+' &BL1)) '+' &BL1)) '+' &BL1)) ; eini = eini '+' (acel '*' (Tfois '/' &BL1)) ; Tfois = Tfois * tini ; 'FIN' BL1 ; RETN = RN '*' (eini '+' (0.5 '*' ('PSCAL' WINI WINI GN = RN '*' WINI ; YN = YH21 '+' YO21 '+' YH2O1 ; RYN = RN '*' YN ; 'SI' VRAI ; * Test PCEL = 'MAXIMUM' PINI ; TCEL = 'MAXIMUM' TINI ; 'SI' (('MAXIMUM' ((P '-' pini) '/' PCEL) 'ABS')> 1.0D-3) ; 'MESSAGE' 'Probleme calcul energie totale' ; 'ERREUR' 21 ; 'FINSI' ; 'SI' (('MAXIMUM' ((T '-' Tini) '/' TCEL)) > 1.0D-3) ; 'MESSAGE' 'Probleme calcul energie totale' ; 'ERREUR' 21 ; 'FINSI' ; 'FINSI' ; **************************************************************** **************************************************************** ***** Parameters for the computations ****** **************************************************************** **************************************************************** * Upwind scheme * METO = 'VLH' ; METO = 'SS' ; * Iterations * Final time * Safety Factor fot the time step * Second order reconstruction? NITER = 10000 ; TFINAL = 5.0D-3 ; SAFFAC = 0.7 ; LOGSO = VRAI ; * 'OPTION' 'SAUVER' 'parameters.sauv' ; * 'SAUVER' METO NITER TFINAL SAFFAC LOGSO ; **************************************************************** **************************************************************** ***** The computation ****** **************************************************************** **************************************************************** ************************ **** PROCEDURE DETO **** ************************ 'ARGUMENT' PGAZ*'TABLE' TN*'CHPOINT' RYN*'CHPOINT' DTI*'FLOTTANT' ; * * dRYO2/dT = MO2 * A * (T ** -B) EXP( - TA / T) * (RYH2 ** C) * (RYO2) * **** Les parametres physiques * * Ts = temperature de seuil * TA = 8310.; A = 1.1725D14; B = 0.91; CON = 2; H0H2 = PGAZ . 'H2 ' . 'H0K' ; H0O2 = PGAZ . 'O2 ' . 'H0K' ; H0H2O = PGAZ . 'H2O ' . 'H0K' ; RYH2 RYO2 RYH2O DELTAE = 'FLAM' 'ARRHENIU' TS A B CON TA H0H2 H0O2 H0H2O DTI RYH2 RYO2 RYH2O TN ; RY = RYH2 'ET' RYO2 'ET' RYH2O ; 'FINPROC' RY DELTAE ; **************************** **** FIN PROCEDURE DETO **** **************************** * **** Chemical time step * * We compute d(RHY2)/dT at the von Neumann state * * Molar reaction rate * TVN = 2000 ; TA = 8310.; A = 1.1725D14; B = 0.91; CON = 2; H0H2 = PGAZ . 'H2 ' . 'H0K' ; H0O2 = PGAZ . 'O2 ' . 'H0K' ; H0H2O = PGAZ . 'H2O ' . 'H0K' ; OMEGA = A '*' (RYH2 '**' CON) '*' RYO2 '*' (TVN '**' (-1.0 '*' B)) '*' ('EXP' (-1.0 '*' TA '*' (TVN '**' -1))) ; * OMEGA in (mol/m3/s) * OMEGAH2 in (kg/m3/s) OMEGAH2 = OMEGA '*' 2 '*' 2E-3 ; DELTATC = RYH2 '/' OMEGAH2 ; * NB DELTATC << DELTAT_CON * **** Zone d activation = etat AICC * ; RYH2 RYO2 RYH2O DELTARE = 'FLAM' 'ARRHENIU' TS A B CON TA H0H2 H0O2 H0H2O (1.0D5 '*' DELTATC) RYH2 RYO2 RYH2O TN ; RYN = RYH2 'ET' RYO2 'ET' RYH2O ; RETN = RETN '+' DELTARE ; RN0 = 'COPIER' RN ; GN0 = 'COPIER' GN ; RETN0 = 'COPIER' RETN ; RYN0 = 'COPIER' RYN ; * **** Parameter for the time loop * * Names of the residuum components * **** Geometrical coefficient to compute gradients * GRADR CACCA COEFSCAL = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'NOLIMITE' GRADV CACCA COEFVECT = 'PENT' $DOMTOT 'CENTRE' 'EULEVECT' 'NOLIMITE' TPS = 0.0 ; * **** The chemistry time step is too little * We take DT_CHEM > DELTATC * * DT_CHEM = 50 '*' DELTATC ; * **** Temporal loop * 'MESSAGE' ; 'MESSAGE' ('CHAINE' 'Methode = ' METO) ; 'MESSAGE' ('CHAINE' 'SAFFAC = ' SAFFAC) ; 'MESSAGE' ; TNM1 = 'COPIER' TN ; 'TEMPS' 'ZERO' ; 'REPETER' BL1 NITER ; * **** Primitive variables * VN PN TN YN GAMMAN = 'PRIM' 'PERFTEMP' PGAZ RN GN RETN RYN TNM1 ; TNM1 = 'COPIER' TN ; 'SI' LOGSO ; GRADR ALR = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR' GRADP ALP = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR' GRADV ALV = 'PENT' $DOMTOT 'CENTRE' 'EULEVECT' 'LIMITEUR' GRADY ALY = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR' $DOMTOT PGAZ RN GRADR ALR VN GRADV ALV PN GRADP ALP YN GRADY ALY ; 'SINON' ; $DOMTOT PGAZ RN VN PN YN ; 'FINSI' ; $DOMTOT PGAZ LISTINCO ROF VITF PF YF ; DT_CON = SAFFAC '*' DELTAT ; * **** The time step linked to tps * * **** Total time step * * **** Increment of the variables (convection) * RESIDU = DTMIN '*' RESIDU ; TPS = TPS '+' DTMIN ; RN = RN '+' DRN ; GN = GN '+' DGN ; RETN = RETN '+' DRETN ; RYN = RYN '+' DRYN ; * **** Increment of the variables (chemical source) * VN PN TN YN GAMMAN = 'PRIM' 'PERFTEMP' PGAZ RN GN RETN RYN TNM1 ; RETN = RETN '+' DRETN ; 'SI' (((&BL1 '/' 20) '*' 20) 'EGA' &BL1) ; 'MESSAGE' ('CHAINE' 'ITER =' &BL1 ' TPS =' TPS) ; 'FINSI' ; 'SI' (TPS > TFINAL) ; 'QUITTER' BL1 ; 'FINSI' ; 'FIN' BL1 ; 'TEMPS' ; * 'OPTION' 'SAUVER' ('CHAINE' 'result.sauv_' RAF 'tps_' TPS ) ; * 'SAUVER' ; **************************************************************** **************************************************************** ***** The post-treatment ****** **************************************************************** **************************************************************** * 'OPTI' 'REST' 'result.sauv_1tps_5' ; * 'REST' ; GRAPH = VRAI ; GRAPH = FAUX ; * **** The mesh * 'SI' GRAPH ; 'TRACER' DOMTOT 'TITR' ('CHAINE' 'Maillage: ' 'FINSI' ; * **** Initial conditions * 'SI' GRAPH ; VN PN TN YN GAMMAN = 'PRIM' 'PERFTEMP' PGAZ RN0 GN0 RETN0 RYN0 ; 'TRAC' CHM_RN MOD1 'TRAC' CHM_VN MOD1 'TRAC' CHM_PN MOD1 'TRAC' CHM_TN MOD1 'TRAC' CHM_YN MOD1 'FINSI' ; * **** Results * 'SI' GRAPH ; 'TRAC' CHM_RN MOD1 'TRAC' CHM_VN MOD1 'TRAC' CHM_PN MOD1 'TRAC' CHM_TN MOD1 'TRAC' CHM_YN MOD1 'FINSI' ; * *** Evolution Objects * SS = 'COORDONNEE' 1 LIGEVO; x0 = 'MINIMUM' lxx; x1 = 'MAXIMUM' lxx ; titolo = 'CHAINE' ' at t = ' TPS ' Methode = ' METO ' SF = ' SAFFAC ; * rho tro = 'CHAINE' 'ro ' titolo ; * u tu = 'CHAINE' 'u ' titolo ; * v tv = 'CHAINE' 'v ' titolo ; * p tp = 'CHAINE' 'p ' titolo ; * T tT = 'CHAINE' 'T ' titolo ; 'SI' GRAPH ; 'DESSIN' evro 'TITRE' tro 'XBOR' x0 x1 'MIMA' ; 'DESSIN' evp 'TITRE' tp 'XBOR' x0 x1 'MIMA' ; 'DESSIN' evu 'TITRE' tu 'XBOR' x0 x1 'MIMA' ; 'DESSIN' evv 'TITRE' tv 'XBOR' x0 x1 'MIMA' ; 'DESSIN' evT 'TITRE' tT 'XBOR' x0 x1 'MIMA' ; 'FINSI' ; * Test PVN = 3.2E6 ; PCJ = 1.1E6 ; RHOVN = 3.7 ; RHOCJ = 1.4 ; PMAX = 'MAXIMUM' PN ; 'SI' ((PMAX '>' PVN) 'OU' (PMAX '<' PCJ)) ; 'MESSAGE' 'Pression = ???' ; 'ERREUR' 5 ; 'FINSI' ; RHOMAX = 'MAXIMUM' RN ; 'SI' ((RHOMAX '>' RHOVN) 'OU' (RHOMAX '<' (0.85 '*' RHOCJ))) ; 'MESSAGE' 'Densite = ???' ; 'ERREUR' 5 ; 'FINSI' ; 'FIN' ;
© Cast3M 2003 - Tous droits réservés.
Mentions légales