The TELEMAC-MASCARET system  trunk
coef.f
Go to the documentation of this file.
1 ! ***************
2  SUBROUTINE coef
3 ! ***************
4 !
5  & (s3d_ivide, s3d_epai, tra01 ,
6  & s3d_npfmax, imax , ndeb ,
7  & s3d_rhos, grav , s3d_dtc, dsig1 )
8 !
9 !***********************************************************************
10 ! TELEMAC3D V6P1 21/08/2010
11 !***********************************************************************
12 !
13 !brief COMPUTES THE COEFFICIENTS RESULTING FROM THE
14 !+ DISCRETISATION OF THE DIFFERENTIAL EQUATION GOVERNING
15 !+ THE CONSOLIDATION OF MUDDY BEDS.
16 !
17 !history C LE NORMANT (LNH)
18 !+ 13/05/92
19 !+ V5P1
20 !+
21 !
22 !history JACEK A. JANKOWSKI PINXIT
23 !+ **/03/99
24 !+
25 !+ FORTRAN95 VERSION
26 !
27 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
28 !+ 13/07/2010
29 !+ V6P0
30 !+ Translation of French comments within the FORTRAN sources into
31 !+ English comments
32 !
33 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
34 !+ 21/08/2010
35 !+ V6P0
36 !+ Creation of DOXYGEN tags for automated documentation and
37 !+ cross-referencing of the FORTRAN sources
38 !
39 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40 !| DSIG1 |-->| DERIVATIVE OF THE EFFECTIVE STRESS
41 !| | | AT THE FIRST POINT OF THE MESH
42 !| GRAV |-->| GRAVITY ACCELERATION
43 !| IMAX |-->| NUMBER OF POINTS AT THE BOTTOM MESH
44 !| NDEB |-->| INDEX LIMITING THE RANGE OF RESOLUTION
45 !| S3D_DTC |-->| TIME STEP FOR CONSOLIDATION
46 !| S3D_EPAI |-->| THICKNESS OF MESH ELEMENTS DISCRETISING THE BED
47 !| S3D_IVIDE |-->| INDEX OF EMPTY SPACES AT MESH POINTS
48 !| S3D_NPFMAX |-->| MAXIMUM NUMBER OF HORIZONTAL PLANES THAT
49 !| | | DISCRETISE MUDDY BOTTOM
50 !| S3D_RHOS |-->| SEDIMENT DENSITY
51 !| TRA01 |<->| WORKING ARRAY
52 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53 !
54  IMPLICIT NONE
55 !
56 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57 !
58  INTEGER, INTENT(IN) :: S3D_NPFMAX, IMAX,NDEB
59 !
60  DOUBLE PRECISION, INTENT(INOUT) :: TRA01(s3d_npfmax,6)
61  DOUBLE PRECISION, INTENT(IN) :: S3D_EPAI(s3d_npfmax-1)
62  DOUBLE PRECISION, INTENT(IN) :: S3D_IVIDE(s3d_npfmax)
63  DOUBLE PRECISION, INTENT(IN) :: S3D_RHOS, GRAV ,S3D_DTC, DSIG1
64 !
65 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
66 !
67  INTEGER I
68  DOUBLE PRECISION A , D
69 !
70 !=======================================================================
71 !
72 ! -----INITIALISES THE COEFFICIENTS-----
73 !
74  DO i=ndeb,imax
75  tra01(i,3)=0.d0
76  tra01(i,4)=1.d0
77  tra01(i,5)=0.d0
78  tra01(i,6)=0.d0
79  END DO
80 !
81 ! -----COMPUTES THE COEFFICIENTS AT THE MESH NODES-----
82 !
83 ! ...NODE ON THE BOTTOM:
84  tra01(ndeb,5)=-1.d0
85  tra01(ndeb,6)=(s3d_rhos-1000.d0)*grav*s3d_epai(1)/dsig1
86 !
87 ! ...INTERIOR NODE:
88  DO i=ndeb+1,imax-1
89 !
90  IF (tra01(i,1).GE.1.d-10) THEN
91  a=tra01(i,1)/(s3d_epai(i-1))
92  d=1.d0
93  ELSE
94  a=tra01(i,1)/(s3d_epai(i))
95  d=0.d0
96  ENDIF
97 !
98  tra01(i,3)=s3d_dtc*(-(tra01(i,2)+tra01(i-1,2))/((s3d_epai(i)+
99  & s3d_epai(i-1))*s3d_epai(i-1))-d*a)
100  tra01(i,5)=s3d_dtc*((1.d0-d)*a-((tra01(i,2)+tra01(i+1,2))
101  & /((s3d_epai(i)+s3d_epai(i-1))*s3d_epai(i))))
102  tra01(i,4)=1.d0-tra01(i,3)-tra01(i,5)
103  tra01(i,6)=s3d_ivide(i)
104 !
105  END DO
106 !
107 ! ...INTERFACE NODE:
108  tra01(imax,6)=s3d_ivide(imax)
109 !
110  RETURN
111  END SUBROUTINE coef
subroutine coef(S3D_IVIDE, S3D_EPAI, TRA01, S3D_NPFMAX, IMAX, NDEB, S3D_RHOS, GRAV, S3D_DTC, DSIG1)
Definition: coef.f:9