Welcome, Guest
Username: Password: Remember me

TOPIC: Tuning of head loss coefficients

Tuning of head loss coefficients 7 years 5 months ago #26893

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Hi Users, Hi Svensmolders,

I wrote your article dealing with the new implementation of the tubes. You did a great job.
I try to use it on a study case.
  • rectangular culvert
  • Length 30 meters
  • Width 2.9 meters
  • Heigth 1.6 meters
  • z1 ~0.55 mNGF / z2 ~0.45 mNGF


Upstream_View.png


inlet_sketch.png


Culvert.png



The approach sections on both sides (canal) are almost the same than the culvert section. No contraction or expansion.

The valve section is reduced compared to the culvert section.
  • double arch orifice
  • Width 2 x 0.95 meters separated by 0.4m wide pilar
  • Heigth 1.2 meters
  • Wide openning valve

outlet_sketch.png


Dowstream_view.png


oulet_sketch_dowstream_view.png


The top of the culvert is at 2.2mNGF and the top of the valve section at 1.65mNGF.


I try to simulate the case with or without the valve. The downstream is part of my model is subject to the tide (tidal range from -3mNGF to 3.7mNGF). The upstream part is kind of floodplain (tidal marsh) isolated from the sea by the valve.

I try to set the right parameters for this case.
I think CE1, CE2, CS1 and CS2 can be lowered to 0 (no lateral contraction but vertical contraction when the culvert flows in charge)?
For the geometric caracteristic, I described the regular section of the culvert (W=2.9, H=1.6, z1=0.55mNGF an z2=0.45mNGF) and not the valve section, am I right? I don't know what value of HAUT2 should I chose?

In that case, should I take a large value of Cv or Cp to take into account of the reduction of the valve section?

Your help will be appreciated as I have no data to calibrate and I just want to study the impact of the valve removal.

Regards,
Alexis
The administrator has disabled public write access.

Tuning of head loss coefficients 7 years 5 months ago #26896

  • Svensmolders
  • Svensmolders's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 105
  • Thank you received: 20
Hi Alexis,

nice case study and very similar to my cases. So I can give you some advice on the values I would use or on how implemented my culverts like in your case.
Your set up would just be 1 culvert. I used index 1 for the seaside and index 2 for the marsh area. here below are the values I would give:

Relaxation, Number of culverts
0.8 1
I1 I2 CE1 CE2 CS1 CS2 LRG HAUT1 CLP LBUS Z1 Z2 CV C56 CV5 C5 CT HAUT2 FRIC LENGTH CIRC
nodenr_Seaside nodenr_Marsh 0.5 0 1 0 1.9 1.1 2 0 0.45 0.56 1 10 1.5 6 0 1.65 0.025 30 0

on your marsh side you have no contraction or expansion, but on your sea side ( with the valve if I read it correctly) you have a contraction at the openings of the valves. Therefore you should give some head loss value to CE1 and CS1.

For the width (LRG) value of your culvert we take the smallest opening as a reference, as this will determine eventually how much water can get through. So LRG = 1.9
HAUT1 is the height of your opening on the sea side and this is only 1.1 m
CLP determines the direction of flow and since you have a one-way valve, in theory the water can only low from the marsh to the sea. So CLP = 2
Make sure you use the keyword OPTION FOR CULVERTS =2 to use the new part of the code in BUSE.f subroutine. In this part the LBUS parameter is not used and you can set the value to 0.
For Z1 and Z2 you use the bottom levels of the openings on either side.
Cv is the head loss for the valve. If your valve opens rather easily than you can set this parameter to 1. The heavier the valve or if it opens badly because of corrosion or something, you can increase this value.
The Ct is the head loss in case you would have trash screens, but you don't have those, so you can set this to zero.
HAUT2 is the height of the culvert opening at the marsh side = 1.65 m
FRIC is a manning friction coefficient that is used to calculate the head loss due to wall friction. We have very smooth concrete with algae on it so I gave my culverts a value of 0.015, but if you have a more rough surface as I deduct from the picture you can increase this value a bit to 0.025
your culvert is 30 m long so LENGTH = 30
CIRC = 0 because you don't have a circular culvert.


when calculating the discharges through the culvert the code take the amount of water that is available in your cell into account. If the calculated discharge is much higher than the amount of water that is available in your mesh at that time step, the discharge is limited. This is done this way because the culverts are in the model as a couple of sink and source nodes. If you are not aware of this, you might get very different results.
I use some tricks to avoid this: you could divide your one culvert into 2 culverts of hhalf the size. Or what I did was to make the bathymetry in the sink and source node and surrounding nodes a little deeper, so there is always a large amount of water available.

to monitor your discharges, you could introduce a private variable in the code that you write your discharges to and let it print in your 2D output.

last tip: I use the following keyword:
TYPE OF SOURCES =2 to select the Dirac type of sources. They are more stable and use less computation time. That last argument is only important if you run with 500 sinks and sources :-) like me.

hope this will help you further.

Sven
The administrator has disabled public write access.
The following user(s) said Thank You: abernard

Tuning of head loss coefficients 7 years 5 months ago #26900

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Hi Sven,

Great, Thanks à lot. I will try with the set of parameters you suggest.

I also try to modify telemac2d.f to get the discharge as suggested in this post but I fail with the message :


telemac_2d_error.png


Here is my routine modification :

IF(NBUSE.GT.0) THEN
IF(DEBUG.GT.0) WRITE(LU,*) 'CALLING BUSE'
CALL BUSE(RELAXB,NBUSE,ENTBUS%I,SORBUS%I,GRAV,
& H%R,ZF%R,DBUS%R,LRGBUS%R,HAUBUS%R,CLPBUS%I,
& ALTBUS%R,CSBUS%R,CEBUS%R,ANGBUS%R,LBUS%R,
& NTRAC,T,TBUS,UBUS%R,VBUS%R,U%R,V%R,ENTET,
& CV%R,C56%R,CV5%R,C5%R,CTRASH%R,FRICBUS%R,
& LONGBUS%R,CIRC%I,OPTBUSE,V2DPAR,DT,SECBUS%R,
& MAXSCE)
CALL OS('X=0',X=PRIVE)
DO I=1,NBUSE
PRIVE%ADR(1)%P%R(ENTBUS(I))=-DBUS%R(I)
PRIVE%ADR(1)%P%R(SORBUS(I))= DBUS%R(I)
ENDDO
IF(DEBUG.GT.0) WRITE(LU,*) 'BACK FROM BUSE'

ENDIF
The administrator has disabled public write access.

Tuning of head loss coefficients 7 years 4 months ago #26933

  • Svensmolders
  • Svensmolders's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 105
  • Thank you received: 20
Hi Alexis,

I will tell you what I did in 3D to get the discharge output. You can translate it to 2D in the code. It will be very similar.

In the steering file you add the private variable and ask for output of this variable:

NUMBER OF 2D PRIVATE ARRAYS =1
NAMES OF 2D PRIVATE VARIABLES ='CULVERTS M3/S '
VARIABLES FOR 2D GRAPHIC PRINTOUTS =U,V,S,H,B,TA1,PRIVE1

Then I added a few lines of code in telemac3d.f subroutine. For you this will be telemac2d.f

After calling BUSE in this subroutine I added:

CALL OS('X=0 ',X=PRIVE2D)
DO I=1,NBUSE
PRIVE2D%ADR(1)%P%R(ENTBUS(I))=-DBUS%R(I)
PRIVE2D%ADR(1)%P%R(SORBUS(I))= DBUS%R(I)
ENDDO

and I think this is all you need. In 2D the variable is just called PRIVE I think so if you remove the 2D two letters from the code above I think you can just copy paste it.
Be carefull, because in telemac3d.f there are two calls to BUSE.f. To be sure you should check this in 2D and copy the code in the subroutine after the second call to BUSE.f of course.


Let me know if it works or not

Sven
The administrator has disabled public write access.

Tuning of head loss coefficients 7 years 4 months ago #26934

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Hi Sven,

It doesn't work for me. You can find enclosed my telemac2d.f

I don-t know why i still get this error:

error_T2d.png
Attachments:
The administrator has disabled public write access.

Tuning of head loss coefficients 7 years 4 months ago #26935

  • Phelype
  • Phelype's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 140
  • Thank you received: 64
Hello Alexis

That's because ENTBUS and SORBUS are of type BIEF_OBJ then, as they are integers, you have to use ENTBUS%I(I) and SORBUS%I(I) like this:
PRIVE%ADR(1)%P%R(ENTBUS%I(I))=-DBUS%R(I)
PRIVE%ADR(1)%P%R(SORBUS%I(I))= DBUS%R(I)

P.S.: Consider also replacing the tab characters in your code by spaces. Some compilers may misbehave.

P.S.²: telemac2d.f has a few preprocessing directives (as you can see by the messages "Illegal preprocessor directives"). Rename the fortran file to telemac2d.F (capital) to enable preprocessing in this file.

Best regards,

Phelype
The administrator has disabled public write access.

Tuning of head loss coefficients 7 years 4 months ago #26938

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Hi Phelype,

Thanks,
It still doesn't work when I apply your suggested changes

error_T2d_1.png


error_T2d_2.png
The administrator has disabled public write access.

Tuning of head loss coefficients 7 years 4 months ago #26939

  • Svensmolders
  • Svensmolders's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 105
  • Thank you received: 20
Hi Alexis,

you can actually remove the CALL OS line.
This is already done in near line 600.

If it still doesn't work I suggest you send me all your files so I can run the simulation to see if something else is wrong.

Sven
The administrator has disabled public write access.

Tuning of head loss coefficients 7 years 4 months ago #26940

  • Phelype
  • Phelype's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 140
  • Thank you received: 64
Hello Alexis

You can see the first two errors are now gone.

And the second error says that the operation 'X=0 CALL' is unknown. This is happening because because OS takes a string of length 8 as input argument, and the one in your code is of length 4, then the remaining of the string is filled with something else. Thus the correct form is:
CALL OS('X=0',X=PRIVE)
CALL OS('X=0     ',X=PRIVE)
This error is related to the warning that the compiler throws, saying that the input string is of different length than the target string.

Of course, Sven said that this call to OS is not needed, thus you can simply remove it.

And also, to be sure that the code will work properly, rename your fortran file from .f to .F to enable the preprocessing of the code.

Best regards,

Phelype
The administrator has disabled public write access.

Tuning of head loss coefficients 7 years 4 months ago #27010

  • Svensmolders
  • Svensmolders's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 105
  • Thank you received: 20
Alexis,

I had a look at your steering file and it looks fine.
Then I had a look in the t2d dico file and if you want a private variable to be printed in the output, the name to ad to graphical printouts is not PRIVE1, but N.
I don't know why this is done this way. I would find it more logical to add PRIVE1 like it is done in t3d.
Anyway, if you add the N instead of the PRIVE1 it will give you the output you ask for.

Good luck

Sven
The administrator has disabled public write access.
Moderators: pham

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