CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Spanwise averaging during runtime for dynamic Smagorinsky

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2015, 15:27
Default Spanwise averaging during runtime for dynamic Smagorinsky
  #1
New Member
 
Karthik Rudra Reddy
Join Date: Nov 2013
Posts: 6
Rep Power: 12
kreddy is on a distinguished road
Hello all,

Does anyone know if we can average a variable along a single direction (say spanwise) during runtime? Specifically, I want to do spanwise averaging while calculating LL, MM in the homogenousDynSmagorinsky LES model, instead of averaging over the whole domain, like it seems to be doing now.
Just for a quick reference, here's the portion of the model in homogenousDynSmagorinsky.C where the model constant is being calculated.

Code:
dimensionedScalar homogeneousDynSmagorinsky::cD
(
    const volSymmTensorField& D
) const
{
    const volSymmTensorField MM
    (
        sqr(delta())*(filter_(mag(D)*(D)) - 4*mag(filter_(D))*filter_(D))
    );

    dimensionedScalar MMMM = average(magSqr(MM));

    if (MMMM.value() > VSMALL)
    {
        tmp<volSymmTensorField> LL =
            dev(filter_(sqr(U())) - (sqr(filter_(U()))));

        return 0.5*average(LL && MM)/MMMM;
    }
    else
    {
        return 0.0;
    }
}
So basically, I'd like to replace "average()" with "spanwiseaverage()".
Please let me know if any of you have any ideas.
kreddy is offline   Reply With Quote

Old   February 12, 2015, 13:13
Default
  #2
Member
 
Zifei Yin
Join Date: Sep 2012
Location: Shanghai & Ames
Posts: 33
Rep Power: 13
yzf1215 is on a distinguished road
Good question, karthik. -- Zifei
use a structured solver maybe -- Umair
yzf1215 is offline   Reply With Quote

Old   February 12, 2015, 13:40
Default
  #3
New Member
 
Karthik Rudra Reddy
Join Date: Nov 2013
Posts: 6
Rep Power: 12
kreddy is on a distinguished road
Quote:
Originally Posted by yzf1215 View Post
Good question, karthik. -- Zifei
use a structured solver maybe -- Umair
wish I had that choice!
kreddy is offline   Reply With Quote

Old   February 18, 2015, 08:20
Default
  #4
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
I don't really have an answer to your question, other than implementing the functionality on your own using for-loops and if-statements.

However, since you are not the only one with this problem, there are quite some papers that address this issue, my favorite (with respect to dynamic coeff evaluation) would be the Lagrangian averaging proposed by Meneveau et al. (1996):

Meneveau, Charles, Thomas S. Lund, and William H. Cabot. “A Lagrangian Dynamic Subgrid-Scale Model of Turbulence.” Journal of Fluid Mechanics 319 (July 1996): 353–85. doi:10.1017/S0022112096007379.

The next OpenFOAM version will have this model implemented, see here:
https://github.com/OpenFOAM/OpenFOAM...icLagrangian.H
dkxls is offline   Reply With Quote

Reply

Tags
les, spanwise average


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Spanwise averaging of three-dimensional field Fuchs OpenFOAM Post-Processing 47 December 1, 2021 08:59
Difference between Constant smagorinsky and Dynamic model Smagorinsky model cfdmms Main CFD Forum 8 January 21, 2016 04:44
Starting field averaging using libFunctionObject after certain time eelcovv OpenFOAM Programming & Development 25 December 7, 2015 22:28
Problem in3D model processing mebinitap OpenFOAM 2 December 12, 2014 04:40
spanwise averaging for LES backward facing step Sungho Yoon CFX 6 July 23, 2008 10:34


All times are GMT -4. The time now is 09:31.