cdlzz.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\cdlzz.f
00002 !
00049                         SUBROUTINE CDLZZ
00050 !                       ****************
00051 !
00052      &(NS,NPTFR,NBOR,LIMPRO,XNEBOR,YNEBOR,KDIR,KNEU,KDDL,G,
00053      & W,CE,FLUENT,FLUSORT,FLBOR,ZF,WINF)
00054 !
00055 !***********************************************************************
00056 ! TELEMAC 2D VERSION 6.3                                     01/07/2013
00057 !***********************************************************************
00058 !
00059 !
00060 !    UA(1,IS) = H,  UA(2,IS)=U  ,UA(3,IS)=V
00061 !
00062 ! history  R. ATA (EDF-LNHE) 01/07/2013
00063 !+
00064 !+        V6P3
00065 !+ COMMENT THE FLUX CALL FOR WALL CONDITTION
00066 !+ CLEAN UNUSED VARIABLES
00067 !
00068 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00069 !|  NS            |-->|  TOTAL NUMNER OF NODES
00070 !|  NPTFR         |-->|  TOTAL NUMBER OF BOUNDARY NODES
00071 !|  NBOR          |-->|  GLOBAL NUMBERS OF BOUNDARY POINTS
00072 !|  LIMPRO        |-->|  TYPES OF BOUNDARY CONDITION
00073 !|  XNEBOR,YNEBOR |-->|  UNIT OUTWARD NORMAL COMPONENTS AT BOUNDARY POINTS
00074 !|  KDIR          |-->|  CONVENTION FOR DIRICHLET POINTS
00075 !|  KNEU          |-->|  CONVENTION FOR NEUMANN POINTS
00076 !|  G             |-->|  GRAVITY CONSTANT
00077 !|  W             |-->|  UA(1,IS) = H,  UA(2,IS)=U  ,UA(3,IS)=V
00078 !|  CE            |<->|  FLUX
00079 !|  FLUENT,FLUSORT|<--|  IN AND OUT MASS FLUX
00080 !|  FLBOR         |<--|  IN AND OUT WATER MASS FLUX
00081 !|  EPS           |-->|  TOLERANCE FOR WATER DEPTH DIVISION
00082 !|  ZF            |-->|  BATHYMETRY
00083 !|  WINF          |-->|  PRESCRIBED BOUNDARY CONDITIONS
00084 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00085 !
00086       USE BIEF
00087       USE INTERFACE_TELEMAC2D, EX_CDLZZ => CDLZZ
00088 !
00089       IMPLICIT NONE
00090       INTEGER LNG,LU
00091       COMMON/INFO/LNG,LU
00092 !
00093 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00094 !
00095       INTEGER, INTENT(IN)             :: NS,NPTFR,KDIR,KNEU,KDDL
00096       INTEGER, INTENT(IN)             :: NBOR(NPTFR),LIMPRO(NPTFR,6)
00097       DOUBLE PRECISION, INTENT(IN)    :: XNEBOR(2*NPTFR),YNEBOR(2*NPTFR)
00098       DOUBLE PRECISION, INTENT(IN)    :: W(3,NS)
00099       DOUBLE PRECISION, INTENT(IN)    :: G,ZF(NS)
00100       DOUBLE PRECISION, INTENT(IN)    :: WINF(3,NPTFR)
00101       DOUBLE PRECISION, INTENT(INOUT) :: CE(NS,3),FLUENT,FLUSORT
00102       TYPE(BIEF_OBJ) , INTENT(INOUT)  :: FLBOR
00103 !
00104 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00105 !
00106       INTEGER IS,K,IDRY
00107 !
00108       DOUBLE PRECISION VNX,VNY,XNN,YNN,VNL
00109       DOUBLE PRECISION :: FLXI(3),FLXJ(3),H1,U10,U1,V1,ETA1
00110       DOUBLE PRECISION :: H2,ETA2,U2,V2,ZF1,ZF2
00111       DOUBLE PRECISION :: INFLOW,OUTFLOW,EPS
00112 
00113       EPS=1.0E-3
00114 !
00115 !     LOOP OVER BOUNDARY NODES
00116 !
00117       DO K=1,NPTFR
00118 !
00119         IS=NBOR(K)
00120 !
00121 !       INITIALIZATION
00122 !
00123         FLUENT  = 0.D0
00124         FLUSORT = 0.0D0
00125         INFLOW  = 0.0D0
00126         OUTFLOW = 0.0D0
00127         FLXI(1)  = 0.0D0
00128         FLXI(2)  = 0.0D0
00129         FLXI(3)  = 0.0D0
00130         FLXJ(1)  = 0.0D0
00131         FLXJ(2)  = 0.0D0
00132         FLXJ(3)  = 0.0D0
00133 !
00134 !       INDICATOR FOR DRY CELLS
00135 !
00136         IDRY=0
00137 !
00138 !       NORMALIZED NORMAL
00139 !
00140         XNN=XNEBOR(K)
00141         YNN=YNEBOR(K)
00142 !
00143 !       NON NORMALIZED NORMAL
00144 !
00145         VNX=XNEBOR(K+NPTFR)
00146         VNY=YNEBOR(K+NPTFR)
00147         VNL=SQRT(VNX**2+VNY**2)
00148 !
00149         H1   = W(1,IS)
00150         ZF1  = ZF(IS)
00151         ETA1 = H1+ZF1
00152         IF(H1.GT.EPS)THEN
00153           U1 = W(2,IS)/H1
00154           V1 = W(3,IS)/H1
00155         ELSE
00156           U1 = 0.0D0
00157           V1 = 0.0D0
00158           IDRY=IDRY+1
00159         ENDIF
00160 !
00161 !**************************************************
00162 !       WALL BOUNDARIES
00163 !**************************************************
00164 !
00165 !   PERFECT SLIPPING CONDITION
00166 !====================================
00167 !
00168         IF(LIMPRO(K,1).EQ.KNEU) THEN
00169 !
00170 !         DEFINITION OF THE GOST STATE Ue
00171 !
00172           H2  = H1
00173           ETA2= ETA1
00174           ZF2 = ZF1
00175 !         ROTATION
00176           U10 = U1
00177           U1  = XNN*U10+YNN*V1
00178           V1  =-YNN*U10+XNN*V1
00179 !
00180 !         PUT NORMAL COMPONENT = 0
00181 !
00182           U1 =  0.0D0
00183           U2 =  U1
00184           V2 =  V1
00185 !
00186 !         INVERSE ROTATION
00187 !
00188           U10 = U1
00189           U1  = -YNN*V1
00190           V1  =  XNN*V1
00191 !
00192           U2  = -YNN*V2
00193           V2  =  XNN*V2
00194 ! NOT NECESARY
00195 !         CALL FLU_ZOKAGOA(H1,H2,ZF1,ZF2,ETA1,ETA2,U1,U2,
00196 !     &                    V1,V2,XNN,YNN,FLXI,FLXJ,G)
00197 !
00198 !**************************************************
00199 !     LIQUID BOUNDARY
00200 !**************************************************
00201 !
00202         ELSEIF(LIMPRO(K,1).EQ.KDIR.OR.LIMPRO(K,1).EQ.KDDL)THEN
00203 !
00204 !   CASE1: H  IMPOSED
00205 !===============================
00206 !
00207           IF(LIMPRO(K,1).EQ.KDIR) THEN
00208 !
00209             H2 = WINF(1,K)
00210             ETA2 = H2 + ZF(IS)
00211             ZF2 = ZF(IS)
00212             IF(H2 .GT.EPS)THEN
00213               U2 = WINF(2,K) / H2
00214               V2 = WINF(3,K) / H2
00215             ELSE
00216               U2 = 0.0D0
00217               V2 = 0.0D0
00218               IDRY = IDRY + 1
00219             ENDIF
00220 !
00221             IF(IDRY.LT.2)THEN
00222 !           AT LEAST ONE WET CELL
00223               CALL FLU_ZOKAGOA(H1,H2,ZF1,ZF2,ETA1,ETA2,U1,U2,
00224      &                         V1,V2,XNN,YNN,FLXI,FLXJ,G)
00225             ENDIF
00226             OUTFLOW    = FLXI(1)*VNL
00227             FLUSORT    = FLUSORT + OUTFLOW
00228             FLBOR%R(K) = OUTFLOW
00229 !
00230 !         LIMPRO(K,1).NE.KDIR
00231           ELSE
00232 !
00233             H2 = H1
00234             U2 = U1
00235             V2 = V1
00236             ZF1= ZF(IS)
00237             ZF2= ZF1
00238             ETA2=ETA1
00239 !
00240             H1 = WINF(1,K)
00241             ETA1=H1+ZF(IS)
00242             IF(H1.GT.EPS)THEN
00243               U1 = WINF(2,K) / H1
00244               V1 = WINF(3,K) / H1
00245             ELSE
00246               U1 = 0.0D0
00247               V1 = 0.0D0
00248               IDRY = IDRY + 1
00249             ENDIF
00250 !
00251             IF(IDRY.LT.2)THEN
00252 !           AT LEAST ONE WET CELL
00253               CALL FLU_ZOKAGOA(H2,H1,ZF1,ZF2,ETA2,ETA1,U2,U1,
00254      &                         V2,V1,XNN,YNN,FLXI,FLXJ,G)
00255             ENDIF
00256             INFLOW     = FLXI(1)*VNL
00257             FLUENT     = FLUENT + INFLOW
00258             FLBOR%R(K) = INFLOW
00259 !
00260           ENDIF
00261         ENDIF
00262 !
00263         CE(IS,1)  = CE(IS,1) - VNL*FLXI(1)
00264         CE(IS,2)  = CE(IS,2) - VNL*FLXI(2)
00265         CE(IS,3)  = CE(IS,3) - VNL*FLXI(3)
00266 !
00267       ENDDO
00268 !
00269 !-----------------------------------------------------------------------
00270 !
00271       RETURN
00272       END

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