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

LES-Content of a Detached Eddy Simulation for OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2012, 12:36
Default LES-Content of a Detached Eddy Simulation for OpenFOAM
  #1
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey Foamers,

I started with OpenFOAMŪ+DES, SpalartAllmarasIDDES.
I would like to determine the LES-Content of my computation.
Does someone know an indicator or a way to determine the content?

It would be desirable to see the averaged LES content...

Thanks
Anne
Anne Lincke is offline   Reply With Quote

Old   July 4, 2012, 12:07
Default
  #2
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by Anne Lincke View Post
Hey Foamers,

I started with OpenFOAMŪ+DES, SpalartAllmarasIDDES.
I would like to determine the LES-Content of my computation.
Does someone know an indicator or a way to determine the content?

It would be desirable to see the averaged LES content...

Thanks
Anne
Hi,
you can obtain the averaged resolved Reynolds stresses by just activating the averaging function for the velocity field at the end of your controlDict:

functions
{
fieldAverage
{
type fieldAverage;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl outputTime;
fields
(
U
{
mean on;
prime2Mean on;
base time;
}
);
}
}

The above addition will produce and write both the time-averaged velocity field as well as the six time averaged components of the resolved Reynolds stresses tensor (this is the meaning of prime2Mean: fluctuating components squared and averaged against time). Of course, to obtain reliable results, you have to start averaging when the flow has developed its transient content and then average for a sufficiently long period, in order to get the mean (and thus the fluctuating) values stabilized.

Hope this helps

V.
vonboett likes this.
vkrastev is offline   Reply With Quote

Old   July 5, 2012, 04:11
Default
  #3
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey Vesselin,

thanks for your answer. I already activated fieldAverage and plottet those values.

But this was not my question, maybe I expressed in a bad way.
What I meant: I would like to plot a "sensor" which is for example "1" in regions where LES-mode is activated and "0" in regions where RANS-mode is activated.
When outputting the averaged sensor, one could see the regions where mainly LES-, and regions where mainly RANS-mode was activated.

It is desirable for a DES to switch on RANS-mode in near-wall regions and LES-mode inside the fluid volume.

Dou you or someone else have an idea how to solve this in OpenFOAM?
I heard that it is common for solvers to have such a sensor implemented....

Thanks
Anne
Anne Lincke is offline   Reply With Quote

Old   July 5, 2012, 05:10
Default
  #4
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by Anne Lincke View Post
Hey Vesselin,

thanks for your answer. I already activated fieldAverage and plottet those values.

But this was not my question, maybe I expressed in a bad way.
What I meant: I would like to plot a "sensor" which is for example "1" in regions where LES-mode is activated and "0" in regions where RANS-mode is activated.
When outputting the averaged sensor, one could see the regions where mainly LES-, and regions where mainly RANS-mode was activated.

It is desirable for a DES to switch on RANS-mode in near-wall regions and LES-mode inside the fluid volume.

Dou you or someone else have an idea how to solve this in OpenFOAM?
I heard that it is common for solvers to have such a sensor implemented....

Thanks
Anne
Ok, so I haven't understood your question properly...Well, if you are interested in a post-processing of this RANS/LES parameter than the easiest way should be to write your own post-proc utility which calculates and writes the parameter using already calculated flow variables. For the DES and DDES models actually all you have to do is to calculate the ratio between the RANS and LES lenght scales which are used to discriminate where to apply the RANS or DES formulation (where the RANS scale is smaller then the LES one the model works in RANS mode, the opposite applies for the LES mode). I'm not sure if things are that easy with the IDDES model, which as far as I know has a much more complex formulation. Just as an example, I can send you an utility which calculates and writes the delaying function fd included in the DDES model.

Good luck for your work

V.
Attached Files
File Type: gz Fd.tar.gz (1.9 KB, 263 views)
David* likes this.
vkrastev is offline   Reply With Quote

Old   July 17, 2012, 05:24
Default
  #5
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey Vesselin,

sorry for the late reply.
Thanks a lot for this tool. I wrote a similar one for IDDES.

Kind Regards
Anne
Anne Lincke is offline   Reply With Quote

Old   July 17, 2012, 05:35
Default
  #6
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Hi Anne,
no problem, happy to see that you have solved your issue!

Regards

V.
vkrastev is offline   Reply With Quote

Old   August 8, 2012, 06:35
Default
  #7
New Member
 
Lukas
Join Date: Jul 2012
Posts: 12
Rep Power: 14
luhawk is on a distinguished road
Hello everybody,
hello Anne,

I am currently trying to work my way into DES in OpenFOAM. Such a tool as you said would really be neat to have. Unfortunately, when it comes to coding in OpenFOAM, I am pretty much a novice, so I have a question:
Did you implement the evaluation of the length scales as a post processing or routine did you modify the turbulence model to write a field?

Any help is appreciated.

Best regards,

Lukas
luhawk is offline   Reply With Quote

Old   August 8, 2012, 06:52
Default
  #8
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey Lukas,

I implemented a postprocessing tool which writes \tilde{fd}*(1+fe) and 1-\tilde{fd} which are the coefficients of l_RANS and l_LES, respectively (according to the paper of Shur et. al).

It would be desirable to insert such a tool inside a simulation such that these coefficients are computed at each time step and could be averaged.

But I only succeeded in doing this inside a postprocessing routine, which computes these values for the written time steps. So one can see the LES content of each time step which was output.

Kind Regards
Anne
potentialFoam likes this.
Anne Lincke is offline   Reply With Quote

Old   August 9, 2012, 01:15
Default
  #9
Member
 
Jason Eason
Join Date: Jan 2010
Location: Portage, Michigan
Posts: 45
Rep Power: 16
JulytoNovember is on a distinguished road
Hi Anne,
Could you please post your LESProperties file, with SpalartAllmarasIDDES implemented?
__________________
Debian Squeeze - OpenFOAM-2.1.x, Paraview-3.12.0
JulytoNovember is offline   Reply With Quote

Old   August 9, 2012, 03:55
Default
  #10
Member
 
Timo K.
Join Date: Feb 2010
Location: University of Stuttgart
Posts: 66
Rep Power: 16
timo_IHS is on a distinguished road
Hi Anne,

have a look in the extend project.
You have to define an IOobject.
timo_IHS is offline   Reply With Quote

Old   August 9, 2012, 04:09
Default
  #11
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey,

Quote:
Originally Posted by JulytoNovember View Post
Hi Anne,
Could you please post your LESProperties file, with SpalartAllmarasIDDES implemented?
here it is:

HTML Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      LESProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

LESModel       SpalartAllmarasIDDES;

printCoeffs     on;

delta IDDESDelta; // maxDeltaxyz;//


maxDeltaxyzCoeffs
{
    deltaCoeff 2;
}



SpalartAllmarasIDDESCoeffs
{
    fieldMaps
    {
        nuTilda         nuTilda;
        nuSgs           nuSgs;
    }
    alphaNut        1.5;
    Cb1             0.1355;
    Cb2             0.622;
    Cw2             0.3;
    Cw3             2;
    Cv1             7.1;
    Cv2             5;
    CDES            0.65;
    ck              0.07;
    fwStar          0.424;
    cl              3.55;
    ct              1.63;
}

IDDESDeltaCoeffs
{
    cw 0.15;
    deltaCoeff      2;//1; 2 for hexMesh

}

SpalartAllmarasCoeffs
{
    alphaNut         1.5;
    Cb1              0.1355;
    Cb2              0.622;
    Cw2              0.3;
    Cw3              2;
    Cv1              7.1;
    Cv2              5.0;
    CDES             0.65;
    ck               0.07;
}

SpalartAllmarasDDESCoeffs
{
    alphaNut         1.5;
    Cb1              0.1355;
    Cb2              0.622;
    Cw2              0.3;
    Cw3              2.0;
    Cv1              7.1;
    Cv2              5.0;
    CDES             0.65;
    ck               0.07;
}

SpalartAllmarasIDDESCoeffs
{
    alphaNut         1.5;
    kappa            0.4187;
    Cb1              0.1355;
    Cb2              0.622;
    Cw2              0.3;
    Cw3              2.0;
    Cv1              7.1;
    Cv2              5.0;
    CDES             0.65;
    ck               0.07;
}



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;
}


// ************************************************************************* //
Kind Regards,
Anne
cheng1988sjtu and Alexee like this.
Anne Lincke is offline   Reply With Quote

Old   August 14, 2012, 10:21
Default
  #12
New Member
 
Jane L
Join Date: May 2012
Posts: 23
Rep Power: 14
Jane L is on a distinguished road
Hi,
just in case you're still interested. You can define the IOobject Timo_IHS mentioned in your own copy of the SpalartAllmaras.C (DES) model which could look like this:
Code:
  RANSregion_
    (
        IOobject
        (
            "RANSregion",
            runTime_.timeName(),
            mesh_,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh_
    ),
"RANSregion_" has to be initialized in the *.H file and you need a RANSregion_ file in the 0 folder with the correct dimensions depending on your equation to calculate "RANSregion_". The equation itself may be placed where nuSgs is calculated. Example for SpalartAllmaras:
Code:
void mySpalartAllmaras::updateSubGridScaleFields()
{
    nuSgs_.internalField() = fv1()*nuTilda_.internalField();
    nuSgs_.correctBoundaryConditions();

    RANSregion_ = CDES_*delta() - y_;
}
This gives you a positive result in the area where RANS is used and a negative where LES is used.

kind regards
Jane L is offline   Reply With Quote

Old   August 14, 2012, 13:56
Default
  #13
Senior Member
 
Awais Ali
Join Date: Feb 2010
Location: Germany
Posts: 128
Rep Power: 17
owayz is on a distinguished road
Send a message via MSN to owayz
Hi Jane L,
Can we do something similar for other Turbulence models as well. And what is "fv1()" in the above equation. It would be very helpful if you could explain shortly what this code snippet is actually doing.
Regards,
Awais
owayz is offline   Reply With Quote

Old   August 15, 2012, 03:22
Default
  #14
New Member
 
Jane L
Join Date: May 2012
Posts: 23
Rep Power: 14
Jane L is on a distinguished road
Hi!
Quote:
Originally Posted by owayz View Post
Can we do something similar for other Turbulence models as well.
The example above is a possible solution for the issue Anne described:

Quote:
I would like to plot a "sensor" which is for example "1" in regions where LES-mode is activated and "0" in regions where RANS-mode is activated.
While this makes only sence in a DES method, you can of course apply something similar to any turbulence model if you wish to have some more outputdata. This data will be written in the folder of each timestep and can be used by paraview.

Quote:
Originally Posted by owayz View Post
And what is "fv1()" in the above equation. It would be very helpful if you could explain shortly what this code snippet is actually doing.
This code snipped is a variation of the SpalartAllmaras turbulence model, which is located in your OpenFOAM installation folder under:
/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C
So actually the function "fv1()" comes from this model. In order to alter existing turbulence models you should make your own copy of that turbulence model. Follow the instructions of Hakan Nilsson (you find the "implementTurbulenceModel.pdf" via google)

I hope this helps!
regards
Jane L is offline   Reply With Quote

Old   August 15, 2012, 11:17
Default
  #15
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey Jane,

thank you very much for this information. I am still interested in implementing such a sensor and will try to do it in this way.
Starting with Spalart-Allmaras and DES seems to be a good way, as the model gets more and more complex for DDES and IDDES.

Kind Regards
Anne
Anne Lincke is offline   Reply With Quote

Old   August 15, 2012, 12:11
Default
  #16
Senior Member
 
Awais Ali
Join Date: Feb 2010
Location: Germany
Posts: 128
Rep Power: 17
owayz is on a distinguished road
Send a message via MSN to owayz
Hi Jane,
Thanks for your reply. I will try to look into that pdf. Also I might try to do something similar for LES as well.

Regards,
Awais
owayz is offline   Reply With Quote

Old   August 17, 2012, 01:29
Default
  #17
Senior Member
 
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 16
Tarak is on a distinguished road
Hii,

Have you tried plotting the energy spectrum to get an estimate of the LES content?
Tarak is offline   Reply With Quote

Old   March 1, 2013, 16:22
Default
  #18
Member
 
Join Date: Jul 2010
Posts: 52
Rep Power: 16
MaryBau is on a distinguished road
Hi;

I have been trying to run a simulation in OFv2.1.0 with SpalartAllmarasIDDES using exactly the same LESProperties file that Anne L. posted in this forum. However, I am getting this error:

Code:
Selecting incompressible transport model Newtonian
Selecting turbulence model type LESModel
Selecting LES turbulence model SpalartAllmarasIDDES


--> FOAM FATAL IO ERROR: 
keyword delta is undefined in dictionary ""

file: 

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 400.

FOAM exiting
The IDDESDelta is recognized, because if I spell it wrong it appears on the LESdelta types.

Code:
--> FOAM FATAL ERROR: 
Unknown LESdelta type XXIDDESDelta

Valid LESdelta types are :

6
(
IDDESDelta
Prandtl
cubeRootVol
maxDeltaxyz
smooth
vanDriest
)


    From function LESdelta::New(const fvMesh&, const dictionary&)
    in file LESdelta/LESdelta.C at line 78.

FOAM exiting
Any ideas or suggestions?

Thanks!
MaryBau is offline   Reply With Quote

Old   March 4, 2013, 04:27
Default
  #19
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey,

I installed OpenFOAM-2.1.1. and since then I get exactly the same error message. I would be really interested in how to solve this, too.
Anne Lincke is offline   Reply With Quote

Old   March 6, 2013, 09:16
Default
  #20
New Member
 
My Name
Join Date: Jan 2013
Posts: 13
Rep Power: 13
ingcorra is on a distinguished road
This should be the correct LESProperties file for 2.1.x

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      LESProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

LESModel       SpalartAllmarasIDDES;

printCoeffs     on;

delta cubeRootVol;

printCoeffs on;

cubeRootVolCoeffs
{
    deltaCoeff      1;
}

SpalartAllmarasIDDESCoeffs
{
    delta IDDESDelta;
    IDDESDeltaCoeffs
    {
        deltaCoeff 1;
        cw 0.15;
    }
}


//*************************************************************************//
ingcorra is offline   Reply With Quote

Reply


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
Detached eddy simulation rooholghodos OpenFOAM 0 March 7, 2012 11:35
Transition RANS to LES during simulation LorenzN OpenFOAM Running, Solving & CFD 4 November 17, 2011 11:47
Link between eddy viscosity and subgrid-scale turbulent viscosity in LES Marvin Main CFD Forum 6 December 4, 2009 12:08
Large Eddy Simulation help PattiMichelle Phoenics 2 April 29, 2005 14:24
Detached Eddy Simulation Fred Main CFD Forum 4 December 16, 2000 10:45


All times are GMT -4. The time now is 14:53.