CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Average of Uprime2Mean(Reynolds stresses) in time and Uprime3mean definition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 3, 2022, 10:19
Default Average of Uprime2Mean(Reynolds stresses) in time and Uprime3mean definition
  #1
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 205
Rep Power: 7
farzadmech is on a distinguished road
Hello all
I want to average prime2Mean in time. There must be two options;
1- Adding new volScalarfield named RXX,RYY,RZZ,.... an then average in time(This should work fine)
2- Since we have generated Uprime2Mean already in U section, we may average it as a new parameter again without adding RXX,RYY,RZZ,.... .

Also I want to define Uprime3mean which is the third moment of velocity. I believe it must be defined in "libfieldFunctionObjects.so", but I can find the file to define this new parameter.

Do you have any suggestion for my questions?


Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     pimpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         20;

deltaT          0.2;

writeControl    timeStep;

writeInterval   10;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    fieldAverage1
    {
        type            fieldAverage;
        libs            ("libfieldFunctionObjects.so");
        writeControl    writeTime;

        fields
        (
            U
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }

        );
    }

}

// ************************************************************************* //
farzadmech is offline   Reply With Quote

Old   August 3, 2022, 10:30
Default hi
  #2
New Member
 
sina
Join Date: Jul 2013
Posts: 21
Rep Power: 12
aghsin is on a distinguished road
Hi,
uprime2Mean is already averaged in time. why do you want to average again?
aghsin is offline   Reply With Quote

Old   August 3, 2022, 13:05
Default
  #3
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 205
Rep Power: 7
farzadmech is on a distinguished road
You are right, it is already averaged. What about Uprime3mean? Where is the function object file so I can modify it?


Thanks,
Farzad

Quote:
Originally Posted by aghsin View Post
Hi,
uprime2Mean is already averaged in time. why do you want to average again?
farzadmech is offline   Reply With Quote

Old   August 3, 2022, 18:40
Default
  #4
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 313
Rep Power: 15
agustinvo is on a distinguished road
Quote:
Originally Posted by farzadmech View Post
You are right, it is already averaged. What about Uprime3mean? Where is the function object file so I can modify it?


Thanks,
Farzad
Do you mean a rank 3 tensor? I saw something about that a long time ago (at least in the programming guide they are mentioned) in the code, but it was not implemented or I never knew how to use it.
agustinvo is offline   Reply With Quote

Old   August 3, 2022, 22:19
Default
  #5
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 205
Rep Power: 7
farzadmech is on a distinguished road
I want R111,R222,R333 and etc.


Farzad

Quote:
Originally Posted by agustinvo View Post
Do you mean a rank 3 tensor? I saw something about that a long time ago (at least in the programming guide they are mentioned) in the code, but it was not implemented or I never knew how to use it.
farzadmech is offline   Reply With Quote

Old   August 3, 2022, 23:10
Default
  #6
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 205
Rep Power: 7
farzadmech is on a distinguished road
My main question is that where is Reynolds stresses defined? I found libfieldFunctionObjects but I did not see where Reynolds stresses has been defined. I want to add my definition there.

Thanks,
Farzad

Quote:
Originally Posted by farzadmech View Post
I want R111,R222,R333 and etc.


Farzad
farzadmech is offline   Reply With Quote

Old   August 5, 2022, 13:53
Default
  #7
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 313
Rep Power: 15
agustinvo is on a distinguished road
The Reynolds stress tendor is defined in the turbulence model library. If you are using a eddy viscosity model R is not callable unless you use the turbulenceFields functioObject. If you are using a Reynolds stress model you would have no problems.

The problem you might have when computing the UPrime3Mean is that there are no rank three volFields. You should somehow load U and UMean and define your third momentum tensor instantaneously, but you should create three tensor fields and average them in time. Check the fieldAverage function to help you with that.
agustinvo is offline   Reply With Quote

Reply

Tags
openfoam, time-averaged, uprime2mean, uprime3mean


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



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