CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

OF 4.0 multiregion case calculate yPlus

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 3 Post By igor.leo93
  • 4 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 18, 2016, 14:59
Question OF 4.0 multiregion case calculate yPlus
  #1
New Member
 
Paolo Bianchini
Join Date: Jun 2016
Location: Berkeley
Posts: 2
Rep Power: 0
pbnuclex is on a distinguished road
Good morning Foamers!

I am currently working on a multiregion case with chtMultiRegionSimpleFoam. I want to calculate yPlus for all time directories for a certain region, so after the parallel solving and the reconstruction I typed:

Quote:
postProcess -func yPlus -region <regionName>
(where the region I named is a region in which I have a flow field) and the standard output showed (this is just the end part but it is all the same):

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.0-gcc4.8.5                          |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 4.0-gcc4.8.5
Exec   : postProcess -func yPlus -region coolant
Date   : Aug 18 2016
Time   : 12:01:48
Host   : "ln003.brc"
PID    : 94200
Case   : /global/scratch/pbianchi/case/gen3nea
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh coolant for time = 0

--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 644
    Caught FatalError 
--> FOAM FATAL ERROR: 

    request for objectRegistry region0 from objectRegistry gen3nea failed
    available objects of type objectRegistry are
1(coolant)

    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::objectRegistry]
    in file /global/home/users/pbianchi/OpenFOAM/OpenFOAM-4.0-gcc4.8.5/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193.

Executing functionObjects

Time = 0

Reading fields:


[...]

Executing functionObjects

Time = 4900

Reading fields:


Executing functionObjects

Time = 5000

Reading fields:


Executing functionObjects

End
Then I tried:

Quote:
postProcess -func "yPlus" -region <regionName>
and the answer was the same. In both cases, no yPlus field was present, in any time directory.

I am new to version 4.0, and in my previous version (3.0.1) I simply used the yPlus utility on its own. Can someone tell me how to calculate yPlus in version 4.0, or link me some useful documentation or tutorial in which the correct usage of postProcess for yPlus is shown?

Thank you in advance, have a good day!

Last edited by pbnuclex; August 18, 2016 at 16:04. Reason: missing info
pbnuclex is offline   Reply With Quote

Old   August 19, 2016, 09:40
Default
  #2
New Member
 
igor.leo93's Avatar
 
Igor Leonardo
Join Date: Jul 2016
Location: Brazil - SP - SJC
Posts: 20
Rep Power: 10
igor.leo93 is on a distinguished road
Hello,
Did you try using the solver postProcess?
Like :

simpleFoam -postProcess -func "yPlus"

I don't know if that will do, but i remember having problems with yPlus a few days ago, and adding the solver postProcess did it.

Regards,
Igor Carvalho
vsammartano, XU0207 and Harald like this.
igor.leo93 is offline   Reply With Quote

Old   May 1, 2017, 09:53
Default
  #3
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 17
student666 is on a distinguished road
Hi guys,

have you solved your issues with openfoam 4.0 postProcess utility?
student666 is offline   Reply With Quote

Old   May 1, 2017, 17:42
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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 to all!

The problem is related to multi-region solvers, for which Igor gave the partial solution, i.e. use the chtMultiRegionSimpleFoam solver...

Wait, OK, I see the problem, the steps for being able to use this in OpenFOAM 4 are as follows:
  1. Edit the file "system/controlDict" and add the following function object inside "functions", where "bottomAir" is the name of the region:
    Code:
      yPlusBottomAir
      {
        type            yPlus;
        libs            ("libfieldFunctionObjects.so");
    
        executeControl  writeTime;
        writeControl    writeTime;
    
        region  bottomAir;
      }
    So that it looks something like this:
    Code:
    functions
    {
      yPlusBottomAir
      {
        type            yPlus;
        libs            ("libfieldFunctionObjects.so");
    
        executeControl  writeTime;
        writeControl    writeTime;
    
        region  bottomAir;
      }
    }
  2. Then finally run:
    Code:
    chtMultiRegionSimpleFoam -postProcess
The contents for the function object came from the file "$FOAM_ETC/caseDicts/postProcessing/fields/yPlus", which I found by running this command:
Code:
find $FOAM_ETC -name yPlus

There are currently two bug reports regarding this issue, which were posted over the past 48h or so on this topic, so it's really unfortunate that this wasn't reported sooner. The bug reports are as follows:
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 14, 2018, 10:50
Default SimpleGraph for multiple regions
  #5
New Member
 
Amadeus Wolf
Join Date: Dec 2017
Location: Germany
Posts: 11
Rep Power: 8
AmBeWo is on a distinguished road
Hello everybody,

unfortunately I still have problem with using postProcess in a multiple region case even working through this thread and the bug reports.

The Problem is as follow:

I am using the "pemfcSinglephaseNonIsothermalSolver" for fuel cell simulation in OF 4.0.
Information can be found here:
pemfcSinglePhaseModel-4.0 on OpenFOAM

I want to sample data through the (sub)region "air" along a line using "postProcess -func singleGraph". The volScalarField YO2air is only present in this region.

Therefore I have system/simpleGraph as follow:

Code:
singleGraph
{
start   (0.005191 0.0008 0);
end     (0.005191 0.0008 0.022);
//fields  (T);
fields  (YO2air);

// Sampling and I/O settings
#includeEtc "caseDicts/postProcessing/graphs/sampleDict.cfg"

// Override settings here, e.g.
 setConfig { type midPoint;
                     axis z;
             }
// Must be last entry
#includeEtc "caseDicts/postProcessing/graphs/graph.cfg"
}
and systen/controlDict entry

Code:
functions
{
singleGraphAir
  {
    type            singleGraph;
    libs            ("libfieldFunctionObjects.so");

    executeControl  writeTime;
    writeControl    writeTime;

    region  air;
  }

//#includeFunc singleGraph
}
When I run the command "postProcess -func singleGraph -region air" I get the following error:


Code:
Create time

Create mesh air for time = 0

--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 644
    Caught FatalError 
--> FOAM FATAL ERROR: 

    request for objectRegistry region0 from objectRegistry test failed
    available objects of type objectRegistry are
1(air)

    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::objectRegistry]
    in file /scratch/OpenFOAM/OpenFOAM-4.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193.

Time = 0

Reading fields:
    volScalarFields: YO2air

Executing functionObjects

Time = 60

Reading fields:
    volScalarFields: YO2air

Executing functionObjects

Time = 120

Reading fields:
    volScalarFields: YO2air

Executing functionObjects

End
The option to run the utility using the solver as mentioned before -> "pemfcSinglephaseNonIsothermalSolver -postProcess" -> is not possible, because the "pemfcSinglePhaseNonIothermalSolver" does not support the OPTION postProcess:


Code:
Usage: pemfcSinglephaseNonIsothermalSolver [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -noFunctionObjects
                    do not execute functionObjects
  -parallel         run in parallel
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

Using: OpenFOAM-4.0 (see www.OpenFOAM.org)
Build: 4.0

--> FOAM FATAL ERROR: 
Invalid option: -postProcess
Using "postProcess -func singleGraph" on the global mesh (to plot data of field T) works fine.


It would be very awesome if someone could help. Thanks in advance :-)


Greetings,
Amadeus
AmBeWo is offline   Reply With Quote

Old   December 17, 2018, 04:18
Default Solution
  #6
New Member
 
Amadeus Wolf
Join Date: Dec 2017
Location: Germany
Posts: 11
Rep Power: 8
AmBeWo is on a distinguished road
Good Morning,


I found the solution. The postProcess utility for multiple regions works in this case with an extra entry for the region in the "singleGraph" dict:


Code:
singleGraph
{
start   (0.005191 0.0008 0);
end     (0.005191 0.0008 0.022);
//fields  (T);
fields  (YO2air);

// Sampling and I/O settings
#includeEtc "caseDicts/postProcessing/graphs/sampleDict.cfg"

// Override settings here, e.g.
 setConfig { type midPoint;
               axis z;
             }

region air;

// Must be last entry
#includeEtc "caseDicts/postProcessing/graphs/graph.cfg"
}
The command is then: postProcess -func singleGraph -region air


Greetings
Amadeus
AmBeWo is offline   Reply With Quote

Old   July 16, 2020, 05:27
Default
  #7
Member
 
Join Date: Mar 2015
Posts: 36
Rep Power: 11
K.C. is on a distinguished road
Dear Foamers,


a simple question to the topic of yPlus:
I want to get the written field yPlus at "writeTime", but would like to get the values calculated and written to the terminal every timeStep. Therefore I tried
Code:
       yPlus1
      {
          type                yPlus;
          libs                ("libfieldFunctionObjects.so");
          executeControl      timeStep;
          executeInterval     1;
          writeControl        writeTime;
          writeFields         true; 
      }

But i dont get my terminal output. I am using OF5. Does anybody see my mistake?


Kind regards,
K.C.
K.C. is offline   Reply With Quote

Reply

Tags
openfoam4.0, postprocess, yplus


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
How to calculate yPlus in DNS tzqfly OpenFOAM Post-Processing 2 June 26, 2019 00:01
problem in calculate yplus value? hamidciv CFX 9 September 15, 2015 06:30
How to calculate and plot Cp Vs Theta in a 2d cylider case zahid OpenFOAM Post-Processing 0 April 21, 2014 03:05
Changing the grid on the same set-up Katya FLUENT 7 October 8, 2009 17:31
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 13:24


All times are GMT -4. The time now is 15:24.