stability of k-ε model in CS 2.0-rc1

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Jean-Baptiste Leydet

stability of k-ε model in CS 2.0-rc1

Post by Jean-Baptiste Leydet »

Dear support, dear users,
 
I’ve been using k-ε models in a commercial package (namely,
Fluent) for a few years and from my experience, fairly simple calculations
would converge smoothly and be fairly robust to user input (mesh quality,
initialization settings, etc.) I’m not saying this is always a good thing, as
we all know convergence do not mean accurate predictions.
 
Still… From my short experience in CS, the k-ε formulation
seems a little moody in terms of stability.
 
What would you guys say are the most important things to pay
attention to during the setup of a k-ε calculation in CS, with emphasis
on the main difference between typical Fluent and CS setups?
 
The case we're currently working on is a strongly 3D flow in a
ventilation channel, with sharp edges (lots of expected recirculation zones). It’s
a steady state, with no heat transfer, and constant fluid properties.
 
We tried to play with solver settings, initialization
parameters, transient vs steady state, mesh quality, and so one with no success
so far (either divergence or non physical oscillations).
 
Anyone?
 
Thanks a bunch!

Jean-Baptiste
Yvan Fournier

Re: stability of k-ε model in CS 2.0-rc1

Post by Yvan Fournier »

Hello,

I am not familiar with FLUENT, but several things may help with Code_Saturne.

First, are the k-epsilon calculations the first you ran on this mesh, or did you also try laminar or k-omega calculations for example (possibly at a lower velocity) ? We usually move directly to k-epsilon, but the issues could come from sensitivity to your mesh and time step and not directly from turbulence.

As you have no heat transfer, k-omega may also be usable. As you seem to have tried different meshes, mesh quality may not be the issue, but if it were, setting a "relaxation of pressure increase" slightly lower than 1 in the numerical model parameters could help in case of convergence issues. Avoiding too high CFL numbers (check for "courant max" in the "listing" calculation log) may also be important. 1 to 5 is safe, up to 20 may be OK.

Remaining with k-epsilon, 2 parameters have been observed to be important in several cases:
-activating "extrapolation of pressure gradient on domain boundary" (in the GUI's numerical parameters/global parameters) may lead to slight non-physical oscillations in at least one example, though the average is OK.
- in the GUI's numerical parameters/equation parameters/scheme, deactivating flux reconstruction for k and epsilon (EnerTurb and Dissip) is often recommended.

Hoping this helps and I have not forgotten anything important...

Best regards,

  Yvan
Alexandre Douce

Re: stability of k-ε model in CS 2.0-rc1

Post by Alexandre Douce »

Hi,

an important point for the stability is the choice of an adapted gradient calculation mode , depending of the mesh quality.

In the GUI "Numerical parameters > Global parameters > Gradient calculation method", use "Iterative Handling of non-orthogonalities" if you have an hexahedral grid without strong distortion. If you have a full tetrahedral mesh, you should prefer "Least squares method over extended cell neighborhood", and if you have a poor quality mesh choose "Least squares method over partial extended cell neighborhood".

Tell us Jean-Baptiste if these points help you to improve your computations.
Jean-Baptiste Leydet

Re: stability of k-ε model in CS 2.0-rc1

Post by Jean-Baptiste Leydet »

Hi guys,

Thanks a lot for the input, and sorry for the late reply. The simulation is
now running smoothly: see details below, and feel free to comment!

@Yvan: I think the mesh quality was OK, but maybe the resulting y+ was a bit
outside the ideal 30-100 range for the k-epsilon model. We tried a few different
settings before reading your input. Among them, switching to SST k-omega, 1st order
upwind vs. SOLU, transient vs. steady state... and each time the run would
either diverge or exhibit very non-physical variation (sometimes up to +/- 30%
variation in pressure drop within a few iterations). We haven't tried at lower
speeds, though...

The current set-up we're using is the following:
* System: steady state BC's, 3d wall-bounded flow; See attached file for a brief
description.
* Mesh:  fully tetrahedral, decent quality.
* Turbulence model: k-ε, scalable wall functions
* Time stepping: variable in time and space
* Gradient calculation method: Least squares method over partial
extended cell neighborhood (we missed Alexandre's post when we set up the
calculation)
* Relaxation of pressure increase: 0.9
* Schemes:
1. First, Upwind for all, ticking the 'flux reconstruction' option, except
for k and epsilon. 1st order ran until convergence.
2. Then, switch to SOLU for all, using default settings. 2nd order ran until
convergence
 
Comments?

We have some experimental data for several channel configurations... It will
be interesting to see how close we get!

Please let me know if we can provide you with / try anything that could help
us improve the accuracy of our predictions.
 
Thanks again.

/Jean-Baptiste
 
ps: sorry for the post layout, but I'm not sure how to get rid of the ugly formatting code...
Attachments
100423_model.jpg
David Monfort

Re: stability of k-ε model in CS 2.0-rc1

Post by David Monfort »

Nice to see your calculations converging!

I don't have much to suggest (yet) to improve your set up. Perhaps scalable wall functions would be useless if you are in the range 30-?? for y+, and anyway, it would be strongly discouraged for thermal flows (due to the approximation on the heat exchange coefficient).

Nonetheless, just a side note concerning the k-omega SST. If you are using the 2.0-rc1 version (or beta 2), we did a last minute changed in the relaxation factor on the turbulent variables (k and omega) to improve our unsteady simulations. It seems that it can cause the divergence of other (steady) simulations. So, you might try to change the relaxv variable from 1. (no relaxation) to 0.7 (the previous value) in usini1 (usipsu subroutine).

iphas = 1
relaxv(ik(iphas)) = 0.7d0
relaxv(iomg(iphas)) = 0.7d0

David

ps : I also tried to remove the spurious text at the beginning of your posts... without any success :-( let's forget about that :)
Post Reply