lecsip.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\lecsip.f
00002 !
00076                      SUBROUTINE LECSIP
00077 !                    *****************
00078 !
00079      &(RELAXS,NSIPH,ENTSIP,SORSIP,SECSIP,
00080      & ALTSIP,CSSIP,CESIP,DELSIP,ANGSIP,LSIP,IFIC,MESH)
00081 !
00082 !***********************************************************************
00083 ! TELEMAC2D   V6P2                                   21/08/2010
00084 !***********************************************************************
00085 !
00086 !
00087 !
00088 !
00089 !
00090 !
00091 !
00092 !
00093 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00094 !| ALTSIP         |<--| ELEVATION OF ENTRY AND EXIT OF PIPES
00095 !| ANGSIP         |<--| ANGLE OF PIPES WITH AXIS OX.
00096 !| CESIP          |<--| HEAD LOSS COEFFICIENT WHEN WORKING AS AN INFLOW
00097 !| CSSIP          |<--| HEAD LOSS COEFFICIENT WHEN WORKING AS AN OUTFLOW
00098 !| DELSIP         |<--| ANGLE OF PIPES WITH VERTICAL
00099 !| ENTSIP         |<--| INDICES OF ENTRY OF PIPE IN GLOBAL NUMBERING
00100 !| IFIC           |-->| LOGICAL UNIT OF FORMATTED DATA FILE 1
00101 !| LSIP           |<--| LINEAR HEAD LOSS OF PIPE
00102 !| NSIPH          |<--| NUMBER OF CULVERTS
00103 !| RELAXS         |<--| RELAXATION COEFFICIENT.
00104 !| SECSIP         |<--| CROSS SECTION OF CULVERTS
00105 !| SORSIP         |<--| INDICES OF PIPES EXITS IN GLOBAL MESH NUMBERING
00106 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00107 !
00108       USE BIEF
00109       IMPLICIT NONE
00110       INTEGER LNG,LU
00111       COMMON/INFO/LNG,LU
00112 !
00113 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00114 !
00115       INTEGER, INTENT(IN)             :: IFIC,NSIPH
00116       INTEGER, INTENT(INOUT)          :: ENTSIP(NSIPH),SORSIP(NSIPH)
00117       DOUBLE PRECISION, INTENT(INOUT) :: RELAXS
00118       DOUBLE PRECISION, INTENT(INOUT) :: SECSIP(NSIPH),ALTSIP(NSIPH,2)
00119       DOUBLE PRECISION, INTENT(INOUT) :: DELSIP(NSIPH,2),ANGSIP(NSIPH,2)
00120       DOUBLE PRECISION, INTENT(INOUT) :: CESIP(NSIPH,2),CSSIP(NSIPH,2)
00121       DOUBLE PRECISION, INTENT(INOUT) :: LSIP(NSIPH)
00122       TYPE(BIEF_MESH), INTENT(IN)     :: MESH
00123 !
00124 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00125 !
00126       INTEGER N
00127 !
00128       DOUBLE PRECISION DELTA1,DELTA2,ALT1,ALT2
00129       DOUBLE PRECISION ANG1,ANG2,CS1,CS2,CE1,CE2
00130 !
00131       DOUBLE PRECISION PI
00132       PARAMETER(PI=3.141592653589D0)
00133 !
00134 !-----------------------------------------------------------------------
00135 !
00136       READ(IFIC,*,END=900)
00137       READ(IFIC,*,ERR=998) RELAXS
00138       READ(IFIC,*,END=900)
00139 !
00140       DO N=1,NSIPH
00141         READ(IFIC,*,ERR=997) ENTSIP(N),SORSIP(N),
00142      &                       DELTA1,DELTA2,CE1,CE2,
00143      &                       CS1,CS2,SECSIP(N),LSIP(N),
00144      &                       ALT1,ALT2,ANG1,ANG2
00145         DELSIP(N,1) = DELTA1*PI/180.D0
00146         DELSIP(N,2) = DELTA2*PI/180.D0
00147         CESIP(N,1)  = CE1
00148         CESIP(N,2)  = CE2
00149         CSSIP(N,1)  = CS1
00150         CSSIP(N,2)  = CS2
00151         ALTSIP(N,1) = ALT1
00152         ALTSIP(N,2) = ALT2
00153         ANGSIP(N,1) = ANG1*PI/180.D0
00154         ANGSIP(N,2) = ANG2*PI/180.D0
00155       ENDDO ! N
00156 !
00157 !     IN // THE POINTS ARE GIVEN THEIR LOCAL NUMBER
00158 !           OR 0 IF NOT IN THE SUB-DOMAIN
00159 !
00160       IF(NCSIZE.GT.1) THEN
00161         DO N=1,NSIPH
00162           ENTSIP(N)=GLOBAL_TO_LOCAL_POINT(ENTSIP(N),MESH)
00163           SORSIP(N)=GLOBAL_TO_LOCAL_POINT(SORSIP(N),MESH)
00164         ENDDO
00165       ENDIF
00166 !
00167       GO TO 1000
00168 !
00169 !-----------------------------------------------------------------------
00170 !     ERROR MESSAGES
00171 !-----------------------------------------------------------------------
00172 !
00173 998   CONTINUE
00174       IF(LNG.EQ.1) THEN
00175         WRITE(LU,*) 'LECSIP : ERREUR DE LECTURE SUR LE'
00176         WRITE(LU,*) '         FICHIER DE DONNEES DES SIPHONS'
00177         WRITE(LU,*) '         2EME LIGNE DU FICHIER NON CONFORME.'
00178       ELSEIF(LNG.EQ.2) THEN
00179         WRITE(LU,*) 'LECSIP : READ ERROR ON THE'
00180         WRITE(LU,*) '         CULVERT DATA FILE'
00181         WRITE(LU,*) '         AT LINE 2'
00182       ENDIF
00183       CALL PLANTE(1)
00184       STOP
00185 !
00186 997   CONTINUE
00187       IF(LNG.EQ.1) THEN
00188         WRITE(LU,*) 'LECSIP : ERREUR DE LECTURE SUR LE'
00189         WRITE(LU,*) '         FICHIER DE DONNEES DES SIPHONS'
00190         WRITE(LU,*) '         POUR LE SIPHON ',N
00191         WRITE(LU,*) '         DONNEES ILLISIBLES'
00192       ELSEIF(LNG.EQ.2) THEN
00193         WRITE(LU,*) 'LECSIP : READ ERROR ON THE'
00194         WRITE(LU,*) '         CULVERT DATA FILE'
00195         WRITE(LU,*) '         FOR CULVERT NUMBER ',N
00196         WRITE(LU,*) '         THE DATA CANNOT BE READ'
00197       ENDIF
00198       CALL PLANTE(1)
00199       STOP
00200 !
00201 900   CONTINUE
00202       IF(LNG.EQ.1) THEN
00203         WRITE(LU,*) 'LECSIP : ERREUR DE LECTURE SUR LE'
00204         WRITE(LU,*) '         FICHIER DE DONNEES DES SIPHONS'
00205         WRITE(LU,*) '         FIN DE FICHIER PREMATUREE'
00206       ELSEIF(LNG.EQ.2) THEN
00207         WRITE(LU,*) 'LECSIP : READ ERROR ON THE'
00208         WRITE(LU,*) '         CULVERT DATA FILE'
00209         WRITE(LU,*) '         UNEXPECTED END OF FILE'
00210       ENDIF
00211       CALL PLANTE(1)
00212       STOP
00213 !
00214 1000  CONTINUE
00215 !
00216 !-----------------------------------------------------------------------
00217 !
00218       RETURN
00219       END

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