fap22f
C FAP22F SOURCE CB215821 16/04/21 21:16:46 8920 & alphaL, uvnL, uvtL, ulnL, ultL, pL, TvL, TlL, & rvL, rlL, & alphaR, uvnR, uvtR, ulnR, ultR, pR, TvR, TlR, & rvR, rlR, & F) C*********************************************************************** C NOM : fAP22F C DESCRIPTION : Calculation of the Two phase AUSM+ flux C (2D two fluid model, water and air) C C LANGAGE : ESOPE C AUTEUR : José R. Garcia Cascales (CEA/DEN/DM2S/SFME/LTMF) C mél : fd1@semt2.smts.cea.fr C*********************************************************************** C APPELES : C APPELES (E/S) : C inputs : INDMET, variable to say if we want C preconditioned version or not C primitive variable at left side C AL, UVNL, UVTL, ULNL, ULTL, PL, TVL, TLL, C RVG, RLG, C primitive variables at right side C AR, UVNR, UVTR, ULNR, ULTR, PR, TVR, TLR, C RVR, RLR, C C output : F, 2D AUSM+ flux C*********************************************************************** C SYNTAXE GIBIANE : C ENTREES : C ENTREES/SORTIES : C SORTIES : C CODE RETOUR (IRET) : = 0 si tout s'est bien passé C*********************************************************************** C VERSION : v1, 18/02/2002, version initiale C*********************************************************************** * * Executable statements * real*8 F(8) real*8 alphaL, alphaR, uvnL, uvnR, uvtL, uvtR, & ulnL, ulnR, ultL, ultR, pL, pR, evL, evR, elL, & elR, hvL, hvR, hlL, hlR, TvL, TvR, TlL, TlR integer INDMET C variables for AUSMDV scheme real*8 rvL, rvR, rlL, rlR, avL, avR, alL, alR & dotmv, dotml, Mvplus, Mvmin, Mlplus, Mlmin, & Pvplus, Pvmin, Plplus, Plmin real*8 gamv, cpv, gaml, cpl, pil PARAMETER(gamv = 1.4D0, cpv = 1008.D0, & gaml = 2.8D0, cpl = 4186.D0, pil = 8.5D8) evL = cpv*TvL/gamv evR = cpv*TvR/gamv elL = cpl*TlL/gaml + pil/rlL elR = cpl*TlR/gaml + pil/rlR hvL = evL + pL/rvL hvR = evR + pR/rvR hlL = elL + pL/rlL hlR = elR + pR/rlR C Speed of sound at left and rigth sides avL = SQRT((gamv - 1.D0)*Cpv*TvL) avR = SQRT((gamv - 1.D0)*Cpv*TvR) alL = SQRT((gaml - 1.D0)*Cpl*TlL) alR = SQRT((gaml - 1.D0)*Cpl*TlR) alm = SQRT(alL*alR) C Match number at both sides MlL = ulnL/alm MlR = ulnR/alm C AUSM+ scheme C AUSM schemes mass fluxes dotml = alm*((1.D0 - alphaL)*rlL*Mlplus + (1.D0 - alphaR)*rlR $ *Mlmin) C without this term the program does not work C for the shock tube, phase separatio, nozzle test... C it introduces too much diffusion in the manometer test C dotmv = dotmv + 0.01d0*(pL - pR) if(INDMET .EQ. 2)then dotml = dotml + 0.01d0*(pL - pR) end if C AUSM schemes pressure fluxes avpm = Pvplus*alphaL*pL + Pvmin*alphaR*pR alpm = Plplus*(1.D0 - alphaL)*pL + Plmin*(1.D0 - alphaR)*pR C Definition of convective part of the flux if (dotmv .GT. 0.D0) then F(1) = dotmv*1.D0 F(3) = dotmv*uvnL F(5) = dotmv*uvtL F(7) = dotmv*(hvL + (uvnL**2 + uvtL**2)/2.D0) else F(1) = dotmv*1.D0 F(3) = dotmv*uvnR F(5) = dotmv*uvtR F(7) = dotmv*(hvR + (uvnR**2 + uvtR**2)/2.D0) end if if (dotml .GT. 0.D0) then F(2) = dotml*1.D0 F(4) = dotml*ulnL F(6) = dotml*ultL F(8) = dotml*(hlL + (ulnL**2 + ultL**2)/2.D0) else F(2) = dotml*1.D0 F(4) = dotml*ulnR F(6) = dotml*ultR F(8) = dotml*(hlR + (ulnR**2 + ultR**2)/2.D0) end if C Addition of the pressure term F(3) = F(3) + avpm F(4) = F(4) + alpm END
© Cast3M 2003 - Tous droits réservés.
Mentions légales