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

TOPIC: Problem in KEPCL3 when choosing Dirichlet BC for k at free surface

Problem in KEPCL3 when choosing Dirichlet BC for k at free surface 8 years 3 months ago #23316

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Hello,

Recently I have been testing the k-epsilon model in the Telemac-3D. I accidentally found a small problem in the subroutine KEPCL3.

This problem occurred when I was trying to use Dirichlet boundary conditions for k and epsilon at free surface. After looking at the code, I found there is a piece of code missing in KEPCL3 if LIKBOS is set to KENT.

From Line 205 to 230, the boundary values are computed for epsilon at free surface (EBOS) but not for k (no values giving to KBOS). So I simply appended the following lines to this part:
!       DIRICHLET ON K
!       --------------

        IF(LIKBOS(IPOIN2).EQ.KENT) THEN
          KBORS(IPOIN2) = MAX(0.D0,KMIN)
        ENDIF

Then the problem is gone. I got proper values of k at free surface.

k.png


Hope this helps if anyone has the same problem.

But, as you can see in the figure, the k profile in the vertical is not correct. There is overestimation compared to the analytic solutions found by the mixing length theory and the shape becomes strange near the bottom in the Telemac-3D results.

I will try to test the k-epsilon model further and come back with more detailed comparison.

Best regards,
Qilong
The administrator has disabled public write access.

Problem in KEPCL3 when choosing Dirichlet BC for k at free surface 8 years 3 months ago #23414

Dear Qilong,

Thank you for you feedback. I'll add your fix in the next version.

I think the piece of code is missing because Dirichlet condition on k and eps at free surface is not realy common (and diffucult to set).

Did you try to use a Dirichlet condition on eps and Neumann condition on k?

Best regards,
The administrator has disabled public write access.

Problem in KEPCL3 when choosing Dirichlet BC for k at free surface 8 years 3 months ago #23461

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Dear Jacques,

Thanks for your suggestion.
I tried with a Dirichlet condition on eps and Neumann condition on k, but it doesn't really improve the k profile.

As can be seen in the plot, the value of k at bottom still have the same value of analytic solution even I set Neumann condition k at bottom.


k_ncf.png
The administrator has disabled public write access.

Problem in KEPCL3 when choosing Dirichlet BC for k at free surface 8 years 3 months ago #23467

  • konsonaut
  • konsonaut's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 413
  • Thank you received: 144
Hi,
to put in my two cents: I agree with Jacques that Dirichlet for eps and Neumann for k at the free surface is the proper treatment. The higher eps at the free surface will reduce k in the transport equation for k and thus dampen the turbulence (->turbulent eddy viscosity) there which is in line with the literature, see for instance Nezu and Nakagawa (1993).
If you put k=KMIN than the eddy viscosity will be almost zero anyway independently of the computed or specified value for eps.
In Telemac-3D you have always Dirichlet conditions at the bottom, which is also reasonable.

And be careful about the needed inflow length to get rid of the boundary conditions when you are interested specifically in k and eps. It can be amazingly long, as you can see in the picture. In this typical lab flume case it is around 40m.

TKE_15cmdepth.png


Best regards,
Clemens
The administrator has disabled public write access.
The following user(s) said Thank You: qilong

Problem in KEPCL3 when choosing Dirichlet BC for k at free surface 8 years 3 months ago #23470

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Dear Clemens,

Thanks for sharing the experience on how to set-up the boundary conditions for k and epsilon. I agree with you that the Neumann type for k at free surface are more physically correct.

In my test, the osculating of k near the bottom is the most concern. In order to find the reasons behind it, I tried with different combinations of boundary types as well as different options of the source terms in Telemac-3D.

In my case, A simple channel test is set up. The geometry of the channel is 1000m long and 180m wide. The bottom is flat with a mild slope of 0.2%. The same flowrate is imposed at both upstream and downstream, therefore, the flow is in a steady state after certain period. The water elevation is 12m. The results of Node 930 (800m away from the upstream open boundary) is used for analysis.

k_2016-08-17.png


k_2016-08-17-2.png


k-RNG.png


However, this osculating doesn't appear in the epsilon profile

ep-RNG.png


nut-RNG.png


Currently, I have no idea where could go wrong in the computation of k near the bottom...

Best regards,
Qilong
The administrator has disabled public write access.

Problem in KEPCL3 when choosing Dirichlet BC for k at free surface 8 years 3 months ago #23471

  • konsonaut
  • konsonaut's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 413
  • Thank you received: 144
Indeed strange. Some time ago we did some tests with the TEL3D k-eps model and it worked just really good under various different but quite simple setups.

Maybe you tried them already but some suggestions for variations, a little bit "haphazardly" B)
- Downstream condition for velocity (discharge) prescribed?
If yes, try to use discharge for the inlet and only water level for the outlet.
- constant vertical discretization and number of levels
- playing with the roughness


Hope it helps,
Clemens
The administrator has disabled public write access.
The following user(s) said Thank You: qilong

Problem in KEPCL3 when choosing Dirichlet BC for k at free surface 8 years 3 months ago #23472

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Thanks for your advice, Clemens!
I'll keep testing and update this post if I could find something.

Cheers,
Qilong
The administrator has disabled public write access.

Problem in KEPCL3 when choosing Dirichlet BC for k at free surface 8 years 3 months ago #23505

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Hi Clemens!

I followed your suggestion with constant vertical discretization and number of levels and use discharge for the inlet and only water level for the outlet. The oscillation of k values near the bottom still exists. But in general, the results are not bad in terms of eddy viscosity and velocity profiles.

k_2016-08-18.png


eps.png


nut.png


ux.png


However, we still don't understand the cause of the problem. I don't know if you still keep your simple test cases with Telemac-3D k-epsilon model, which worked nicely? Is it possible to have your test case so we can compare the setups with your case?

Kind regards,
Qilong
The administrator has disabled public write access.

Problem in KEPCL3 when choosing Dirichlet BC for k at free surface 8 years 3 months ago #23507

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

nice graphs! As you can see also in your graphs when comparing ML with k-eps near the free surface, the "much" higher eddy viscosity values with the k-eps values don't produce significantly different velocities near the surface. And this is also the case at the bottom in that some wiggles in the turbulent parameters don't alter too much the velocities. And therefore the application of Neumann conditions for k and eps at the free surface is normally considered as standard, e.g. also in OpenFoam. But you are right, such wiggles are not physical in such a case.
Enclosed the test case. You could try to use directly the steering file for your case.

Hope it helps!
Best regards,
Clemens
Attachments:
The administrator has disabled public write access.
The following user(s) said Thank You: qilong

Problem in KEPCL3 when choosing Dirichlet BC for k at free surface 8 years 3 months ago #23508

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Thank you very much Clemens!
I'll try your test case to see if I can find the reasons for the wiggles.

Best regards,
Qilong
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.