Page 2 of 3

Re: Imposed velocity profile

Posted: Wed Oct 10, 2012 10:40 am
by JamesMcNaughton
You need to set the other velocity values at the inlet. And if running turbulence need to set those quantities too.

Re: Imposed velocity profile

Posted: Wed Oct 10, 2012 10:46 am
by stage75
Yes James I use the (K-epsilon regime of turbulence)!


I changed the value of velocity but I have the same error message
Some boundary definitions are incomplete or incorrect:
The is other parameters to define when I impose a inlet?

Thanks

Re: Imposed velocity profile

Posted: Wed Oct 10, 2012 10:52 am
by JamesMcNaughton
Have you set all the variables at the inlet?

Re: Imposed velocity profile

Posted: Wed Oct 10, 2012 2:09 pm
by stage75
precisely, I wonder if there are other variables to enter at the inlet apart the velociy,

My code at the inlet is:

Code: Select all

call getfbr('Face_155', nlelt, lstelt)
!==========
do ilelt = 1, nlelt

  ifac = lstelt(ilelt)

iel = ifabor(ifac)

  do iphas = 1, nphas
    itypfb(ifac,iphas) = ientre

rcodcl(ifac,iv(iphas),1) = 0.5d0 

  enddo

enddo
I miss things to define?

Re: Imposed velocity profile

Posted: Wed Oct 10, 2012 5:40 pm
by JamesMcNaughton
Sorry yes that is what I had meant... you need to set the other velocity variables (iu, iv, iw) and turbulent quantities (for your case ik, iep).

Re: Imposed velocity profile

Posted: Wed Oct 10, 2012 8:26 pm
by stage75
Thank you very much for your reply and your help James,

I redefined my velocity as follows:

Code: Select all

call getfbr('Face_155', nlelt, lstelt)
!==========
do ilelt = 1, nlelt

  ifac = lstelt(ilelt)

iel = ifabor(ifac)

  do iphas = 1, nphas
    itypfb(ifac,iphas) = ientre

rcodcl(ifac,iu(iphas),1) = 0.0d0
rcodcl(ifac,iv(iphas),1) = 0.5d0
rcodcl(ifac,iw(iphas),1) = 0.0d0
  enddo
enddo
By cons I have no idea on how to define the parameters of turbulences (ik and iep), (I chose the K-epsilon model), mybe its like this:

Code: Select all

  rcodcl(ifac,ik(iphas),1) 
      rcodcl(ifac,iep(iphas),1)
I don't know, really, how to proceed!! :?: :oops:

Re: Imposed velocity profile

Posted: Thu Oct 11, 2012 7:52 am
by JamesMcNaughton
Yes like that, have a look at the examples in usclim it shows you how to define them there.

Re: Imposed velocity profile

Posted: Thu Oct 11, 2012 8:45 am
by stage75
THanks James for your ideas !

Is this different définition are general and by default, I can use it dirrectly:

Code: Select all

 rhomoy = propfb(ifac,ipprob(irom(iphas)))

Code: Select all

!uref2 = rcodcl(ifac,iv(iphas),1)**2 + omegay**2*0.075**2

!uref2 = max(uref2,1.d-12)
Its important to define "dh" (hydraulic diameter"

Thanks

Re: Imposed velocity profile

Posted: Thu Oct 11, 2012 9:22 am
by JamesMcNaughton
The examples are (I think) for a pipe flow based on a hydraulic diameter (keendb subroutine I think it is called), the second example uses the turbulence intensity (keenin). You can try setting your turbulence using them if you like but they are unlikely to give you the correct inlet turbulence for your case. If you have experimental data they may have given you information (eg turbulent intensity / length-scales) that you can use. If you're not familiar with this a good starting point might be http://www.cfd-online.com/Wiki/Turbulence_modeling
although you'll get more out of a text book on turbulence modelling. I am afraid that is as much as I can help with this as I am no expert in turbulence modelling myself.

Your questions:

Do you set "dh" ? Yes if you are using it (in the keenin / keendb routines or elsewhere).
rhomoy - this is the fluid density.
uref2 - in the example this is u^2 + v^2 + w^2 for use in the keenin / keendb subroutines but you have changed it.

Good luck!

James

Re: Imposed velocity profile

Posted: Thu Oct 11, 2012 9:41 am
by stage75
Thank you verry much James,

I will read carefully the link you gave me and at the same time I run a simulation (on a larger time scale) with the parameters that you suggested to me, in goal to see if the result is consistent..