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

Incomp. LES in pisoFOAM, how to set up Smagorinsky model with van Driest dampin

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2012, 12:27
Default Incomp. LES in pisoFOAM, how to set up Smagorinsky model with van Driest dampin
  #1
New Member
 
Jan Östh
Join Date: Feb 2012
Location: Gothenburg/Sweden
Posts: 17
Rep Power: 14
Jan.Östh is on a distinguished road
Hi all

Im new to OpenFOAM and I'm using v2.1.0 release. My question is regarding the Smagorinsky model implemented in this release. I used the motorBike tutorial to set up an incompressible LES simulation, and to use the Smagorinsky model I specify this in the LESProperties file. So far so good, I get the simulation to run as I anticipated. However, I'm not sure if van Driest damping is incorporated in the standard implementation of the standard Smagorinsky model? From what I have managed to figure out from the file Smagorinsky.H which is located in :

$OpenFOAM_Installation_dir/OpenFOAM-2.1.x/src/turbulenceModels/incompressible/LES/Smagorinsky

it seems to me van Driest damping is not included. My question is, how do I specify that I would like to use the van Driest damping? Right now, for the boundary conditions for nuSgs I have the Spalding wall function specified on my no-slip boundaries.

Cheers
Jan.Östh is offline   Reply With Quote

Old   February 28, 2012, 05:08
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Set

delta vanDriest;

into LESProperties.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   February 29, 2012, 09:30
Default
  #3
New Member
 
Jan Östh
Join Date: Feb 2012
Location: Gothenburg/Sweden
Posts: 17
Rep Power: 14
Jan.Östh is on a distinguished road
Quote:
Originally Posted by alberto View Post
Set

delta vanDriest;

into LESProperties.
Thanks! I also saw your recommendation to use pimpleFoam instead of pisoFoam in another thread. I will try that out...

/Jan
Jan.Östh is offline   Reply With Quote

Old   March 2, 2012, 09:41
Default
  #4
New Member
 
Jan Östh
Join Date: Feb 2012
Location: Gothenburg/Sweden
Posts: 17
Rep Power: 14
Jan.Östh is on a distinguished road
Hmm, I get an error when I try to activate the van Driest damping. The only thing I change is to set

Code:
delta               vanDriest;
instead of

Code:
delta               vanDriest;
in LESProperties. When running the case, the first time step runs:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.1.x-82293690fe3e
Exec   : pisoFoam
Date   : Mar 02 2012
Time   : 14:34:06
Host   : "ojan-Precision-WorkStation-T7500"
PID    : 55088
Case   : /home/ojan/OpenFOAM/ojan-2.1.x/LES_2D_cube/LES_2D_cube
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type LESModel
Selecting LES turbulence model Smagorinsky
SmagorinskyCoeffs
{
    ce              1.05;
    ck              0.0472;
}


Starting time loop

Time = 0.001

Courant Number mean: 0.080654 max: 3.37697
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 6.11753e-08, No Iterations 3
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 1.97382e-07, No Iterations 3
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 8.11524e-06, No Iterations 2
DICPCG:  Solving for p, Initial residual = 1, Final residual = 0.0485667, No Iterations 321
time step continuity errors : sum local = 1.22778e-05, global = -1.62292e-18, cumulative = -1.62292e-18
DICPCG:  Solving for p, Initial residual = 0.121577, Final residual = 9.51256e-07, No Iterations 404
time step continuity errors : sum local = 1.81875e-09, global = -7.33994e-19, cumulative = -2.35691e-18
But then the solver crashes with the following error message:

Code:
#0  Foam::error::printStack(Foam::Ostream&) in "/home/ojan/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/home/ojan/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3   in "/lib/x86_64-linux-gnu/libm.so.6"
#4  exp in "/lib/x86_64-linux-gnu/libm.so.6"
#5  Foam::exp(Foam::Field<double>&, Foam::UList<double> const&) in "/home/ojan/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::exp<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) in "/home/ojan/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libincompressibleLESModels.so"
#7  Foam::incompressible::LESModels::vanDriestDelta::calcDelta() in "/home/ojan/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libincompressibleLESModels.so"
#8  Foam::incompressible::LESModels::Smagorinsky::correct(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) in "/home/ojan/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libincompressibleLESModels.so"
#9  Foam::incompressible::LESModel::correct() in "/home/ojan/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libincompressibleLESModels.so"
#10  
 in "/home/ojan/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin/pisoFoam"
#11  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#12  
 in "/home/ojan/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin/pisoFoam"
Floating point exception
Anybody knows what might be causing this? I'm using Ubuntu 11.04...
Jan.Östh is offline   Reply With Quote

Old   March 2, 2012, 09:59
Default
  #5
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18
calim_cfd is on a distinguished road
hi!

i'm not that familiar with les, specially in of, yet, but have you check out the tutorials:
/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/LESProperties
/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/LESProperties
/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/LESProperties
/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/LESProperties
/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties
/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties
/tutorials/incompressible/channelFoam/channel395/constant/LESProperties

also you're running a transient solver.. try checking your settings with a steady-state one.. then switch over. i normally find it harder to get a transient solver to work at first

hope it helps!

regards

Last edited by calim_cfd; March 2, 2012 at 10:00. Reason: spelling
calim_cfd is offline   Reply With Quote

Old   March 2, 2012, 10:09
Default
  #6
New Member
 
Jan Östh
Join Date: Feb 2012
Location: Gothenburg/Sweden
Posts: 17
Rep Power: 14
Jan.Östh is on a distinguished road
Thanks for the reply, I will go through the tutorials. However, the above error was created by activating the van Driest damping. Before that, the simulation was running as it should...
Jan.Östh is offline   Reply With Quote

Old   March 2, 2012, 10:17
Default
  #7
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18
calim_cfd is on a distinguished road
then i guess the problem is the annoying one.. solver/schemes/timestep settings..

can't help you much there.. too many parameters at this point

sry
calim_cfd is offline   Reply With Quote

Old   March 2, 2012, 12:54
Default
  #8
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
It is actually a bug, since it happens even in tutorials, if you use vanDriest. I reported it: http://www.openfoam.org/mantisbt/view.php?id=445
solefire likes this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   March 4, 2012, 03:59
Default
  #9
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Short update: I investigated more using the pisoFoam/pitzDaily tutorial. The problem originates from the exp at line 93:

(kappa_/Cdelta_)*((scalar(1) + SMALL) - exp(-y/ystar/Aplus_))*y

I inspected the values of the argument at the first iteration and I obtained:

min(y) -1e+15
max(y) 0.000566292
min(ystar) 8.46024e-06
max(ystar) 1

It seems the minimum wall distance is computed incorrectly and leads to an overflow of the exponential function.
solefire and beatlejuice like this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.

Last edited by alberto; March 4, 2012 at 05:15. Reason: The content was not correct.
alberto is offline   Reply With Quote

Old   March 4, 2012, 09:59
Default
  #10
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18
calim_cfd is on a distinguished road
Quote:
Originally Posted by alberto View Post
Short update: I investigated more using the pisoFoam/pitzDaily tutorial. The problem originates from the exp at line 93:

(kappa_/Cdelta_)*((scalar(1) + SMALL) - exp(-y/ystar/Aplus_))*y

I inspected the values of the argument at the first iteration and I obtained:

min(y) -1e+15
max(y) 0.000566292
min(ystar) 8.46024e-06
max(ystar) 1

It seems the minimum wall distance is computed incorrectly and leads to an overflow of the exponential function.
interesting... i wish i had more time to check it out since i should be working with les soon enough.

one last thought..

you said the error appears even in the tutorials right? but does the error occurs with the "stock settings"?

cuz.. i mean.. say you have a tutorial and change the turbulence settings as you need..
have you checked the possibility of a mesh error?? check that for your mesh and the tutorial one... YplusLES should help you with the checking...

if mesh is not the issue, my hands are now tight..

sry and good luck!
calim_cfd is offline   Reply With Quote

Old   March 4, 2012, 23:05
Default
  #11
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Some work with git bisect showed that the problem is related to commit c06792759a720eb9d1494b4b4b0c3a86d21c20b0

http://www.openfoam.org/mantisbt/view.php?id=448
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   March 5, 2012, 08:30
Default
  #12
New Member
 
Jan Östh
Join Date: Feb 2012
Location: Gothenburg/Sweden
Posts: 17
Rep Power: 14
Jan.Östh is on a distinguished road
Ok great work, thanks alberto. I tried the OpenFoam v2.0 release and that was ok.
Jan.Östh is offline   Reply With Quote

Old   March 5, 2012, 09:15
Default
  #13
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
OpenCFD fixed the bug in git for 2.1.x (See bug-report).
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   March 5, 2012, 11:46
Default
  #14
New Member
 
Jan Östh
Join Date: Feb 2012
Location: Gothenburg/Sweden
Posts: 17
Rep Power: 14
Jan.Östh is on a distinguished road
Quote:
Originally Posted by alberto View Post
OpenCFD fixed the bug in git for 2.1.x (See bug-report).

Great. I updated the release and now it works using van Driest (at least it doesn't crash).

/Jan
Jan.Östh is offline   Reply With Quote

Old   March 17, 2014, 22:53
Default
  #15
Member
 
Peter
Join Date: Nov 2011
Posts: 46
Rep Power: 15
palmerlee is on a distinguished road
Quote:
Originally Posted by alberto View Post
OpenCFD fixed the bug in git for 2.1.x (See bug-report).
Hi, alberto!
I wonder if there is a way to fix the bug in OpenFoam 2.0.1. For some reason, I kind of have to use this version of OpenFoam. Could you please give me some hits? My OS system is Ubuntu 11.04.

Best regards
Peter
palmerlee is offline   Reply With Quote

Old   May 1, 2014, 00:14
Default van Driest damping fuction
  #16
Member
 
ehk
Join Date: Sep 2012
Posts: 30
Rep Power: 14
ehsankf is on a distinguished road
Hi all,

Any body can point me to a paper for the van Driest damping function implemented in the Openfoam.
Thanks.
ehsankf is offline   Reply With Quote

Old   May 1, 2014, 02:51
Default
  #17
Senior Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13
massive_turbulence is on a distinguished road
Quote:
Originally Posted by ehsankf View Post
Hi all,

Any body can point me to a paper for the van Driest damping function implemented in the Openfoam.
Thanks.
There are references here

http://www.cfd-online.com/Wiki/Near-...for_LES_models
http://www.fluidosol.se/thesismod/paper5.pdf

Hope it works for you.
massive_turbulence is offline   Reply With Quote

Old   May 1, 2014, 03:09
Default
  #18
Member
 
ehk
Join Date: Sep 2012
Posts: 30
Rep Power: 14
ehsankf is on a distinguished road
The van Driest damping function in OpenFoam is applied in different way. In OpenFoam, the damping is derived by changing the filter width, depending on the distance from the wall. You may want to look at equation 2.7 in this document


http://www.tfd.chalmers.se/~hani/kur...jectReport.pdf

Any reference for that?

Quote:
Originally Posted by massive_turbulence View Post
ehsankf is offline   Reply With Quote

Old   September 17, 2014, 07:18
Default
  #19
New Member
 
Hans Barósz
Join Date: May 2014
Posts: 22
Rep Power: 12
HanSolo123 is on a distinguished road
Hi ehk,

in my opinion the statement for Delta in the report you posted is wrong.

When I check eq. 2.7 with https://github.com/OpenFOAM/OpenFOAM...nDriestDelta.C
I can see a difference.

It should be:

Delta = min[Delta , kappa/C_d * (1 - exp(yPlus/APlus))*y]

and not

Delta = min[Delta , kappa/C_d] * (1 - exp(yPlus/APlus))*y

So the damping function only effects the right term of the min expression. Can someone confirm this?
HanSolo123 is offline   Reply With Quote

Old   August 4, 2016, 12:22
Default
  #20
New Member
 
Join Date: Jun 2016
Posts: 6
Rep Power: 10
Esther Jin is on a distinguished road
Hello, I am doing LES turbulence simulation using OpenFOAM3.0.1, and have some questions about the turbulenceProperties in the constant folder of pitzDaily in tutorials, I don't understand what LESdelta means, is it related to filter width?

Code:
simulationType  LES;

LES
{
    LESModel        dynamicKEqn;

    turbulence      on;

    printCoeffs     on;

    delta           cubeRootVol;

    dynamicKEqnCoeffs
    {
        filter simple;
    }

    cubeRootVolCoeffs
    {
        deltaCoeff      1;
    }

    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;
    }
}
If I choose VanDriest as Delta, in log file it shows the LES delta type selected twice,

PHP Code:
PIMPLEOperating solver in PISO mode

Reading field p

Reading field U

Reading
/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type LES
Selecting LES turbulence model Smagorinsky
Selecting LES delta type vanDriest
Selecting LES delta type cubeRootVol
SmagorinskyCoeffs
{
    
Ck              0.094;
    
Ce              1.048;

I also want to use Van Driest damping function, but I am so confused with these LES deltas and coefficients. Could anyone please explain me about these parameters if you have experience with LES turbulent flow simulation?

Thank you in advance!

Best regards,
Esther
Esther Jin 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
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
LES Compressible Smagorinsky Model iyer_arvind OpenFOAM Running, Solving & CFD 26 September 9, 2014 08:22
LES and combustion model Margherita Cadorin CFX 0 October 29, 2008 06:24
Smagorinsky closure model for LES Jimmy FLUENT 0 December 18, 2002 05:33
2-equation model of LES and source code M.R.Hadian Main CFD Forum 0 February 3, 2002 06:00


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