flusew.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\flusew.f
00002 !
00062                        SUBROUTINE FLUSEW
00063 !                      *****************
00064 !
00065      &(AMINF,NPOIN,EPS,G,W,XNEBOR,YNEBOR,
00066      & NPTFR,LIMPRO,NBOR,KDIR,KDDL)
00067 !
00068 !***********************************************************************
00069 ! TELEMAC2D   V6P3                                           05/15/2013
00070 !***********************************************************************
00071 !
00072 !   1- CHECK THE REGIME : FROUDE(FR)>1 OR <1
00073 !   2- FOR INLET:
00074 !        - IF FR<1 ==> Q IMPOSED
00075 !        - IF FR>1 ==> Q AND H IMPOSED
00076 !   3- FOR OUTLET:
00077 !        - IF FR<1 ==> H IMPOSED
00078 !        - IF FR>1 ==> NO CONDITION IS REQUIRED
00079 !
00080 !
00081 !
00082 !
00083 !
00084 !
00085 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00086 !| AMINF          |<--| IN/OUT VALUES TO BE IMPOSED
00087 !| EPS            |-->| TOLERENCE FOR WATER DEPTH
00088 !| G              |-->| GRAVITY
00089 !| KDDL           |-->| CONVENTION FOR BC (FREE H)
00090 !| KDIR           |-->| CONVENTION FOR BC (DIRICHLET POINT)
00091 !| KNEU           |-->| CONVENTION FOR BC (NEUMANN POINT)
00092 !| LIMPRO         |-->| BC TYPE (PRESCRIBED)
00093 !| NBOR           |-->| GLOBAL NUMBER (INDEX) OF BOUNDARY NODES
00094 !| NPOIN          |-->| TOTAL NUMBER OF NODES
00095 !| NPTFR          |-->| TOTAL NUMBER OF BOUNDARY NODES
00096 !| UBOR           |-->| IMPOSED VELOCITY X-COMPONENENT
00097 !| VBOR           |-->| IMPOSED VELOCITY Y-COMPONENENT
00098 !| W              |-->| (H,HU,HV)
00099 !| XNEBOR         |-->| X-COMPOENENT OF OUTWARD UNIT NORMAL AT POINT
00100 !| YNEBOR         |-->| Y-COMPOENENT OF OUTWARD UNIT NORMAL AT POINT
00101 !| XSGBOR         |-->| X-COMPOENENT OF OUTWARD UNIT NORMAL AT EDGE
00102 !| YSGBOR         |-->| Y-COMPOENENT OF OUTWARD UNIT NORMAL AT EDGE
00103 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00104 !
00105       IMPLICIT NONE
00106       INTEGER LNG,LU
00107       COMMON/INFO/LNG,LU
00108 !
00109 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00110 !
00111       INTEGER, INTENT(IN)             :: NPOIN,NPTFR,KDIR,KDDL
00112       INTEGER, INTENT(IN)             :: LIMPRO(NPTFR,6),NBOR(NPTFR)
00113       DOUBLE PRECISION, INTENT(IN)    :: XNEBOR(NPTFR),YNEBOR(NPTFR)
00114       DOUBLE PRECISION, INTENT(IN)    :: W(3,NPOIN)
00115       DOUBLE PRECISION, INTENT(IN)    :: EPS,G
00116       DOUBLE PRECISION, INTENT(INOUT) :: AMINF(3,NPTFR)
00117 !
00118 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00119 !
00120       INTEGER IEL,K
00121       DOUBLE PRECISION HI,UI,VI,XN,YN,R1,RLAMB0,HJ,UJ,VJ,R,PI
00122 !
00123       DO K = 1 , NPTFR
00124 !
00125 !       IF H IS FREE OR INFLOW IS FREE
00126         IF(LIMPRO(K,1).EQ.KDDL.OR.LIMPRO(K,2).EQ.KDDL) THEN
00127           IEL = NBOR(K)
00128           XN = XNEBOR(K)
00129           YN = YNEBOR(K)
00130           HJ = W(1,IEL)
00131           IF(HJ.GT.EPS) THEN
00132             UJ = W(2,IEL)/HJ
00133             VJ = W(3,IEL)/HJ
00134             R  =  UJ*XN + VJ*YN-2.D0*SQRT(G*HJ)
00135             R1 =  UJ*XN + VJ*YN+2.D0*SQRT(G*HJ)
00136 !
00137 !       IF IN/OUTFLOW IMPOSED
00138 !
00139             IF(LIMPRO(K,2).EQ.KDIR) THEN
00140 !
00141 !       Q GIVEN ; COMPUTES H FOR A SUBCRITICAL ENTRY
00142 !
00143               RLAMB0 = UJ*XN + VJ*YN
00144               IF ( RLAMB0.LE.0.D0) THEN
00145                 PI = -R+RLAMB0
00146                 HI = (PI**2/4.D0)/G
00147                 UI = AMINF(2,K)/HI
00148                 VI = AMINF(3,K)/HI
00149                 AMINF(1,K) = HI
00150               ENDIF
00151             ENDIF
00152 !
00153 !         IF H IMPOSED
00154 !
00155             IF(LIMPRO(K,1).EQ.KDIR) THEN
00156 !
00157 !        H GIVEN ; COMUTES Q FOR A SUBCRITICAL OUTFLOW
00158 !
00159               HI = AMINF(1,K)
00160 !
00161               RLAMB0 = UJ*XN + VJ*YN
00162               IF (RLAMB0.GE.-0.0001D0) THEN
00163                 UI = (R1-2.D0*SQRT(G*HI))*XN
00164                 VI = (R1-2.D0*SQRT(G*HI))*YN
00165                 AMINF(2,K) = UI*HI
00166                 AMINF(3,K) = VI*HI
00167               ENDIF
00168             ENDIF
00169           ENDIF
00170 !
00171         ENDIF
00172 !
00173       ENDDO !  K
00174 !
00175       RETURN
00176       END

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