CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   What is the Avearage in dynSmargrinsky model (https://www.cfd-online.com/Forums/openfoam/78049-what-avearage-dynsmargrinsky-model.html)

waynezw0618 July 12, 2010 02:57

What is the Avearage in dynSmargrinsky model
 
Dear everyone:

So far as I know, in dynamic smargrinsky model, the original way to calculated cD is unstable , so ensemble average is introduced to resovle the problem such as negetive value of cD. so you can find in http://foam.sourceforge.net/doc/Doxy...agorinsky.html :
cD=<L.M>/<M.M>,
which is intead of

cD=L.M/M.M,

where < > means ensemble average.

But I don`t know what is the " average " in the source code ? it seems like that it is the "Arithmetic average:" for the field

if that the cD is not the funtion of space.as original idea for dynamic model is to make the cD to be the function of time and space--cD=cD(x,t)
so if anyone can tell me where is the code of the original function type for the average here in the code

Thanks

00052
00053 dimensionedScalar dynSmagorinsky::cD(const volSymmTensorField& D) const
00054 {
00055 volSymmTensorField LL = dev(filter_(sqr(U())) - (sqr(filter_(U()))));
00056
00057 volSymmTensorField MM =
00058 sqr(delta())*(filter_(mag(D)*(D)) - 4*mag(filter_(D))*filter_(D));
00059
00060 dimensionedScalar MMMM = average(magSqr(MM));
00061
00062 if (MMMM.value() > VSMALL)
00063 {
00064 return average(LL && MM)/MMMM;
00065 }
00066 else
00067 {
00068 return 0.0;
00069 }
00070 }
00071

BernhardGrieser January 24, 2011 08:54

average(volScalarField) -> implementation?
 
I'd like to know that as well.
How's average(volScalarField) implemented?

cheng1988sjtu January 24, 2011 21:48

Hope this helps!
 
Hi,

See the source file about average():

http://foam.sourceforge.net/doc/Doxy...8C_source.html

you can see some useful field functions( including average(),pow() etc) there

BernhardGrieser January 25, 2011 03:24

Quote:

Originally Posted by cheng1988sjtu (Post 291997)
See the source file about average():

http://foam.sourceforge.net/doc/Doxy...8C_source.html

you can see some useful field functions( including average(),pow() etc) there

Thank you very much, Cheng!

Regards,
Bernhard


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