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

post-processing utility R, calculating Reynolds stress tensor

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

Like Tree4Likes
  • 1 Post By volker
  • 2 Post By chegdan
  • 1 Post By rajeshkunwar

Reply
 
LinkBack Thread Tools Display Modes
Old   February 3, 2010, 05:35
Default post-processing utility R, calculating Reynolds stress tensor
  #1
New Member
 
Volker Tritschler
Join Date: Jan 2010
Posts: 20
Rep Power: 6
volker is on a distinguished road
Hi,

I experienced a problem when using the post-processing utility R to evaluate the Reynolds stress tensor based on a compressible simulation using a kEpsilon turbulence model. The Reynolds stress tensor is needed as initialization for a RSM simulation.
The problem I experienced is basically related to the compressible nature of my simulation and it seems that the R-utility is written exclusively for incompressible flows (makes use of transportProperties file).
I searched already the forum without success.
Does anybody have a suggestion how to resolve that issue?


I'm happy about any idea.


Greets, Volker
maphd likes this.
volker is offline   Reply With Quote

Old   February 28, 2010, 13:02
Default
  #2
Member
 
Stefan
Join Date: Jan 2010
Location: Kiel, Germany
Posts: 68
Rep Power: 6
SD@TUB is on a distinguished road
Hello Volker,

reading in Doxygen --> base class for incompressible turbulence models, i guess that R just work for incompressible turbulent calcualtions so far.

I tried some sampling with your mentioned tool and i'm a little confused, 'cause i get six columns for the reynolds stress tensor in my output file!
Could you/someone explain me the columns? In Doxygen i can't find the source of the utility R!
For future development of post-processing tools it would be useful to include an obvious header to the produced output files.


Regards,
/Stefan
SD@TUB is offline   Reply With Quote

Old   April 13, 2011, 12:46
Default
  #3
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 509
Rep Power: 17
chegdan will become famous soon enough
Quote:
Originally Posted by SD@TUB View Post
Hello Volker,

reading in Doxygen --> base class for incompressible turbulence models, i guess that R just work for incompressible turbulent calcualtions so far.

I tried some sampling with your mentioned tool and i'm a little confused, 'cause i get six columns for the reynolds stress tensor in my output file!
Could you/someone explain me the columns? In Doxygen i can't find the source of the utility R!
For future development of post-processing tools it would be useful to include an obvious header to the produced output files.


Regards,
/Stefan
I know this is old, but I thought I would answer anyway.

You only have 6 components because you have a symmetric tensor Rxx, Ryy, Rzz, Rxy, Rxz, Ryz. that means that Rxy=Ryx, Rxz=Rzx, and Ryz=Rzy.
chegdan is offline   Reply With Quote

Old   May 1, 2013, 23:39
Default
  #4
New Member
 
Rajesh Kumar
Join Date: Apr 2009
Posts: 23
Rep Power: 7
rajeshkunwar is on a distinguished road
Hi Volker,

I am also facing the same problem while getting Reynolds stress. Did u solve this issue? If yes, please post the solution so that others can also get benefited.

Regards
Rajesh
rajeshkunwar is offline   Reply With Quote

Old   May 2, 2013, 08:40
Default
  #5
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 509
Rep Power: 17
chegdan will become famous soon enough
You can make a custom tool to calculate R for compressible cases. To create a compressible turbulence model you will need to read in:

Code:
    Info<< "Creating turbulence model\n" << endl;
    autoPtr<compressible::turbulenceModel> turbulence
    (
        compressible::turbulenceModel::New
        (
            rho,
            U,
            phi,
            thermo
        )
    );
So you will need a thermo object to pass to the constructor. Basically, you will have to look at a compressible solver (e.g. rhoPimpleFoam) and add things like a compressible phi, thermo from basiPsiThermo, etc. Most of these changes are in the createFields.H file in the R utility....but I suggest you make your own utility separately called something like "Rcompressible". Additioanlly, you will have to change some entries in the Make/Options file to let the compiler know where to search for these new "compressible" classes. Hope this helps.
mgg and charmc like this.
__________________
Dan

Find me on twitter @dancombest

Last edited by chegdan; May 2, 2013 at 16:25. Reason: more details
chegdan is offline   Reply With Quote

Old   May 2, 2013, 13:09
Default
  #6
New Member
 
Rajesh Kumar
Join Date: Apr 2009
Posts: 23
Rep Power: 7
rajeshkunwar is on a distinguished road
Thanks Mr. Daniel for your help.

I have created the utility for computing Reynolds stresses for compressible solver.

Regards
Rajesh
charmc likes this.
rajeshkunwar is offline   Reply With Quote

Old   July 20, 2013, 10:14
Default
  #7
New Member
 
Join Date: Jan 2013
Posts: 3
Rep Power: 3
charmc is on a distinguished road
Dear Rajesh:
As a newer to openfoam ! Can you write more detail about how to
creat the utility for computing Reynolds stresses for compressible solver ?
Thank you !
charmc is offline   Reply With Quote

Old   February 19, 2014, 17:16
Question
  #8
New Member
 
Join Date: Jan 2014
Posts: 16
Rep Power: 2
flames is on a distinguished road
Hello there,

In openfoam, what is the order of the components in Reynolds stress tensor? For example, the Reynolds stress is (1,2, 3, 4, 5, 6), how these 6 components corresponds to the Rxx, Ryy ......? Thank you in advance!

flames

Quote:
Originally Posted by chegdan View Post
I know this is old, but I thought I would answer anyway.

You only have 6 components because you have a symmetric tensor Rxx, Ryy, Rzz, Rxy, Rxz, Ryz. that means that Rxy=Ryx, Rxz=Rzx, and Ryz=Rzy.
flames is offline   Reply With Quote

Old   March 27, 2014, 00:37
Default
  #9
New Member
 
JohnKhoo
Join Date: Nov 2012
Posts: 1
Rep Power: 0
johnkh is on a distinguished road
Rxx, Rxy, Rxz, Ryy, Ryz and Rzz correspond to R(0), R(3), R(4), R(1), R(5) and R(2) respectively.
johnkh is offline   Reply With Quote

Old   April 14, 2014, 11:32
Default
  #10
New Member
 
Join Date: May 2013
Posts: 7
Rep Power: 3
maphd is on a distinguished road
Hi,

I have a question: is there a way to read Reynolds stresses directly from Fluent? If you could help me on this, I really appreciate it.

Thanks,
maphd is offline   Reply With Quote

Old   July 30, 2014, 05:14
Default
  #11
New Member
 
Jens
Join Date: Apr 2014
Posts: 14
Rep Power: 2
jensi_t is on a distinguished road
Hey maphd,

you can use the fluentDataToFoam utility, but you have to adapt it bacause Reynolds Stresses are missing:

Code:
    //Reynolds stresses
    
    if (fields.found(128) || fields.found(129) || fields.found(130) || fields.found(131) || fields.found(132) || fields.found(133))
    {
        Info << "Converting reynolds-stresses field" << endl;
        volSymmTensorField R
        (
            IOobject
            (
                "R",
                mesh.time().timeName(),
                mesh,
                IOobject::NO_READ,
                IOobject::NO_WRITE
            ),
            mesh,
            dimensionedSymmTensor("zero", dimensionSet(0, 2, -2, 0, 0, 0, 0), symmTensor::zero)
        );

        if (fields.found(128))
        {
            R.replace
            (
                symmTensor::XX,
                fdc.convertField
                (
                    "UU",   // field name
                    128,           // fluent Unit number
                    dimensionedScalar("zero", dimensionSet(0, 2, -2, 0, 0, 0, 0), 0)
                )
            );
        }

        if (fields.found(129))
        {
            R.replace
            (
                symmTensor::YY,
                fdc.convertField
                (
                    "VV",   // field name
                    129,           // fluent Unit number
                    dimensionedScalar("zero", dimensionSet(0, 2, -2, 0, 0, 0, 0), 0)
                )
            );
        }
        
        if (fields.found(130))
        {
            R.replace
            (
                symmTensor::ZZ,
                fdc.convertField
                (
                    "WW",   // field name
                    130,           // fluent Unit number
                    dimensionedScalar("zero", dimensionSet(0, 2, -2, 0, 0, 0, 0), 0)
                )
            );
        }
        
        if (fields.found(131))
        {
            R.replace
            (
                symmTensor::XY,
                fdc.convertField
                (
                    "UV",   // field name
                    131,           // fluent Unit number
                    dimensionedScalar("zero", dimensionSet(0, 2, -2, 0, 0, 0, 0), 0)
                )
            );
        }
        
        if (fields.found(132))
        {
            R.replace
            (
                symmTensor::YZ,
                fdc.convertField
                (
                    "VW",   // field name
                    132,           // fluent Unit number
                    dimensionedScalar("zero", dimensionSet(0, 2, -2, 0, 0, 0, 0), 0)
                )
            );
        }
        
        if (fields.found(133))
        {
            R.replace
            (
                symmTensor::XZ,
                fdc.convertField
                (
                    "UW",   // field name
                    133,           // fluent Unit number
                    dimensionedScalar("zero", dimensionSet(0, 2, -2, 0, 0, 0, 0), 0)
                )
            );
        }
        R.write();
    }
epsilon as well as i remember

Code:
        if (fields.found(6))
    {
        Info << "Converting dissipation rate field" << endl;
        fdc.convertField
        (
            "epsilon",   // field name
            6,     // fluent Unit number
            dimensionedScalar("zero", dimensionSet(0, 2, -3, 0, 0, 0, 0), 0)
        )().write();
    }

Last edited by jensi_t; August 4, 2014 at 11:52. Reason: I think i mixed the fields up sorry. Now it should work
jensi_t is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reynolds Stress Boundary Conditions tstorm FLUENT 0 July 27, 2009 14:44
Post processing - Wall shear stress Carlo CD-adapco 1 March 4, 2009 07:35
Questions about the Reynolds stress model empirer2002 Main CFD Forum 1 January 5, 2006 07:37
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 17:27
Post Processing in FEM Abhijit Tilak Main CFD Forum 0 April 26, 2004 11:59


All times are GMT -4. The time now is 03:37.