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

Introducing a scalar field for buoyancy production in k-epsilon

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2018, 13:26
Default
  #21
Senior Member
 
CFD_Lovers
Join Date: Mar 2015
Posts: 168
Rep Power: 11
sinatahmooresi is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
Maybe
forAll (U , Celli)

U[Celli].component(0)
Greeting!
During running a test case with my modified solver (pimpleFoam) and modified LRR turbulence model, I get an error :symbol lookup error:Undefined symbol .....
and it is referring to dimensioned Vector
I just defined g (9.81) as a dimensionedVedtor in LRR.C and it compiled with no error. But it seems the solver is unfamiliar with that!
I should say that the solver is working without problem with other cases.
Exactly before calculation the R (Reynolds stress tensor) during the run, it jumps out. Inside the LRR.C I exactly before Reynolds stress eqns added that g (9.81) definition to use it as a vector in calculation of buoyancy term (Gb) to add that in to the Reynolds strees eqns.
Regards
Sina
sinatahmooresi is offline   Reply With Quote

Old   October 31, 2018, 16:01
Default
  #22
Senior Member
 
CFD_Lovers
Join Date: Mar 2015
Posts: 168
Rep Power: 11
sinatahmooresi is on a distinguished road
Quote:
Originally Posted by sinatahmooresi View Post
Greeting!
During running a test case with my modified solver (pimpleFoam) and modified LRR turbulence model, I get an error :symbol lookup error:Undefined symbol .....
and it is referring to dimensioned Vector
I just defined g (9.81) as a dimensionedVedtor in LRR.C and it compiled with no error. But it seems the solver is unfamiliar with that!
I should say that the solver is working without problem with other cases.
Exactly before calculation the R (Reynolds stress tensor) during the run, it jumps out. Inside the LRR.C I exactly before Reynolds stress eqns added that g (9.81) definition to use it as a vector in calculation of buoyancy term (Gb) to add that in to the Reynolds strees eqns.
Regards
Sina

The problem changed to another thing:
no longer previous error! But I can't switch the wallReflection off now! The new modified LRR model is working properly, but it can't distinguish that the wallReflection is switched off! Is it coming from compilation procedure?
sinatahmooresi is offline   Reply With Quote

Old   April 19, 2019, 08:36
Default
  #23
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8
calf.Z is on a distinguished road
Quote:
Originally Posted by clapointe View Post
There already is a buoyant kEpsilon model : https://github.com/OpenFOAM/OpenFOAM...yantKEpsilon.H. If, after checking out its implementation, it is not what you want it should be a good starting point for implementing your own variation.

Caelan
I am now using Gcoef in buoyantKE. I am wondering the meaning of this->alpha_ in Gcoef and g should include the direction or not?
In epsilonsource/ksource:

return -fvm::Susp(...)

If it return -.... in code, G should be -G*... But in equation, it should be +G*...

I am confused about it. Thank you.
calf.Z is offline   Reply With Quote

Old   May 19, 2019, 18:11
Default
  #24
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22
jherb is on a distinguished road
alpha is the phase fraction. So this is used for two phase flows.


g is a vector and it has a direction: https://github.com/OpenFOAM/OpenFOAM...Epsilon.C#L104
And it is used in scalar products.


SuSp does add a source implizitly to an solver equation if it is positive, because this increases the stability of the solution. This means it is added to the diagonal of the matrix to be solved. If it is negative, it will be added explicitly, so to the "right" side of the equation.


So it makes a difference, if you put something like -fvm::SuSp(-G, k) or +fvm::SuSp(G, k) to an equation, because it checks the sign of the first argument.
jherb is offline   Reply With Quote

Old   May 19, 2019, 18:26
Default
  #25
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
In this case isn't alpha thermal diffusivity? See eg : https://github.com/OpenFOAM/OpenFOAM...lDiffusivity.H.

Caelan
clapointe is offline   Reply With Quote

Old   May 19, 2019, 19:48
Default
  #26
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22
jherb is on a distinguished road
If you look for tutorial, where buoyantKEpsilon is used, you find them in:
tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D (dahl, tank3D)
These are multiphase cases, where alpha is used.


But to make sure, this is correct, I patched the buoyantKEpsilon/buoyantKEpsilon.C to output alpha dimension:
Code:
alpha: [0 0 0 0 0 0 0]

compare this to the dimensions of the thermal diffusivity:
Code:
 
//- Thermal diffusivity for enthalpy of mixture for patch [kg/m/s]

https://github.com/OpenFOAM/OpenFOAM...usivity.H#L116

Last edited by jherb; May 20, 2019 at 07:37.
jherb is offline   Reply With Quote

Old   May 19, 2019, 21:35
Default
  #27
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
Good to know -- thanks for checking.

Caelan
clapointe is offline   Reply With Quote

Old   May 20, 2019, 09:45
Default
  #28
Senior Member
 
shinji nakagawa
Join Date: Mar 2009
Location: Japan
Posts: 113
Blog Entries: 1
Rep Power: 18
snak is on a distinguished road
Hi,

I don't think that the alpha in compressibleTurbulenceModels is the phase fraction.

alpha will be the phase fraction for the phaseCompressibleTurbulenceModels.
https://github.com/OpenFOAM/OpenFOAM...ulenceModels.C

However, for incompressible or compressible TurbulenceModels, alpha will be just a geometricOneField.
https://github.com/OpenFOAM/OpenFOAM...moModels.C#L30
https://github.com/OpenFOAM/OpenFOAM...tricOneField.H

Last edited by snak; May 21, 2019 at 09:08.
snak is offline   Reply With Quote

Old   May 21, 2019, 09:12
Default
  #29
Senior Member
 
shinji nakagawa
Join Date: Mar 2009
Location: Japan
Posts: 113
Blog Entries: 1
Rep Power: 18
snak is on a distinguished road
In incompressibleTurbulenceModels, rhoField is also just a geometricOneField (uniform value of 1, without dimension).
When we use these models in multiphase-solver such as interFoam, density of fluid is not considered in the turbulenceModel. rho is 1 at everywhere.

Sofisticated and elegant source-code of turbulence models makes the meanings of alpha and rho in turbulence models a little unclear, I think.
We can get the both compressible and incompressible models from the same code in return for this.
snak 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
Temperature calculation from total enthalpy in OpenFOAM (XiFOAM) sharifi OpenFOAM Running, Solving & CFD 1 October 8, 2020 10:16
Type mismatch: Assigning a scalar to a Field<Type> inside templated BC code karlli OpenFOAM Programming & Development 2 August 28, 2017 02:25
OpenFOAM floating point Error upuli OpenFOAM Programming & Development 5 June 20, 2016 04:19
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 1 November 25, 2008 21:21


All times are GMT -4. The time now is 19:05.