The TELEMAC-MASCARET system  trunk
bedload_solvs_fe_gaia.f
Go to the documentation of this file.
1 ! ***************************
2  SUBROUTINE bedload_solvs_fe_gaia
3 ! ***************************
4 !
5  &(mesh,s,ebor,maskel,mask,qsx,qsy,ielmt,npoin,nptfr,kent,kdir,kddl,
6  & limtec,dt,msk,entet,t1,t2,t3,t4,t8,hz,hzn,gloseg,dimglo,
7  & flodel,flulim,nseg,unsv2d,icla,flbcla,ratio_sand,
8  & liqbor,qbor,maxadv,evcl_mb,xmvs)
9 !
10 !***********************************************************************
11 ! GAIA
12 !***********************************************************************
13 !
27 !
28 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 !
70  USE bief
71  USE interface_gaia, ex_bedload_solvs_fe => bedload_solvs_fe_gaia
73 !
75  IMPLICIT NONE
76 !
77 !!-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
78 !
79  TYPE(bief_mesh), INTENT(INOUT) :: MESH
80  TYPE(bief_obj), INTENT(IN) :: S,MASKEL,MASK,QSX,QSY
81  INTEGER, INTENT(IN) :: IELMT,NPOIN,NPTFR,KENT,KDIR
82  INTEGER, INTENT(IN) :: DIMGLO,NSEG,ICLA,KDDL,MAXADV
83  INTEGER, INTENT(IN) :: GLOSEG(dimglo,2)
84  DOUBLE PRECISION, INTENT(IN) :: DT,RATIO_SAND(npoin),XMVS
85  DOUBLE PRECISION, INTENT(INOUT) :: FLULIM(nseg)
86  LOGICAL, INTENT(IN) :: MSK,ENTET
87  TYPE(bief_obj), INTENT(INOUT) :: FLODEL,T1,T2,T3,T4,T8
88  TYPE(bief_obj), INTENT(INOUT) :: HZ,EBOR,LIMTEC
89  TYPE(bief_obj), INTENT(INOUT) :: FLBCLA,EVCL_MB
90  TYPE(bief_obj), INTENT(IN) :: HZN,UNSV2D,LIQBOR,QBOR
91 !
92 !!-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
93 !
94  INTEGER K,N,I1,I2,ISEG
95 !
96 !-----------------------------------------------------------------------
97 !
98 ! BOUNDARY FLUXES
99 !
100  CALL vector(flbcla,'=','FLUBOR ',ielbor(ielmt,1),1.d0,
101  & s,s,s,qsx,qsy,s,mesh,.true.,mask)
102 !
103 ! FLBCLA built from qsx and qsx, so already in kg/s or kg/(m*s)
104 !
105 ! BOUNDARY CONDITIONS: EITHER EBOR OR QBOR PRESCRIBED (NOT THE 2)
106 !
107  DO k=1,nptfr
108  IF(liqbor%I(k).EQ.kent) THEN
109 ! QBOR IS GIVEN BY USER, AND POSITIVE IF ENTERING
110 ! HERE WE PUT THE INTERNAL USAGE <0 = ENTERING
111  flbcla%R(k)=-qbor%R(k)
112 ! EVEN IF USER HAS SPECIFIED LIEBOR=KSORT, LIMTEC MAY HAVE BEEN
113 ! SET TO KDIR BY CHECKING IF VELOCITY IS ENTERING, THIS IS
114 ! UNWANTED HERE AS QBOR ONLY IS TAKEN INTO ACCOUNT,
115 ! SO DDL IS PUT TO AVOID A DIRICHLET TREATMENT IN POSITIVE_DEPTHS.
116  limtec%I(k)=kddl
117  ELSEIF(limtec%I(k).EQ.kdir) THEN
118 ! HERE THE VARIABLE WILL BE THE LAYER DEPTH OF THE SEDIMENT CLASS,
119 ! PUT IN T8, NOT THE EVOLUTION
120  n=mesh%NBOR%I(k)
121 ! here we should replace : t8=masse imposee au bord+ masse precedente
122  t8%R(k)=ratio_sand(n)*ebor%R(k)*xmvs+hzn%R(n)
123  ENDIF
124  ENDDO
125 !
126 ! HERE T1 MAY NOT BE ASSEMBLED, WE WORK DIRECTLY ON MESH%W%R AFTER,
127 ! FOR CALLING FLUX_EF_VF (IT IS T1 IN NON ASSEMBLED FORM)
128 !
129  CALL vector(t1,'=','VGRADP ',qsx%ELM,-1.d0,
130  & s,s,s,qsx,qsy,s,mesh,msk,maskel,lego=.false.)
131 !
132 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
133 !
134 ! NEW SECTION JMH 10/06/2016: FLODEL COMPUTED HERE, NOT IN POSITIVE_DEPTHS
135 !
136  CALL flux_ef_vf(flodel%R,mesh%W%R,mesh%NSEG,mesh%NELEM,
137  & mesh%NELMAX,mesh%ELTSEG%I,mesh%ORISEG%I,
138  & mesh%IKLE%I,.true.,2)
139 !
140 ! CANCELLING THE FLUXES TO AND FROM DRY POINTS
141 !
142  DO iseg=1,nseg
143 !
144  i1=gloseg(iseg,1)
145  i2=gloseg(iseg,2)
146  IF(hn%R(i1).LT.hmin_bedload.OR.
147  & hn%R(i2).LT.hmin_bedload) flodel%R(iseg)=0.d0
148  ENDDO
149 !
150 ! END OF NEW SECTION (ONLY TRUE CHANGED INTO FALSE AFTER FLODEL IN THE NEXT CALL)
151 !
152 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
153 !
154  CALL positive_depths(t1,t2,t3,t4,hz,hzn,mesh,
155 ! !!!!!!
156 ! & FLODEL, .TRUE.,FLBCLA,DT,UNSV2D,NPOIN,
157  & flodel,.false.,flbcla,dt,unsv2d,npoin,
158  & gloseg(1:dimglo,1),gloseg(1:dimglo,2),
159  & mesh%NBOR%I,nptfr,t8,.false.,t8,.false.,
160 ! VOID (SMH) VOID (PLUIE)
161  & 1,flulim,
162  & limtec%I,t8%R ,kdir,entet,mesh%W%R,
163 ! EBOR%R
164  & 'GAIA ',2,maxadv)
165 ! 2 : HARDCODED
166 ! OPTION FOR POSITIVE DEPTHS ALGORITHMS
167 ! HERE CHOICE OF OPTION WITH EDGE-BASED APPROACH
168 !
169  CALL os('X=Y-Z ' ,x=evcl_mb,y=hz,z=hzn)
170 !
171 !-----------------------------------------------------------------------
172 !
173 ! NEW FLUXES ACROSS CROSS-SECTIONS
174 !
175  IF(doflux) THEN
176  CALL flusec_gai(gloseg,dimglo,nseg,npoin,dt,mesh,unsv2d,
177  & flodel,flulim,hz,icla,entet)
178  ENDIF
179 !
180 !-----------------------------------------------------------------------
181 !
182  RETURN
183  END
184 
logical doflux
Fluxline.
subroutine flusec_gai(GLOSEG, DIMGLO, NSEG, NPOIN, DT, MESH, UNSV2D, FLODEL, FLULIM, HZ, ICLA, DOPLOT)
Definition: flusec_gai.f:8
integer function ielbor(IELM, I)
Definition: ielbor.f:7
type(bief_obj), target hn
Water depth.
subroutine vector(VEC, OP, FORMUL, IELM1, XMUL, F, G, H, U, V, W, MESH, MSK, MASKEL, LEGO, ASSPAR)
Definition: vector.f:7
subroutine flux_ef_vf(FLOW, PHIEL, NSEG, NELEM, NELMAX, ELTSEG, ORISEG, IKLE, INIFLO, IOPT, FN, YAFLULIM, FLULIM, YAFLULIMEBE, FLULIMEBE)
Definition: flux_ef_vf.f:8
subroutine os(OP, X, Y, Z, C, IOPT, INFINI, ZERO)
Definition: os.f:7
subroutine bedload_solvs_fe_gaia(MESH, S, EBOR, MASKEL, MASK, QSX, QSY, IELMT, NPOIN, NPTFR, KENT, KDIR, KDDL, LIMTEC, DT, MSK, ENTET, T1, T2, T3, T4, T8, HZ, HZN, GLOSEG, DIMGLO, FLODEL, FLULIM, NSEG, UNSV2D, ICLA, FLBCLA, RATIO_SAND, LIQBOR, QBOR, MAXADV, EVCL_MB, XMVS)
subroutine positive_depths(T1, T2, T3, T4, H, HN, MESH, FLODEL, COMPUTE_FLODEL, FLBOR, DT, UNSV2D, NPOIN, GLOSEG1, GLOSEG2, NBOR, NPTFR, SMH, YASMH, PLUIE, RAIN, OPTSOU, FLULIM, LIMPRO, HBOR, KDIR, INFO, FLOPOINT, NAMECODE, OPTION, NITMAX, DOFLULIM, FLULIMEBE, DOFLULIMEBE)
double precision hmin_bedload
Minimum depth for bedload.
Definition: bief.f:3