CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   dynamicKEqn LES model max iter 1000 (https://www.cfd-online.com/Forums/openfoam-solving/216463-dynamickeqn-les-model-max-iter-1000-a.html)

kk415 April 9, 2019 02:27

dynamicKEqn LES model max iter 1000
 
Hello Foamers


I have one more doubt now, I am solving for an atomization problem for simplex swirl flow. The solution is running well for coarse mesh but with same parameters and boundary condition when I am trying to solve it in a fine the turbulence kinetic energy diverges. what is the reason for it and the solution?


The parameters I am using are


simulationType LES;

LES
{
LESModel dynamicKEqn;

turbulence on;

printCoeffs on;

delta cubeRootVol;

dynamicKEqnCoeffs
{
filter simple;
}

cubeRootVolCoeffs
{
deltaCoeff 1;
}

PrandtlCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

maxDeltaRatio 1.1;
}

Cdelta 0.158;
}

vanDriestCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

maxDeltaRatio 1.1;
}

Aplus 26;
Cdelta 0.158;
}

smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

maxDeltaRatio 1.1;
}




The boundary condition are


dimensions [0 2 -2 0 0];

internalField uniform 10;

boundaryField
{
INLET
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value uniform 0.05;
}

OPEN
{
type zeroGradient;
}

TOP_WALL
{
type kqRWallFunction;
value uniform 10;
}
}

cryabroad April 10, 2019 04:26

Try settings as described by the OF tutorial case https://github.com/OpenFOAM/OpenFOAM.../les/pitzDaily

I don't think you need wall functions for fine mesh, nor the turbulentIntensityKineticEnergyInlet type inlet B.C.

kk415 April 10, 2019 07:30

Thanks Ruiyan,


I tried trying with different LES model and it is working fine for kEqn Model but not in dynamicKEqn.

cryabroad April 10, 2019 08:25

Did you try kEqn with wall functions activated or not? What about the inlet B.C. for k?

I have used Smagorinsky and WALE but not kEqn or dynamicKEqn, so I'm just wondering, thanks.

kk415 May 11, 2019 07:57

Hi Ruiyan

Sorry for late reply. In my case I have three types of boundary INLET, WALL and OUTLET. I have given turbulent intensity as 5% in INLET, zero Gradient for wall and kQrwallfunction at WALL.

Earlier my k equation was diverging in fine mesh because I haven't scaled my mesh. So now its working fine in coarse as well fine mesh.

Thanks

cryabroad May 15, 2019 23:31

Hi kk145,

Thank you for your input. As for the inlet boundary condition of k, you mentioned using a turbulent intensity of 5%, how did you do that? Using turbulentIntensityKineticEnergyInlet?

As far as I understand, if you are using kEqn as the LES model, k stands for subgrid-scale kinetic energy, not the total kinetic energy (which is the sum of resolved ones plus subgrid-scale ones). In this sense, if you specify the 5% intensity at the inlet using turbulentIntensityKineticEnergyInlet, it will be the total kinetic energy instead of the subgrid-scale one, which is much larger than what you should use as the input.

I'm asking this question because I'm not sure how to estimate the k value at the inlet when using kEqn LES, and it will be grateful if you can clarify it. Thanks!

Ruiyan

kk415 May 16, 2019 01:13

Hi Ruiyan

Yes I am using turbulentIntensityKineticEnergyInlet boundary condition for k, which is most commonly used for Inlet and given in tutorials. We define the intensity I and k is calculated as k=1.5(UI)^2

vivek05 May 16, 2019 02:19

Swirl Flow
 
Quote:

Originally Posted by kk415 (Post 730247)
Hello Foamers


I have one more doubt now, I am solving for an atomization problem for simplex swirl flow. The solution is running well for coarse mesh but with same parameters and boundary condition when I am trying to solve it in a fine the turbulence kinetic energy diverges. what is the reason for it and the solution?

Hi,
Could you explain me how do you simulating simplex swirl flow at the inlet .
I am also working on primary atomization problem. It would be useful if you share your ideas,

Thanks,
Vivek S

kk415 May 16, 2019 03:53

Hi vivek

I am following the work of Fuster et. al. "Simulation of primary atomization with an octree adaptive mesh refinement and VOF method". https://doi.org/10.1016/j.ijmultiphaseflow.2009.02.014
The detail on the inlet and other boundary condition can be found in there. Also you can have a look into this paper (https://doi.org/10.1016/j.ijmultiphaseflow.2018.10.008)

cryabroad May 16, 2019 04:09

Hi Krishna,

As far as I understand, these types of boundary conditions are only suitable in RANS. As you pointed out, k = 1.5(UI)^2, which suggests that k stands for the total kinetic energy. However, when using kEqn for LES, aren't we solving ksgs instead of k? Therefore, we should specify inlet condition for ksgs, not k.

I could be wrong though. Maybe OF is smart enough to detect that since you are using LES, the turbulent intensity applies to ksgs, but how?

syavash May 16, 2019 07:22

Quote:

Originally Posted by cryabroad (Post 733775)
Hi Krishna,

As far as I understand, these types of boundary conditions are only suitable in RANS. As you pointed out, k = 1.5(UI)^2, which suggests that k stands for the total kinetic energy. However, when using kEqn for LES, aren't we solving ksgs instead of k? Therefore, we should specify inlet condition for ksgs, not k.

I could be wrong though. Maybe OF is smart enough to detect that since you are using LES, the turbulent intensity applies to ksgs, but how?

That's why I rely on algebraic SGS models. They do not introduce such an uncertainty to the problem.

cryabroad May 16, 2019 21:25

Hi Ehsan,

Thank you for sharing your experience. As a matter of fact, I'm currently using Smagorinsky and WALE, but they both tend to produce too much dissipation. Of course I can always tune the model constant (Cs and Cw), but that's just not going to work if I do simulations on other types of flow.

The thing is, OpenFOAM doesn't come with the Germano's dynamic Smagorinsky model, which (based on my own survey) has become the go-to model in many publications. That's why I start to think about switching to kEqn. It doesn't assume local equilibrium between production and dissipation, and this may be a good thing especially when the mesh resolution is poor, and obviously it is supposed to give more accurate estimation of turbulent viscosity.

I haven't seen too many publications using the kEqn model. People working on heat transfer really love WALE. Smagorinsky (with constant Cs) seems to provide fairly good results but in my case (turbulent combustion) it always needs tuning for different cases. I'd love to have your comments on this issue. Thanks.

Ruiyan

syavash May 17, 2019 02:31

Quote:

Originally Posted by cryabroad (Post 733888)
Hi Ehsan,

Thank you for sharing your experience. As a matter of fact, I'm currently using Smagorinsky and WALE, but they both tend to produce too much dissipation. Of course I can always tune the model constant (Cs and Cw), but that's just not going to work if I do simulations on other types of flow.

The thing is, OpenFOAM doesn't come with the Germano's dynamic Smagorinsky model, which (based on my own survey) has become the go-to model in many publications. That's why I start to think about switching to kEqn. It doesn't assume local equilibrium between production and dissipation, and this may be a good thing especially when the mesh resolution is poor, and obviously it is supposed to give more accurate estimation of turbulent viscosity.

I haven't seen too many publications using the kEqn model. People working on heat transfer really love WALE. Smagorinsky (with constant Cs) seems to provide fairly good results but in my case (turbulent combustion) it always needs tuning for different cases. I'd love to have your comments on this issue. Thanks.

Ruiyan

Well, in my opinion the constant in non-dynamic models (WALE, Smagorinsky, etc) also introduce uncertainty to the problem. WALE is more accurate in my experience and unlike the classic Smagorinsky model does not require wall damping function. But still its constant is tunable and its value can be a matter of discussion!

I would recommend using the dynamic version of Smagorinsky (so-called Germano's version) model which was implemented by Alberto Passalacqua for OF 2. I have recently modified it for using in later versions of Foam (4.1). You can find my implementation of the model in my github repository:

https://github.com/syavash20/TurbLab...magorinsky_4.1

Kind Regards,
Syavash

cryabroad May 18, 2019 02:58

Thank you for providing the dynamic code! I'll take a look at it and definitely try it out!

I agree with your take on the non-dynamic models, it seems like people use different values of Cs in Smagorinsky all the time. As for Cw in WALE this situation feels to be a little better, because I've only seen people using either 0.50 or 0.325.

I have another question though. In terms of the dynamic Smagorinsky, would you say it needs better mesh resolution compared to non-dynamic Smagorinsky? I think the scale similarity assumption adopted in dynamic Smagorinsky might be more suitable when the mesh size is small.

Thanks,
Ruiyan

syavash May 19, 2019 03:43

Quote:

Originally Posted by cryabroad (Post 734033)
Thank you for providing the dynamic code! I'll take a look at it and definitely try it out!

I agree with your take on the non-dynamic models, it seems like people use different values of Cs in Smagorinsky all the time. As for Cw in WALE this situation feels to be a little better, because I've only seen people using either 0.50 or 0.325.

I have another question though. In terms of the dynamic Smagorinsky, would you say it needs better mesh resolution compared to non-dynamic Smagorinsky? I think the scale similarity assumption adopted in dynamic Smagorinsky might be more suitable when the mesh size is small.

Thanks,
Ruiyan

You're welcome! It would be great to have some comparison between dynamicSmagorinsky and other models. Mind to share the results?

I don't think that the dynamic version of Smagorinsky model would require a finer mesh compared with the non-dynamic one. In vicinity of the wall, a y+ equal to 1 is desired and further away the mesh size may be evaluated by calculating Taylor macro length scale (or Kolmogorov length scale with a more rigorous approach).

As for the mesh size for the dynamicSmagorinsky model compared with the dynamicKEqn, I haven't done a one-to-one comparison. As you pointed, dynamicSmagorinsky might need a finer mesh due to the assumption of local equilibrium between different scale sizes. However, I guess it should be evaluated in practice by comparing the two models side-by-side. It would be great if you share some comparisons in that regard.

Kind Regards,
Syavash

cryabroad May 20, 2019 02:37

If I got the time to do the comparison I definitely will, and share the results if something interesting comes out of it. I've actually read several papers on this for different flow configurations. But, the conclusions based on comparison between dynamic Smagorinsky and non-dynamic one with Cs = 0.1 (FLUENT's default value) seems to be different from that between dynamic Smagorinsky and non-dynamic one with Cs = 0.17 (from Pope's book, and OpenFOAM).

I'm actually more interested in cases where dynamic Smagorinky is compared to non-dynamic kEqn (there are tunable coefficients as well, but I've never seen people change them) on a same mesh. The cost of these two should be, based on my survey of this subject, more or less the same. It's LES though, so each case takes a long long time to run. I'll share some results when it's done.

Regards,
Ruiyan

Santiago May 20, 2019 03:07

Quote:

Originally Posted by cryabroad (Post 733775)
Hi Krishna,

As far as I understand, these types of boundary conditions are only suitable in RANS. As you pointed out, k = 1.5(UI)^2, which suggests that k stands for the total kinetic energy. However, when using kEqn for LES, aren't we solving ksgs instead of k? Therefore, we should specify inlet condition for ksgs, not k.

I could be wrong though. Maybe OF is smart enough to detect that since you are using LES, the turbulent intensity applies to ksgs, but how?

This is true. K on the inlet depends whether the inflow itself is turbulent. That is, if you put an uniform inflow there is no meaning of putting sgs k different from zero. On the other hand, assume you get your inflow from DNS, by filtering the velocities and the reynolds stresses and calculating the Leonard tensor, you get a good estimate of k sgs (the trace).


All times are GMT -4. The time now is 08:44.