limi3d.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac3d\limi3d.f
00002 !
00144                      SUBROUTINE LIMI3D
00145 !                    *****************
00146 !
00147 !
00148 !***********************************************************************
00149 ! TELEMAC3D   V6P1                                   21/08/2010
00150 !***********************************************************************
00151 !
00152 !
00153 !
00154 !
00155 !
00156 !
00157 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00158 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00159 !
00160       USE BIEF
00161       USE DECLARATIONS_TELEMAC
00162       USE DECLARATIONS_TELEMAC3D
00163 !
00164       IMPLICIT NONE
00165       INTEGER LNG,LU
00166       COMMON/INFO/LNG,LU
00167 !
00168 !-----------------------------------------------------------------------
00169 !
00170       INTEGER IPOIN2, IPLAN, IPTFR, IPTFR3, ITRAC
00171 !
00172 !***********************************************************************
00173 !
00174 !     BOUNDARY CONDITIONS ON VELOCITIES
00175 !     *********************************
00176 !
00177 !     BOTTOM
00178 !     ======
00179 !
00180 !     DEFAULT: IMPERMEABILITY AND LOG LAW (SEE ALSO BORD3D)
00181 !
00182       IF(BC_BOTTOM.EQ.1) THEN
00183 !
00184         DO IPOIN2 = 1,NPOIN2
00185           LIUBOF%I(IPOIN2) = KLOG
00186           LIVBOF%I(IPOIN2) = KLOG
00187           LIWBOF%I(IPOIN2) = KLOG
00188 !         USEFUL ? SHOULD NOT BE USED ANYWAY
00189           UBORF%R(IPOIN2)  = 0.D0
00190           VBORF%R(IPOIN2)  = 0.D0
00191           WBORF%R(IPOIN2)  = 0.D0
00192         ENDDO
00193 !
00194       ELSEIF(BC_BOTTOM.EQ.2) THEN
00195 !
00196         DO IPOIN2 = 1,NPOIN2
00197           LIUBOF%I(IPOIN2) = KADH
00198           LIVBOF%I(IPOIN2) = KADH
00199           LIWBOF%I(IPOIN2) = KADH
00200 !         USEFUL ? KADH SAYS IT IS 0.D0
00201           UBORF%R(IPOIN2)  = 0.D0
00202           VBORF%R(IPOIN2)  = 0.D0
00203           WBORF%R(IPOIN2)  = 0.D0
00204         ENDDO
00205 !
00206       ELSE
00207         IF(LNG.EQ.1) THEN
00208           WRITE(LU,*) 'LIMI3D : FAUSSE CONDITION A LA LIMTE AU FOND'
00209           WRITE(LU,*) '         VALEUR ',BC_BOTTOM,' INCONNUE'
00210         ENDIF
00211         IF(LNG.EQ.1) THEN
00212           WRITE(LU,*) 'LIMI3D : BAD BOUNDARY CONDITION ON THE BOTTOM'
00213           WRITE(LU,*) '         VALUE ',BC_BOTTOM,' UNKNOWN'
00214         ENDIF
00215         CALL PLANTE(1)
00216         STOP
00217       ENDIF
00218 !
00219 !     COEFFICIENTS SET TO 0 BY MEANS OF THEIR COMPONENT TYPR
00220 !     NO DIFFUSION FLUX THROUGH BOTTOM
00221 !
00222       AUBORF%TYPR='0'
00223       AVBORF%TYPR='0'
00224       BUBORF%TYPR='0'
00225       BVBORF%TYPR='0'
00226       IF(NONHYD) THEN
00227         AWBORF%TYPR='0'
00228         BWBORF%TYPR='0'
00229       ENDIF
00230 !
00231 !     LATERAL BOUNDARIES
00232 !     ==================
00233 !
00234 !     DEFAULT: 2D CONDITIONS DUPLICATED ON THE VERTICAL
00235 !              FREE FOR W
00236 !              NO FRICTION
00237 !
00238       DO IPLAN = 2,NPLAN
00239         DO IPTFR = 1,NPTFR2
00240           IPTFR3 = (IPLAN-1)*NPTFR2 + IPTFR
00241           LIUBOL%I(IPTFR3) = LIUBOL%I(IPTFR)
00242           LIVBOL%I(IPTFR3) = LIVBOL%I(IPTFR)
00243           UBORL%R(IPTFR3)  = UBORL%R(IPTFR)
00244           VBORL%R(IPTFR3)  = VBORL%R(IPTFR)
00245           AUBORL%R(IPTFR3) = AUBORL%R(IPTFR)
00246         ENDDO
00247       ENDDO
00248 !
00249 !     IDEA OF OPTIMISATION (BEWARE PARALLELISM)
00250 !
00251 !     IF(DOTS(AUBORL,AUBORL).GT.1.D-8) THEN
00252 !       AUBORL%TYPR='Q'
00253 !     ELSE
00254 !       AUBORL%TYPR='0'
00255 !     ENDIF
00256 !
00257       DO IPTFR3 = 1,NPTFR3
00258 !                           KSORT: W FREE ON LATERAL BOUNDARIES
00259         LIWBOL%I(IPTFR3)        = KSORT
00260 !       VALUES SAVED IN SECOND DIMENSION BECAUSE ADVECTION
00261 !       SCHEMES MAY CHANGE THE VALUES
00262         LIUBOL%I(IPTFR3+NPTFR3) = LIUBOL%I(IPTFR3)
00263         LIVBOL%I(IPTFR3+NPTFR3) = LIVBOL%I(IPTFR3)
00264         LIWBOL%I(IPTFR3+NPTFR3) = LIWBOL%I(IPTFR3)
00265         WBORL%R(IPTFR3)  = 0.D0
00266 !       BUBORL%R(IPTFR3) = 0.D0
00267 !       BVBORL%R(IPTFR3) = 0.D0
00268       ENDDO
00269       BUBORL%TYPR='0'
00270       BVBORL%TYPR='0'
00271 !
00272       IF(NONHYD) THEN
00273 !       DO IPTFR3 = 1,NPTFR3
00274 !         AWBORL%R(IPTFR3) = 0.D0
00275 !         BWBORL%R(IPTFR3) = 0.D0
00276 !       ENDDO
00277         AWBORL%TYPR='0'
00278         BWBORL%TYPR='0'
00279       ENDIF
00280 !
00281 !     FREE SURFACE
00282 !     ============
00283 !
00284 !     DEFAULT: IMPERMEABILITY AND NO FRICTION (SEE ALSO BORD3D)
00285 !
00286       DO IPOIN2 = 1,NPOIN2
00287         LIUBOS%I(IPOIN2) = KLOG
00288         LIVBOS%I(IPOIN2) = KLOG
00289         LIWBOS%I(IPOIN2) = KLOG
00290         UBORS%R(IPOIN2)  = 0.D0
00291         VBORS%R(IPOIN2)  = 0.D0
00292         WBORS%R(IPOIN2)  = 0.D0
00293 !       AUBORS%R(IPOIN2) = 0.D0
00294 !       BUBORS%R(IPOIN2) = 0.D0
00295 !       BVBORS%R(IPOIN2) = 0.D0
00296       ENDDO
00297       AUBORS%TYPR='0'
00298       BUBORS%TYPR='0'
00299       AVBORS%TYPR='0'
00300       BVBORS%TYPR='0'
00301 !
00302       IF(NONHYD) THEN
00303 !       DO IPOIN2 = 1,NPOIN2
00304 !         AWBORS%R(IPOIN2) = 0.D0
00305 !         BWBORS%R(IPOIN2) = 0.D0
00306 !       ENDDO
00307         AWBORS%TYPR='0'
00308         BWBORS%TYPR='0'
00309       ENDIF
00310 !
00311 !     **************
00312 !     TRACERS BC'S
00313 !     **************
00314 !
00315       IF (NTRAC.NE.0) THEN
00316         DO ITRAC = 1,NTRAC
00317 !
00318 !     BOTTOM
00319 !     ======
00320 !
00321 !     DEFAULT: NEUMANN BC'S
00322 !
00323           DO IPOIN2 = 1,NPOIN2
00324             LITABF%ADR(ITRAC)%P%I(IPOIN2) = KLOG
00325             TABORF%ADR(ITRAC)%P%R(IPOIN2) = 0.D0
00326 !           ATABOF%ADR(ITRAC)%P%R(IPOIN2) = 0.D0
00327 !           BTABOF%ADR(ITRAC)%P%R(IPOIN2) = 0.D0
00328           ENDDO
00329           ATABOF%ADR(ITRAC)%P%TYPR='0'
00330           BTABOF%ADR(ITRAC)%P%TYPR='0'
00331 !
00332 !     SIDES
00333 !     =====
00334 !
00335 !     DEFAULT: NEUMANN BC'S
00336 !
00337 !           WHAT HAS BEEN READ IN THE BOUNDARY CONDITIONS FILE
00338 !           FOR 1 TRACER IS DUPLICATED ON THE VERTICAL AND FOR
00339 !           ALL TRACERS
00340 !
00341           DO IPLAN = 1,NPLAN
00342             DO IPTFR = 1,NPTFR2
00343               IPTFR3 = (IPLAN-1)*NPTFR2 + IPTFR
00344               LITABL%ADR(ITRAC)%P%I(IPTFR3) = LITABL%ADR(1)%P%I(IPTFR)
00345 !             SAVING ON SECOND DIMENSION BECAUSE ADVECTION SCHEMES
00346 !             MAY CHANGE THIS VALUE
00347               LITABL%ADR(ITRAC)%P%I(IPTFR3+NPTFR3) =
00348      &                                        LITABL%ADR(1)%P%I(IPTFR)
00349               TABORL%ADR(ITRAC)%P%R(IPTFR3) = TABORL%ADR(1)%P%R(IPTFR)
00350 !             ATABOL%ADR(ITRAC)%P%R(IPTFR3) = ATABOL%ADR(1)%P%R(IPTFR)
00351 !             BTABOL%ADR(ITRAC)%P%R(IPTFR3) = BTABOL%ADR(1)%P%R(IPTFR)
00352             ENDDO
00353           ENDDO
00354           ATABOL%ADR(ITRAC)%P%TYPR='0'
00355           BTABOL%ADR(ITRAC)%P%TYPR='0'
00356 !
00357 !     FREE SURFACE
00358 !     =============
00359 !
00360 !     DEFAULT: NEUMANN BC'S
00361 !
00362           DO IPOIN2 = 1,NPOIN2
00363              LITABS%ADR(ITRAC)%P%I(IPOIN2) = KLOG
00364              TABORS%ADR(ITRAC)%P%R(IPOIN2) = 0.D0
00365 !            ATABOS%ADR(ITRAC)%P%R(IPOIN2) = 0.D0
00366 !            BTABOS%ADR(ITRAC)%P%R(IPOIN2) = 0.D0
00367           ENDDO
00368           ATABOS%ADR(ITRAC)%P%TYPR='0'
00369           BTABOS%ADR(ITRAC)%P%TYPR='0'
00370 !
00371         ENDDO
00372       ENDIF
00373 !
00374 !     SOLID BOUNDARIES FOR K AND EPSILON
00375 !     **********************************
00376 !
00377       IF(ITURBV.EQ.3.OR.ITURBV.EQ.7) THEN
00378 !
00379 !     BOTTOM
00380 !     ======
00381 !
00382 !     DEFAULT : NO GRADIENT
00383 !
00384         DO IPOIN2 = 1,NPOIN2
00385           AKBORF%R(IPOIN2) = 0.D0
00386           BKBORF%R(IPOIN2) = 0.D0
00387           AEBORF%R(IPOIN2) = 0.D0
00388           BEBORF%R(IPOIN2) = 0.D0
00389         ENDDO
00390         AKBORF%TYPR = '0'
00391         BKBORF%TYPR = '0'
00392         AEBORF%TYPR = '0'
00393         BEBORF%TYPR = '0'
00394 !
00395 !     SIDES
00396 !     =====
00397 !
00398 !     DEFAULT : NO GRADIENT
00399 !
00400         DO IPTFR3 = 1,NPTFR3
00401           AKBORL%R(IPTFR3) = 0.D0
00402           BKBORL%R(IPTFR3) = 0.D0
00403           AEBORL%R(IPTFR3) = 0.D0
00404           BEBORL%R(IPTFR3) = 0.D0
00405         ENDDO
00406 !
00407 !     FREE SURFACE
00408 !     ============
00409 !
00410 !     DEFAULT : NO GRADIENT
00411 !
00412         DO IPOIN2 = 1,NPOIN2
00413            AKBORS%R(IPOIN2) = 0.D0
00414            BKBORS%R(IPOIN2) = 0.D0
00415            AEBORS%R(IPOIN2) = 0.D0
00416            BEBORS%R(IPOIN2) = 0.D0
00417         ENDDO
00418 !
00419       ENDIF
00420 !
00421 !
00422 !     FRICTION COEFFICIENTS
00423 !     *********************
00424 !
00425 !     DEFAULT: VALUE GIVEN IN STEERING FILE
00426 !
00427       CALL OV('X=C     ',RUGOL%R,RUGOL%R,RUGOL%R,RUGOL0,NPTFR2*NPLAN)
00428 !
00429 !======================================================================
00430 ! DEFAULT BOUNDARY CONDITION TYPES AND VALUES FOR THE
00431 ! PRESSURE POISSON EQUATION
00432 !======================================================================
00433 !
00434       IF(NONHYD) THEN
00435 !
00436 !-----------------------------------------------------------------------
00437 !
00438 ! DEFAULT TYPES AND VALUES FOR THE PRESSURE BOUNDARY CONDITIONS
00439 ! BOTTOM AND FREE SURFACE
00440 !
00441 !       AT ALL LATERAL BOUNDARIES AND BOTTOM DP/DN = 0;
00442 !       DIRICHLET = 0 AT THE SURFACE; DIRICHLET CONDITIONS SET TO 0 ALL OVER
00443 !       (CORRECT AT THE SURFACE ONLY)
00444 !
00445 !       BOTTOM AND SURFACE
00446 !       CHECK KLOG BOTTOM
00447 !
00448         DO IPOIN2=1,NPOIN2
00449           LIPBOF%I(IPOIN2) = KLOG
00450           LIPBOS%I(IPOIN2) = KENT
00451           PBORF%R(IPOIN2)  = 0.D0
00452           PBORS%R(IPOIN2)  = 0.D0
00453         ENDDO
00454 !
00455 !       LATERAL SURFACES: ALL TREATED AS NEUMANN
00456 !
00457         DO IPTFR3=1,NPTFR3
00458           LIPBOL%I(IPTFR3) = KLOG
00459           PBORL%R(IPTFR3)  = 0.D0
00460         ENDDO
00461 !
00462 !       LATERAL SURFACES: DIRICHLET ON ENTRANCES, NEUMANN ELSEWHERE
00463 !
00464 !       DO IPTFR3=1,NPTFR3
00465 !         PBORL%R(IPTFR3)  = 0.D0
00466 !         IF(LIUBOL%I(IPTFR3).EQ.KENT.OR.
00467 !    *       LIUBOL%I(IPTFR3).EQ.KENTU) THEN
00468 !           LIPBOL%I(IPTFR3) = KENT
00469 !         ELSE
00470 !           LIPBOL%I(IPTFR3) = KLOG
00471 !         ENDIF
00472 !       ENDDO
00473 !
00474       ENDIF
00475 !
00476 !======================================================================
00477 !
00478       RETURN
00479       END

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