gestdp.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac3d\gestdp.f
00002 !
00049                      SUBROUTINE GESTDP
00050 !                    *****************
00051 !
00052      &        ( IVIDE  , EPAI   , HDEP    ,
00053      &          NPOIN2 , NPFMAX , NPF     ,
00054      &          EPAI0  , CFDEP  , RHOS    )
00055 !
00056 !***********************************************************************
00057 ! TELEMAC3D   V6P1                                   21/08/2010
00058 !***********************************************************************
00059 !
00060 !
00061 !
00062 !
00063 !
00064 !
00065 !
00066 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00067 !| CFDEP          |-->| CONCENTRATION OF MUD DEPOSIT (G/L)
00068 !| EPAI           |<->| THICKNESS OF SOLID BED LAYER
00069 !|                |   | (EPAI=DZ/(1+IVIDE), DZ TOTAL BED THICKNESS)
00070 !| EPAI0          |<->| REFERENCE THICKNESS CREATE NEW ELEMENTS
00071 !| HDEP           |<->| THICKNESS OF FRESH DEPOSIT (FLUID MUD LAYER)
00072 !| IVIDE          |<->| VOID INDEX OF BOTTOM POINTS
00073 !| NPF            |-->| NUMBER OF POINTS OF THE BOTTOM ON ONE VERTICAL
00074 !| NPFMAX         |-->| MAXIMUM NUMBER OF HORIZONTAL PLANES THAT
00075 !|                |   | DISCRETISE MUD BED
00076 !| NPOIN2         |-->| NUMBER OF POINTS IN 2D
00077 !| RHOS           |-->| SEDIMENT DENSITY
00078 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00079 !
00080       IMPLICIT NONE
00081 !
00082       INTEGER, INTENT(IN) :: NPOIN2 , NPFMAX
00083 !
00084       DOUBLE PRECISION, INTENT(INOUT) :: IVIDE(NPFMAX,NPOIN2)
00085       DOUBLE PRECISION, INTENT(INOUT) :: EPAI(NPFMAX-1,NPOIN2)
00086       DOUBLE PRECISION, INTENT(INOUT) :: HDEP(NPOIN2)
00087 !
00088       DOUBLE PRECISION, INTENT(INOUT) :: EPAI0
00089       DOUBLE PRECISION, INTENT(IN)    :: CFDEP , RHOS
00090 !
00091       INTEGER, INTENT(INOUT) :: NPF(NPOIN2)
00092 !
00093       DOUBLE PRECISION EDEPOT
00094       INTEGER IPOIN , NCOUCH , NAJOUT
00095       INTEGER MANQUE , IPF , ICOUCH
00096 !#####> NOE-CHANGES
00097       DOUBLE PRECISION EPAIX
00098 !#####< NOE-CHANGES
00099       INTRINSIC MAX,INT
00100 !
00101 !=======================================================================
00102 !
00103 !     -----VOIDS INDEX FOR FRESH DEPOSITS-----
00104 !
00105       EDEPOT=RHOS/CFDEP-1.D0
00106 !
00107 !     -----LOOP ON THE BOTTOM POINTS-----
00108 !
00109       DO IPOIN=1,NPOIN2
00110 !
00111 !     -----IF DEPOSIT OCCURS ON NOT ERODABLE BOTTOM----
00112         IF(NPF(IPOIN).EQ.0) THEN
00113           IVIDE(1,IPOIN)=EDEPOT
00114           NPF(IPOIN)=1
00115         ENDIF
00116 !
00117 !     -----NUMBER OF THE LAST LAYER OF THE MUDDY BED-----
00118         NCOUCH=MAX(NPF(IPOIN)-1,0)
00119 !
00120 !     -----COMPUTES THE NUMBER OF LAYERS TO CREATE-----
00121 !
00122 !#####> NOE-CHANGES
00123 !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
00124 ! EPAI0 SHOULD NOT BE CHANGED - PARTICULARLY, IT CANNOT VARY WITH IPOIN
00125 !          EPAI0=EPAI0*(INT(HDEP(IPOIN)/((NPFMAX-1)*EPAI0))+1)
00126 !
00127 ! IF YOU NEED TO HAVE THICKER LAYERS BECAUSE NPFMAX IS NOT LARGE ENOUGH
00128 !  TO SPLIT HDEP, YOU OUGHT TO INTRODUCE EPAIX
00129         EPAIX=EPAI0*(INT(HDEP(IPOIN)/((NPFMAX-1)*EPAI0))+1)
00130 !
00131 ! SEE ADDITIONAL CHANGES BELOW WHERE EPAI0 HAS BEEN REPLACED WITH EPAIX
00132 !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
00133 !#####< NOE-CHANGES
00134         NAJOUT=INT(HDEP(IPOIN)/EPAIX)
00135         MANQUE=NPF(IPOIN)-NPFMAX+NAJOUT
00136         HDEP(IPOIN)=HDEP(IPOIN)-EPAIX*NAJOUT
00139         IF (MANQUE.LE.0) THEN
00140 !      SIMPLY ADDS NEW LAYERS TO THE MUDDY BED
00141 !
00142           DO ICOUCH=1+NCOUCH,NAJOUT+NCOUCH
00143 !           --THEIR THICKNESS IS:              !>NOE: EPAIX <= EPAI0
00144             EPAI(ICOUCH,IPOIN)=EPAIX/(1.+EDEPOT)
00145 !           --THE VOIDS INDEX OF THE 'UPPER BOUNDARY' POINT IS:
00146             IVIDE(ICOUCH+1,IPOIN)=EDEPOT
00147           END DO
00148 !         ----THE NUMBER OF POINTS DISCRETISING THE BED IS:
00149           NPF(IPOIN)=NCOUCH+1+NAJOUT
00150         ELSE
00151 !      OR MODIFIES THE DISCRETISATION OF THE MUDDY BED BEFOREHAND
00152 !
00153           DO IPF=2,MANQUE+1
00154 !#####> NOE-CHANGES
00155 !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
00156 ! EPAI BECOMES ARTIFICIALLY LARGE BY DOING SO
00157 ! HENCE EPAI IS NO LONGER REPRESENTATIVE OF THE 2 LAYERS
00158 !               IVIDE(IPF,IPOIN)=IVIDE(2*IPF-1,IPOIN)
00159 !               EPAI(IPF-1,IPOIN)=
00160 !     &                    EPAI(2*(IPF-1)-1,IPOIN)+EPAI(2*(IPF-1),IPOIN)
00161             EPAI(IPF-1,IPOIN)=
00162      &     ( EPAI(2*(IPF-1)-1,IPOIN)*
00163      &        (2.+IVIDE(2*(IPF-1)-1,IPOIN)+IVIDE(2*(IPF-1),IPOIN))/2.
00164      &     + EPAI(2*(IPF-1),IPOIN)*
00165      &      (2.+IVIDE(2*(IPF-1),IPOIN)+IVIDE(2*(IPF-1)+1,IPOIN))/2.)/
00166      &      (1.+(IVIDE(2*(IPF-1)-1,IPOIN)+IVIDE(2*(IPF-1)+1,IPOIN))/2.)
00167 !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
00168 !#####< NOE-CHANGES
00169           ENDDO
00170           DO IPF=MANQUE+2,NPF(IPOIN)-MANQUE
00171               IVIDE(IPF,IPOIN)=IVIDE(IPF+MANQUE,IPOIN)
00172               EPAI(IPF-1,IPOIN)=EPAI(IPF-1+MANQUE,IPOIN)
00173           ENDDO
00174           DO IPF=NPF(IPOIN)-MANQUE+1,NPF(IPOIN)+NAJOUT-MANQUE
00175               IVIDE(IPF,IPOIN)=EDEPOT
00176               EPAI(IPF-1,IPOIN)=EPAIX/(1.+EDEPOT)
00177           ENDDO
00178 !
00179 !            ----NUMBER OF POINTS DISCRETISING THE BED:
00180                  NPF(IPOIN)=NPF(IPOIN)+NAJOUT-MANQUE
00181         ENDIF
00182 !
00183 !     IF THE DEPOSITED QUANTITY IS NOT SUFFICIENT TO
00184 !     CREATE A NEW LAYER, STORES IT IN A BUFFER LAYER
00185 !     AND WAITS THE NEXT ITERATION!
00186 !
00187       ENDDO
00188 !
00189       RETURN
00190       END

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