- **OpenFOAM Bugs**
(*https://www.cfd-online.com/Forums/openfoam-bugs/*)

- - **DyOneEqEddy negative nuSgs**
(*https://www.cfd-online.com/Forums/openfoam-bugs/62298-dyoneeqeddy-negative-nusgs.html*)

dyOneEqEddy (and perhaps otherdyOneEqEddy (and perhaps other dynamic models) depends upon a localized ck i.e.
nuSgs = ck(D) * sqrt(k) * delta I've found that ck(D) can become negative leading to negative nuSgs. How about bounding nuSgs e.g. in dyOneEqEddy.C after the k solve with somebody like bound(nuSgs_, dimensionedScalar("zero", nuSgs_.dimensions(), 0.0)); Or upstream in the actual calculation of ck. Of course, perhaps we're simply trying to reverse the cascade. http://www.cfd-online.com/OpenFOAM_D...part/happy.gif Michael |

Hi Michael,
Does the dyOneEHi Michael,
Does the dyOneEqEddy model calculate one single global constant, ck, or is it a localized costant. If it is local then in the presence of backsactter ck can be negative ( and nuSgs also negative). One the other hand if the constant is a global one, then the backscatter << forward scatter and the chance of the constant going negative is small. thanks kumar |

Hi Kumar,
dyOneEqEddy uses Hi Kumar,
dyOneEqEddy uses a localized ck. Hmmm backscatter. Good point though I'm seeing far too much of it. I wonder if the ck needs some form of limiting or stabilization. Thanks, I'll investigate further. Thanks Michael |

Hi Michael,
I was lookingHi Michael,
I was looking at the code for calculating ck in dynOneEqEddy.C (i have also pasted it belowhttp://www.cfd-online.com/OpenFOAM_D...part/happy.gif ///////////////////////////////// Begin Code/////////////////////////////////////////////////////////// dimensionedScalar dynOneEqEddy::ck(const volSymmTensorField& D) const { volScalarField KK = 0.5*(filter_(magSqr(U())) - magSqr(filter_(U()))); volSymmTensorField LL = dev(filter_(sqr(U())) - sqr(filter_(U()))); volSymmTensorField MM = delta()*(filter_(sqrt(k_)*D) - 2*sqrt(KK + filter_(k_))*filter_(D)); dimensionedScalar MMMM = average(magSqr(MM)); if (MMMM.value() > VSMALL) { return average(LL && MM)/MMMM; } else { return 0.0; } } //////////////////////////////// End Code /////////////////////////////////////////////////////////////// ck is average(LL && MM)/MMMM and MMMM = average(magSqr(MM)); // Is this not a single number for the whole domain ? average(LL && MM) // This also appears to be a single number for the whole domain ? Thus ck is just one number for the whole domain. or am i wrong here ?? Any ideas as to how locDynOneEqEddy is different from dynOneEqEddy. I thought the dynOneEqn gives a globalized ck and locDynOneEqEddy gives a local ck. any comments ? Thanks again. kumar |

Hi Michael,
Personally I amHi Michael,
Personally I am not convinced by the argument that negative nuSgs represents back-scatter; it violates the entropy inequality. This is a big problem with localized dynamic models and the reason why I don't use them. Putting a clip in to stop nuSgs becoming negative is one "solution" but it's not very physical. H |

Hi Henry,
What is the diffeHi Henry,
What is the difference between the locDynOneEqEddy and dynOneEqEddy ? Thanks a lot Best regards Kumar |

locDynOneEqEddy uses locally elocDynOneEqEddy uses locally evaluated coefficients.
dynOneEqEddy uses globally averaged coefficients and is hence only formally applicable to homogeneous turbulence e.g. in a box with cyclic boundaries. H |

Hi Henry
Thanks a lot for yHi Henry
Thanks a lot for your reply. Best Regards Kumar |

negative nuSGSQuote:
do you know why we have these negative nuSGS in dynamic models? Thanks. |

All times are GMT -4. The time now is 23:48. |