Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: User Defined Initial water elevation in Condim.f

User Defined Initial water elevation in Condim.f 10 years 1 month ago #14508

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
Hi everyone,

I would like to ask if any one can help in programming a special case for setting the initial water elevation as a constant at upstream of an embankment while is different from the downstream or tail water elevation at downstream as shown in the attached pics. I would like to ask also is it possible to leave the embankment dry between two wet boundaries (U/S & D/S)?

Looking forward to hear from YOU!

Kind Regards
AMANJ
Attachments:
The administrator has disabled public write access.

User Defined Initial water elevation in Condim.f 10 years 1 month ago #14521

  • jmhervouet
  • jmhervouet's Avatar
Hello,

You can inspire from the malpasset case and what is done in file t2d_malpasset-small.f. You will see that after initialising the depth as usual in subroutine condin.f we have added a call to a subroutine CORSUI that changes the depth on one side of a straight line (the dam...) defined by 2 points. Subroutine DISTAN just computes the algebraic distance of a point to this line.

On one side of the dam (upstream) we set a free surface elevation of 100 m, so the depth is defined as 100.D0-ZF, ZF being the bottom topography. As another part of the mesh is upstream the line but not in the dam, there is after a small correction for this part.

You can try to adapt this example to your case.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

User Defined Initial water elevation in Condim.f 10 years 1 month ago #14524

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
Hello dear Jean-Michel Hervouet,

Thank you so much for always responding and care about us as a member of OpenTelemac Forum. I did come changes in the condin file as you suggested from Malpasset case, but still something not clear in the subroutine CORSUI, if you can give me more explanation i would appreciate. Here I copied the change and that line which i don't understand well.

SUBROUTINE CORSUI
C *****************
C
C
*(H,U,V,ZF,X,Y,NPOIN)
C
C***********************************************************************
C PROGICIEL : TELEMAC 01/03/90 J-M HERVOUET
C***********************************************************************
C
C FONCTION : FONCTION DE CORRECTION DES FONDS RELEVES
C
C CE SOUS-PROGRAMME UTILITAIRE NE FAIT RIEN DANS LA
C VERSION STANDARD. IL EST A LA DISPOSITION DES
C UTILISATEURS, POUR LISSER OU CORRIGER DES FONDS SAISIS
C PAR EXEMPLE.
C
C
C ARGUMENTS
C .________________.____.______________________________________________
C | NOM |MODE| ROLE
C |________________|____|_______________________________________________
C | ZF |<-->| FOND A MODIFIER.
C | X,Y,(Z) | -->| COORDONNEES DU MAILLAGE (Z N'EST PAS EMPLOYE).
C | NPOIN | -->| NOMBRE DE POINTS DU MAILLAGE.
C |________________|____|______________________________________________
C MODE : -->(DONNEE NON MODIFIEE), <--(RESULTAT), <-->(DONNEE MODIFIEE)
C
C
C PROGRAMME APPELANT : TELMAC
C PROGRAMMES APPELES : RIEN EN STANDARD
C
C***********************************************************************
C
IMPLICIT NONE
C
INTEGER NPOIN,I
C
DOUBLE PRECISION H(*),X(*),Y(*),ZF(*),U(*),V(*)
C
DOUBLE PRECISION DISTAN,X1,X2,Y1,Y2,HD
EXTERNAL DISTAN
C
C
C
C INITIALISATION DES VARIABLES POUR LE CALCUL DE LA SITUATION DU POINT
C X1,Y1,X2,Y2 POINT DEFINISANT LA DROITE DE LIMITE DE BARRAGE
C X3,Y3 POINT DEFINISANT LES COORDONNEES D POINT A DROITE DE LIMITE DE
C
X1= 6.900D0
Y1= 0.0007D0
X2= 6.900D0
Y2= 0.3854D0
C
DO 99 I=1,NPOIN
HD=DISTAN(X1,Y1,X2,Y2,X(I),Y(I))
IF(HD.GT.0.001D0) THEN
H(I) = 0.300D0 - ZF(I)
U(I) = 0.D0
V(I) = 0.D0
ENDIF
C


Here is the line where I need to understand :


IF((X(I)-4500.D0)**2+(Y(I)-5350.D0)**2.LT.200.D0**2) THEN
H(I)=0.D0
ENDIF
C
99 CONTINUE


Kind Regards,
AMANJ
Attachments:
The administrator has disabled public write access.

User Defined Initial water elevation in Condim.f 10 years 1 month ago #14525

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
Here is the location on MAP malpasset
Attachments:
The administrator has disabled public write access.

User Defined Initial water elevation in Condim.f 10 years 1 month ago #14526

  • jmhervouet
  • jmhervouet's Avatar
Hello,

This is just an example, the lines you do not understand is just the fact that when we apply an elevation of 100. m upstream the dam, it encloses a small domain around point (4500,5350) which is not in the reservoir, this is why we cancel the depth around this point, in a circle with radius 200 m. Your own case may be a totally different situation.

Regards,

JMH
The administrator has disabled public write access.

User Defined Initial water elevation in Condim.f 10 years 1 month ago #14544

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
Dear JMH,

I followed your instruction and I just modified the case of malpasset initial condition by modifying Condin file. When I am running my model without fortran file everything is fine, when I attach fortran file and remove initial elevation and just put particular condition, my model doesnt run and I dont know the clear reason.

Here is the run log from Telemac2d

C:\amanj01>telemac2d.py telemactest.cas


Loading Options and Configurations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

... parsing configuration file: C:\opentelemac-mascaret\v6p3\configs\systel.cfg


Running your CAS file for:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+> configuration: win7gfors
+> root: C:\opentelemac-mascaret\v6p3
+> version v6p3


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


... reading the main module dictionary

... processing the main CAS file(s)
+> running in English

... checking parallelisation

... handling temporary directories

... checking coupling between codes
+> running in English

... first pass at copying all input files
+> telemactest.cas
copying: telemac2d.dico C:\amanj01\telemactest.cas_2014-10-20-10h39min59s\T2DDICO
copying: caseone_amanj0.f C:\amanj01\telemactest.cas_2014-10-20-10h39min59s\t2dfort.f
copying: geometry.slf C:\amanj01\telemactest.cas_2014-10-20-10h39min59s\T2DGEO
re-writing: C:\amanj01\telemactest.cas_2014-10-20-10h39min59s\T2DCAS
copying: BC.cli C:\amanj01\telemactest.cas_2014-10-20-10h39min59s\T2DCLI
copying: sisyphe.dico C:\amanj01\telemactest.cas_2014-10-20-10h39min59s\SISDICO
copying: BC.cli C:\amanj01\telemactest.cas_2014-10-20-10h39min59s\SISCLI
copying: geometry.slf C:\amanj01\telemactest.cas_2014-10-20-10h39min59s\SISGEO
re-writing: C:\amanj01\telemactest.cas_2014-10-20-10h39min59s\SISCAS

... checking the executable
re-copying: caseone_amanj0.exe C:\amanj01\telemactest.cas_2014-10-20-10h39min59s\out_caseone_amanj0.exe

... handling sortie file(s)


Running your simulation(s) :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



C:\amanj01\telemactest.cas_2014-10-20-10h39min59s\out_caseone_amanj0.exe



LISTING OF TELEMAC-2D

TTTTT EEEEE L EEEEE M M AAAAA CCCCC
T E L E MM MM A A C
T EEE L EEE M M M AAAAA C
T E L E M M A A C
T EEEEE LLLLL EEEEE M M A A CCCCC

2D VERSION 6.3 FORTRAN 90
WITH SEVERAL TRACERS
COUPLED WITH SISYPHE AND TOMAWAC

********************************************
* LECDON: *
* AFTER CALLING DAMOCLES *
* CHECKING OF DATA READ *
* IN THE STEERING FILE *
********************************************

EXITING LECDON. NAME OF THE STUDY:

OPENING FILES FOR TELEMAC2D

*****************************
* MEMORY ORGANIZATION *
*****************************

READGEO1: TITLE= newSelafin
NUMBER OF ELEMENTS: 81770
NUMBER OF POINTS: 42028

FORMAT NOT INDICATED IN TITLE

MXPTEL (BIEF) : MAXIMUM NUMBER OF ELEMENTS AROUND A POINT: 6
MAXIMUM NUMBER OF POINTS AROUND A POINT: 6
CORRXY (BIEF):NO MODIFICATION OF COORDINATES

MESH: MESH ALLOCATED

*************************************
* END OF MEMORY ORGANIZATION: *
*************************************

LISTING OF SISYPHE WITH COUPLING

SSSS I SSSS Y Y PPPP H H EEEEE
S I S Y Y P P H H E
SSS I SSS Y PPPP HHHHH EEEE
S I S Y P H H E
SSSS I SSSS Y P H H EEEEE

VERSION 6.3
COUPLED WITH TELEMAC-2D INTERNALLY

WARNING ! AT LINE 2554 OF THE DICTIONARY :
NUMBER OF DEFAULT VALUES 10 IS DIFFERENT FROM THE SIZE 2

WARNING ! AT LINE 2637 OF THE DICTIONARY :
NUMBER OF DEFAULT VALUES 10 IS DIFFERENT FROM THE SIZE 2

WARNING ! AT LINE 2675 OF THE DICTIONARY :
NUMBER OF DEFAULT VALUES 10 IS DIFFERENT FROM THE SIZE 2

WARNING ! AT LINE 3254 OF THE DICTIONARY :
NUMBER OF DEFAULT VALUES 13 IS DIFFERENT FROM THE SIZE 1

********************************************
* LECDON: *
* AFTER CALLING DAMOCLES *
* CHECKING OF DATA READ *
* IN THE STEERING FILE *
********************************************

OPENING FILES FOR SISYPHE

*******************************
* MEMORY ORGANISATION *
*******************************

READGEO1: TITLE= newSelafin
NUMBER OF ELEMENTS: 81770
NUMBER OF POINTS: 42028

FORMAT NOT INDICATED IN TITLE

MXPTEL (BIEF) : MAXIMUM NUMBER OF ELEMENTS AROUND A POINT: 6
MAXIMUM NUMBER OF POINTS AROUND A POINT: 6
CORRXY (BIEF):NO MODIFICATION OF COORDINATES

MESH: MESH_S ALLOCATED

*************************************
* END OF MEMORY ORGANIZATION: *
*************************************

INBIEF (BIEF): NOT A VECTOR MACHINE (ACCORDING TO YOUR DATA)
STRCHE (BIEF): NO MODIFICATION OF FRICTION

THERE IS 2 LIQUID BOUNDARIES:

BOUNDARY 1 :
BEGINS AT BOUNDARY POINT: 1106 , WITH GLOBAL NUMBER: 42028
AND COORDINATES: 11.05000 0.4349054E-04
ENDS AT BOUNDARY POINT: 1143 , WITH GLOBAL NUMBER: 1106
AND COORDINATES: 11.04996 0.3841269

BOUNDARY 2 :
BEGINS AT BOUNDARY POINT: 2248 , WITH GLOBAL NUMBER: 1
AND COORDINATES: 0.2645260E-06 0.3848015
ENDS AT BOUNDARY POINT: 1 , WITH GLOBAL NUMBER: 40923
AND COORDINATES: -0.1310169E-04 0.3223095E-03

THERE IS 2 SOLID BOUNDARIES:

BOUNDARY 1 :
BEGINS AT BOUNDARY POINT: 1 , WITH GLOBAL NUMBER: 40923
AND COORDINATES: -0.1310169E-04 0.3223095E-03
ENDS AT BOUNDARY POINT: 1106 , WITH GLOBAL NUMBER: 42028
AND COORDINATES: 11.05000 0.4349054E-04

BOUNDARY 2 :
BEGINS AT BOUNDARY POINT: 1143 , WITH GLOBAL NUMBER: 1106
AND COORDINATES: 11.04996 0.3841269
ENDS AT BOUNDARY POINT: 2248 , WITH GLOBAL NUMBER: 1
AND COORDINATES: 0.2645260E-06 0.3848015

CORFON (TELEMAC2D): NO MODIFICATION OF BOTTOM



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

... handling result files

+> telemactest.cas
moving: telemacresult.slf
moving: sisresult.slf


Warning: Your operating system does not allow me to remove a directory




My work is done





and My fortran is

C *****************
SUBROUTINE CONDIN
C *****************
C
C***********************************************************************
C TELEMAC-2D VERSION 5.0 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
C
C+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
C
INTEGER ITRAC
C
C
C
C INITIALISATION DU TEMPS
C
AT = 0.D0
C
C
C
C INITIALISATION DES VITESSES : VITESSES NULLES
C
CALL OS( 'X=0 ' , X=U )
CALL OS( 'X=0 ' , X=V )
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
STOP 'CONDITIONS PARTICULIERES A PROGRAMMER'
C FIN DE LA ZONE A MODIFIER
ELSE
WRITE(LU,*) 'CONDIN : CONDITION INITIALE NON PREVUE : ',CDTINI
STOP
ENDIF
C
CALL CORSUI(H%R,U%R,V%R,ZF%R,X,Y,NPOIN)
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
C ***************************************************
DOUBLE PRECISION FUNCTION DISTAN(X1,Y1,X2,Y2,X3,Y3)
C ***************************************************
C
C***********************************************************************
C PROGICIEL : TELEMAC 23/07/91
C
C***********************************************************************
C
C FONCTION : CETE FONCTION CALCULE LA DISTANCE ENTRE UNE DROITE
C ET UN POINT SUR LE MAILLAGE
C
C ARGUMENTS
C .________________.____.______________________________________________.
C | NOM |MODE| ROLE |
C |________________|____|______________________________________________|
C | X1 | --> ABSCISSE DU PREMIER POINT SUR LA DROITE
C | Y1 | -->| COORDONNEE DU PREMIER POINT SUR LA DROITE
C | X2 | --> ABSCISSE DU DEUXIEME POINT SUR LA DROITE
C | Y2 | -->| COORDONNEE DU DEUXIEME POINT SUR LA DROITE
C | X | -->| ABSCISSE DU POINT POUR LEQUEL ON CHERCHE DIST1
C | Y | -->| COORDONNEE DU POINT POUR LEQUEL ON CHERCHE DIS
C | DISTAN |<-- | DISTANCE ENTRE LA DROITE ET LE POINT
C |________________|____|_______________________________________________
C MODE : -->(DONNEE NON MODIFIEE), <--(RESULTAT), <-->(DONNEE MODIFIEE)
C***********************************************************************
C
C
IMPLICIT NONE
DOUBLE PRECISION X1,X2,X3,Y1,Y2,Y3
DOUBLE PRECISION A1,B1,C1,DET
INTRINSIC SQRT
A1=Y1-Y2
B1=-X1+X2
C1=X1*Y2-X2*Y1
DET=SQRT((A1**2)+(B1**2))
DISTAN=((A1*X3)+(B1*Y3)+C1)/DET
RETURN
END
C *****************
SUBROUTINE CORSUI
C *****************
C
C
*(H,U,V,ZF,X,Y,NPOIN)
C
C***********************************************************************
C PROGICIEL : TELEMAC 01/03/90 J-M HERVOUET
C***********************************************************************
C
C FONCTION : FONCTION DE CORRECTION DES FONDS RELEVES
C
C CE SOUS-PROGRAMME UTILITAIRE NE FAIT RIEN DANS LA
C VERSION STANDARD. IL EST A LA DISPOSITION DES
C UTILISATEURS, POUR LISSER OU CORRIGER DES FONDS SAISIS
C PAR EXEMPLE.
C
C
C ARGUMENTS
C .________________.____.______________________________________________
C | NOM |MODE| ROLE
C |________________|____|_______________________________________________
C | ZF |<-->| FOND A MODIFIER.
C | X,Y,(Z) | -->| COORDONNEES DU MAILLAGE (Z N'EST PAS EMPLOYE).
C | NPOIN | -->| NOMBRE DE POINTS DU MAILLAGE.
C |________________|____|______________________________________________
C MODE : -->(DONNEE NON MODIFIEE), <--(RESULTAT), <-->(DONNEE MODIFIEE)
C
C
C PROGRAMME APPELANT : TELMAC
C PROGRAMMES APPELES : RIEN EN STANDARD
C
C***********************************************************************
C
IMPLICIT NONE
C
INTEGER NPOIN,I
C
DOUBLE PRECISION H(*),X(*),Y(*),ZF(*),U(*),V(*)
C
DOUBLE PRECISION DISTAN,X1,X2,Y1,Y2,HD
EXTERNAL DISTAN
C
C
C
C INITIALISATION DES VARIABLES POUR LE CALCUL DE LA SITUATION DU POINT
C X1,Y1,X2,Y2 POINT DEFINISANT LA DROITE DE LIMITE DE BARRAGE
C X3,Y3 POINT DEFINISANT LES COORDONNEES D POINT A DROITE DE LIMITE DE
C
X1= 6.900D0
Y1= 0.0007D0
X2= 6.900D0
Y2= 0.385D0
C
DO 99 I=1,NPOIN
HD=DISTAN(X1,Y1,X2,Y2,X(I),Y(I))
IF(HD.GT.0.001D0) THEN
H(I) = 0.300D0 - ZF(I)
U(I) = 0.D0
V(I) = 0.D0
ENDIF
C
C ZONE DERRIERE LE BARRAGE MAIS QUI N'EST PAS DANS
C LA RETENUE.
C

C
99 CONTINUE
C
C
C
RETURN
END
The administrator has disabled public write access.

User Defined Initial water elevation in Condim.f 10 years 1 month ago #14545

  • jmhervouet
  • jmhervouet's Avatar
Hello,

The initial conditions as declared in the steering file must probably not be removed, as they will do a first part of the job, e.g. setting 0 everywhere, so I do not understand your sentence "and remove initial elevation", subroutine CORSUI acts as a correction on certain parts only, so you need an initialisation.

Regards,

JMH
The administrator has disabled public write access.

User Defined Initial water elevation in Condim.f 10 years 1 month ago #14546

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
dear JMH,

before I coupled fortran file, I set the initial conditon as constant elevation with initial value of 0.01 m, then after introducing fortran file and changing the initial condition into particular condition, I removed initial value of 0.01. even with this value I mean before removing it, I run the model but didnt work. I dont know what is the reason, I know something belong to fortran file because before it the model worked well.

Thanks
AMANJ
Attachments:
The administrator has disabled public write access.

User Defined Initial water elevation in Condim.f 10 years 1 month ago #14547

  • jmhervouet
  • jmhervouet's Avatar
Hello,

You should not change the initial conditions to "particular", but let as it is with constant elevation, as CORSUI is called in all cases and will only correct the depth in some places. "particular" means that you have implemented a specific section in condin, which is not the case.

Anyway what do you mean by "the model does not work", is it a crash or do you have a message and a stop ?

Regards,

JMH
The administrator has disabled public write access.

User Defined Initial water elevation in Condim.f 10 years 1 month ago #14549

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
Dear JMH,

Now I set the initial condition to constant elevation with initial value of 0.005 and now is running and iterating the process. I mean by model doesn't work that after reading the sources, without any calculation or iteration , the process ended. I would like to thank you for your advises and I learned a lot.

Kind Regards,
AMANJ
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.