* fichier : cavitefmm.dgibi ************************************************************************ ************************************************************************ ************************************************************************* * CAVITE CARRE A PAROI DEFILANTE * * Methode implicite sans matrice pour les equations de * * Navier-Stokes (bas Mach) * * * * BECCANTINI A., SFME/LTMF, DEC 2003 * * * ************************************************************************* * * The real file starts after the procedure PNSSM * ************************************************************************* ************************************************************************* *********** SOLUTION OF THE NAVIER-STOKES EQUATIONS ******************** *********** FMM ******************** ************************************************************************* ************************************************************************* * * RVX . 'RESULTS' : table containing the results * * RVX . 'FREQI' : frequency of presenting the results * * RVX . 'MODEL' : model object * RVX . 'RN0' : density * RVX . 'GN0' : qdm * RVX . 'RET0' : total energy * * RVX . 'PGAS' : table containing the gas model * RVX . 'PGAS' . 'GAMN' : gamma * RVX . 'PGAS' . 'MU' : dynamic viscosity (kg/m^3 x m^2/s) * RVX . 'PGAS' . 'LAMBDA' : heat diffusion (W/K/m) * * * RVX . 'GRAVITY' : gravity * * RVX . 'LISTCONS' : name of the conservative variables * RVX . 'LISTPRIM' : name of the primitive variables * * RVX . 'LISTERR' : name of the error variables * * RVX . 'METHOD' : numerical scheme * RVX . 'CUTOFF' : cut off speed * * RVX . 'SPACEA' : space accuracy * RVX . 'LIMITER' : limiter type * RVX . 'TIMEA' : time accuracy * * RVX . 'T0' : initial time * RVX . 'TFINAL' : final time * RVX . 'DTPS' ('CFL') : time step or CFL number * * RVX . 'DCFL' : CFL number for dual time * * Error criteria for dual time loop: * RVX . 'NDTITER' : number of iterations * RVX . 'RELERR' : Logical (Relative error or absolute error) * RVX . 'EPSDT' : error at which dual time iterations are stopped * * RVX . 'NJAC' : Jacobi iterations * * RVX . 'PROLIM' : table called by the procedure PROLIM, * procedure to compute boundary conditions * * RVX . 'DIFTIMP' : boundary condition on temperature * RVX . 'DIFGTIMP' : boundary condition on gradient of temperature * RVX . 'DIFVIMP' : boundary condition on speed * RVX . 'DIFGVIMP' : boundary condition on gradient of speed * RVX . 'DIFTAUI' : boundary condition on constraint tensor * RVX . 'DIFQIMP' : boundary condition on heat flux * * 'DEBPROC' PNSSM ; 'ARGUMENT' RVX*TABLE ; * * 'SI' ('EXISTE' RVX 'RESULTS') ; 'MESS' 'Table RESULTS already exists' ; 'SINON' ; RVX . 'RESULTS' = 'TABLE' ; RVX . 'RESULTS' . 'TPS' = RVX . 'T0' ; RVX . 'RESULTS' . 'RN' = 'COPIER' (RVX . 'RN0') ; RVX . 'RESULTS' . 'GN' = 'COPIER' (RVX . 'GN0') ; RVX . 'RESULTS' . 'RET' = 'COPIER' (RVX . 'RET0') ; RVX . 'RESULTS' . 'NITER' = 0 ; 'FINSI' ; MDOMINT = RVX . 'MODEL' ; * ***** Physical properties * GAMN = RVX . 'PGAS' . 'GAMN' ; GAMSCA1 = 'MAXIMUM' GAMN ; GAMSCA2 = 'MINIMUM' GAMN ; 'SI' ('EGA' GAMSCA2 GAMSCA1 0.0001) ; GAMSCAL = GAMSCA1 ; 'SINON' ; 'MESSAGE' ; 'MESSAGE' 'Gamma is not constant' ; 'ERREUR' 21 ; 'FINSI' ; * MU = (RVX . 'PGAS' . 'MU') ; LAMBDA = (RVX . 'PGAS' . 'LAMBDA') ; R = (RVX . 'PGAS' . 'R') ; CV = R '/' (gamscal '-' 1.) ; * LISTINCO = RVX . 'LISTCONS' ; LISTPRIM = RVX . 'LISTPRIM' ; LISTERR = RVX . 'LISTERR' ; * Names of the gradient of temperature * Names of the gradient of speed * * Upwind scheme * METO = RVX . 'METHOD' ; * Space accuracy (1 or 2) and limiter * Time accuracy (1 or 2) ORDESP = RVX . 'SPACEA' ; TYPELIM = RVX . 'LIMITER' ; ORDTPS = RVX . 'TIMEA' ; * Initial/final time * Deltat or CFL TPS = RVX . 'RESULTS' . 'TPS' ; TFINAL = RVX . 'TFINAL' ; 'SI' ('EXISTE' RVX 'DTPS') ; 'MESSAGE' 'DTPS or CFL ???' ; 'ERREUR' 21 ; 'FINSI' ; DTPS = RVX . 'DTPS' ; 'SINON' ; 'FINSI' ; * Dual time iterations NDT = RVX . 'NDTITER' ; * Relative error EPSDT = RVX . 'EPSDT' ; * Jacobi iterations * NJAC = RVX . 'NJAC' ; * Cut off speed ICO = RVX . 'CUTOFF' ; * To compute the diffusive cut-off USDELTAX = 'INVERSE' DELTAX ; * **** Conservative variables * * MOT1 = 'EXTRAIRE' LISTINCO 1 ; NOMMOM = 'EXTRAIRE' LISTINCO MOT2 = 'EXTRAIRE' LISTINCO 4 ; 'SINON' ; NOMMOM = 'EXTRAIRE' LISTINCO MOT2 = 'EXTRAIRE' LISTINCO 5 ; 'FINSI' ; * **** Primitive variables * TN0 = PN0 '/' (R '*' RN0) ; MOTRN = 'EXTRAIRE' LISTPRIM 1 ; MOTVN = 'EXTRAIRE' LISTPRIM MOTPN = 'EXTRAIRE' LISTPRIM 4 ; 'SINON' ; MOTVN = 'EXTRAIRE' LISTPRIM MOTPN = 'EXTRAIRE' LISTPRIM 5 ; 'FINSI' ; * **** Coeff to compute gradients for convective term (MCHSCA, MCHVEC) * Boundary conditions have to be taken into account * RCHLIM RESLIM = PROLIM (RVX . 'PROLIM') MDOMINT LISTINCO LISTPRIM RN0 VN0 PN0 GAMN ; MAILLIM = 'EXTRAIRE' RCHLIM 'MAILLAGE' ; 'SI' (MAILLIM 'EGA' 0) ; GRADRN ALRN MCHSCA = 'PENT' MDOMINT 'CENTRE' 'EULESCAL' 'NOLIMITE' GRADVN ALVN MCHVEC = 'PENT' MDOMINT 'CENTRE' 'EULEVECT' 'NOLIMITE' NOMVEL GN0 'CLIM' (RVX . 'DIFVIMP') ; 'SINON' ; VECTBC = 'MANUEL' 'CHPO' MAILLIM 'NATURE' 'DISCRET' 2 'UX' 0.0 'UY' 0.0 ; * Same name as NOMVEL 'SINON' ; VECTBC = 'MANUEL' 'CHPO' MAILLIM 'NATURE' 'DISCRET' 3 'UX' 0.0 'UY' 0.0 'UZ' ; 'FINSI' ; VECTBC = VECTBC 'ET' (RVX . 'DIFVIMP') ; * GRADRN ALRN MCHSCA = 'PENT' MDOMINT 'CENTRE' 'EULESCAL' 'NOLIMITE' GRADVN ALVN MCHVEC = 'PENT' MDOMINT 'CENTRE' 'EULEVECT' 'NOLIMITE' NOMVEL VN0 'CLIM' VECTBC ; 'FINSI' ; * *** Coeff to compute gradient for diffusive flux * LMGTEMP TN0 (RVX . 'DIFTIMP') (RVX . 'DIFGTIMP') ; VN0 (RVX . 'DIFVIMP') (RVX . 'DIFGVIMP') ; * * *** After each dual time loop, we could display * the evolution of the error in the dual time loop * the evolution of the dual time step (the safety factor) * LISTLINF = RVX . 'RESULTS' . 'LISTLINF' ; LISTITDT = RVX . 'RESULTS' . 'LISTITDT' ; LISTITER = RVX . 'RESULTS' . 'LISTITER' ; * 'MESSAGE' ; 'MESSAGE' ('CHAINE' 'Methode = ' METO) ; 'MESSAGE' ; 'TEMPS' 'ZERO' ; ************************************************************************ ************************************************************************ **** Temporal loop ***************************************************** ************************************************************************ ************************************************************************ RN_N1M1 = 'COPIER' RN0 ; GN_N1M1 = 'COPIER' GN0 ; RET_N1M1 = 'COPIER' RET0 ; 'SI' (AA > 0) ; PTITER = 'EXTRAIRE' LISTITER AA ; 'SINON' ; PTITER = 0 ; 'FINSI' ; DUSDT = 0.0D0 ; 'REPETER' BLITER -1 ; PTITER = PTITER '+' 1 ; * **** Personal procedure * PROCPT RVX ; * * **** _N1M = (t^n,\tau^m) * _N1M1 = (t^n,\tau^{m+1}) * * ************************************************************************ ****** Loop on dual time*********************************************** ************************************************************************ * * *** DUSDT0 is the increment of DUSDT in the previous (physical) time * iteration. * DUSDT0 = DUSDT ; DUSDT = 0.0D0 ; 'REPETER' BLDT NDT ; RN_N1M = RN_N1M1 ; GN_N1M = GN_N1M1 ; RET_N1M = RET_N1M1 ; * **** Primitive variables * * *** Boundary conditions * RCHLIM RESLIM = PROLIM (RVX . 'PROLIM') MDOMINT LISTINCO LISTPRIM RN_N1M VN_N1M PN_N1M GAMN ; * ****** First/second order reconstruction * 'SI' (ORDESP 'EGA' 2) ; * 'SI' (NNLIM 'EGA' 0) ; RNLIM = CHPVID ; PNLIM = CHPVID ; VNLIM = RVX . 'DIFVIMP' ; 'SINON' ; 'ET' (RVX . 'DIFVIMP') ; 'FINSI' ; GRADRN ALRN0 = 'PENT' MDOMINT 'CENTRE' 'EULESCAL' TYPELIM 'CLIM' RNLIM 'GRADGEO' MCHSCA ; GRADPN ALPN0 = 'PENT' MDOMINT 'CENTRE' 'EULESCAL' TYPELIM 'CLIM' PNLIM 'GRADGEO' MCHSCA ; GRADVN ALVN0 = 'PENT' MDOMINT 'CENTRE' 'EULEVECT' TYPELIM 'CLIM' VNLIM 'GRADGEO' MCHVEC ; * 'SI' (&BLDT < NLCB) ; * ALRN0 = 'COPIER' ALRN ; * ALPN0 = 'COPIER' ALPN ; * ALVN0 = 'COPIER' ALVN ; * 'SINON' ; * 'SI' (&BLDT 'EGA' NLCB) ; * 'MESSAGE' ; * 'MESSAGE' 'On gele les limiteurs!!!' ; * 'MESSAGE' ; * 'FINSI' ; * 'FINSI' ; MDOMINT RN_N1M GRADRN ALRN0 VN_N1M GRADVN ALVN0 PN_N1M GRADPN ALPN0 GAMN ; 'SINON' ; MDOMINT RN_N1M VN_N1M PN_N1M GAMN ; 'FINSI' ; MDOMINT LISTINCO ROF VITF PF GAMF MAILLIM ICO (MU '*' ('INVERSE' RN_N1M) '*' USDELTAX) ; * ICO ICO ; RESIDU = RESIDU '+' RESLIM ; * **** La gravite * RN_N1M GN_N1M1 (RVX . 'GRAVITY') ; RESIDU = RESIDU '+' RESGRA ; * ************************************** **** Diffusive terms ***************** ************************************** * TN_N1M = PN_N1M '/' (R '*' RN_N1M) ; * LMGTEMP TN_N1M (RVX . 'DIFTIMP') (RVX . 'DIFGTIMP') 'GRADGEO' MCHDIT ; VN_N1M (RVX . 'DIFVIMP') (RVX . 'DIFGVIMP') 'GRADGEO' MCHDIV ; * MDOMINT MU LAMBDA CV RN_N1M VN_N1M TN_N1M GRADVN GRADTN LISTINCO 'VIMP' (RVX . 'DIFVIMP') 'TAUI' (RVX . 'DIFTAUI') 'QIMP' (RVX . 'DIFQIMP') ; RESIDU = RESIDU '+' RESIDI ; COEFV = (0.0 '*' RN_N1M) '+' 1.0 ; COEFV = COEFV '*' (lambda '*' (gamscal '-' 1.)) ; COEFV = COEFV '/' (R '*' RN_N1M) ; * 'MESSAGE' ; * 'MESSAGE' 'Je fais n importe' ; * COEFV = COEFV '*' 0.25 ; * ****** Residuum for dual tims stepping also involved the * variation of the conserved variables with respect * to time 'SI' ((&BLITER 'EGA' 1) 'OU' (ORDTPS 'EGA' 1)) ; RESIDU = RESIDU '-' DUSDT ; 'SINON' ; RESIDU = RESIDU '-' ((1.5 '*' DUSDT) '-' (0.5 '*' DUSDT0)) ; 'FINSI' ; * *** Time step at the first iteration/jacobi iteration * 'SI' (&BLDT 'EGA' 1) ; 'SINON' ; DTPS = RVX . 'DTPS' ; 'FINSI' ; TPS = TPS '+' DTPS ; * NJAC = 'ENTIER' ('MINIMUM' (RVX . 'NJACITER')) ; NJAC0 = NJAC ; 'SINON' ; (RVX . 'NJACLERR') (RVX . 'NJACITER') ; NJAC = 'ENTIER' NJAC ; NJAC0 = NJAC ; 'FINSI' ; * *** JACOBI * * **** CFL dual * 'SI' (&BLDT 'EGA' 1) ; SAFFACD = ('MINIMUM' (RVX . 'DCFL')) '*' 2 ; 'SINON' ; (RVX . 'DCFLERR') (RVX . 'DCFL')) '*' 2 ; 'FINSI' ; 'SI' ((&BLITER 'EGA' 1) 'OU' (ORDTPS 'EGA' 1)) ; * DUN IPRO = 'DETO' (RVX . 'TYPEJAC') LISTINCO MDOMINT RESIDU RN_N1M GN_N1M RET_N1M GAMN ICO DTPS SAFFACD NJAC 'CLIM' LISTPRIM RCHLIM COEFV ; 'SINON' ; * DUN IPRO = 'DETO' (RVX . 'TYPEJAC') LISTINCO MDOMINT RESIDU RN_N1M GN_N1M RET_N1M GAMN ICO (DTPS '/' 1.5) SAFFACD NJAC 'CLIM' LISTPRIM RCHLIM COEFV ; 'FINSI' ; * 'FINSI' ; 'SI' (IPRO 'NEG' 0) ; 'MESSAGE' ; 'MESSAGE' 'Probleme dans FMM' ; 'MESSAGE' ; 'ERREUR' 21 ; 'FINSI' ; * **** We compute DUSDT for the future loop * DUSDT = DUSDT '+' (DUN '/' DTPS) ; * **** We evaluate the conservative variables at t^{n+1}, \tau^{m+1} * RN_N1M1 = RN_N1M '+' DRN ; GN_N1M1 = GN_N1M '+' DGN ; RET_N1M1 = RET_N1M '+' DRET ; ERRINF = 'MAXIMUM' DUN 'ABS' LISTERR ; 'SI' ((&BLDT 'EGA' 1) 'OU' (((&BLDT '/' (RVX . 'FREQI')) '*' (RVX . 'FREQI')) 'EGA' &BLDT)) ; 'MESSAGE' ; 'MESSAGE' ('CHAINE' 'ITER =' PTITER ' TPS =' TPS ' DTITER =' &BLDT ' LINF =' ERRINF ' DCFL =' SAFFACD ' NJAC =' NJAC) ; 'MESSAGE' ; 'FINSI' ; * * *** Update of RVX . 'RESULTS' * RVX . 'RESULTS' . 'RN' = RN_N1M1 ; RVX . 'RESULTS' . 'GN' = GN_N1M1 ; RVX . 'RESULTS' . 'RET' = RET_N1M1 ; RVX . 'RESULTS' . 'LISTLINF' = LISTLINF ; RVX . 'RESULTS' . 'LISTITDT' = LISTITDT ; RVX . 'RESULTS' . 'LISTITER' = LISTITER ; * 'SI' (RVX . 'RELERR') ; * Relative error 'SI' (&BLDT 'EGA' 1) ; ERRINF0 = ERRINF ; 'SINON' ; 'SI' (ERRINF < (EPSDT '*' ERRINF0)) ; 'QUITTER' BLDT ; 'FINSI' ; 'FINSI' ; 'SINON' ; 'SI' (ERRINF < EPSDT) ; 'QUITTER' BLDT ; 'FINSI' ; 'FINSI' ; 'FIN' BLDT ; ************************************************************************ ****** End of the loop on dual time************************************* ************************************************************************ * *** Update of RVX . 'RESULTS' * RVX . 'RESULTS' . 'TPS' = TPS ; RVX . 'RESULTS' . 'NITER' = (RVX . 'RESULTS' . 'NITER') '+' 1 ; * 'SI' (TPS '>EG' TFINAL) ; 'QUITTER' BLITER ; 'FINSI' ; 'FIN' BLITER ; TCPU = 'TEMPS' 'NOEC' ; RVX . 'RESULTS' . 'TCPU' = TCPU ; 'FINPROC' ; ************************************************************************* ************************************************************************* ************************************************************************* ************************************************************************* 'OPTION' 'DIME' 2 'ELEM' 'QUA4' 'TRAC' 'PSC' 'ECHO' 1 ; LOGTRI = VRAI ; * GRAPH = VRAI ; GRAPH = FAUX ; ******************************* **** MESH ***************** ******************************* RAF = 8 ; L = 1 ; H = L ; DENINI = (L '/' (8. '*' RAF)) ; DENCEN = 8 '*' DENINI ; A1 = 0.0 0.0 ; A12 = (L '/' 2.) 0.0 ; A2 = L 0.0 ; A23 = L (H '/' 2.0) ; A3 = L H ; A34 = (L '/' 2.0) H ; A4 = 0.0 H ; A41 = 0.0 (H '/' 2.0) ; A1A2 = (A1 'DROIT' A12 'DINI' DENINI 'DFIN' DENCEN) 'ET' (A12 'DROIT' A2 'DINI' DENCEN 'DFIN' DENINI); A2A3 = (A2 'DROIT' A23 'DINI' DENINI 'DFIN' DENCEN) 'ET' (A23 'DROIT' A3 'DINI' DENCEN 'DFIN' DENINI); A3A4 = (A3 'DROIT' A34 'DINI' DENINI 'DFIN' DENCEN) 'ET' (A34 'DROIT' A4 'DINI' DENCEN 'DFIN' DENINI); A4A1 = (A4 'DROIT' A41 'DINI' DENINI 'DFIN' DENCEN) 'ET' (A41 'DROIT' A1 'DINI' DENCEN 'DFIN' DENINI); DOMINT = 'DALLER' A1A2 A2A3 A3A4 A4A1 'PLAN' ; 'SI' LOGTRI ; 'OPTION' 'ELEM' 'TRI3' ; DOMINT = 'SURFACE' ( A1A2 'ET' A2A3 'ET' A3A4 'ET' A4A1 ) 'PLAN' ; 'FINSI' ; MDOMINT = 'MODELISER' DOMINT 'EULER' ; MA1A2 = 'MODELISER' A1A2 'EULER' ; MA2A3 = 'MODELISER' A2A3 'EULER' ; MA3A4 = 'MODELISER' A3A4 'EULER' ; MA4A1 = 'MODELISER' A4A1 'EULER' ; 'ELIMINATION' QDOMINT (DENINI '/' 100) QA1A2 ; 'ELIMINATION' QDOMINT (DENINI '/' 100) QA2A3 ; 'ELIMINATION' QDOMINT (DENINI '/' 100) QA3A4 ; 'ELIMINATION' QDOMINT (DENINI '/' 100) QA4A1 ; 'SI' GRAPH ; 'FINSI' ; *************************************** ******** PHYSICAL PARAMETERS ********* *************************************** gamscal = 1.4 ; RAIR = 288. ; * ro_0 = 1.0 ; p_0 = 1.0D5 ; ret_0 = (1. '/' (gamscal '-' 1.)) '*' p_0 ; * * Rey = 1000 ; mu = (ro_0 '*' L '*' VParois) '/' Rey ; * Pr = 0.72 ; * lambda = mu * cp '/' pr ; lambda = mu '*' (gamscal '*' RAIR '/' (gamscal '-' 1.0)) '/' Pr ; *************************************** **** INITIAL CONDITIONS *************** *************************************** * * A4 -> A3 * * * * * A1 A2 * VN0 PN0 = 'PRIM' 'PERFMONO' RN0 GN0 RETN0 GAMN ; TN0 = PN0 '/' (Rair '*' RN0) ; * Conditions aux bords 'NATU' 'DISCRET' ) 'ET' ($A1A2 . 'CENTRE') 'ET' ($A2A3 . 'CENTRE')) 2 'UX' 0.0 'UY' 0.0 'NATU' 'DISCRET') ; GRADVLIM = CHPVID ; TAULIM = 'COPIER' CHPVID ; * TLIM = CHPVID ; 'ET' ($A1A2 . 'CENTRE') 'ET' ($A2A3 . 'CENTRE')) 2 'P1DX' 0.0 'P1DY' 0.0 'NATU' 'DISCRET' ; 'ET' ($A1A2 . 'CENTRE') 'ET' ($A2A3 . 'CENTRE')) 2 'UX' 0.0 'UY' 0.0 'NATU' 'DISCRET' ; * ***** Pictures of the initial conditions * MOD1 = 'MODELISER' ($DOMINT . 'MAILLAGE') 'THERMIQUE' ; 'SI' GRAPH ; 'OPTION' 'ISOV' 'SULI' ; * * 'OPTION' 'ISOV' CELL ; 'FINSI' ; * Names of conserved variables LISTCONS = NOMDEN 'ET' NOMMOM 'ET' NOMRET ; LISTP = NOMDEN 'ET' NOMVEL 'ET' NOMPRE ; ************************************************************************* ************************************************************************* ************************************************************************* ************************************************************************* ************ COMPUTATION OF THE SOLUTION ***************************** ************************************************************************* ************************************************************************* ************************************************************************* ************************************************************************* ************************************************************************* ******PROCEDURE PROCPT ************************************************** ************************************************************************* * * 'DEBPROC' PROCPT ; 'FINPROC' ; * ************************************************************************* ******PROCEDURE PROLIM ************************************************** ************************************************************************* * 'DEBPROC' PROLIM ; 'ARGUMENT' RVX*'TABLE' MDOMINT*'MMODEL' LISTINCO*'LISTMOTS' LISTPRIM*'LISTMOTS' RN*'CHPOINT' VN*'CHPOINT' PN*'CHPOINT' GAMN*'CHPOINT' ; * *** Boundary conditions * * 'RESPRO' RCHLIM RESLIM ; 'RESPRO' CHPVID CHPVID ; 'FINPROC' ; ************************************************************************* ****** FIN PROCEDURE PROLIM ********************************************* ************************************************************************* * RV = 'TABLE' ; RV . 'FREQI' = 1 ; RV . 'MODEL' = MDOMINT ; * **** Conservative variables / primitive variables * * RV . 'LISTCONS' = LISTCONS ; RV . 'LISTPRIM' = LISTP ; * RV . 'RN0' = RN0 ; RV . 'GN0' = GN0 ; RV . 'RET0' = RETN0 ; * **** Gas property/gravity * RV . 'PGAS' = 'TABLE' ; RV . 'PGAS' . 'GAMN' = GAMN ; RV . 'PGAS' . 'MU' = mu ; RV . 'PGAS' . 'R' = Rair ; RV . 'PGAS' . 'LAMBDA' = lambda ; * 'UY' 0.0 ; * * Table for BC (convective flux) * RV . 'PROLIM' = 'TABLE' ; * * BC (diffusive flux) * * RVX . 'DIFTIMP' : boundary condition on temperature * RVX . 'DIFGTIMP' : boundary condition on gradient of temperature * RVX . 'DIFVIMP' : boundary condition on speed * RVX . 'DIFGVIMP' : boundary condition on gradient of speed * RVX . 'DIFTAUI' : boundary condition on constraint tensor * RVX . 'DIFQIMP' : boundary condition on heat flux * * RV . 'DIFTIMP' = TLIM ; RV . 'DIFGTIMP' = GRADTLIM ; RV . 'DIFQIMP' = QLIM ; RV . 'DIFVIMP' = VLIM ; RV . 'DIFGVIMP' = GRADVLIM ; RV . 'DIFTAUI' = TAULIM ; * GRADTF MCHTNF = 'PENT' MDOMINT 'FACE' 'DIAMAN2' ('MOTS' 'SCAL') * ('MOTS' 'P1DX' 'P1DY') TN0 TLIM GRADTLIM ; * GRADVF MCHVNF = 'PENT' MDOMINT 'FACE' 'DIAMAN2' ('MOTS' 'UX' 'UY') * ('MOTS' 'P1DX' 'P1DY' 'P2DX' 'P2DY') VN0 VLIM TAULIM ; * * ICACCA RESIDI DTCACCA = 'LAPN' 'VF' 'PROPCOST' 'RESI' 'EXPL' * MDOMINT MU LAMBDA CV RN0 VN0 TN0 GRADVF GRADTF * (RV . 'LISTCONS') 'VIMP' (RV . 'DIFVIMP') 'TAUI' (RV . 'DIFTAUI') * 'QIMP' (RV . 'DIFQIMP') ; * **** Numerical parameters * * * Variable to compute Linf error * RV . 'LISTERR' = NOMMOM ; * RV . 'LISTERR' = NOMDEN ; * RV . 'LISTERR' = NOMRET ; * * Upwind scheme * RV . 'METHOD' = 'RUSANOLM' ; * RV . 'METHOD' = 'AUSMPLM' ; * **** Cut off * We take a constant cutoff * 'SCAL' Vparois ; * Reconstruction/limiter * Time accuracy (1 or 2) * Iterations * Final time RV . 'SPACEA' = 2 ; RV . 'LIMITER' = 'NOLIMITE' ; * RV . 'LIMITER' = 'LIMITEUR' ; RV . 'TIMEA' = 1 ; * **** Phisical time * RV . 'T0' = 0 ; RV . 'TFINAL' = 1.0D6 ; * RV . 'DTPS' = 1.0D16 ; * **** Dual time * * Safety factor for the dual time step * Max. Dual time iterations * Absolute/relative error * RV . 'NDTITER' = 1000 ; RV . 'RELERR' = FAUX ; RV . 'EPSDT' = 1.0D-5 ; **** Jacobi iterations RV . 'TYPEJAC' = 'PJACO' ; * RV . 'TYPEJAC' = 'LJACOF' ; * RV . 'TYPEJAC' = 'LJACOB' ; * RV . 'TYPEJAC' = 'LJACOFB' ; * **** Parameters for PROCPT * 'TEMPS' 'ZERO' ; PNSSM RV ; * 'TEMPS' 'IMPR' ; ********************************************************** ********************************************************** ********************************************************** ************** PLOTS ************************************* ********************************************************** ********************************************************** ********************************************************** ********************************************************** RN = RV . 'RESULTS' . 'RN' ; GN = RV . 'RESULTS' . 'GN' ; RET = RV . 'RESULTS' . 'RET' ; LISTITER = RV . 'RESULTS' . 'LISTITER' ; LISTITDT = RV . 'RESULTS' . 'LISTITDT' ; LISTLINF = RV . 'RESULTS' . 'LISTLINF' ; * *** Convergence evolution inside of each iteration * I1 = 1 ; 'REPETER' BLITER NITERE ; I0 = I1 ; I1 = 'EXTRAIRE' LISTITER &BLITER ; 'SI' (I1 'EGA' I0) ; 'SINON' ; ('LOG' 10.)) ; 'SI' GRAPH ; 'DESSIN' everr 'TITRE' ('CHAINE' 'Convergence at iter ' (I1 '-' 1)) ; 'FINSI' ; 'FINSI' ; 'FIN' BLITER ; ('LOG' 10.)) ; 'SI' GRAPH ; 'DESSIN' everr 'TITRE' ('CHAINE' 'Convergence at iter ' (I1)) ; 'FINSI' ; 'FINSI' ; CN2 = GAMN '*' (PN '/' RN) ; VN2 = 'PSCAL' VN VN NOMVEL NOMVEL ; MACHN2 = VN2 '/' CN2 ; MACHN = MACHN2 '**' 0.5 ; HTN = (GAMN '/' (GAMN '-' 1.0)) '*' (PN '/' RN) ; ECIN = 0.5 '*' ('PSCAL' VN VN NOMVEL NOMVEL) ; HTN = HTN '+' ECIN ; SN = PN '/' (RN '**' GAMSCAL) ; tps = RV . 'RESULTS' . 'TPS' ; 'SI' GRAPH ; * 'OPTION' 'ISOV' 'LIGN' ; * RNV = 'ELNO' $DOMINT ('KCHT' $DOMINT 'SCAL' 'CENTRE' RN) ; * 'TRACER' DOMINT RNV ('CONTOUR' DOMINT) 15 'TITRE' 'ro'; * PNV = 'ELNO' $DOMINT ('KCHT' $DOMINT 'SCAL' 'CENTRE' PN) ; * 'TRACER' DOMINT PNV ('CONTOUR' DOMINT) 15 'TITRE' 'p' ; * MNV = 'ELNO' $DOMINT ('KCHT' $DOMINT 'SCAL' 'CENTRE' MACHN) ; * 'TRACER' DOMINT MNV ('CONTOUR' DOMINT) 15 'TITRE' 'Mach' ; * RUX = 'EXCO' GN 'UX' ; * RUXV = 'ELNO' $DOMINT ('REDU' RUX $DOMINT . 'CENTRE') ; * 'TRACER' DOMINT RUXV ('CONTOUR' DOMINT) 15 * 'TITRE' 'rux' ; VECN = 'VECTEUR' VN ; 'TRACER' VECN DOMINT ; MODVN = 'PSCAL' VN VN NOMVEL NOMVEL ; MODVN = MODVN '**' 0.5 ; MODVN = MODVN '+' (('MAXIMUM' MODVN) '*' 0.000001) ; VN1 = VN '/' MODVN ; VECN1 = 'VECTEUR' 0.01 VN1 'JAUNE' ; 'TRACER' DOMINT VECN1 ('CONTOUR' DOMINT) 'TITRE' ('CHAINE' 'Normalized VN : ' TITOLO) ; 'FINSI' ; * **** Evolution objects * TAB1 = 'TABLE' ; TAB1 . 'TITRE'= 'TABLE' ; TAB1 . 1 = 'MARQ CROI NOLI'; TAB1 . 'TITRE' . 1 = 'Reference (Su)' ; TAB1 . 2 = 'REGU' ; TAB1 . 'TITRE' . 2 = 'Numerical res.' ; 0.2344 0.5 0.8047 0.8594 0.9063 0.9453 0.9531 0.9609 0.9688 1 ; 0.3193 0.0243 -0.317 -0.4245 -0.5182 -0.3972 -0.3421 -0.2816 -0.2175 0 ; 0.5 0.6172 0.7344 0.8516 0.9531 0.9609 0.9688 0.9766 1 ; -0.1058 -0.0605 0.0564 0.1857 0.3316 0.466 0.5109 0.5743 0.6582 1 ; 'OPTION' 'ELEM' 'QUA4' ; XL = 'EXTRAIRE' LISTX &BL1 ; YMIN = 'MINIMUM' ('COORDONNEE' 2 DOMINT) ; YMAX = 'MAXIMUM' ('COORDONNEE' 2 DOMINT) ; DELTAY = YMAX '-' YMIN ; PL1 = XL (YMIN '+' (1.0D-10 '*' DELTAY)) ; PL2 = XL 0.0 ; PL3 = XL (YMAX '-' (1.0D-10 '*' DELTAY)) ; LIG1 = (PL1 'DROIT' PL2 'DINI' DENINI 'DFIN' DENCEN) 'ET' (PL2 'DROIT' PL3 'DINI' DENCEN 'DFIN' DENINI) ; 'SI' GRAPH ; 'FINSI' ; ('EXTRAIRE' EVUX 'ABSC') ; 'SI' GRAPH ; 'DESSIN' (EV_UXY 'ET' EVUX1) 'TITRE' ('CHAINE' 'Nondimensional ux at x = ' XL) 'LEGE' TAB1 ; 'FINSI' ; 'FIN' BL1 ; 'OPTION' 'ELEM' 'QUA4' ; YL = 'EXTRAIRE' LISTY &BL1 ; XMIN = 'MINIMUM' ('COORDONNEE' 2 DOMINT) ; XMAX = 'MAXIMUM' ('COORDONNEE' 2 DOMINT) ; DELTAX = XMAX '-' XMIN ; PL1 = (XMIN '+' (1.0D-10 '*' DELTAX)) YL; PL2 = 0.0 YL ; PL3 = (XMAX '-' (1.0D-10 '*' DELTAX)) YL ; LIG1 = (PL1 'DROIT' PL2 'DINI' DENINI 'DFIN' DENCEN) 'ET' (PL2 'DROIT' PL3 'DINI' DENCEN 'DFIN' DENINI) ; 'SI' GRAPH ; 'FINSI' ; 'SI' GRAPH ; 'DESSIN' (EV_UYX 'ET' EVUY) 'TITRE' ('CHAINE' 'Nondimensional uy at y = ' YL) 'LEGE' TAB1 ; 'FINSI' ; 'FIN' BL1 ; * TEST AA = 10. '**' ('EXTRAIRE' LERR 1) ; 'SI' ((BB '/' AA) '>' 1.0D-5) ; 'ERREUR' 'Probleme de convergence' ; 'FINSI' ; 'FIN' ;
© Cast3M 2003 - Tous droits réservés.
Mentions légales