CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Calculate mean wind speed (http://www.cfd-online.com/Forums/openfoam-solving/71965-calculate-mean-wind-speed.html)

Alicelin January 21, 2010 05:37

Calculate mean wind speed
 
Dear all,

I just executed turbFoam and got the U values for every time step. Now I want to find out the mean wind speed so I want to ask if there's any command that can calculate the time-averaged wind speed?

Thanks!

Alice

Alicelin January 21, 2010 06:29

Sorry just want to mention that I've added the following thing into controlDict:

function
{
fieldAverage1
{
// Type of functionObject
type fieldAverage;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldAverage.so");
// Whether to perform a clean restart, or start from previous
// averaging into if available
cleanRestart true;
// Whether to reset the averaged fields after they have been written.
// Used to average over only the preceding write interval for transient cases.
resetOnOutput true;
// Fields to be averaged - runTime modifiable
fields
(
U
{
mean on;
prime2Mean on;
base time;
}
p
{
mean on;
prime2Mean on;
base time;
}
Unorm
{
mean on;
prime2Mean on;
base time;
}
);
}
}

********************************************
and I've executed turbFoam but seems nothing new can be found in the results:(

Can anyone help me with the problem?

Alice

Edison_Ge September 6, 2010 11:42

Quote:

Originally Posted by Alicelin (Post 243271)
Sorry just want to mention that I've added the following thing into controlDict:

function
{
fieldAverage1
{
// Type of functionObject
type fieldAverage;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldAverage.so");
// Whether to perform a clean restart, or start from previous
// averaging into if available
cleanRestart true;
// Whether to reset the averaged fields after they have been written.
// Used to average over only the preceding write interval for transient cases.
resetOnOutput true;
// Fields to be averaged - runTime modifiable
fields
(
U
{
mean on;
prime2Mean on;
base time;
}
p
{
mean on;
prime2Mean on;
base time;
}
Unorm
{
mean on;
prime2Mean on;
base time;
}
);
}
}

********************************************
and I've executed turbFoam but seems nothing new can be found in the results:(

Can anyone help me with the problem?

Alice

Hi, Alice,
I've been stuck in the same problem. By searching the forum, I think the magic of averaging function lies in set it before running the simulation. Anyway, I have got time to test it.
http://www.cfd-online.com/Forums/ope...tatistics.html
Have you worked out it?Waiting to hear your latest statues.

eelcovv September 6, 2010 12:22

postAverage
 
Hi Alice

I have been searching for the same utility to be able to do the averaging of the data fields in time after that you have run the simulation. This is handy in case that you forgot to switch on the averaging during the run, or that you want to do an average over a shorter time period in case that the beginning of the simulation was not conveger yet.

Anyway, I ended up with writing my own utility which basically does what you want. Please have a look at the thread below. The utility is at the bottom of the page. Note that you still need to set the fields properly in the system/controlDict file

Cheers,

Eelco

http://www.cfd-online.com/Forums/ope...rocessing.html


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