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/)
-   -   LES Compressible Smagorinsky Model (https://www.cfd-online.com/Forums/openfoam-solving/58781-les-compressible-smagorinsky-model.html)

iyer_arvind September 26, 2006 06:30

The les Smagorinsky Model inco
 
The les Smagorinsky Model incorporated in OpenFOAM, for compressible flows, add some more terms, which i have not been able to understand, can anyone give me a link to what method has been followed for compressible LES Smagorinsky Model?

iyer_arvind October 9, 2006 00:43

The Smagorinsky model coded is
 
The Smagorinsky model coded is as follows

volTensorField D = symm(gradU);
volScalarField a = ce_/delta();
volScalarField b = (2.0/3.0)*tr(D);
volScalarField c = 2*ck_*delta()*(dev(D) && D);
k_ = sqr((2*b + sqrt(sqr(b) +4*a*c))/(2*a));
muSgs_ = ck_*rho()*delta()*sqrt(k_);

while the model commonly documented is much simpler. This looks like a solution of a quadratic equation, but i am still in search of a link for interpreting the above model.

the incompressible Smagorinsly model is simply

nuSgs_ = ck_*delta()*sqrt(k(gradU));
nuSgs_.correctBoundaryConditions();

i would be very thankful if someone could point out a link to the compressible model.

nishant_hull June 24, 2008 10:13

Is there any reference paper f
 
Is there any reference paper for the implementation of compressible smagorinsky model???
if there is any link either in the forum please provide it to me.

cheers!

Nishant

ngj June 24, 2008 12:02

Hi The following title sug
 
Hi

The following title suggest that it might be interesting. Haven't read it myself:

C. Fureby
On Sub-Grid Scale Modeling in Large Eddy Simulations of Compressible Fluid Flow
Phys. Fluids, 8, 1301, 1996.

Best regards,

Niels

jiejie July 21, 2010 02:51

Quote:

Originally Posted by iyer_arvind (Post 183935)
The Smagorinsky model coded is as follows

volTensorField D = symm(gradU);
volScalarField a = ce_/delta();
volScalarField b = (2.0/3.0)*tr(D);
volScalarField c = 2*ck_*delta()*(dev(D) && D);
k_ = sqr((2*b + sqrt(sqr(b) +4*a*c))/(2*a));
muSgs_ = ck_*rho()*delta()*sqrt(k_);

while the model commonly documented is much simpler. This looks like a solution of a quadratic equation, but i am still in search of a link for interpreting the above model.

the incompressible Smagorinsly model is simply

nuSgs_ = ck_*delta()*sqrt(k(gradU));
nuSgs_.correctBoundaryConditions();

i would be very thankful if someone could point out a link to the compressible model.

Hi iyer_arvind

Have you got the reference for the dynSmagorinsky model used in OpenFOAM by any chance? I am stuck at the same place trying to understand it as it is different from the original dynamic Smagoribsky from Lilly 1992.

Thanks

georg December 1, 2010 11:42

Hello everybody,

I have another question regarding the compressible Smagorinsky model. Why does the model ask for the file k within start directory? I use OpenFOAM-1.6 with rhoPisoFoam. I thought, Smagorinsky works without it. The incompressible model does not ask.

Best regards,
Georg

Fransje December 3, 2010 14:05

Hello Georg,

Looking at the code, I guess that the compressible version of the Smagorinsky model requests the "k" file through inheritance..

The Smagorinsky LES model is a child of the general base class GenEddyVisc. In the GenEddyVisc.C file you can see:
Code:

00073    k_
00074    (
00075        IOobject
00076        (
00077            "k",
00078            runTime_.timeName(),
00079            mesh_,
00080            IOobject::MUST_READ,
00081            IOobject::AUTO_WRITE
00082        ),
00083        mesh_
00084    ),

Which means that the implementation of the compressible Smagorinsky model (and as a matter of fact, all the models having GenEddyEq as a base class) will require k to be in your start directory, and that whether the turbulence model uses it, or not..

I guess this is inconsistent with the incompressible implementation of the turbulent models, where the request for "k" is programmed in the turbulence model itself, meaning that it will not be used/asked for if not needed by the model. Consequently, the incompressible Smagorinsky model does not complaining about "k" not being present in the start directory..

I don't know why it was implemented that way, but I guess you could ask the developers themselves via the openfoam/bugs site. I would be curious to know what the reason is.

Kind regards,

Francois.

georg December 8, 2010 05:37

Hi Francois,

thank you for your quick answer. I have reported that issue to OpenCFD. I will keep you informed.

Kind regards,
Georg

georg January 11, 2011 04:20

Hello Francois,

me again. It seems, that there was no reason for the way the compressible model was implemented. The code was reorganized and will be part of the next release.

Regards,
Georg

Fransje January 11, 2011 08:18

Allright!
Good work, and thanks for the update.

Kind regards,
Francois.

morard July 19, 2011 11:50

Hi,
there is no new implementation of compressible Smagorinsky model in OF 2.0! Is there any other reference than Fureby because he doesn't use this kind of modelling? Where I can find more about the version of compressible Smagorinsky, which is implemented in OF? Why a separate calculation of k will be used?
Thx Dejan

gregor January 25, 2012 12:07

Quote:

Originally Posted by morard (Post 316638)
Why a separate calculation of k will be used?

that was a bug see http://www.openfoam.com/mantisbt/view.php?id=389

morard January 25, 2012 12:27

Thanks Gregor!

This question was actually posed by my friend because he didn't have profile at that time. I can't wait to see his face when he find out that this was a bug all the time :)

gregor January 25, 2012 12:35

And furthermore you can actually derive the quadratic k equation from the Fureby1996 paper. I just did't see how in the beginning.

gregor July 11, 2012 07:57

As demanded:

To derive the quadratic k equation you take

-B*D = c_B*rho*k^(3/2)*delta^(-1) (1 equilibrium assumption)

and plug in

B = 2/3 rho*k*I-2*mu_t*D (2 subgrid scale stress tensor )

so you get:

- c_B*rho*k^(3/2)*Delta^(-1) = 2/3 rho*k*trace(D)-2*mu_t*D^2 (3)

with mu_t = c_k*Delta*k^(1/2) (4 Smagorinsky model)

you finally get the quadratic k equation used in OpenFOAM:

- c_B*rho*k^(3/2)*Delta^(-1) = 2/3 rho*k*trace(D)-2*c_k*Delta*k^(1/2)*D^2 (5)

So the basic difference between the Smagorinsky model in the compressible and incompressible case is (at least how it is implemented in OpenFOAM), whether you can neglect the rho*k*trace(D) term or not.

D = Strain rate tensor

deji October 22, 2012 11:53

Gregor,

If I may ask this question: how is D is the strain rate tensor?
volTensorField D = symm(gradU);

Sij = 0.5(dUi/dxj + dUj/dxi) and it is clearly a symmetric tensor
But how is D= symm(fvc::grad(U)) = Sij???

Is the assumption that the cross-stream and span-wise derivatives are minute compared to the wall normal derivates?

Cheers,
Deji

deji October 22, 2012 12:05

D is actually the deformation rate tensor.

deji October 22, 2012 12:10

I think I've figured this out...

hz283 January 23, 2013 18:30

Quote:

Originally Posted by gregor (Post 370796)
As demanded:

To derive the quadratic k equation you take

-B*D = c_B*rho*k^(3/2)*delta^(-1) (1 equilibrium assumption)

and plug in

B = 2/3 rho*k*I-2*mu_t*D (2 subgrid scale stress tensor )

so you get:

- c_B*rho*k^(3/2)*Delta^(-1) = 2/3 rho*k*trace(D)-2*mu_t*D^2 (3)

with mu_t = c_k*Delta*k^(1/2) (4 Smagorinsky model)

you finally get the quadratic k equation used in OpenFOAM:

- c_B*rho*k^(3/2)*Delta^(-1) = 2/3 rho*k*trace(D)-2*c_k*Delta*k^(1/2)*D^2 (5)

So the basic difference between the Smagorinsky model in the compressible and incompressible case is (at least how it is implemented in OpenFOAM), whether you can neglect the rho*k*trace(D) term or not.

D = Strain rate tensor

Hi,

Can I ask you a question about Eq. (5)? Why is Eq. (5) a the quadratic k equation ? I know this is a simple question. I checked the source code and but that OPenfoam did solve it like a quadratic equation. Any suggestions are really appreciated.

best regards,
H

gregor January 24, 2013 07:51

Hi H

take Eq. 5 and divide it by k^(1/2) and you get:

- c_B*rho*k*Delta^(-1) = 2/3 rho*k^(1/2)*trace(D)-2*c_k*Delta*D^2

now substitute k by k=K^2, this yields

- c_B*rho*K^2*Delta^(-1) = 2/3 rho*K*trace(D)-2*c_k*Delta*D^2

solve for K and resubstitute K=sqrt(k). That is at least my opinion of whats happening ;)

hz283 January 29, 2013 15:40

Quote:

Originally Posted by gregor (Post 403765)
Hi H

take Eq. 5 and divide it by k^(1/2) and you get:

- c_B*rho*k*Delta^(-1) = 2/3 rho*k^(1/2)*trace(D)-2*c_k*Delta*D^2

now substitute k by k=K^2, this yields

- c_B*rho*K^2*Delta^(-1) = 2/3 rho*K*trace(D)-2*c_k*Delta*D^2

solve for K and resubstitute K=sqrt(k). That is at least my opinion of whats happening ;)

Dear Gregor and other openfoam users,

Thank you for your reply. About the Smagorinksy model (for compressible flows) in openfoam, I still have three questions:

1, The compressible form of Smagorinksy model use the equation B.D + epsilon =0, this is discussed in the paper (but the models in this paper are for incompressible models):
http://pof.aip.org/resource/1/phfle6...sAuthorized=no

But they did not the normal form, Eq. (4), and instead they use B.D + epsilon =0, which can be derived from Eq. (5) when the local equilibrium assumption is introduced.

In fact, there is another paper by the same author and this paper discussed the compressible LES models:

http://pof.aip.org/resource/1/phfle6...sAuthorized=no

In compressible Openfoam, they do not use the Smagorinsky model from this paper. Does any one know what is the reason?

2, Return to the first paper, it was mentioned that B.D + epsilon =0 can make model B1 reduce to A1 model. Actually in Openfoam, for TKE k, a algebraic equation is solved. Thus, how B1 can be reduced to A1?

3, I also found that it is difficult to relate these model constants ck and ce in compressible Openfoam to the standard Smagorinky model: nusgs=(Cs*delta)**2*||S||.

Your any comments and suggestions are welcome.

gregor January 31, 2013 04:32

Quote:

Originally Posted by hz283 (Post 404891)
2, Return to the first paper, it was mentioned that B.D + epsilon =0 can make model B1 reduce to A1 model. Actually in Openfoam, for TKE k, a algebraic equation is solved. Thus, how B1 can be reduced to A1?

this is thr algebraic equation for TKE k:
- c_B*rho*K^2*Delta^(-1) = 2/3 rho*K*trace(D)-2*c_k*Delta*D^2

in the incompressible case:

2/3 rho*K*trace(D) = 0 (continuity)

thus k=c_B/c_K Delta^(2) D^2

which gives with

nu_t = c_k Delta sqrt(k) = sqrt(c_k^3/c_e)Delta^2 D

Quote:

Originally Posted by hz283 (Post 404891)
3, I also found that it is difficult to relate these model constants ck and ce in compressible Openfoam to the standard Smagorinky model: nusgs=(Cs*delta)**2*||S||.

yes excactly, the "compressible" smagorinsky reduces to the standard smagorinsky model in the incompressible case and you can recover the smagorinsky constant. but i am not certain if it makes sense to look for a smagorinsky constant in the compressible case.

I dont know if i am getting Q1 ?!

rajeshkunwar June 19, 2013 14:52

Hi Mr. Gregor
Please throw some light on why k is defined in two ways in the smagorinsky model.

// Member Functions

//- Return SGS kinetic energy
// calculated from the given velocity gradient
tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
{
volSymmTensorField D(symm(gradU));

volScalarField a(ce_/delta());
volScalarField b((2.0/3.0)*tr(D));
volScalarField c(2*ck_*delta()*(dev(D) && D));

return sqr((-b + sqrt(sqr(b) + 4*a*c))/(2*a));
}

//- Return SGS kinetic energy
virtual tmp<volScalarField> k() const
{
return k(fvc::grad(U()));
}

gregor June 26, 2013 05:32

well if you have a close look you'll see that the second function
Code:

virtual tmp<volScalarField> k() const
only calls the first function
Code:

tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
thus the second function is some kind of an alias which is needed because of inheritance.

rajeshkunwar June 28, 2013 19:21

Thanx Gregor for the explanation. I observed a peculiar thing in the Smagorinsky Model.

For compressible Smagorinsky Ck = 0.02
For Incompressible Smagorinsky Ck = 0.094

I think this is wrong.

openfoammaofnepo November 16, 2013 12:12

Hi All,

In Openfoam, the model constants for compressible Smagorisnky model are:

Ck=0.01
Ce=1.048

I checked the following paper:

Fureby, C

On subgrid scale modelling in large eddy simulation of compressible fluid flow.
Physics of Fluid, 8(5) 1996.

In this paper, there are four models for the subgrid scale modelling, but I found that no models exactly correspond to the one used in the Openfoam code (compressible).

Actually, in openfoam, the compressible Smagorisnky model is not a standard. I did not found how the two model constant (ck and Ce) come from and if there are validated by the experimental data. Does anybody know how these two constants come from? Thank you.

Quote:

Originally Posted by rajeshkunwar (Post 436672)
Thanx Gregor for the explanation. I observed a peculiar thing in the Smagorinsky Model.

For compressible Smagorinsky Ck = 0.02
For Incompressible Smagorinsky Ck = 0.094

I think this is wrong.


HanSolo123 September 9, 2014 07:22

Hi openfoammaofnepo,
have you found an answer to your question about the coefficients?

I find it very difficult to resolve the OpenFoam coefficients c_k and c_e from the compressible smagorinsky model, and I wasnt able to do so yet. I would appreciate any help.

From what gregor already posted (I think there is a mistake in it), I was able to derive the quadratic equation for k, which is solved in the model. But I cant figure out the relationship between the OpenFOAM smagorinsky and the one published by Fureby (1996).

Fureby says:
muSgs = rho*c_d*delta^2*D

with the coefficient c_d = 0.038

OpenFoam says:
muSgs = ck*rho*sqrt(k)*delta

with ck = 0,02. There are of course coefficients in sqrt(k), but my main problem is that I cant calculate the resulting coefficient!

In http://croccolab.umd.edu/publication...FD00_vol13.pdf on page 5 it is said that the final coefficient should be the square of the standard smagorinsky coefficient Ck = 0.16.

I am very confused now. Please dont hesitate to give me your hints.


All times are GMT -4. The time now is 22:28.