limiter.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\limiter.f
00002 !
00043                         DOUBLE PRECISION FUNCTION LIMITER
00044 !                       **********************************
00045 !
00046      &(ILIM,R,C)
00047 !
00048 !***********************************************************************
00049 ! TELEMAC 2D VERSION 6.2                                           R.ATA
00050 !***********************************************************************
00051 !
00052 !     FUNCTION THAT COMPUTES THE VALUE OF A GIVEN LIMITER FOR WAF SCHEME
00053 !        BASED IN THE EXCELLENT PAPER OF FRIEDMANN: "A COMPARATIVE
00054 !         STUDY OF TVD-LIMITERS- WELL KNOWN LIMITERS AND AN
00055 !           INTRODUCTION OF NEW ONES". INT.J.NUMER.METH.FLUIDS(2010)
00056 !
00057 !
00058 !-----------------------------------------------------------------------
00059 !                             ARGUMENTS
00060 ! .________________.____.______________________________________________
00061 ! |      NOM       |MODE|                   ROLE                       |
00062 ! |________________|____|______________________________________________|
00063 ! |  ILIM          | -->|  OPTION POUR LIMITEUR                        |
00064 ! |                |    |     1 : MINMOD                               |
00065 ! |                |    |     2 : VAN ALBADA                           |
00066 ! |                |    |     3 : SUPERBEE                             |
00067 ! |                |    |     4 : MINBEE                               |
00068 ! |                |    |     5 : VAN LEER                             |
00069 ! |  Q             | -->|  CHOICE OF Q :                               |
00070 ! |                |    |     H : IF L(LEFT) OR R (RIGHT)              |
00071 ! |                |    |     V : FOR * STATE                          |
00072 ! |  R             | -->|  RATIO OF UPWIND CHANGE TO LOCAL CHANGE OF Q |
00073 ! |  C             | -->|  CELERITY                                    |
00074 ! |                |    |  FINITE VOLUME SCHEME                        |
00075 ! |                |    |     0      : ROE SCHEME                      |
00076 ! |                |    |     1      : KINETIC SCHEME                  |
00077 ! |                |    |     2      : ZOKAGOA SCHEME                  |
00078 ! |                |    |     3      : TCHAMEN SCHEME                  |
00079 ! |                |    |     4      : HLLC SCHEME                     |
00080 ! |                |    |     5      : WAF SCHEME                      |
00081 ! |________________|____|______________________________________________|
00082 !
00083 !  MODE: -->(UNCHANGEABLE INPUT),<--(OUTPUT),<-->(CHANGEABLE INPUT)
00084 !-----------------------------------------------------------------------
00085 !  CALLING SUBROUTINE HYD_WAF OR FLUXZZ
00086 !
00087 !***********************************************************************
00088 !
00089       IMPLICIT NONE
00090       INTEGER LNG,LU
00091       COMMON/INFO/LNG,LU
00092 !
00093 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00094 !
00095       INTEGER, INTENT(IN) :: ILIM
00096       DOUBLE PRECISION, INTENT(IN) :: R,C
00097 !
00098       DOUBLE PRECISION EPS
00099 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00100 !
00101 !-----------------------------------------------------------------------
00102 !
00103 !     WAF SCHEME: WHAT WE COMPUTE HERE IS NOT THE LIMITER B(r)
00104 !                 BUT THE FUNCTION A(r) = 1-(1-|C|)B(r)
00105 
00106       SELECT CASE (ILIM)
00107         CASE (1)
00108 !
00109 !       MINMOD
00110 !
00111           LIMITER = 1.0D0 - (1.0D0-ABS(C))
00112      &             *0.5D0*(1.0D0 + DSIGN(1.D0,R)) ! DSIGN(A,B) = |A|*SIGN(B)
00113      &             *ABS(R)
00114 !
00115 !
00116 !         ELSEIF (ILIM.EQ.2) THEN
00117         CASE (2)
00118 !
00119 !       VAN ALBADA
00120 !
00121           IF(R.LE.0)THEN
00122             LIMITER = 1.0D0
00123           ELSE
00124             LIMITER = 1.0D0-(1.0D0-ABS(C))*R*(1.0D0+R)/(1.0D0+R**2)
00125           ENDIF
00126 !
00127         CASE(3)
00128 !
00129 !       VAN LEER
00130 !
00131           EPS = 1.D-12
00132           IF(R.LE.0)THEN
00133             LIMITER = 1.0D0
00134           ELSE
00135             LIMITER = 1.0D0-2.0D0*(1.0D0-ABS(C))*R/(1.0D0+R+EPS)
00136           ENDIF
00137 !
00138         CASE(4)
00139 !
00140 !       MINBEE
00141 !
00142           IF(R.LE.0)THEN
00143             LIMITER = 1.0D0
00144           ELSEIF(R.GT.0.0D0.AND.R.LE.1)THEN
00145             LIMITER = 1.0D0-(1.0D0-ABS(C))*R
00146           ELSE
00147             LIMITER = ABS(C)
00148           ENDIF
00149 !
00150         CASE(5)
00151 !
00152 !       SUPERBEE
00153 !
00154           IF(R.LE.0)THEN
00155             LIMITER = 1.0D0
00156           ELSEIF(R.GT.0.0D0.AND.R.LE.0.5D0)THEN
00157             LIMITER = 1.0D0-2.0D0*(1.0D0-ABS(C))*R
00158           ELSEIF(R.GT.0.5D0.AND.R.LE.1.0D0)THEN
00159             LIMITER = ABS(C)
00160           ELSEIF(R.GT.1.0D0.AND.R.LE.2.0D0)THEN
00161             LIMITER = 1.0D0-(1.0D0-ABS(C))*R
00162           ELSE
00163             LIMITER = 2.0D0*ABS(C)-1.0D0
00164           ENDIF
00165 !
00166         CASE DEFAULT
00167 !
00168           WRITE(LU,*)'INVALID LIMITER FOR WAF SCHEME'
00169           CALL PLANTE(1)
00170           STOP
00171 !-----------------------------------------------------------------------
00172 !
00173       END SELECT
00174 
00175       RETURN
00176       END FUNCTION LIMITER

Generated on Fri Aug 31 2013 18:12:58 by S.E.Bourban (HRW) using doxygen 1.7.0