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   September 26, 2018, 03:24
Default
  #21
New Member
 
Christian Jähnel
Join Date: Nov 2016
Posts: 11
Rep Power: 9
ch_jaehnel 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 for that hint. I did a simulation with interfoam and now get the following error after executing "execFlowFunctionObjects -time 1.5 | tee log.desField":



Code:
Create time

Create mesh for time = 1.5

Time = 1.5
    Reading phi
    Reading U
    Reading p
No finite volume options present

--> FOAM Warning :
--> FOAM FATAL IO ERROR:
keyword transportModel is undefined in dictionary "/lustre/scratch2/s2665038/FFW2.5_n24_350l/constant/transportProperties"

file: /lustre/scratch2/s2665038/FFW2.5_n24_350l/constant/transportProperties from line 18 to line 66.

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

End
Here are my transportProperties:


Code:
phases (water air);

water
{
    transportModel  Newtonian;
    nu              nu [ 0 2 -1 0 0 0 0 ]  1e-06;
    rho             rho [ 1 -3 0 0 0 0 0 ] 1000;
    
    CrossPowerLawCoeffs    
    {
        nu0            nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
        nuInf        nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
        m            m [ 0 0 1 0 0 0 0 ] 1;
        n            n [ 0 0 0 0 0 0 0 ] 0;
    }
    
    BirdCarreauCoeffs   
    {
        nu0            nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
        nuInf        nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
        k            k [ 0 0 1 0 0 0 0 ] 99.6;
        n            n [ 0 0 0 0 0 0 0 ] 0.1003;
    }
}

air
{
    transportModel  Newtonian;
    nu              nu [ 0 2 -1 0 0 0 0 ]  1.48e-05;
    rho             rho [ 1 -3 0 0 0 0 0 ] 1;
    
    CrossPowerLawCoeffs    
    {
        nu0            nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
        nuInf        nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
        m            m [ 0 0 1 0 0 0 0 ] 1;
        n            n [ 0 0 0 0 0 0 0 ] 0;
    }
    
    BirdCarreauCoeffs    
    {
        nu0            nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
        nuInf        nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
        k            k [ 0 0 1 0 0 0 0 ] 99.6;
        n            n [ 0 0 0 0 0 0 0 ] 0.1003;
    }
}

sigma           sigma [ 1 0 -2 0 0 0 0 ] 0.07;
so the transportModel is obviously defined, but for every phase. How can I get around this error?
Thanks a lot!
ch_jaehnel is offline   Reply With Quote

Old   September 26, 2018, 16:51
Default
  #22
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 question @ch_jaehnel: Which OpenFOAM version are you using?
__________________
wyldckat is offline   Reply With Quote

Old   September 28, 2018, 06:35
Default
  #23
New Member
 
Christian Jähnel
Join Date: Nov 2016
Posts: 11
Rep Power: 9
ch_jaehnel is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick question @ch_jaehnel: Which OpenFOAM version are you using?

Sorry forgot to mention: I use OF 2.3.1


I have also acces to OF5.0, the result is the same.
ch_jaehnel is offline   Reply With Quote

Old   December 4, 2018, 02:58
Default
  #24
Member
 
Sai Guruprasad Jakkala
Join Date: Jan 2017
Posts: 34
Rep Power: 9
saiguruprasad 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
I am trying to use the DESModelRegions for the k-Omega SST DES model, but I don't think it is supported with this code.

Is there any way to make this code work for the k-Omega SST DES model?

I got this error when I used it for k-Omega SST DES : "No DES turbulence model found in database"
saiguruprasad is offline   Reply With Quote

Old   December 4, 2018, 16:41
Default
  #25
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 answers:

@ch_jaehnel: Sorry for the very late reply:
Quote:
Originally Posted by ch_jaehnel View Post
Sorry forgot to mention: I use OF 2.3.1

I have also acces to OF5.0, the result is the same.
The problem is that execFlowFunctionObjects does not load the necessary dependencies for transport properties, turbulence and so on.
With OpenFOAM 5, use the "-postProcess" option with the solver, which will load in the necessary properties and fields. See the User Guide for more details.

----------

@saiguruprasad:
Quote:
Originally Posted by saiguruprasad View Post
I am trying to use the DESModelRegions for the k-Omega SST DES model, but I don't think it is supported with this code.

Is there any way to make this code work for the k-Omega SST DES model?

I got this error when I used it for k-Omega SST DES : "No DES turbulence model found in database"
I... I don't even know what to tell you exactly... please read this thread: How to give enough info to get help - hopefully you will understand why I don't even know what answer to give you
__________________
wyldckat is offline   Reply With Quote

Old   December 4, 2018, 22:19
Question
  #26
Member
 
Sai Guruprasad Jakkala
Join Date: Jan 2017
Posts: 34
Rep Power: 9
saiguruprasad is on a distinguished road
I am sorry for not being verbose about the problem before.

I am trying to simulate Couette flow at Re_w=8600 using k-\omega SST DES model in OF-5.x. I used perturbUChannel to set up the initial conditions for the flow to sustain turbulence. Running a LES simulation, the instantaneous and mean velocity should be different. But I was not able to achieve this using k-\omega SST DES.

I wanted to use DESModelRegions to check how much of the area was being solved using LES and RANS. I downloaded the code and compiled it without errors. I added the folowing line to my controlDict:
Code:
functions
{
desField
    {
        type            DESModelRegions;
        functionObjectLibs ("libDESModelRegions.so");
        writeControl writeTime;
    }
}
In the log file, I got the following output:
Quote:
DESModelRegions desField write:
No DES turbulence model found in database
I would like to know if I can use DESModelRegions with k-\omega SST DES model in OF-5.x.
saiguruprasad is offline   Reply With Quote

Old   December 5, 2018, 05:46
Default
  #27
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 question: What is the exact line you used to define the turbulence model in the file "turbulenceProperties"?
wyldckat is offline   Reply With Quote

Old   December 5, 2018, 22:39
Default
  #28
Member
 
Sai Guruprasad Jakkala
Join Date: Jan 2017
Posts: 34
Rep Power: 9
saiguruprasad is on a distinguished road
Code:
simulationType  LES;

LES
{
    LESModel        kOmegaSSTDES;

    turbulence      on;

    printCoeffs     on;

    delta               cubeRootVol;

    printCoeffs         on;

    turbulence          on;

    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;
    }
}
This is my turbulenceProperties file
saiguruprasad is offline   Reply With Quote

Old   December 6, 2018, 12:38
Default
  #29
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 @saiguruprasad: Many thanks for all of the details, because I'm not very familiar with DES and how it's implemented.


After taking a better look, I roughly remembered things and then noticed what I wrote back when I created the repository and I quote: https://github.com/wyldckat/DESModel...#how-to-use-it

Quote:
You must use the turbulence model SpalartAllmarasDES or one of its derivatives, as shown in the diagram here: https://cpp.openfoam.org/v5/classFoa...lmarasDES.html
In other words, "kOmegaSSTDES" is not supported because it does not provide the necessary calculations for differentiate between RAS and LES


In more detail, with the SpalartAllmarasDES models, the calculation of the model regions field is calculated as indicated here: https://cpp.openfoam.org/v5/SpalartA...ce.html#l00379
But the problem is that it's not clear how it should be calculated for "kOmegaSSTDES", not even back in OpenFOAM 2.3.


If you do some research on the topic and figure out how it should be calculated, we can then work on implementing that calculation.
wyldckat is offline   Reply With Quote

Old   February 21, 2019, 10:44
Default DESModelRegions Usage
  #30
Member
 
sibo
Join Date: Oct 2016
Location: Chicago
Posts: 55
Rep Power: 9
sibo 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
Hi Bruno,

Firstly thanks a lot for providing this utility for OF 5.
I want to test this function in a tutorial case pitzDaily using SpalartAllmarasDES model. But the results show that

Code:
DESModelRegions desField write:
    No DES turbulence model found in database
I was following the instruction https://github.com/wyldckat/DESModelRegions to build it.

I attached my case here. Could you help me to test it?
Thanks!
Attached Files
File Type: zip pitzDaily.zip (16.3 KB, 7 views)
wyldckat likes this.
sibo is offline   Reply With Quote

Old   February 24, 2019, 18:10
Default
  #31
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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:
Quote:
Originally Posted by sibo View Post
I attached my case here. Could you help me to test it?
Many thanks for the feedback and test case! I had made a mistake in how the model is constructed for compressible flow.

If you downloaded the ZIP file, then please do another download and build again, because I have committed the bug fix just now.

If you downloaded using Git, then go into the folder where you've placed the "DESModelRegions" source code and run:
Code:
git pull
wmake
Then try running the case once again! It should now work as intended.
__________________
wyldckat is offline   Reply With Quote

Old   February 24, 2019, 18:31
Default
  #32
Member
 
sibo
Join Date: Oct 2016
Location: Chicago
Posts: 55
Rep Power: 9
sibo is on a distinguished road
Thanks a lot!

It works fine now.
wyldckat likes this.
sibo is offline   Reply With Quote

Old   April 19, 2019, 19:12
Default Implementation for kwSST-DES
  #33
New Member
 
Carlos G. Ramirez R.
Join Date: Oct 2014
Posts: 3
Rep Power: 11
CarlosGRR 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 for this function for the latest OpenFOAM versions. As you mentioned in your GitHub documentation, this function only supports Spalart-Allmaras-DES models. It would be great that this were uptated to work with kwSST-DES hybrid models, available in OpenFOAM too.

Thanks again for this contribution,

Carlos
CarlosGRR is offline   Reply With Quote

Old   April 21, 2019, 06:17
Default
  #34
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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:
  1. Even though I have been informed and given permission to bring in adapted code to the repo I'm maintaining, I haven't had time to work on it: https://github.com/wyldckat/DESModelRegions/issues/1
  2. On that report I was informed that the versions at OpenFOAM.com do have that capability, namely they do have the DESModelRegions for the k-omega variant with DES.
__________________
wyldckat 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 10:05
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42
Is function object forceCeofficient compatible with interDyMFoam? Philer OpenFOAM Running, Solving & CFD 0 March 10, 2010 10:30
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35


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