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

LES turbulence model: how to write delta

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 6 Post By dkxls

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 16, 2015, 06:08
Default LES turbulence model: how to write delta
  #1
New Member
 
Marcel Vonlanthen
Join Date: Nov 2012
Location: Zurich, Switzerland
Posts: 28
Rep Power: 13
Sylv is on a distinguished road
Dear foamer,

I am using pimpleFoam to run some LES case. As you know, a key element of an LES is the filter width, which is known as delta in OpenFOAM (also in most of the litterature). This delta, is simply a volScalarField

For my simulation, I want to write this volScalarField delta.

In pimpleFoam, the turbulence model is loaded with
Code:
autoPtr<incompressible::turbulenceModel> turbulence
(
    incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
The class turbulenceModel has no access to delta, but delta MUST exist somewhere. How can I access it??

Cheers,
Marcel
Sylv is offline   Reply With Quote

Old   January 16, 2015, 07:52
Default
  #2
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
Quote:
Originally Posted by Sylv View Post
The class turbulenceModel has no access to delta, but delta MUST exist somewhere. How can I access it??
The delta field is inside the LESModel class:
src/turbulenceModels/incompressible/LES/LESModel/LESModel.H

You cannot access the LESModel through the "turbulence pointer" (at least to my knowledge), but you could lookup the delta field (or the LESmodel for that matter) from the objectRegistry. Here is how you can lookup the delta field:
Code:
    volScalarField LESdelta
    (
        IOobject
        (
            "LESdelta",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        mesh,
        dimensionedScalar("LESdelta", dimLength, SMALL)
    );

    if (mesh.objectRegistry::foundObject<volScalarField>("delta"))
    {
        const volScalarField& delta =
            mesh.objectRegistry::lookupObject<volScalarField>("delta");

        LESdelta.internalField() = delta.internalField();
    }
Note that I haven't tested this code in particular, but I'm doing it in a similar way in some of my own classes.
fumiya, Sylv, babala and 3 others like this.
dkxls is offline   Reply With Quote

Old   January 16, 2015, 09:13
Default
  #3
New Member
 
Marcel Vonlanthen
Join Date: Nov 2012
Location: Zurich, Switzerland
Posts: 28
Rep Power: 13
Sylv is on a distinguished road
Thank for reply dkxls. your suggestion works perfectly.

Marcel
Sylv is offline   Reply With Quote

Old   January 14, 2018, 17:19
Default
  #4
New Member
 
Pedro Marreiro
Join Date: Nov 2017
Location: Lisbon
Posts: 8
Rep Power: 8
pmarreiro is on a distinguished road
Quote:
Originally Posted by Sylv View Post
Thank for reply dkxls. your suggestion works perfectly.

Marcel
Marcel, can you tell me where did you implemented the code?

Kind regards,
Pedro
pmarreiro 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
Smoothing of IDDES delta Fuchs OpenFOAM Running, Solving & CFD 2 November 17, 2020 11:17
How to decide to Turbulence model shipman OpenFOAM 2 August 18, 2013 03:00
OpenFOAM: LES turbulence model names Ollie OpenFOAM 5 January 7, 2013 10:24
Discussion: Reason of Turbulence!! Wen Long Main CFD Forum 3 May 15, 2009 09:52
LES turbulence model problem-HELP James Willie FLUENT 2 August 23, 2005 04:54


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