hvf.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\utils\bief\hvf.f
00002 !
00070                      SUBROUTINE HVF
00071 !                    **************
00072 !
00073      &(H,HN,FXMAT,UNSV2D,DT,FXBOR,SMH,YASMH,NSEG,NPOIN,NPTFR,GLOSEG,
00074      & SIZGLO,NBOR,OPTSOU,T7,MESH,MSK,RAIN,PLUIE)
00075 !
00076 !***********************************************************************
00077 ! BIEF   V6P2                                   21/08/2010
00078 !***********************************************************************
00079 !
00080 !
00081 !
00082 !
00083 !
00084 !
00085 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00086 !| DT             |-->| TIME STEP
00087 !| FXBOR          |-->| FLUX ON BOUNDARIES (DEFINED ON ALL DOMAIN
00088 !|                |   | AND ASSEMBLED IN PARALLEL)
00089 !| FXMAT          |-->| MATRIX FOR STORING FLUXES.
00090 !| GLOSEG         |-->| GLOBAL NUMBER OF THE 2 POINTS OF A SEGMENT
00091 !| H              |-->| WATER DEPTH AT TIME N+1
00092 !| HN             |-->| WATER DEPTH AT TIME N
00093 !| MESH           |-->| MESh STRUCTURE
00094 !| MSK            |-->| MSK : IF YES, MASKING OF DRY ELEMENTS
00095 !| NBOR           |-->| GLOBAL NUMBER OF BOUNDARY POINTS
00096 !| NPOIN          |-->| NUMBER OF POINTS
00097 !| NPTFR          |-->| NUMBER OF BOUNDARY POINTS
00098 !| NSEG           |-->| NUMBER OF SEGMENTS
00099 !| OPTSOU         |-->| OPTION FOR THE TREATMENT OF SOURCES
00100 !|                |   | 1: NORMAL  2: DIRAC
00101 !|                |   | SEE PROPAG IN TELEMAC-2D
00102 !| PLUIE          |-->| RAIN OR EVAPORATION, IN M/S
00103 !| RAIN           |-->| IF YES: RAIN OR EVAPORATION
00104 !| SIZGLO         |-->| FIRST DIMENSION OF GLOSEG
00105 !| SMH            |-->| SOURCE TERM IN CONTINUITY EQUATION
00106 !| T7             |<->| WORK BIEF_OBJ STRUCTURE
00107 !| UNSV2D         |-->| INVERSE OF INTEGRALS OF TEST FUNCTIONS
00108 !| YASMH          |-->| IF YES, SMH MUST BE TAKEN INTO ACCOUNT
00109 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00110 !
00111       USE BIEF, EX_HVF => HVF
00112 !
00113       IMPLICIT NONE
00114       INTEGER LNG,LU
00115       COMMON/INFO/LNG,LU
00116 !
00117 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00118 !
00119       INTEGER, INTENT(IN)             :: NSEG,NPOIN,NPTFR,OPTSOU,SIZGLO
00120       INTEGER, INTENT(IN)             :: GLOSEG(SIZGLO,2)
00121       INTEGER, INTENT(IN)             :: NBOR(NPTFR)
00122       DOUBLE PRECISION, INTENT(IN)    :: DT
00123       DOUBLE PRECISION, INTENT(INOUT) :: H(NPOIN)
00124       DOUBLE PRECISION, INTENT(IN)    :: HN(NPOIN),UNSV2D(NPOIN)
00125       DOUBLE PRECISION, INTENT(IN)    :: FXBOR(NPOIN),SMH(NPOIN)
00126       DOUBLE PRECISION, INTENT(IN)    :: FXMAT(NSEG*2),PLUIE(NPOIN)
00127       LOGICAL, INTENT(IN)             :: YASMH,MSK,RAIN
00128       TYPE(BIEF_OBJ), INTENT(INOUT)   :: T7
00129       TYPE(BIEF_MESH), INTENT(INOUT)  :: MESH
00130 !
00131 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00132 !
00133       INTEGER I,N
00134 !
00135 !-----------------------------------------------------------------------
00136 !
00137       DO I = 1,NPOIN
00138         H(I) = HN(I)
00139       ENDDO
00140 !
00141 !     SOURCES
00142 !
00143       IF(YASMH) THEN
00144         IF(OPTSOU.EQ.1) THEN
00145           DO I = 1,NPOIN
00146             H(I) = H(I) + DT*SMH(I)
00147           ENDDO
00148         ELSEIF(OPTSOU.EQ.2) THEN
00149           DO I = 1,NPOIN
00150             H(I) = H(I) + DT*UNSV2D(I)*SMH(I)
00151           ENDDO
00152         ENDIF
00153       ENDIF
00154 !
00155 !     RAIN OR EVAPORATION
00156 !
00157       IF(RAIN) THEN
00158         DO I = 1,NPOIN
00159           H(I) = H(I) + DT*PLUIE(I)
00160         ENDDO
00161       ENDIF
00162 !
00163       IF(NCSIZE.GT.1) THEN
00164         DO I = 1,NPOIN
00165           T7%R(I) = 0.D0
00166         ENDDO
00167         DO I = 1,NSEG
00168           T7%R(GLOSEG(I,1))=T7%R(GLOSEG(I,1))
00169      &                     -DT*UNSV2D(GLOSEG(I,1))*FXMAT(I)
00170           T7%R(GLOSEG(I,2))=T7%R(GLOSEG(I,2))
00171      &                     +DT*UNSV2D(GLOSEG(I,2))*FXMAT(I)
00172         ENDDO
00173         CALL PARCOM(T7,2,MESH)
00174         DO I = 1,NPOIN
00175           H(I) = H(I) + T7%R(I)
00176         ENDDO
00177       ELSE
00178         DO I = 1,NSEG
00179           H(GLOSEG(I,1))=H(GLOSEG(I,1))-DT*UNSV2D(GLOSEG(I,1))*FXMAT(I)
00180           H(GLOSEG(I,2))=H(GLOSEG(I,2))+DT*UNSV2D(GLOSEG(I,2))*FXMAT(I)
00181         ENDDO
00182       ENDIF
00183 !
00184 !     ON THE BOUNDARIES : BOUNDARY FLUX TERMS
00185 !
00186       DO I=1,NPTFR
00187         N=NBOR(I)
00188         H(N) = H(N) - DT*UNSV2D(N)*FXBOR(N)
00189       ENDDO
00190 !
00191 !-----------------------------------------------------------------------
00192 !
00193 !     WHEN NEGATIVE DEPTHS APPEAR WHILE COMPUTING H, THE PREVIOUS
00194 !     VALUE OF H IS KEPT
00195 !
00196       IF(MSK) THEN
00197         DO I = 1,NPOIN
00198           IF(H(I).LT.0.D0) H(I) = MAX(1.D-2,HN(I))
00199         ENDDO
00200       ENDIF
00201 !
00202 !-----------------------------------------------------------------------
00203 !
00204       RETURN
00205       END

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