Welcome, Guest
Username: Password: Remember me

TOPIC: Boundary conditions K-epsilon

Boundary conditions K-epsilon 9 years 3 days ago #20110

  • Thiébot
  • Thiébot's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Hello,

I am curently trying to simualte the hydrodynamics in the English Channel using Telemac3D v6p3.
The mesh size varies from 5km to 50m. There are 20 horizontal planes. I am using TPXO.

I wish to use k-eps in both horizontal and vertical directions.

I tried two advection schemes for k-eps : Characteristics (scheme n°1) and explicit (scheme n°3).

The first scheme rapidly leads to unphysical results (High values near the solid boundaries). The explicit scheme (n°3) gives much nicer results but the calculation crashes at the boundaries.
I therefore planned to use explicit scheme for k-eps and to impose no turbulence at the entrance (the site of interest is far from the boundaries). To this end, I modified the KEPCL3 routine.
In KEPCL3, the values of KBORL cannot be modified because the test LIKBOL(IPTFR,IPLAN).EQ.KENT is false. Could you tell me how to impose Dirichlet conditions in this case?

Thank you.

Best regards.

Jérôme

PS : the case file is attached
Attachments:
The administrator has disabled public write access.

Boundary conditions K-epsilon 9 years 3 days ago #20113

  • jmhervouet
  • jmhervouet's Avatar
Hello Jérôme,

Please note that there is now an option in version 7.1:

OPTION FOR THE BOUNDARY CONDITIONS OF K-EPSILON : 0(no turbulence) or 1 (Hans & Burchard formula). However wait for version 7.1R1 before changing.

For the rest, I understand that we have a problem if LIUBOR(IPTFR).EQ.KENTU (your case) in KEPICL because then the boundary condition on K is wrong, so we should have in KEPICL:

IF(LIUBOR(IPTFR).EQ.KENT.OR.LIUBOR(IPTFR).EQ.KENTU) THEN...

You can try to put:

IF(LIUBOR(IPTFR).EQ.KENT.OR.LIUBOR(IPTFR).EQ.6) THEN... in KEPICL and if OK we shall correct this cleanly for the next release.

With best regards,

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

Boundary conditions K-epsilon 9 years 3 days ago #20116

  • Thiébot
  • Thiébot's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Hello Jean-Michel,
Thank you for your prompt answer.
In fact, I have already tried writing KBORL(IPTFR,IPLAN)=KMIN outside the test LIKBOL(IPTFR,IPLAN).EQ.KENT. By so doing I manage to impose the values of KBORL.
However, when I look at the values of AK and KBORL at different places of the TELEMAC3D soubroutine, it seems that the values of AK are never set to the values of KBORL. I have to check it in more details (there should be other tests as regards the value of LIKBOL).
I will also compare this case to another case (flume experiment) in which I succeed in imposing k and epsilon at the entrance.
I will keep you in touch.
Best regards
Jérôme
PS : I will promptly move to v7 :-)
The administrator has disabled public write access.

Boundary conditions K-epsilon 9 years 3 days ago #20122

  • Thiébot
  • Thiébot's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Hello Jean-Michel,
I finally solved the problem by modifying the KEPICL routine. This is my modification:

! Deb JT
! <--
! DO IPTFR=1,NPTFR3
! IF(LIUBOL(IPTFR).EQ.KENT) THEN
! LIKBOL(IPTFR) = KENT
! LIEBOL(IPTFR) = KENT
! ELSE
! LIKBOL(IPTFR) = KSORT
! LIEBOL(IPTFR) = KSORT
! ENDIF
!! SAVING VALUES IN THE SECOND DIMENSION (SEE POINT_TELEMAC3D)
! LIKBOL(IPTFR+NPTFR3) = KSORT
! LIEBOL(IPTFR+NPTFR3) = KSORT
! ENDDO
! -->
DO IPTFR=1,NPTFR3
LIKBOL(IPTFR) = KENT
LIEBOL(IPTFR) = KENT
LIKBOL(IPTFR+NPTFR3) = KENT
LIEBOL(IPTFR+NPTFR3) = KENT
ENDDO
! Fin JT

I can now impose the required values of k and epsilon at the entrance.
However, the calculation still crashes at the entrance (always after 60 seconds...). I suppose that the error occurs when the TPXO boundary conditions are updated. I will now have a look.
Best regards.
Jérôme
The administrator has disabled public write access.

Boundary conditions K-epsilon 9 years 3 days ago #20124

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Yes but by doing this you have prescribed K and Epsilon on ALL boundaries, even solid boundaries. Did you test to write :

IF(LIUBOL(IPTFR).EQ.KENT.OR.LIUBOL(IPTFR).EQ.KENTU) THEN...

in your case you must have LIUBOL(IPTFR)=KENTU=6 on the TPXO boundaries...

Regards,

JMH
The administrator has disabled public write access.

Boundary conditions K-epsilon 9 years 3 days ago #20125

  • Thiébot
  • Thiébot's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Hello,
The K and epsilon are prescribed only on liquid boundaries because the test you mention is used in KEPCL3.

In fact, there are two tests in KEPCL3:

test 1 : LIKBOL(IPTFR,IPLAN).EQ.KENT ? --> this test was wrong before modifying KEPICL

test 2 (if test 1 is true) : LIUBOL(IPTFR,IPLAN).EQ.KENT.OR.
& LIUBOL(IPTFR,IPLAN).EQ.KENTU.OR.
& LIUBOL(IPTFR,IPLAN).EQ.KSORT ? this test aims at distinguishing solid and liquid boundary. It works well.

Thank you for your help.
Best regards
Jérôme
The administrator has disabled public write access.

Boundary conditions K-epsilon 1 month 1 week ago #46199

  • phmusiedlak
  • phmusiedlak's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 3
Hello,

I am trying to replicate the experiment from P.Ouro et al. 2018 : a vertical tidal turbine in a flume. In experments, the turbulent intensity (TI) is measured as pretty much constant along the flume (horizontally and vertically) : TIi=15% ; while the vertical profile is pretty much constant/flat (horizontally and vertically).

To impose this profile and TI in my numerical flume I use the k-epsilon turbulence model to have access to the TKE and epsilon - and I assume that TI=sqrt(2*TKE/3)/||u||
Using Viollet test case and forum posts, the idea is to specify TKE and Epsilon in kepcl3.f via a Dirichlet boundary condition. I manage to do that for the inlet - around lines 257:
IF(OPTBCKE.EQ.1) THEN
!               NO TURBULENCE
                KBORL(IPTFR,IPLAN) = 0.03D0 ! 3/2*(TI[%]*U)**2 KMIN

However specifying TKE on WALLS seems impossible - line 277 in kepscl3.f does nothing. I think I tried all combinaison of keywords but let me know if I forgot one (I do NOT want to impose a friction coefficient on walls as I want a constant/flat horizontal velocity profile). Imposing TKE and Epsilon on walls is the only solution I came up with otherwise TI drops from 15% at inlet to 6% at outlet - because we impose Dirichlet BC TKE=Kmin on walls (and bottom).

I think line 277 in kepscl3.f does nothing because LIKBOL should be KENT (line 241), whereas in kepicl.f LIKBOL=KSORT (lines 78-89) since LIUBOL=!KENT or LIUBOL=!KENTU

So, (and this is why I post on this topic), I made modifications in kepicl.f:
IF(LIUBOL(IPTFR).EQ.KENT.OR.LIUBOL(IPTFR).EQ.KENTU) THEN
          LIKBOL(IPTFR) = KENT
          LIEBOL(IPTFR) = KENT
!        ELSE
        elseif(LIUBOL(IPTFR).EQ.KSORT) then
          LIKBOL(IPTFR) = KSORT
          LIEBOL(IPTFR) = KSORT
		else 
		  LIKBOL(IPTFR) = KENT
          LIEBOL(IPTFR) = KENT
        ENDIF

That way, wall type BC can be specified in kepcl3.f.

I guess another solution would be to add (in kepcl3.f) an else to the LIKBOL(IPTFR,IPLAN).EQ.KENT (line 241) and move the "wall" part.


I have attached the case - hopefully to replicate- and a picture showing the difference.


Pierre-Henri
Attachments:
The administrator has disabled public write access.
Moderators: pham

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