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

simpleFoam -postProcess -func R

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 2017, 01:53
Default simpleFoam -postProcess -func R
  #1
Member
 
Join Date: Apr 2017
Posts: 68
Rep Power: 9
kaaja is on a distinguished road
Hi,

I have trouble getting results for the Reynold's stresses when using the command

Code:
simpleFoam -postProcess -func R
Using the above command, I get the following error message

Code:
Build  : 4.1
Exec   : simpleFoam -postProcess -func R
Date   : Apr 18 2017
Time   : 07:42:47
Host   : ""
PID    : 10656
Case   : /home/.../run16
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 for time = 0


SIMPLE: convergence criteria
    field p     tolerance 0.01
    field U     tolerance 0.001
    field "(k|epsilon|omega|f|v2)"     tolerance 0.001

turbulenceFields R: storing fields:
    turbulenceProperties:R

Time = 0
Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmegaSST
Selecting patchDistMethod meshWave
kOmegaSSTCoeffs
{
    alphaK1         0.85;
    alphaK2         1;
    alphaOmega1     0.5;
    alphaOmega2     0.856;
    gamma1          0.555556;
    gamma2          0.44;
    beta1           0.075;
    beta2           0.0828;
    betaStar        0.09;
    a1              0.31;
    b1              1;
    c1              10;
    F3              false;
}

No MRF models present

--> FOAM Warning : 
--> FOAM FATAL IO ERROR: 
keyword boundaryField is undefined in dictionary "/home/.../run16/0/turbulenceProperties:R"

file: /home/.../run16/0/turbulenceProperties:R from line 18 to line 20.

    From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const
    in file db/dictionary/dictionary.C at line 642.
The file "turbulenceProperties:R " looks like:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volSymmTensorField;
    location    "0";
    object      turbulenceProperties:R;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform (0.233333 -0 -0 0.233333 -0 0.233333);
Does anyone have a clue to what's going wrong here?
kaaja is offline   Reply With Quote

Old   March 23, 2018, 12:59
Default
  #2
aow
Member
 
Andrew O. Winter
Join Date: Aug 2015
Location: Seattle, WA, USA
Posts: 78
Rep Power: 10
aow is on a distinguished road
Hello Kaaja,

I realize this is roughly a year later, but I was wondering if you figured out your problem (since I believe I'm having a similar one)? My guess after reading the error is that it looks like you were missing boundary condition definitions for the Reynolds stress tensor since all that the command "<solverName> -postProcess -func R" does is to generate a file that has the full field data for each cell without specifying any boundary conditions. If this was the case, what sort of boundary conditions did you apply for R?

Also, do you have to change the file name from "turbulenceProperties:R" (the file name generated by the postProcess command) to "R" in the time directories? After looking at the source code in "LRR.H" and "LRR.C" it looks like they're using "R".

Best regards,
Andrew

PS - In case it matters, I've attached the error report and I am using Pablo Higuera's "olaDyMFoam" solver, which is a modification of the standard "interFoam" solver to allow for dynamic mesh motion for wave generation boundary conditions (I'm trying to model a piston wave maker in a long flume; see https://github.com/phicau/olaFlow for the solver code).
Attached Files
File Type: txt LRRtestErrorReport.txt (11.4 KB, 38 views)
aow is offline   Reply With Quote

Old   March 29, 2018, 09:25
Default
  #3
Member
 
Join Date: Apr 2017
Posts: 68
Rep Power: 9
kaaja is on a distinguished road
Hello Andrew,

I am sad to say that I don't remember if I solved that problem, and that I don't have capacity these next 2 months checking it eighter (lot of work).

Probably not the same thing, but I found the following 2 posts I did on somewhat related topics

How to sample turbulenceProperties:R?

https://www.cfd-online.com/Forums/openfoam/187909-reporting-turbulence-fields.html


I hope you will work it out!
kaaja is offline   Reply With Quote

Old   March 29, 2018, 17:40
Default
  #4
aow
Member
 
Andrew O. Winter
Join Date: Aug 2015
Location: Seattle, WA, USA
Posts: 78
Rep Power: 10
aow is on a distinguished road
Thanks kaaja,

I managed to get my LRR simulation working using Rxx = Ryy = Rzz = 2k/3 and Rxy = Rxz = Ryz = 0 for the internalField. I used the following BCs for R in my 0 directory.

For a solid wall boundary...
Code:
flumeWall
    {
        type            kqRWallFunction;
        value           uniform (0 0 0 0 0 0);
    }
For an atmosphere boundary at the top of my wave flume...
Code:
atmosphere
    {
        type            inletOutlet;
		inletValue      uniform (0 0 0 0 0 0);
		value           uniform (0 0 0 0 0 0);
    }
I also had to adjust my fvSchemes and fvSolution files too since there weren't any entries for R-related calculations.

For fvSchemes I used...
Code:
ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    div(rhoPhi,U)                                      Gauss limitedLinearV 1;
    div(U)                                                Gauss linear;
    div(phi,alpha)                                     Gauss vanLeer;
    div(phirb,alpha)                                  Gauss interfaceCompression;
    div((muEff*dev(T(grad(U)))))	             Gauss linear;
    div(phi,k)                                           Gauss upwind;
    div(phi,epsilon)                                   Gauss upwind;
    div(phi,omega)                                   Gauss upwind;
    div(phi,R)                                           Gauss upwind;
    div((rhoPhi|interpolate(porosity)),U)     Gauss limitedLinearV 1;
    div(rhoPhiPor,UPor)                              Gauss limitedLinearV 1;
    div(rhoPhi,UPor)                                  Gauss limitedLinearV 1;
    div(rhoPhiPor,U)                                  Gauss limitedLinearV 1;
    div((phi|interpolate(porosity)),k)          Gauss upwind;
    div((phi|interpolate(porosity)),epsilon) Gauss upwind;
    div((phi|interpolate(porosity)),omega)  Gauss upwind;
    div((phi|interpolate(porosity)),R)          Gauss upwind;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p_rgh;
    pcorr;
    alpha.water;
}

wallDist
{
    method meshWave;
}
For fvSolution I used...
Code:
solvers
{
    "alpha.water.*"
    {
        nAlphaCorr      1;
        nAlphaSubCycles 2;
        alphaOuterCorrectors yes;
        cAlpha          1;

        MULESCorr       no;
        nLimiterIter    3;

        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-8;
        relTol          0;
    }

    "pcorr.*"
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-5;
        relTol          0;
    }

    pcorrFinal
    {
        $pcorr;
        relTol          0;
    }

    p_rgh
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-07;
        relTol          0.05;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    "(U|k|epsilon).*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-06;
        relTol          0;
    }
	
    R
    {
	solver          smoothSolver;
        smoother     symGaussSeidel;
        tolerance     1e-8;
        relTol          0;
     }
	
     RFinal
     {
		$R;
		tolerance		1e-08;
		relTol		0;
      }
	
    cellDisplacement
    {
        solver                        GAMG;
        tolerance                    1e-5;
        relTol                         0;
        smoother                   GaussSeidel;
        cacheAgglomeration    false;
        nCellsInCoarsestLevel 10;
        agglomerator              faceAreaPair;
        mergeLevels               1;
    }

    cellDisplacementFinal
    {
        $cellDisplacement;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor   no;
    nOuterCorrectors    1;
    nCorrectors         3;
    nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
    fields
    {
    }
    equations
    {
        ".*" 1;
    }
}
Finally, it should be noted that I used OpenFOAM-5.0 with Pablo Higuera's OLAFOAM (now called olaFlow; see https://github.com/phicau/olaFlow) solvers added too. The case is a highly-modified version of the wavemakerFlume tutorial that came with OLAFOAM.
aow is offline   Reply With Quote

Old   March 29, 2018, 17:48
Default
  #5
aow
Member
 
Andrew O. Winter
Join Date: Aug 2015
Location: Seattle, WA, USA
Posts: 78
Rep Power: 10
aow is on a distinguished road
Also, I forgot to say that I ended up just making a brand new R file in my 0 time directory with the boundary conditions I mentioned previously so I got away with not using the recommended approach of first running a simpler model (kEpsilon) and then changing to the RSM model (LRR).

Since my simulation went so well, I also tried using the SSG model in this same manner at first, which blew up after 0.6 s (my endTime is 25 s). Then I tried using the LRR results at 0.5 s as an initial state for switching to the SSG model, but it also blew up near 1 s so for now I'm just sticking with the LRR model.
aow is offline   Reply With Quote

Reply

Tags
boundaryfield, reynolds stress

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
postProcess Utility: icoFoam -noFunctionObjects Why?How? TeresaT OpenFOAM Post-Processing 8 July 26, 2023 02:41
interFoam vs. simpleFoam channel flow comparison DanM OpenFOAM Running, Solving & CFD 12 January 31, 2020 15:26
postProcess functionality in openFOAM 4 bullmut OpenFOAM Post-Processing 23 July 21, 2017 09:11
simpleFoam parallel solver & Fluent polyhedral mesh Zlatko OpenFOAM Running, Solving & CFD 3 September 26, 2014 06:53
Trying to run a benchmark case with simpleFoam spsb OpenFOAM 3 February 24, 2012 09:07


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