CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   simpleFoam: Reynolds Stress, turbulenceProperties:R, no output (https://www.cfd-online.com/Forums/openfoam/216990-simplefoam-reynolds-stress-turbulenceproperties-r-no-output.html)

FoamingSimon April 26, 2019 08:57

simpleFoam: Reynolds Stress, turbulenceProperties:R, no output
 
Hello,

I am having troubles with extracting the Reynolds stress from a simulation. Wether I use

Code:

"simpleFoam -postProcess -func R"
or (in the controlDict)

Code:

functions
{
    turbulenceFields1
    {
        type        turbulenceFields;
        libs        ("libfieldFunctionObjects.so");
        field                R;
        writeControl        onEnd;
    }
}

The result entire simulation executes well, but the extracted Reynolds stresses is the same:

Code:

No MRF models present

No finite volume options present
    functionObjects::turbulenceFields R writing field: turbulenceProperties:R

Which seems fine, except there is not output. Nothing to be found neither in the folder nor when viewing results via Paraview.

Running more postproccessing together with the Reynolds stress via the controlDict, for instance wallshear stress, works fine and produces:

Code:

    functionObjects::turbulenceFields turbulenceFields1 writing field: turbulenceProperties:R
wallShearStress wallShearStress1 write:
    writing field wallShearStress
    min/max(ground) = (-0.119511319929 -1.42561710357e-18 -2.02731918065e-05), (-0.115200085848 2.42927606607e-18 1.24279923199e-05)

But again, no Reynolds stresses. Which I need.

I am using the "Windows Binary v1812" version of OpenFOAM.

Does anyone have suggestions on what to do, to get the Reynolds stress?
Or a way of fixing my problem?

FoamingSimon May 9, 2019 03:46

Still no solutions in hand, but more information gathered:

When running either

Code:

postProcess -func R
or

Code:

postProcess -funcs '(turbulenceFields)'
The result is:

Code:

Executing functionObjects


--> FOAM FATAL ERROR:
Turbulence model not found in database, deactivating

    From function bool Foam::functionObjects::turbulenceFields::compressible()
    in file turbulenceFields/turbulenceFields.C at line 107.

FOAM exiting


blackpingu May 15, 2019 13:55

Try this maybe :

Code:

YourSolverHere -postProcess -func R

FoamingSimon May 16, 2019 02:41

Hello Blackpingu

Unfortunately, it does not make any difference. An excerpt of the result from running above code is:

Code:

Time = 450
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 kEpsilon
kEpsilonCoeffs
{
    Cmu            0.03;
    C1              1.21;
    C2              1.92;
    sigmaEps        1.3;
    C3              0;
    sigmak          1;
}

No MRF models present

No finite volume options present
    functionObjects::turbulenceFields R writing field: turbulenceProperties:R

Also, still no "R" in the postprocess folder

blackpingu May 16, 2019 04:23

Quote:

Originally Posted by FoamingSimon (Post 733761)
Hello Blackpingu

Unfortunately, it does not make any difference. An excerpt of the result from running above code is:

Code:

Time = 450
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 kEpsilon
kEpsilonCoeffs
{
    Cmu            0.03;
    C1              1.21;
    C2              1.92;
    sigmaEps        1.3;
    C3              0;
    sigmak          1;
}

No MRF models present

No finite volume options present
    functionObjects::turbulenceFields R writing field: turbulenceProperties:R

Also, still no "R" in the postprocess folder



Check your time folders for a file named "turbulenceProperties:R", in folder "450" for example.

FoamingSimon May 16, 2019 05:24

No such file nor anything similar.
If I postprocess for yplus for example, I do get a "yPlus"-file with the results.

blackpingu May 16, 2019 05:56

That is strange, what case are you running?

FoamingSimon May 16, 2019 07:03

1 Attachment(s)
Indeed.

It does not matter what I run, it seems.
But currently, I run a modified "turbine siting tutorial". Basically a square domain, with ABL inflow.

I have attached a 2D-ABL flow study I have made, where I cannot extract the Reynold's stresses as well.

blackpingu May 16, 2019 09:40

Try to change to this in the controldict file instead of "onEnd"

Code:

turbulenceFields1
    {
        type        turbulenceFields;
        libs        ("libfieldFunctionObjects.so");
        field                R;
        writeControl        writeTime;
    }


or

Code:

turbulenceFields1
    {
        type        turbulenceFields;
        libs        ("libfieldFunctionObjects.so");
        field                R;
        writeControl        timeStep;
    }


FoamingSimon May 16, 2019 10:25

Thank you for your perseverance, Blackpingu, but no - changing the writeControl to either writeTime or timeStep did not result in any Reynolds stress outputs. Neither in the postProcess folder, nor in any of the arbitrary timestep folders.

Although, the writeControl "timeStep" did result in a lot of empty folders - which makes sense, since an output is written for every time increment.

Do you have any other ideas?

blackpingu May 16, 2019 10:30

Quote:

Originally Posted by FoamingSimon (Post 733828)
Thank you for your perseverance, Blackpingu, but no - changing the writeControl to either writeTime or timeStep did not result in any Reynolds stress outputs. Neither in the postProcess folder, nor in any of the arbitrary timestep folders.

Although, the writeControl "timeStep" did result in a lot of empty folders - which makes sense, since an output is written for every time increment.

Do you have any other ideas?

Not that i can think of, but I wasn't able to run your case properly, didn't get files for U or P or anything, do you get decent results for the velocity? Which OF version are you running?

FoamingSimon May 16, 2019 11:40

1 Attachment(s)
That sounds weird, as I get reasonable results, as can be seen on the attached .png-file, showing the velocity profiles through the domain.

- Did you run it via the Allrun-file?
Otherwise, you would have to copy the 0.orig and rename it 0 before running it.

I am using the "Windows Binary v1812" version of OpenFOAM.

blackpingu May 16, 2019 15:25

Quote:

Originally Posted by FoamingSimon (Post 733848)
That sounds weird, as I get reasonable results, as can be seen on the attached .png-file, showing the velocity profiles through the domain.

- Did you run it via the Allrun-file?
Otherwise, you would have to copy the 0.orig and rename it 0 before running it.

I am using the "Windows Binary v1812" version of OpenFOAM.

Yep I did but no luck

FoamingSimon May 17, 2019 02:20

Quote:

Originally Posted by blackpingu (Post 733866)
Yep I did but no luck

Maybe this is due to some differences in versions of OF.
What version do you use?
And is it normally possible for you to extract the Reynolds stresses?

FoamingSimon May 17, 2019 02:45

New error type..
Using:
Code:

postProcess -func 'components(turbulenceProperties:R)'
The result is:
Code:

Time = 0

Reading fields:

Executing functionObjects
--> FOAM Warning :    functionObjects::components components(turbulenceProperties:R) failed to execute.

For each time..

blackpingu May 19, 2019 14:37

I use OpenFOAM 5, and yes works everytime.

FoamingSimon October 10, 2019 07:24

Switched OF version from the windows binary docker version to ubuntu via windows, and everything works like a charm now.


All times are GMT -4. The time now is 02:42.