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

Strong coupling in k-epsilon equation

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 22, 2009, 11:02
Default Strong coupling in k-epsilon equation
  #1
New Member
 
Nat Trask
Join Date: Mar 2009
Location: Providence, RI
Posts: 18
Rep Power: 8
natrask is on a distinguished road
Hello all,

I am implementing a turbulence model with very strong coupling between the k and epsilon equation. I am currently forced to iteratively solve both equations several times with relaxation to obtain convergence.

i.e.

while ( initial residuals < TOL){
update k and epsilon matrices with latest k and epsilon
solve k
solve epsilon
k = k_lastiteration + relax*(k_thisiteration - k_lastiteration)
epsilon = epsilon_lastiteration + relax*(epsilon_thisiteration - epsilon_lastiteration)
}
k=k_lastiteration
epsilon=epsilon_lastiteration

This approach does work, but is fairly expensive and requires tuning of the relaxation constant and tolerance to get convergence. A coupled matrix solver would be a preferable way to tackle the problem. I've seen posts that such a solver is being implemented... any updates on the progress? Or has anyone come up with a better approach for this type of problem?

Thanks,
Nat
natrask is offline   Reply With Quote

Old   February 22, 2010, 14:21
Default
  #2
Member
 
Markus Weinmann
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 77
Rep Power: 8
cfdmarkus is on a distinguished road
Hi Nat,

I was wondering if you have found a more elegant solution to your problem?

I am aking because I am facing almost exactly the same problem.

Regards
Markus
cfdmarkus is offline   Reply With Quote

Old   February 23, 2010, 03:46
Default
  #3
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by cfdmarkus View Post
Hi Nat,

I was wondering if you have found a more elegant solution to your problem?

I am aking because I am facing almost exactly the same problem.

Regards
Markus
Without knowing the exact form of the equations it is impossible to give a hint, if not very generic

Anyway, I would love to have a coupled solver too and I know Hrvoje and his co-workers are working on that (actually I saw some very interesting result ).

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods

Last edited by alberto; February 23, 2010 at 03:47. Reason: typo
alberto is offline   Reply With Quote

Old   February 23, 2010, 07:25
Default
  #4
Member
 
Markus Weinmann
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 77
Rep Power: 8
cfdmarkus is on a distinguished road
I am using a RAS model which is based on the elliptic relaxation concept, i.e. in addition to a two-equation model, I am solving another velocity scale equation and an elliptic equation. The coupling of these equations and the use of a non-linear stress-strain relationship makes it very difficult to get it converged (particularly the pressure equation has problems).

I have just downloaded OF-1.5-dev and it seems that there are coupled matrix solvers. However, the question is how they can be used for my problem, if at all.

I will investigate further!

Markus
cfdmarkus is offline   Reply With Quote

Old   February 23, 2010, 13:48
Default
  #5
New Member
 
Nat Trask
Join Date: Mar 2009
Location: Providence, RI
Posts: 18
Rep Power: 8
natrask is on a distinguished road
Hi Markus,

I've been waiting for the block solvers to come out too. One thing that I've been playing with in the mean-time is doing a Gauss-Seidel inversion of the k-epsilon matrix (I think that this should be applicable if you're using a 3-equation model as well), although there are no guarantees that this will converge in general (it hasn't worked very well for me, since I'm looking at high-density ratio compressible flow with very intense turbulent mixing that gives me bad condition numbers, but maybe those working on incompressible cases or lower Reynolds numbers will have more luck with it).

For the 2-equation case, if you think of the coupled equations as a block matrix:

k_k k_eps
eps_k eps_k

i.e. k_k is the block of coefficients in the coupled k-equation dependent upon k, k_eps the block of coefficients in the k-equation dependent upon epsilon, etc.

You can pull the diagonal of the top-left block and bottom-right block by calling kEqn.A() and epsEqn.A(). You can get the off diagonal contribution of both blocks through kEqn.H() and epsEqn.H().

In the segregated framework that we're forced to work in right now, the contribution of epsilon to the k equation and vice versa has to be treated as an explicit source (accessible via kEqn.source(), etc.) that get lumped in with the other source terms

Pulling all those together in a Gauss-Seidel block inversion will get you something that looks like this

while (residuals < TOL){
k = (1.0/kEqn.A()) * (kEqn.source() - kEqn.H());
epsilon = (1.0/epsEqn.A()) * (epsEqn.source() - epsEqn.H());
}

This will accomplish the exact same thing as solving the fully coupled block matrix system. I can't attest to what sort of speedup this could give you over simply iterating over k and epsilon, but it should be substantially faster (here we're doing a diagonal inversion for each iteration as opposed to a full CG or multigrid solve).

If you (or anyone else) has any luck with this please let me know. I've been meaning to test this out but I've been pressed for time.

-Nat
natrask is offline   Reply With Quote

Old   February 24, 2010, 06:38
Default
  #6
Member
 
Markus Weinmann
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 77
Rep Power: 8
cfdmarkus is on a distinguished road
Hi Nat,

thanks for the detailed explanations. I will give your suggestions a try.
By any chance, do yo know whether the coupled matrix solvers in 1.5-dev could be used to solve the K-epsilon equations in a coupled fashion?

Regards
Markus
cfdmarkus is offline   Reply With Quote

Old   February 24, 2010, 16:24
Default
  #7
New Member
 
Nat Trask
Join Date: Mar 2009
Location: Providence, RI
Posts: 18
Rep Power: 8
natrask is on a distinguished road
My understanding is that the coupledMatrix class (is that what you're referring to?) is only for mesh/mesh coupling... the class solves a block diagonal system of equations for one variable. i.e. if you have two meshes in your solver sharing an internal boundary you can use coupledMatrix to solve them simultaneously, but the solver still uses a segregated approach (no k-epsilon coupling allowed). You can see it being used in the conjugateHeatFoam solver where they use it to couple the temperature in a solid domain to a temperature in a liquid domain.

It was discussed a little bit here CoupledFvScalarMatrix in OF15

-Nat
natrask is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 13 November 4, 2013 15:13
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 1 November 25, 2008 21:21
coupling KE equation with navier stokes equation prashant FLUENT 0 March 7, 2008 08:05
derivation of epsilon equation of k-epsilon model Ricardo Rezende Main CFD Forum 5 May 1, 2007 05:38


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