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

How to use DESModelRegions function object

Register Blogs Community New Posts Updated Threads Search

Like Tree14Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 1, 2013, 19:37
Default How to use DESModelRegions function object
  #1
New Member
 
Håkon Bartnes Line
Join Date: Mar 2013
Posts: 27
Rep Power: 14
hakonbar is on a distinguished road
Hi! I'm doing some DES simulations, and I would like to see which parts of my flow field are in RANS mode and which are in LES mode. I see the new OF release (2.2.0) introduced a new function object called DESModelRegions, which outputs this data. The thing is, I don't know which lines to put in the controlDict in order to activate this object, and which library to load.

Have any of you used this function object before, and do you know which libs to load etc?

best regards,
Håkon Line
hakonbar is offline   Reply With Quote

Old   May 2, 2013, 09:48
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Håkon,

Without an example case, I can't test any further than the following instructions:
  1. Edit the file "system/controlDict".
  2. Append/add the following block:
    Code:
    functions
    {
        desField
        {
            type            DESModelRegions;
            functionObjectLibs ("libutilityFunctionObjects.so");
            log             true;
            //region "region0";
            enabled on;
            storeFilter on;
            timeStart 0.0;
            timeEnd 10.0;
            outputControl timeStep;
            outputInterval       5000;
        }
    }
    Note: it writes and outputs information for each 5000 steps in this example! And if you do not define the "timeStart" and "timeEnd", it will run for the whole simulation.
  3. It created the file "postProcessing/desField/0/DESModelRegions.dat", but I didn't use DES, so I only got this header:
    Code:
    # DES model region coverage (% volume)
    # time  LES     RAS
  4. And since I used "log true;", I only got this message:
    Code:
    DESModelRegions output:
        No DES turbulence model found in database
  5. And it creates the field "DES::LESRegion".
Like I wrote at the beginning, without an example, I can't test this properly.

edit: I do have an example case now and is used here: http://www.cfd-online.com/Forums/ope...tml#post424797 - post #10

Best regards,
Bruno
__________________

Last edited by wyldckat; May 2, 2013 at 16:13. Reason: I've updated the post with new information and see "edit:"
wyldckat is offline   Reply With Quote

Old   May 3, 2013, 09:15
Default
  #3
New Member
 
Håkon Bartnes Line
Join Date: Mar 2013
Posts: 27
Rep Power: 14
hakonbar is on a distinguished road
It works perfectly, thanks! Now I've learned the general syntax for function objects as well. =)
hakonbar is offline   Reply With Quote

Old   July 5, 2016, 08:26
Default
  #4
Member
 
Peter
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 57
Rep Power: 11
potentialFoam is on a distinguished road
Dear Foamers,

can you help me to use 'DESModelRegions' with OF30X?

I fear, it is not implemented in OF30X. But how could you determine the RANS content of a DES?

Using an older version (like OF231) for postprocessing does not work, 'cos the constant/turbulenceProperties-file changed since this version.

Even this thread
HTML Code:
http://www.cfd-online.com/Forums/openfoam-solving/104123-les-content-detached-eddy-simulation-openfoam.html
does not provide an answer for OF30X.

I would be happy to hear your ideas!
Regards,
Peter

EDIT:
According to a hint I installed OpenFOAM-v1606+ from openfoam.com
and this perfectly works for postprocessing cases simulated with OF301 :-)

Last edited by potentialFoam; July 6, 2016 at 04:47.
potentialFoam is offline   Reply With Quote

Old   December 2, 2016, 04:38
Default
  #5
Senior Member
 
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 16
Bazinga is on a distinguished road
Quote:
Originally Posted by potentialFoam View Post
Dear Foamers,

can you help me to use 'DESModelRegions' with OF30X?

I fear, it is not implemented in OF30X. But how could you determine the RANS content of a DES?

Using an older version (like OF231) for postprocessing does not work, 'cos the constant/turbulenceProperties-file changed since this version.

Even this thread
HTML Code:
http://www.cfd-online.com/Forums/openfoam-solving/104123-les-content-detached-eddy-simulation-openfoam.html
does not provide an answer for OF30X.

I would be happy to hear your ideas!
Regards,
Peter

EDIT:
According to a hint I installed OpenFOAM-v1606+ from openfoam.com
and this perfectly works for postprocessing cases simulated with OF301 :-)
Dear Peter,

I am also trying to find my LES and RANS regions for my DES simulations. Can you guide me how you used 1606+ to find those regions. Thanks
Bazinga is offline   Reply With Quote

Old   December 2, 2016, 05:01
Default
  #6
Member
 
Peter
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 57
Rep Power: 11
potentialFoam is on a distinguished road
Sure, inside
system/controlDict.functions
you need to add
Code:
functions
{
 //   Determine LES-content
    desField
    {
      type            DESModelRegions;
      functionObjectLibs ("libutilityFunctionObjects.so");
      log             true;
      enabled on;
      storeFilter on;
      outputControl   outputTime;
    }
}
And afterwards, you can just execute
Code:
execFlowFunctionObjects -time 0.4 | tee log.desField
for the time you want.

Good luck!
potentialFoam is offline   Reply With Quote

Old   December 2, 2016, 05:09
Default
  #7
Senior Member
 
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 16
Bazinga is on a distinguished road
Quote:
Originally Posted by potentialFoam View Post
Sure, inside
system/controlDict.functions
you need to add
Code:
functions
{
 //   Determine LES-content
    desField
    {
      type            DESModelRegions;
      functionObjectLibs ("libutilityFunctionObjects.so");
      log             true;
      enabled on;
      storeFilter on;
      outputControl   outputTime;
    }
}
And afterwards, you can just execute
Code:
execFlowFunctionObjects -time 0.4 | tee log.desField
for the time you want.

Good luck!
Thank you so much for the fast reply. Will try it now. Best regards
Bazinga is offline   Reply With Quote

Old   December 2, 2016, 10:39
Default
  #8
Senior Member
 
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 16
Bazinga is on a distinguished road
Hmmm, I installed v1606+ but it says "execFlowFunctionObjects: command not found".

My OpenFOAM 2.4.0 installation can be used for "execFlowFunctionObjects" but for this the folder and file structure has changed too much since, so it doesn't work.

Anything I am missing here?
Bazinga is offline   Reply With Quote

Old   December 3, 2016, 16:18
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by Bazinga View Post
Hmmm, I installed v1606+ but it says "execFlowFunctionObjects: command not found".
Quick answer: Something might have went wrong with your installation of v1606+, because execFlowFunctionObjects is built by default in that version as well.

Or maybe you had OpenFOAM 4.0 or 4.1 active in your shell? Because it was replaced by in 4.0 by postProcess, along with (almost) all solvers having their one "-postProcess" argument as well.
__________________
wyldckat is offline   Reply With Quote

Old   December 4, 2016, 02:55
Default
  #10
Senior Member
 
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 16
Bazinga is on a distinguished road
Thanks for the quick reply. I think something went wrong with the installation. Will try again

edit: So, you were right. Not everything was installed during the 1606+ installation. I was able to run wmake for the execFlowFunctionObjects myself and now it is working
Bazinga is offline   Reply With Quote

Old   August 14, 2018, 07:18
Default
  #11
New Member
 
Hanis Rasyidah Binti Dollah
Join Date: Mar 2018
Posts: 5
Rep Power: 8
hanis_rda is on a distinguished road
Dear Foamer,

I have done IDDES simulation in OpenFoam 5x.
But when I try to use DESModelRegions function for post-processing in OpenFoam 5x. It is not recognised.
Anyone can help me to find the region that used RANS and LES using OpenFOAM 5x?

Thank you.
hanis_rda is offline   Reply With Quote

Old   August 17, 2018, 17:11
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: https://bugs.openfoam.org/view.php?id=2763
hanis_rda likes this.
__________________
wyldckat is offline   Reply With Quote

Old   August 17, 2018, 17:25
Default
  #13
New Member
 
Hanis Rasyidah Binti Dollah
Join Date: Mar 2018
Posts: 5
Rep Power: 8
hanis_rda is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Thank you for the information.
Is there any other function that can differentiate between RANS and LES region?
hanis_rda is offline   Reply With Quote

Old   August 20, 2018, 21:45
Default
  #14
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings hanis_rda,

I was curious about this and was inspired to work on this. I've managed to create the function object for OpenFOAM 5 and 6, but I have not fully tested it.

The repository is provided here: https://github.com/wyldckat/DESModelRegions
And you can find download and build instructions on that page as well.

Please report back here if this works or not and with which OpenFOAM version it worked and with which DES-type turbulence model!

Best regards,
Bruno
CarlosGRR and hanis_rda like this.
__________________
wyldckat is offline   Reply With Quote

Old   August 21, 2018, 10:49
Default
  #15
New Member
 
Hanis Rasyidah Binti Dollah
Join Date: Mar 2018
Posts: 5
Rep Power: 8
hanis_rda is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings hanis_rda,

I was curious about this and was inspired to work on this. I've managed to create the function object for OpenFOAM 5 and 6, but I have not fully tested it.

The repository is provided here: https://github.com/wyldckat/DESModelRegions
And you can find download and build instructions on that page as well.

Please report back here if this works or not and with which OpenFOAM version it worked and with which DES-type turbulence model!

Best regards,
Bruno

Thank you very much for your help.
I run for IDDES turbulence model in OpenFOAM5x.
But I got this error message:
Code:
DESModelRegions desField write:
    writing field DES::LESRegion
--> FOAM Warning : 
    From function Foam::OFstream& Foam::functionObjects::logFiles::file()
    in file db/functionObjects/logFiles/logFiles.C at line 131
    Requested single file, but multiple files are present
--------------------------------------------------------------------------
A process has executed an operation involving a call to the
"fork()" system call to create a child process.  Open MPI is currently
operating in a condition that could result in memory corruption or
other system errors; your job may hang, crash, or produce silent
data corruption.  The use of fork() (or system() or other calls that
create child processes) is strongly discouraged.

The process that invoked fork was:

  Local host:          [[16608,0],0] (PID 1396)

If you are *absolutely sure* that your application will successfully
and correctly survive a call to fork(), you may disable this warning
by setting the mpi_warn_on_fork MCA parameter to 0.
--------------------------------------------------------------------------
[0] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[0] #1  Foam::sigSegv::sigHandler(int) at ??:?
[0] #2  ? in "/usr/lib64/libc.so.6"
[0] #3  Foam::functionObjects::logFiles::file() at ??:?
[0] #4  Foam::functionObjects::DESModelRegions::write() at ??:?
[0] #5  Foam::functionObjects::timeControl::write() at ??:?
[0] #6  Foam::functionObjectList::execute() at ??:?
[0] #7  Foam::Time::loop() at ??:?
[0] #8  ? at ??:?
[0] #9  __libc_start_main in "/usr/lib64/libc.so.6"
[0] #10  ? at ??:?

Last edited by wyldckat; August 21, 2018 at 11:07. Reason: Added [CODE][/CODE] markers
hanis_rda is offline   Reply With Quote

Old   August 21, 2018, 11:18
Default
  #16
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Sorry about that, I forgot to properly re-test after adapting the missing features that were in the original function object.


I've now fixed it and is available at the repository. To update your build:
  • If you downloaded by using git, then go into the folder "DESModelRegions" and run:
    Code:
    git pull
    wmake
    wclean
  • If you downloaded from ZIP, then you must delete the old ZIP file and the folder "DESModelRegions-master". Then do once again the steps for downloading the ZIP file and so on, as instructed on the repository.
hanis_rda likes this.
wyldckat is offline   Reply With Quote

Old   August 21, 2018, 11:37
Default
  #17
New Member
 
Hanis Rasyidah Binti Dollah
Join Date: Mar 2018
Posts: 5
Rep Power: 8
hanis_rda is on a distinguished road
Now it is running for IDDES simulation in OpenFOAM5x. Thank you very much.

# DES model region coverage (% volume)
# Time LES RAS
1.4001 5.134440e+01 4.865560e+01
1.4002 5.134438e+01 4.865562e+01
1.4003 5.134434e+01 4.865566e+01
wyldckat likes this.
hanis_rda is offline   Reply With Quote

Old   September 18, 2018, 18:27
Default Receiving error: Attempt to cast type cubeRootVol to type IDDESDelta
  #18
New Member
 
Syeda
Join Date: Jun 2017
Posts: 4
Rep Power: 9
S123 is on a distinguished road
Hello, I am trying to run a SpalartAllmarasIDDES simulation in OpenFoam v5.0. However, I receive the error "Attempt to cast type cubeRootVol to type IDDESDelta". Since you were able to successfully run IDDES in v5, please could you provide some assistance. cubeRootVol is the delta notation in my LESProperties file.


This is how my LESProperties file looks:

Code:
simulationType  LES;

LES
{
	LESModel            SpalartAllmarasIDDES;

	delta               cubeRootVol;

	printCoeffs         on;

    turbulence          on;	

	cubeRootVolCoeffs
{
    deltaCoeff      1;
}


laminarCoeffs
{
}

oneEqEddyCoeffs
{
    ck               0.07;
    ce               1.05;
}

dynOneEqEddyCoeffs
{
    ce               1.05;
    filter          simple;
}

locDynOneEqEddyCoeffs
{
    ce               1.05;
    filter          simple;
}

SmagorinskyCoeffs
{
    ce               1.05;
    ck               0.07;
}

Smagorinsky2Coeffs
{
    ce               1.05;
    ck               0.07;
    cD2              0.02;
}

spectEddyViscCoeffs
{
    ce               1.05;
    cB               8.22;
    cK1              0.83;
    cK2              1.03;
    cK3              4.75;
    cK4              2.55;
}

dynSmagorinskyCoeffs
{
    ce               1.05;
    filter          simple;
}

mixedSmagorinskyCoeffs
{
    ce               1.05;
    ck               0.07;
    filter          simple;
}

dynMixedSmagorinskyCoeffs
{
    ce               1.05;
    filter          simple;
}

LRRDiffStressCoeffs
{
    ce               1.05;
    ck               0.09;
    c1               1.8;
    c2               0.6;
}

DeardorffDiffStressCoeffs
{
    ce               1.05;
    ck               0.09;
    cm               4.13;
}

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
{
     delta  IDDESDelta;

     IDDESDeltaCoeffs
     {
         deltaCoeff       1;

         //according to src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C
         cw               0.15;
     }

     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;

//These are the default values
     sigmaNut        0.66666;
     kappa           0.41;
     Cb1             0.1355;
     Cb2             0.622;
     Cv1             7.1;
     Cv2             5;
     CDES            0.65;
     ck              0.07;
     Cw2             0.3;
     Cw3             2;
     fwStar          0.424;
     cl              3.55;
     ct              1.63;

}

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

kappa            0.4187;

wallFunctionCoeffs
{
    E                9;
}

Many thanks.


Quote:
Originally Posted by hanis_rda View Post
Now it is running for IDDES simulation in OpenFOAM5x. Thank you very much.

# DES model region coverage (% volume)
# Time LES RAS
1.4001 5.134440e+01 4.865560e+01
1.4002 5.134438e+01 4.865562e+01
1.4003 5.134434e+01 4.865566e+01

Last edited by S123; September 18, 2018 at 18:35. Reason: Added more info
S123 is offline   Reply With Quote

Old   September 20, 2018, 05:53
Default
  #19
New Member
 
Hanis Rasyidah Binti Dollah
Join Date: Mar 2018
Posts: 5
Rep Power: 8
hanis_rda is on a distinguished road
Quote:
Originally Posted by S123 View Post
Hello, I am trying to run a SpalartAllmarasIDDES simulation in OpenFoam v5.0. However, I receive the error "Attempt to cast type cubeRootVol to type IDDESDelta". Since you were able to successfully run IDDES in v5, please could you provide some assistance. cubeRootVol is the delta notation in my LESProperties file.

Many thanks.
Sorry for late reply.

I have changed all 'cubeRootVol' to 'IDDESDelta' in my LESProperties. Hope it will help you.
hanis_rda is offline   Reply With Quote

Old   September 21, 2018, 06:52
Smile
  #20
New Member
 
Syeda
Join Date: Jun 2017
Posts: 4
Rep Power: 9
S123 is on a distinguished road
Thank you very much, Hanis. This worked!! Many thanks & best wishes.

Quote:
Originally Posted by hanis_rda View Post
Sorry for late reply.

I have changed all 'cubeRootVol' to 'IDDESDelta' in my LESProperties. Hope it will help you.
S123 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
foamToTecplot360 thomasduerr OpenFOAM Post-Processing 121 June 11, 2021 11:05
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
Is function object forceCeofficient compatible with interDyMFoam? Philer OpenFOAM Running, Solving & CFD 0 March 10, 2010 11:30
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 01:35


All times are GMT -4. The time now is 12:16.