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

TwoPhaseEulerFoam and Boundary conditions

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2012, 22:39
Default
  #81
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 14
matt.mech.eng is on a distinguished road
Well I have read through H.Rusche thesis and the k-epsilon model used in the thesis is Gosman's model. I read your earlier posts as well as the bubbleFoam wiki and I can see that Gosmans model is not used in bubbleFoam. My question is why are the source terms for k and epsilon, S_k and S_eps not included in bubbleFoam?

Also my understanding is that Gosman's model is used in twoPhaseeulerFoam?

Kind Regards

Matt
matt.mech.eng is offline   Reply With Quote

Old   April 21, 2012, 05:51
Default
  #82
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
They seem to implement a simpler form of the model than the one from Gosman (in Rusche's thesis they mention that Gosman's model might cause numerical problems).
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 22, 2012, 07:22
Default
  #83
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 14
matt.mech.eng is on a distinguished road
Thank you for the responses Alberto your help is always much appreciated.

I think it may be worth my while to have a look more closely at Gosman's model to hopefully determine what his source terms represent. I am currently looking into running the bubbleFoam/twoPhaseEulerFoam bubble column tutorial with turbulence and I cannot seem to get it working, just trying to broaden my understanding of the k-epsilon model. I think I have made the appropriate changes to fvSolutions and fvSchemes (added the variables to be solved and the new laplacian terms for the turbulence equations). However my solution blows up after very few timesteps.
I am at the moment trying to get the tutorial running with turbulence before I move on to my specific tank geometry (tank with parabolic profile)

Matt
matt.mech.eng is offline   Reply With Quote

Old   April 23, 2012, 11:30
Default
  #84
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Do you have parts of the system where alpha = 1? If so, the turbulence model implemented in twoPhaseEulerFoam/bubbleFoam is unstable in that limit, since beta -> 0.

You might want to consider, depending on your system, a mixture formulation, or to make some change to the implementation to manage the case beta -> 0 more robustly. If you need info on this, let me know.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 24, 2012, 04:58
Default
  #85
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 14
matt.mech.eng is on a distinguished road
Quote:
Originally Posted by alberto View Post
Hi,

twoPhaseEulerFoam implements the turbulence mixture model of Gosman (see H. Rusche thesis).The implementation is done completely in the code, where you can find also the implementation of the wall functions.

To implement a new model:

- Remove the current model equations, or add a switch to decide which turbulence model you want to use. Equations are in twoPhaseEulerFoam/turbulenceModel/kEpsilon.H. In the same directory you find the headers where wall functions are implemented.

- Assuming all turbulence models you want to try rely on the hypothesis of turbulence viscosity, you do not have to deeply change the structure of the solver. Simply change the parts where the turbulent and effective viscosities are computed.
For explicit closures, this is all what you need to do.

- For models involving transport equations, you should code them, following the example of the k-eps equations already in the code.

As a side note, to compile twoPhaseEulerFoam, you need to run ./Allwmake because there are additional classes to be compiled.

Best,
Alberto

Hi Alberto,

I noticed that you have already mentioned the method for making changes to the solver...

Are bubbleFoam and twoPhaseEuler the same in terms of turbulence models? Have these 2 solvers undergone much change since previous versions?

There are areas of my domain where alpha is equal to 1, so I will definately need to make some modifications here.

Kind Regards

Matt
matt.mech.eng is offline   Reply With Quote

Old   April 25, 2012, 02:47
Default
  #86
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by matt.mech.eng View Post
Hi Alberto,

I noticed that you have already mentioned the method for making changes to the solver...

Are bubbleFoam and twoPhaseEuler the same in terms of turbulence models? Have these 2 solvers undergone much change since previous versions?

There are areas of my domain where alpha is equal to 1, so I will definately need to make some modifications here.

Kind Regards

Matt
New developments in terms of multi-fluid models came with 2.x, but not in terms of turbulence modeling.

For the limit of beta -> 0, you can probably define a minimum value of alpha in some term of the equation (see what they do in compressibleTwoPhaseEulerFoam for the drag), or drop the cells where beta < small from the solution, and fix the value of the variable there (risky approach in terms of robustness).

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   May 4, 2012, 08:57
Default
  #87
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 14
matt.mech.eng is on a distinguished road
Hi Alberto,

I have finally attempted some modifications to the bubbleFoam solver to implement the mixture turbulence model. I have a question relating to the implementation of the first divergence term in the equations.. I am not sure what this term means?

Also I have not included the source terms yet as they are not implemented in bubblefoam as standard, but I would eventually like to implement these once I get it working without them.

Kind Regards

Matt
matt.mech.eng is offline   Reply With Quote

Old   May 4, 2012, 22:46
Default
  #88
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by matt.mech.eng View Post
Hi Alberto,

I have finally attempted some modifications to the bubbleFoam solver to implement the mixture turbulence model. I have a question relating to the implementation of the first divergence term in the equations.. I am not sure what this term means?
I am not sure about what equations you are considering. The "standard" mixture turbulent model is usually identical to the single-phase turbulence model, but considering the properties of the mixture. In other words:

rho -> rhoMix
U -> UMix
mu -> muMix (molecular viscosity)

and the resulting k and epsilon belong to the mixture. Please note that the same consideration applies to wall functions.

The divergence term div(rho_mix*U_mix*k_mix) is the convective term. In bubbleFoam U_mix is simply the face velocity of the mixture phi, and rho_mix is "rho = alpha*rhoa + beta*rhob", which should be available already.

Quote:
Also I have not included the source terms yet as they are not implemented in bubblefoam as standard, but I would eventually like to implement these once I get it working without them.
What reference are you using?

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   May 4, 2012, 23:33
Default
  #89
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 14
matt.mech.eng is on a distinguished road
sorry about that I didn't even mention.. I am using Rusche PhD thesis

the equations I am referring to are equations 3.66 and 3.67

I have circled the div terms which I am unsure about in the attached image.

Cheers

Matt
Attached Images
File Type: jpg RuscheMixturekeps.jpg (50.8 KB, 59 views)
matt.mech.eng is offline   Reply With Quote

Old   May 4, 2012, 23:47
Default
  #90
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Those terms are what is in the code already:

fvm::div(phib, k)

and

fvm::div(phib, epsilon).

The next divergence term has to be discretized as

-fvm::Sp(fvc::div(phib), k)

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.

Last edited by alberto; May 9, 2012 at 13:35. Reason: Corrected typo (Su -> Sp)
alberto is offline   Reply With Quote

Old   May 5, 2012, 01:43
Default
  #91
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 14
matt.mech.eng is on a distinguished road
I have added the extra term as you suggested and re-compiled but now I get the following error message:

--> FOAM FATAL ERROR:
incompatible dimensions for operation
[epsilon[0 2 -4 0 0 0 0] ] - [epsilon[0 0 -1 0 0 0 0] ]

From function checkMethod(const fvMatrix<Type>&, const fvMatrix<Type>&)
in file /opt/openfoam201/src/finiteVolume/lnInclude/fvMatrix.C at line 1278.
matt.mech.eng is offline   Reply With Quote

Old   May 5, 2012, 02:28
Default
  #92
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
First, let me correct one typo: I wrote "Su" instead of "Sp".

If you use

fvm::div(phib, epsilon) - fvm::Sp(fvc::div(phib), epsilon)

it should work out, since the units are:

[phi] = m/s
[epsilon] = m^2/s^3

so the first term is m^2/s^4 (accounting for the units introduced by the divergence). The second term gives

[div(phib)] = 1/s
[epsilon] = m^2/s^3

so again m^2/s^4 as before.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   May 5, 2012, 03:08
Default
  #93
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 14
matt.mech.eng is on a distinguished road
Thanks a lot Alberto,

I have compiled the solver again, so basically equations 3.66 and 3.67 (Rusche) are implemented as my turbulence model without the source terms.

The solver now runs on the bubbleColumn tute, after halving the time step, for the full 20 sec however after about 10 sec of the solution the flow takes on the shape in the image and does not change.. Should I be using a different scheme for the k-epsilon terms?

I'm not sure what is causing this.
The settings are the same as the bubbleColumn tute with the following changes:
-added the k-epsilon terms to the fvSchemes dict
-halved time step to 0.001s
-turned correctAlpha to yes

Kind Regards


Matt
Attached Images
File Type: jpg Screenshot-20.jpg (26.4 KB, 61 views)
matt.mech.eng is offline   Reply With Quote

Old   May 5, 2012, 03:10
Default
  #94
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Could you check the values of turbulent viscosity?
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   May 5, 2012, 03:28
Default
  #95
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 14
matt.mech.eng is on a distinguished road
turbulent viscosity was taken from Paraview..
Attached Images
File Type: jpg Screenshot-21.jpg (30.0 KB, 59 views)
matt.mech.eng is offline   Reply With Quote

Old   May 5, 2012, 14:08
Default
  #96
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
This seems quite normal.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   May 9, 2012, 04:06
Default
  #97
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 14
matt.mech.eng is on a distinguished road
Hi Alberto,

So I have made some modifications to the createRASTurbulence.H file, namely the alphaEps coefficient (I believe this is the Schmidt number in the dissipation equation).
It is set to 0.76923 originally in the solver however Rusche uses 1.3.

My problem is that once I change it to 1.3 and recompile the solver blows up.. I have tried running the solver on a case that I had already run without changing alphaEps and it did not solve.

I also have not been able to figure out why I am having problems I had posted earlier with the flow! I am guessing that I am missing something in the code. I only changed parts of the section of kEpsilon.H as follows:


// Dissipation equation
fvScalarMatrix epsEqn
(
fvm::ddt(epsilon)
+ fvm::div(phib, epsilon)
- fvm::Sp(fvc::div(phi), epsilon)
- fvm::laplacian
(
nuEffb/alphaEps, epsilon,
"laplacian(DepsilonEff,epsilon)"
)
==
C1*G*epsilon/k
- fvm::Sp(C2*epsilon/k, epsilon)
);

#include "wallDissipation.H"

epsEqn.relax();
epsEqn.solve();

epsilon.max(dimensionedScalar("zero", epsilon.dimensions(), 1.0e-15));


// Turbulent kinetic energy equation
fvScalarMatrix kEqn
(
fvm::ddt(k)
+ fvm::div(phib, k)
- fvm::Sp(fvc::div(phi), k)
- fvm::laplacian
(
nuEffb/alphak, k,
"laplacian(DkEff,k)"
)
==
G
- fvm::Sp(epsilon/k, k)
);


Does this look ok to you?

Kind Regards


Matt

Last edited by matt.mech.eng; May 9, 2012 at 11:18.
matt.mech.eng is offline   Reply With Quote

Old   May 9, 2012, 13:37
Default
  #98
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
There was a typo that I corrected in my previous post: fvm::Sp(fvc::div(phi), k) should be fvm::Sp(fvc::div(phib), k). Same for epsilon: you should use phib.

Also, you don't need to re-compile the code to change alphaEps. Just specify it in the appropriate dictionary in the constant/RASProperties dictionary.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   September 23, 2013, 06:31
Default
  #99
New Member
 
Join Date: Aug 2012
Location: Italy
Posts: 3
Rep Power: 13
Lapo is on a distinguished road
Send a message via MSN to Lapo Send a message via Skype™ to Lapo
Hi, just a little question: in the latest implementation of twoPhaseEulerFoam i see the term above discussed:

fvm::Sp(fvc::div(phib),k) and the same for eps equation.

My question is: does this term have any importance for incompressible simulations?

In the previous versions of the code it isn't implemented in the incompressible version.

Thanks,

Lapo
Lapo is offline   Reply With Quote

Old   February 6, 2018, 18:31
Default
  #100
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Quote:
Originally Posted by raagh77 View Post
Hi Alberto

Am back to this thread !

I just finished the 2D simulation of bubble column, becker case (with turbulence being on)

I would like to discuss the results here

.> The velocity variations at three positions after time averaging was quite compariable
.> K-epsilon model predicted higher turbulent viscosity (nutb)
.> Timeperiod of the lateral bubble movement around 70seconds which was far more greater than what specified in the paper (paper says 16 to 20seconds)

This increase in timeperiod is either because of high prediction of nutb by k-epsilon or due to the relaxation parameters used for twoPhaseEulerFoam solver (because I remember you saying with "realaxtion parameters its difficult to obtain time accruate predictions") ??

Regards
Raghavendra
Hi Raghavendra

I am useing twoPhaseEulerFoam to simulate the Becker's case as well. I am wondering if you fixed your increased bubble plume oscillation period issue?

Thanks
Jie
jiejie 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
Burgerbs equation non constant Boundary Conditions Initial Conditions arkangel OpenFOAM Running, Solving & CFD 1 October 2, 2008 14:48
Boundary conditions for turbulent boundary layer Thomas FLUENT 1 June 17, 2008 05:14
boundary conditions for boundary layer flow A. Al-zoubi CFX 0 November 3, 2007 07:11
TwoPhaseEulerFoam and InletOutlet boundary condition hemph OpenFOAM Running, Solving & CFD 10 January 29, 2007 09:47
Integral boundary conditions turbulent intensitylength boundary conditions olesen OpenFOAM Running, Solving & CFD 0 July 27, 2006 07:18


All times are GMT -4. The time now is 20:42.