sta_dis_cur.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\sta_dis_cur.f
00002 !
00051                      DOUBLE PRECISION FUNCTION STA_DIS_CUR
00052 !                    *************************************
00053 !
00054      &(IFRLIQ,FLUX,PTS,QZ,NFRLIQ,ZN)
00055 !
00056 !***********************************************************************
00057 ! TELEMAC2D   V6P1                                   21/08/2010
00058 !***********************************************************************
00059 !
00060 !
00061 !
00062 !
00063 !
00064 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00065 !| FLUX           |-->| ACTUAL FLUX AT THIS BOUNDARY
00066 !| IFRLIQ         |-->| LIQUID BOUNDARY NUMBER
00067 !| NFRLIQ         |-->| NUMBER OF LIQUID BOUNDARIES
00068 !| PTS            |-->| NUMBER OF POINTS IN THE STAGE-DISCHARGE CURVE
00069 !| QZ             |-->| ARRAY WITH STAGE-DISCHARGE CURVES
00070 !| ZN             |-->| PREVIOUS ELEVATION (FOR RELAXATION)
00071 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00072 !
00073       USE BIEF
00074 !
00075       IMPLICIT NONE
00076       INTEGER LNG,LU
00077       COMMON/INFO/LNG,LU
00078 !
00079 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00080 !
00081       INTEGER, INTENT(IN) :: IFRLIQ,NFRLIQ,PTS
00082       DOUBLE PRECISION, INTENT(IN) :: ZN,FLUX,QZ(2,NFRLIQ,PTS)
00083 !                                                         PTS AT LEAST
00084 !
00085 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00086 !
00087       INTEGER I
00088       DOUBLE PRECISION GOAL,TETA,Q1,Q2
00089 !
00090 !-----------------------------------------------------------------------
00091 !
00092       Q1=QZ(1,IFRLIQ,1)
00093       Q2=QZ(1,IFRLIQ,PTS)
00094       IF(FLUX.LE.Q1) THEN
00095 !       OUTSIDE THE CURVE WITH LOWER DISCHARGE
00096         GOAL=QZ(2,IFRLIQ,1)
00097       ELSEIF(FLUX.GE.Q2) THEN
00098 !       OUTSIDE THE CURVE WITH HIGHER DISCHARGE
00099         GOAL=QZ(2,IFRLIQ,PTS)
00100       ELSE
00101 !       IN BETWEEN: CASE WITH INTERPOLATION
00102         I=1
00103 1       CONTINUE
00104         Q2=QZ(1,IFRLIQ,I+1)
00105         IF(FLUX.GE.Q1.AND.FLUX.LE.Q2) THEN
00106           TETA=(FLUX-Q1)/MAX(Q2-Q1,1.D-8)
00107           GOAL=QZ(2,IFRLIQ,I)+TETA*(QZ(2,IFRLIQ,I+1)-QZ(2,IFRLIQ,I))
00108         ELSE
00109           I=I+1
00110           Q1=Q2
00111           GO TO 1
00112         ENDIF
00113       ENDIF
00114 !
00115 !-----------------------------------------------------------------------
00116 !
00117 !     RELAXATION OF RESULT
00118 !
00119       STA_DIS_CUR=ZN+0.02D0*(GOAL-ZN)
00120 !
00121 !-----------------------------------------------------------------------
00122 !
00123       RETURN
00124       END

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