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

Incompressible LES tutorial (oodles) - time averaged statistics

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 2 Post By fs82
  • 2 Post By fs82

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2009, 10:45
Default Incompressible LES tutorial (oodles) - time averaged statistics
  #1
Member
 
Bernard Esterhuyse
Join Date: Mar 2009
Location: Pretoria, South Africa
Posts: 50
Rep Power: 17
bernarde is on a distinguished road
Good day

I have completed the Incompressible LES tutorial (oodles pitzDaily). Viewing the results in paraFoam gives me the field values at discrete time steps throughout the simulation.

However, I would like to view the average over say the last 100 steps, to view the statistics of the solution. Is there a way I can do this in paraFoam?

Also, how is convergence judged in this example? Normally I judge conversion in a LES by looking at velocity at a probe point and observing the instance when this velocity starts fluctuating around a constant value.

Any help on this greatly appreciated.

Regards
bernarde is offline   Reply With Quote

Old   July 10, 2009, 05:47
Default
  #2
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
Hi,

put this in your controlDict for averaging:

functions
(
fieldAverage1
{
// Type of functionObject
type fieldAverage;

// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldAverage.so");

// Fields to be averaged - runTime modifiable
fields
(
U
{
mean on;
prime2Mean on;
base time;
}
p
{
mean on;
prime2Mean on;
base time;
}
);
}
);

If you want to probe points during calculation, there exists another funktion you can turn on in your controlDict:
probes1
{
// Type of functionObject
type probes;

// Where to load it from (if not already in solver)
functionObjectLibs ("libsampling.so");

// Locations to be probed. runTime modifiable!
probeLocations
(
(0.0 0.0 0.0)
);

// Fields to be probed. runTime modifiable!
fields
(
U
p
);
}
arvindpj and amolrajan like this.
fs82 is offline   Reply With Quote

Old   July 10, 2009, 06:05
Default
  #3
Member
 
Bernard Esterhuyse
Join Date: Mar 2009
Location: Pretoria, South Africa
Posts: 50
Rep Power: 17
bernarde is on a distinguished road
Thanks. I figured out how to do this. The problem I have was more to view the averaged values in paraView. I found that you required the UMean and PMean files in the /0 folder to enable paraFoam to load them into the postprocessor.
bernarde is offline   Reply With Quote

Old   July 10, 2009, 06:25
Default
  #4
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
I do not using paraview. I prefer Tecplot, but if you turn on the fieldAverage1 function I mentioned above, you will get at every time step you write out during a run a Umean, Pmean UprimeToMean and PprimeToMean file. I am sure that paraview will load Umean and Pmean, because Tecplot does that to (to be more acurate: the foamToTecplot converter treat this fields). May be paraview will get problems with the symmetic tensor field UPrimeToMean, like the foamToTecplot converter, but I dont think so.
fs82 is offline   Reply With Quote

Old   July 10, 2009, 07:40
Default
  #5
Member
 
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17
leonardo.morita is on a distinguished road
Once your case is finished, I don't think it's possible to access averages if you didn't turn on fieldAverage function during runtime...neither it is possible to do an averaging like you said, over a specific period of time.
leonardo.morita is offline   Reply With Quote

Old   July 10, 2009, 08:01
Default
  #6
Member
 
Bernard Esterhuyse
Join Date: Mar 2009
Location: Pretoria, South Africa
Posts: 50
Rep Power: 17
bernarde is on a distinguished road
Yes, I understand that you need to turn on averaging if you require this for your postprocessing. However, it must be possible to start averaging only after a certain time, say once you have reached psudo-convergence.
bernarde is offline   Reply With Quote

Old   July 10, 2009, 08:37
Default
  #7
Member
 
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17
leonardo.morita is on a distinguished road
Sure, you can follow a variable with probes and once you judge it has "converged", you go to the controlDict and change "off" to "on". So that averaging will start at that time. Then you can check averaging time in the file <time>/uniform/fieldAveragingProperties.
One important thing to know is that if you change off/on once again, averaging will restart.
leonardo.morita is offline   Reply With Quote

Old   July 10, 2009, 08:49
Default
  #8
Member
 
Bernard Esterhuyse
Join Date: Mar 2009
Location: Pretoria, South Africa
Posts: 50
Rep Power: 17
bernarde is on a distinguished road
Thanks, this is what I was looking for, will give it a try. How do you monitor the probe variables - do you make use of paraFoam, or do you just view the values in the console? It would be ideal to plot them.
bernarde is offline   Reply With Quote

Old   July 10, 2009, 08:54
Default
  #9
Member
 
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17
leonardo.morita is on a distinguished road
Since a text file is created, I open it with excel, for example, and plot data.
Hint: try to follow more than one point, at "strategic" positions, in order to make sure (or almost) a "steady-state" has been reached.
leonardo.morita is offline   Reply With Quote

Old   July 10, 2009, 09:03
Default
  #10
Member
 
Bernard Esterhuyse
Join Date: Mar 2009
Location: Pretoria, South Africa
Posts: 50
Rep Power: 17
bernarde is on a distinguished road
Thanks man, I'll try the excel method. I agree, more than one point is better. Still, it's sometimes hard to be certain if a "steady state" has really been reached.
bernarde is offline   Reply With Quote

Old   July 13, 2009, 07:39
Default
  #11
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
Allright, it seems to me your problem is solved. OpenFoam reread the controlDict every timestep, if you have set runTimeModifiable to yes. So you can start averaging by switching between on/off. I prefer to comment out the fieldAverage1-function.
fs82 is offline   Reply With Quote

Old   August 26, 2016, 15:57
Default time average velocity calculation LES openfoam
  #12
New Member
 
sudhakar singh
Join Date: Jun 2016
Posts: 12
Rep Power: 10
Sud09463 is on a distinguished road
Hi fs82
i am using OF3.0. when I am putting fieldAverage in controlDict file, it is showing the following error:
--> FOAM FATAL ERROR:
Unknown function type fieldAverage

Valid functions are :

4
(
patchProbes
probes
sets
surfaces
)


How i can calculate average velocity using paraFoam in OF3.0?? I am new to openfoam, please help
Sud09463 is offline   Reply With Quote

Old   August 29, 2016, 03:40
Default
  #13
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
Please check if there is a functionOpnject available in

$FOAM_SRC/postProcessing/functionObjects/field/fieldAverage

You will find some piece of code an an example controlDict how to use this fieldAverage functionObject. Furthermore, you can do a "grep -R fieldAverage" on the tutorials directory and find an tutorial case using the fieldAverage functionObject.
amolrajan and sourav90 like this.
fs82 is offline   Reply With Quote

Old   August 29, 2016, 08:26
Default fieldAveraging OF3.0
  #14
New Member
 
sudhakar singh
Join Date: Jun 2016
Posts: 12
Rep Power: 10
Sud09463 is on a distinguished road
Hello fs82,
thanku 4 quick response. fieldAverage is there in OF3.0 also. but i have one more doubt that, the Umean we are calculating using fieldaverage is time average velocity field or something else?
Sud09463 is offline   Reply With Quote

Reply


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
Computational time sunnysun OpenFOAM Running, Solving & CFD 5 March 16, 2009 04:32
Bug in Dynamic 1Eq Eddy Viscosity LES Model Incompressible flow harishg OpenFOAM Bugs 5 December 2, 2008 19:18
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 12:16
CFL number and time accuracy for LES Li Yang Main CFD Forum 2 August 1, 2002 07:11
time averaged heat transfer in oscillating flow Matthieu Ubas Main CFD Forum 2 November 5, 1999 15:20


All times are GMT -4. The time now is 23:32.