- **OpenFOAM Running, Solving & CFD**
(*http://www.cfd-online.com/Forums/openfoam-solving/*)

- - **Strong coupling in k-epsilon equation**
(*http://www.cfd-online.com/Forums/openfoam-solving/65650-strong-coupling-k-epsilon-equation.html*)

Strong coupling in k-epsilon equationHello 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 |

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 |

Quote:
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, |

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 |

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 |

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 |

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 http://www.cfd-online.com/Forums/ope...trix-of15.html -Nat |

All times are GMT -4. The time now is 04:38. |