Welcome, Guest
Username: Password: Remember me

TOPIC: Seeking clarification on user manual and source code/Nikuradse formula

Seeking clarification on user manual and source code/Nikuradse formula 1 year 2 months ago #43263

Hello everyone,

I'm currently working with the Telemac v8p4r0 for my project and I've encountered what might be discrepancies between the user manual and the source code.

Issue #1:
According to the user manual (section 4.3.2, released on December 1, 2020), the friction velocity u* is supposed to be calculated using the following formula:
u_*=(k.u_plane1)/ln(33.∆z/k_s)

However, upon inspecting the source code, TFOND.F subroutine under Telemac3D directory, the corresponding calculations are:

155 DO N=1,NPOIN
156! TAKES INTO ACCOUNT CRUSHED PLANES
157! I1 FIRST POINT WITH WATER ABOVE (EXCEPT CASE OF TIDAL FLATS
158! WHERE THE LEVEL UNDER THE FREE SURFACE IS TAKEN)
159 I1=(MIN(NPLAN-1,IPBOT(N)+1)-1)*NPOIN+N
160 DIST = Z(NPOIN+I1)-Z(I1)
161 AUX=MAX(1.001D0,30.D0*DIST/RUGOF(N))
162 UETCAR(N)=(KARMAN/LOG(AUX))**2
163 & * (U3D(I1+NPOIN)**2+V3D(I1+NPOIN)**2)
164 ENDDO


Normally, on line 161, the coefficient of 30 should be 33 to be consistent with the user manual. I wonder to know which one of them is correct?

Issue #2:
To calculate the friction coefficient, cf, in the case of Nikuradse law, I found these formulae in the user manual (section 1.6.5 page 40):

C = 7.83ln(12h/k_s)
Cf = 2g/C^2

and in the COEFRO.F subroutine, the corresponding piece of code is:

174 TRENTESURE=30.D0/EXP(1.D0)
175 DO N=1,NPOIN
176 HC = MAX(HH(N),1.D-4)
177 CF%R(N) = 2.D0 / (LOG( TRENTESURE*HC/CHESTR%R(N))/KARMAN )**2
178 ENDDO

It is expected to set the 'TRENTESURE' variable to 12, not 30/exp(1), which is equal to 11.036.


I understand that there could be various reasons for such differences, including possible updates or corrections in the source code that haven't been reflected in the manual or I'm looking to the wrong subroutine. Before assuming this as an inconsistency or bug, I would like to kindly request insights from the developer or anyone familiar with the Model.

Thank you in advance for your time and contributions.
The administrator has disabled public write access.

Seeking clarification on user manual and source code/Nikuradse formula 1 year 2 months ago #43329

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Mostafa,

I can write one thing for sure: you are right, there are discrepancies between the TELEMAC-3D theory guide and what is implemented in the source files.

Unfortunately, every colleague who worked on these tasks do not work here anymore and hard to give hints.
I have tried to do some source archeology:
- the formula found in tfond.f with 30 has been existing since release 5.4 (around 2004! Before I even started to use or develop TELEMAC),
- factor 30/e^1 replaced 11 (and not even 12) in release 6.2. I wonder if Catherine did not change the factor because it better worked with SISYPHE?

Anyway, I will try to discuss with some colleagues of mine who may have a better idea for which formula should be kept.

If other users already have ideas, do not hesitate to give your feedback.

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: MostafaNazarali

Seeking clarification on user manual and source code/Nikuradse formula 1 year 2 months ago #43335

  • jurjendejong
  • jurjendejong's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 27
  • Thank you received: 12
Regarding issue 2:

Starting with the manual. It appears to be an approximation of Van Rijn (1984) to be able to use the natural logaritm in Fortran. The coefficient 12 should be correct.

Van Rijn (1984):
C = 18 * log(12 * h/ks)

-->
C = 18 * ln(10) * ln(12 * h/ks) = 7.817 * ln(12 * h/ks)



However, the code seems to be using a different translation to Cf that might be more applicable to 3D models. I have not been able to figure out what the basis of the formulae is.

Comparing manual and code, when assuming for simplicity h = ks = 1, than the coefficients reduce to:

Manual: Cf = 2 * g / (7.83 * ln(12))**2 = 0.0518
Code: Cf = 2 / (ln(30/e)/Karman)**2 = 0.0555
The administrator has disabled public write access.
The following user(s) said Thank You: MostafaNazarali

Seeking clarification on user manual and source code/Nikuradse formula 1 year 2 months ago #43338

  • konsonaut
  • konsonaut's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 413
  • Thank you received: 144
Hi,

to give my two cents. Long time ago I had some discussion with Jean-Michel Hervouet about the Karman constant equal to 0.40 or 0.41 in the Telemac system. In fact, the different values, 30 or 33, and the successive calculations come from different assumptions for the Karman constant in the log-law. At that time in the Telemac code it was quite mixed and hence, I proposed to set the Karman constant within the Telemac system globally to a value of 0.40. What I know, it was done. Maybe the user manual was not updated (and maybe some parts of the code also).

Best regards,

Clemens
The administrator has disabled public write access.
The following user(s) said Thank You: pham, MostafaNazarali

Seeking clarification on user manual and source code/Nikuradse formula 1 year 2 months ago #43343

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Thanks Clemens for the reminder,

Indeed, in TELEMAC, the default value for Karman constant was changed some years ago and adjustments should have been done. I hope everything in the source codes is consistent (I will try to check). But for sure, user manuals have not been updated (or originally were not coherent with what is implemented).

Chi-Tuan
The administrator has disabled public write access.

Seeking clarification on user manual and source code/Nikuradse formula 1 year 1 month ago #43402

Thank you, everyone, for your insightful remarks and contributions to the discussion. So, For the moment, I will primarily rely on what is already written in the source code and will not be implementing the Theory Guide formula.

@Pham: Please let us know if you plan to make changes to the formulae in the source code.
The administrator has disabled public write access.

Seeking clarification on user manual and source code/Nikuradse formula 1 year 4 weeks ago #43520

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Mostafa,

For sure, I will update documentation to be consistent with what is implemented for next release (v8p5) which is planned to be available early December.

Personally, no plan to change the source code.

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: MostafaNazarali
Moderators: pham

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