CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

production due to buoyancy in turbulence models in openfoam

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By Attavino
  • 1 Post By agustinvo
  • 1 Post By nitinkumar@cfd
  • 1 Post By agustinvo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2017, 06:49
Default production due to buoyancy in turbulence models in openfoam
  #1
Senior Member
 
CFD_Lovers
Join Date: Mar 2015
Posts: 168
Rep Power: 11
sinatahmooresi is on a distinguished road
Hi Foamers !
I was checking the source code of RAS models in OP3.0.1 and I found that there is no term for production due to buoyancy effect in none of RAS models! the only production term is G or p (that is the production due to stress and not buoyancy) so I checked k-e , LRR and SSG model and I couldn't find the buoyancy term. I just found buoyantKEpsilon in compressible RAS models that included the buoyancy effect due to density changes. so is that (the buoyantKEpsilon) the only buoyant turbulence model in OP3.0.1 ?
or I am missing something about this ? I thought maybe the correction could be in somewhere in buoyant solvers. but as I found, in the solver just modification are done by correction of momentum eqns. so what is going on ? advises are appreciated
Regards sina

Last edited by sinatahmooresi; February 4, 2017 at 10:32.
sinatahmooresi is offline   Reply With Quote

Old   May 31, 2017, 09:05
Default
  #2
New Member
 
Andrea
Join Date: Apr 2016
Posts: 4
Rep Power: 10
Attavino is on a distinguished road
Hi Sina,

sorry for the late answer, at the moment the buoyantKEpsilon is the only turbulence model that includes production due to buoyancy force, however for both incompressible and compressible models it is not difficult to include the source therm, just follow how the buoyantKEpsilon model is implemented. However if you wish to use the kOmega you will also need to modify the basic kOmega model since the source functions are not included in there.

Best Regards,

Andrea
rrsantos likes this.
Attavino is offline   Reply With Quote

Old   January 20, 2018, 14:41
Default
  #3
New Member
 
Raphael Santos
Join Date: Nov 2016
Posts: 4
Rep Power: 9
rrsantos is on a distinguished road
Did you solve this?

Now I am working on OpenFOAM 4.1, and I have the same problem. I want to implement buoyant terms to solve incompressible solver.

I implement a new model using Kassem's guide, based on buoyant K-epsilon. But, the code bellow, to use g is not recognised by the incompressible library.

Quote:
buoyantKEpsilon<BasicTurbulenceModel>::Gcoef() const { const uniformDimensionedVectorField& g = this->mesh_.objectRegistry::template lookupObject<uniformDimensionedVectorField>("g");
return (Cg_*this->Cmu_)*this->alpha_*this->k_*(g & fvc::grad(this->rho_)) /(this->epsilon_ + this->epsilonMin_); }
My doubt is, how to use g to calculate the buoyant terms using incompressible library?
rrsantos is offline   Reply With Quote

Old   January 22, 2018, 06:16
Default
  #4
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
Hello

the problem is in rho. In incompressible solvers that variable does not exist, and when you try to use this code for the buoyant term it gives an error. Please check how to define there your density and replace it in this code.
rrsantos likes this.
agustinvo is offline   Reply With Quote

Old   January 24, 2018, 18:50
Default
  #5
New Member
 
Raphael Santos
Join Date: Nov 2016
Posts: 4
Rep Power: 9
rrsantos is on a distinguished road
Thank you Agustin, it helped.

I think I found a solution. As I said before, I used buoyantKEpsilon code to use to incompressible solver twoLiquidMixingFoam. The problem is when "this->rho_" is used in the equation.


Using the same command to bring "g", I brought the volScalarField rho

Quote:
const volScalarField& rhoRA =
this->mesh_.objectRegistry::template
lookupObject<volScalarField>("rho");
And I used it in the equation.

Quote:
(Cg_*this->Cmu_)*this->alpha_*this->k_*(g & fvc::grad(rhoRA))/(rhoRA*(this->epsilon_ + this->epsilonMin_));
As the equation is incompressible, it should be diveded by the density. So, I modified the equation

Quote:
...*(g & fvc::grad(rho_))*(this->epsilon_ + this->epsilonMin_)
to

Quote:
...*(g & fvc::grad(rhoRA))/(rhoRA*(this->epsilon_ + this->epsilonMin_))

Last edited by rrsantos; January 25, 2018 at 10:20. Reason: possible solution
rrsantos is offline   Reply With Quote

Old   August 6, 2020, 05:30
Default buoyancy production code
  #6
New Member
 
NITIN KUMAR
Join Date: Apr 2018
Posts: 3
Rep Power: 8
nitinkumar@cfd is on a distinguished road
Hi rrsantos
I am working on incompressible buoyancy-driven flow using OpenFOAM-6. Since the openfoam do not have the code for the contribution of production due to the buoyancy(for incompressible flow). Can you provide your code for the incompressible flow that will help me to write my code for buoyancy production terms. That will be a great help.



Thanks
N Kumar
Raphael_Santos likes this.
nitinkumar@cfd is offline   Reply With Quote

Old   August 6, 2020, 08:04
Default
  #7
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
Hi,


which solver are you using? Normally, in the incompressible framework the Boussinesq approximation is implemented, so the production term should be something like:
Code:
Pb = -beta * nut/Prt * (g & gradT)
being nut the one from the turbulence model, and gradT the gradient of temperature. If you use other approaches you should check how to implement such buoyancy term
Raphael_Santos likes this.
agustinvo is offline   Reply With Quote

Old   August 11, 2020, 09:30
Default
  #8
New Member
 
Raphael Santos
Join Date: Oct 2013
Posts: 20
Rep Power: 12
Raphael_Santos is on a distinguished road
Hello there, I do not have access to my files, now, so

Nittin,
I did what I mentioned above (rrsantos here). Have a look at 'buoyantKEpsilon' turbulent model and try to understand how source term is defined there.

Agustinvo,
in my case, the buoyancy effect was based on the difference of density due to different species concentration. So, I used the definition based on reduced gravity (g' = g.delta(rho)/rho). My flow was isothermal.

Regards,
Raphael
Raphael_Santos is offline   Reply With Quote

Old   August 12, 2020, 06:01
Default buoyancy production turbulence model code
  #9
New Member
 
NITIN KUMAR
Join Date: Apr 2018
Posts: 3
Rep Power: 8
nitinkumar@cfd is on a distinguished road
Hi agustinvo
I am using buoyantbuosinesqPimpleFOAM. Yes you are correct the expression will be similar but should i change the code in the buoyant Kepsilon its self or in k Epsilon model.
nitinkumar@cfd is offline   Reply With Quote

Old   October 19, 2021, 05:30
Default
  #10
New Member
 
Elol
Join Date: Feb 2020
Posts: 16
Rep Power: 6
Elol is on a distinguished road
Hi Raphael,

It really helped alot this finding for incombressible fluids. But I have couple of questions.

1- why did you declared new variable rhoRA despite of it is already there "this->rho_" ?

2- When I applied your way I found out that i don't have dimensinon consistency, how did you manage to solve that ?

Code:
--> FOAM FATAL ERROR: 
incompatible dimensions for operation 
    [epsilon[1 -1 -4 0 0 0 0] ] + [epsilon[0 2 -4 0 0 0 0] ]
Elol is offline   Reply With Quote

Old   October 19, 2021, 08:05
Default
  #11
New Member
 
Raphael Santos
Join Date: Oct 2013
Posts: 20
Rep Power: 12
Raphael_Santos is on a distinguished road
Hello, Elol.

1. With rhoRA, I wanted to have a new variable with a different name of "rho", because I was a little bit afraid to get lost with the code. But, yes, you already have rho, there is no problem to use it.

2. As I used for incompressible fluid, ie, a incompressible solver, to make dimensional consistent, it is needed to divide the new expression by the density, as fvc::grad(rhoRA))/(rhoRA) [grad(rho)/rho]. So, check if the solver you are using is to compressible or incompressible cases.
Look, the left one dimension [epsilon[1 -1 -4 0 0 0 0] ] means [kg/(m.s^4)], and the right one [epsilon[0 2 -4 0 0 0 0] ] means [m^2/s^4], the difference lies in the product or division by the density. If your solver is compressible, you need to remove the division by the density.

I hope that helps you.

Cheers
Raphael_Santos is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Thermophysical Properties wsmith02 OpenFOAM 4 June 1, 2023 14:30
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
Multiphase Turbulence Models im_lenny OpenFOAM Running, Solving & CFD 8 January 31, 2019 10:37
[Contribution] Implementation of three turbulence models in openFoam Ardali OpenFOAM Programming & Development 0 August 25, 2015 03:23
Y plus requirements of turbulence models buidu FLUENT 4 August 11, 2015 18:56


All times are GMT -4. The time now is 21:01.