C *****************
SUBROUTINE CONDIN
C *****************
C
C***********************************************************************
C TELEMAC 2D VERSION 5.2 19/08/98 J-M HERVOUET TEL: 30 87 80 18
C
C***********************************************************************
C
C FONCTION : INITIALISATION DES GRANDEURS PHYSIQUES H, U, V ETC
C
C-----------------------------------------------------------------------
C ARGUMENTS
C .________________.____.______________________________________________
C | NOM |MODE| ROLE
C |________________|____|______________________________________________
C | | -- |
C |________________|____|______________________________________________
C MODE : -->(DONNEE NON MODIFIEE), <--(RESULTAT), <-->(DONNEE MODIFIEE)
C***********************************************************************
C
USE BIEF
USE DECLARATIONS_TELEMAC2D
C
IMPLICIT NONE
INTEGER LNG,LU
COMMON/INFO/LNG,LU
C
C+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
C
DOUBLE PRECISION N,L,D,G
DOUBLE PRECISION L2,CORI,FREQ,A,EQ1,EQ2
INTEGER I,ITRAC
C
C+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
C
C
C-----------------------------------------------------------------------
C
C INITIALISATION DU TEMPS
C
AT = 0.D0
C
C-----------------------------------------------------------------------
C
C INITIALISATION DES VITESSES : VITESSES NULLES
C
C CALL OS( 'X=C ' , U , U , U , 0.D0 )
CALL OS( 'X=C ' , V , V , V , 0.D0 )
C
C-----------------------------------------------------------------------
C
C INITIALISATION DE H , LA HAUTEUR D'EAU
C
IF(CDTINI(1:10).EQ.'COTE NULLE'.OR.
* CDTINI(1:14).EQ.'ZERO ELEVATION') THEN
CALL OS( 'X=C ' , H , H , H , 0.D0 )
CALL OS( 'X=X-Y ' , H , ZF , H , 0.D0 )
ELSEIF(CDTINI(1:14).EQ.'COTE CONSTANTE'.OR.
* CDTINI(1:18).EQ.'CONSTANT ELEVATION') THEN
CALL OS( 'X=C ' , H , H , H , COTINI )
CALL OS( 'X=X-Y ' , H , ZF , H , 0.D0 )
ELSEIF(CDTINI(1:13).EQ.'HAUTEUR NULLE'.OR.
* CDTINI(1:10).EQ.'ZERO DEPTH') THEN
CALL OS( 'X=C ' , H , H , H , 0.D0 )
ELSEIF(CDTINI(1:17).EQ.'HAUTEUR CONSTANTE'.OR.
* CDTINI(1:14).EQ.'CONSTANT DEPTH') THEN
CALL OS( 'X=C ' , H , H , H , HAUTIN )
ELSEIF(CDTINI(1:13).EQ.'PARTICULIERES'.OR.
* CDTINI(1:10).EQ.'PARTICULAR'.OR.
* CDTINI(1:07).EQ.'SPECIAL') THEN
C ZONE A MODIFIER
C
C=====================================
C DEFINITION DES PARAMETRES A UTILISER
N=1.0D0
L=2141.D0
D=1.1D0
G=9.81D0
L2=L**2.D0
CORI=(1.457D0*(10.D0**4.D0))*SIN(0.901)
FREQ=(((8.D0*G*D)/L2)+(CORI**2.D0))**0.5D0
A=(((D+N)**2.0)-(D**2.0))/(((D+N)**2.0)+(D**2.0))
EQ1=(((1-(A**2.D0))**0.5D0)/(1-A*COS(FREQ*0.0)))-1
EQ2=(1-(A**2.0))/(1-A*COS(FREQ*0.0)**2.0)-1
DO I = 1, NPOIN
H%R(I) = 1.D0
IF ((D*(EQ1-((X(I)**2.D0+Y(I)**2.D0)/L2)*EQ2)).gt.ZF%R(I)) THEN
H%R(I) = ((D*(EQ1-(((X(I)**2.D0+Y(I)**2.D0)/L2)*EQ2)))-ZF%R(I))
END IF
END DO
C FIN DE LA ZONE A MODIFIER
ELSE
IF(LNG.EQ.1) THEN
WRITE(LU,*) 'CONDIN : CONDITION INITIALE NON PREVUE : ',CDTINI
ENDIF
IF(LNG.EQ.2) THEN
WRITE(LU,*) 'CONDIN: INITIAL CONDITION UNKNOWN: ',CDTINI
ENDIF
CALL PLANTE(1)
STOP
ENDIF
C
C-----------------------------------------------------------------------
C
C INITIALISATION DU TRACEUR
C
IF(NTRAC.GT.0) THEN
DO ITRAC=1,NTRAC
CALL OS( 'X=C ' , X=T%ADR(ITRAC)%P , C=TRAC0(ITRAC) )
ENDDO
ENDIF
C
C-----------------------------------------------------------------------
C
C INITIALISATION DE LA VISCOSITE
C
CALL OS( 'X=C ' , VISC , VISC , VISC , PROPNU )
C
C-----------------------------------------------------------------------
C
RETURN
END