The TELEMAC-MASCARET system  trunk
conlit_gaia.f
Go to the documentation of this file.
1 ! **********************
2  SUBROUTINE conlit_gaia
3 ! **********************
4 !
5 !***********************************************************************
6 ! GAIA
7 !***********************************************************************
8 !
14 !
15 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16  USE bief
19 !
21  USE interface_parallel, ONLY : p_max
22  IMPLICIT NONE
23 !
24  INTEGER I,K,IFRLIQ,ISAND
25  INTEGER YADEB(maxfro)
26 !
27  DOUBLE PRECISION, EXTERNAL :: CGL_GAIA
28  DOUBLE PRECISION, EXTERNAL :: QGL_GAIA
29 !
30 !-----------------------------------------------------------------------
31 !
32 ! INITIALISATION OF YADEB
33 !
34  IF(nfrliq.GE.1) THEN
35  DO i=1,nfrliq
36  yadeb(i)=0
37  ENDDO
38  ENDIF
39 !
40 !-----------------------------------------------------------------------
41 !
42 ! DISTRIBUTING THE (TOTAL) PRESCRIBED EVOLUTION TAKEN IN THE
43 ! BOUNDARY CONDITIONS FILE WITH RESPECT TO FRACTIONS IN THE
44 ! FIRST LAYER IF THERE ARE SANDS
45 ! IF THERE ARE MUDS, BEDLOAD IS NOT ALLOWED
46 !
47  DO isand=1, nsand
48  DO k=1,nptfr
49  ebor%ADR(num_isand_icla(isand))%P%R(k)=
50  & ratio_sand(isand,1,mesh%NBOR%I(k)) *
51  & ebor%ADR(1)%P%R(k)
52  ENDDO
53  ENDDO
54 !
55 !-----------------------------------------------------------------------
56 !
57  DO k=1,nptfr
58 !
59  i = mesh%NBOR%I(k)
60 !
61 ! HERE KADH (WALL WITH NO SLIP CONDITION) IS CHANGED INTO KLOG (WALL)
62 !
63  IF(liebor%I(k).EQ.kadh) THEN
64  liebor%I(k)= klog
65  ELSEIF(liebor%I(k).EQ.kent) THEN
66 ! WARNING !!!!!!!!!!!!!! DYNAMITE !!!!!!!!!
67 ! FOR COMPATIBILITY OF OLD STUDIES, LIEBOR=KENT SUPERSEDES LIQBOR=KENT
68 ! IF BOTH ARE GIVEN AS KENT
69  liqbor%I(k)= ksort
70  ENDIF
71 !
72 ! CASES WHERE WE HAVE A PRESCRIBED DISCHARGE
73 !
74  IF(liqbor%I(k).EQ.kent) yadeb(numliq%I(k))=1
75 !
76 ! DIRICHLET CONDITIONS
77 ! EITHER ON EVOLUTION OR ON SOLID DISCHARGE
78 !
79 ! EXAMPLE 1: IMPOSED SOLID DISCHARGE - FREE BED EVOLUTION
80 !
81 ! QBOR%ADR(J)%P%R(K) IS THE SOLID DISCHARGE IMPOSED AT THE BOUNDARY
82 ! NODE K , CLASS OF SEDIMENT J, EXCLUDING VOIDS
83 !
84 ! LIEBOR%I(K)=KSORT
85 ! LIQBOR%I(K)=KENT
86 !
87 ! QBOR%ADR(1)%P%R(K)=1.D-4
88 ! QBOR%ADR(2)%P%R(K)=1.D-4 .....
89 !
90 ! EXAMPLE 2: IMPOSED BED EVOLUTON
91 !
92 ! LIEBOR%I(K)=KENT
93 ! (LIQBOR%I(K)=KSORT IS DONE IN GAIA.F)
94 ! IF(LIEBOR%I(K).EQ.KENT) THEN
95 ! EBOR%ADR(1)%P%R(K)=1.D-4
96 ! EBOR%ADR(2)%P%R(K)=1.D-4.....
97 ! ENDIF
98 !
99  ENDDO
100 !
101 ! DEALING WITH PRESCRIBED SOLID DISCHARGES
102 !
103  IF(nfrliq.GT.0) THEN
104  DO ifrliq=1,nfrliq
105  IF(ncsize.GT.1) yadeb(ifrliq)=p_max(yadeb(ifrliq))
106  IF(yadeb(ifrliq).EQ.1) THEN
107 !
108 ! READING BOUNDARY CONDITION FILE WITH SOLID DISCHARGE
109 !
110  IF(charr) THEN
111 ! AVOID OVERRIDING WITH SUSPENDED SEDIMENT TRANSPORT
112  IF(gai_files(gailiq)%NAME(1:1).NE.' ') THEN
113  soldis(ifrliq)=qgl_gaia(ifrliq,at0)
114  ENDIF
115  ENDIF
116 
117  CALL disimp_gaia(soldis(ifrliq),q2bor,numliq%I,ifrliq,
118  & nsoldis,t5,t1,
119 ! MASK OF LIQUID BOUNDARIES DONE IN GAIA
120  & nptfr,mask%R,mesh)
121 !
122  IF(nsicla.GT.1) THEN
123  DO i=1,nsicla
124  isand=num_icla_isand(i)
125  IF(.NOT.sedco(i)) THEN
126  DO k=1,nptfr
127  IF(numliq%I(k).EQ.ifrliq.AND.
128  & liqbor%I(k).EQ.kent) THEN
129 ! --TEMPORARY!!-- RATIO_SAND NEED TO BE REPLACED BY A GENERAL VARIABLE
130 ! (NOT RELATED TO ONLY SANDS)
131  IF(nprop.EQ.0) THEN
132  qbor%ADR(i)%P%R(k)= ratio_sand(isand,1,mesh%NBOR%I(k))
133  & * t1%R(k)
134  ELSE
135  qbor%ADR(i)%P%R(k)= ratio_debimp(isand)
136  & * t1%R(k)
137  ENDIF
138  ENDIF
139  ENDDO
140  ENDIF
141  ENDDO
142  ELSE
143  DO k=1,nptfr
144  IF(numliq%I(k).EQ.ifrliq.AND.
145  & liqbor%I(k).EQ.kent) THEN
146  IF(.NOT.sedco(1))
147  & qbor%ADR(1)%P%R(k)=t1%R(k)
148  ENDIF
149  ENDDO
150  ENDIF
151  ENDIF
152  ENDDO
153  ENDIF
154 !
155 !-----------------------------------------------------------------------
156 !
157  RETURN
158  END
integer, pointer nptfr
Number of boundary points.
type(bief_obj), target liqbor
Type of boundary conditions on sand transport rate.
type(bief_obj), pointer t5
integer, parameter kadh
integer nsoldis
Number of given solid discharges given by user.
type(bief_file), dimension(maxlu_gai), target gai_files
For storing information on files.
double precision, dimension(:), allocatable ratio_debimp
Ratio of sand in the prescribed solid discharge.
type(bief_obj), target qbor
Imposed solid transport at the boundary In m3/s, for every class.
type(bief_obj), target numliq
Liquid boundary numbering.
subroutine conlit_gaia
Definition: conlit_gaia.f:4
double precision, dimension(:), allocatable soldis
Prescribed solid discharges.
integer, parameter kent
integer nprop
Number of class proportion for imposed discharge given by user.
integer nsand
Total number of sand.
integer, dimension(:), allocatable num_isand_icla
type(bief_obj), target q2bor
Imposed solid transport at the boundary In m2/s, total, read in the boundary conditions file...
logical, dimension(nsiclm) sedco
Cohesive sediments (for each class)
integer, target nsicla
Number of sediment classes of bed material (less than NISCLM)
type(bief_obj), pointer t1
Aliases for work vectors in tb.
type(bief_obj), target mask
Block of masks.
double precision, dimension(:,:,:), allocatable, target ratio_sand
Ratio of sand to all sands, for isand,ilayer,ipoin.
integer maxfro
Maximum number of (liquid boundaries, solid boundaries)
type(bief_obj), target ebor
Imposed bed evolution at the boundary [m].
integer, dimension(:), allocatable num_icla_isand
subroutine disimp_gaia(Q, Q2BOR, NUMLIQ, IFRLIQ, NSOLDIS, WORK1, QBOR, NPTFR, MASK, MESH)
Definition: disimp_gaia.f:7
type(bief_mesh), target mesh
Mesh structure.
logical, target charr
Include bedload in the simulation.
double precision at0
type(bief_obj), target liebor
Type of boundary conditions on bed evolution.
integer nfrliq
Number of liquid boundaries.
integer, parameter klog
integer, parameter ksort
Definition: bief.f:3