|
[Sponsors] |
March 5, 2018, 15:18 |
fieldAverage missing function!
|
#1 |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Hi everyone!
Is it possible to add an 'interval' option to fieldAverage? In this way the Mean quantities would be only calculated, for instance, every n seconds which n is the interval specified by the user, rather than at every and each time-step. I think this option would be very useful in case of LES simulations. To justify my suggestion, I mention "phase-locked averaging" which is necessary in many LES cases. As an example, consider a flow configuration which demonstrates a natural frequency. A simple case is the flow around a cylinder with nominal vortex shedding with a certain frequency. In this case, it would be very convenient if the user could record identical phase-locked snapshots of the flow and average them altogether to have a phase-averaged field (e.g. in 45phi, 90phi, 180phi, ...where phi is phase angle). Is it possible to implement such an option in the present functionObjects? If not, I believe it is viable to add this functionality to OpenFOAM and many users could benefit from it. Best Regards, Syavash |
|
March 5, 2018, 16:15 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,746
Rep Power: 66 |
I'm also curious of some crude implementation of a phase-locked average at runtime.
I haven't tried it yet but check out this post by wyldckat. You use timeStart to set the phase, but I'm not sure if the next part with setting adjustableTime for outputControl actually does the correct phase-average. Improving the windowing features of fieldAverage to support weights could fix this issue neatly. I.e. by using a window of 5 and defining the weights as [1 0 0 0 0] would give you the average of the 1st bin. But you need to be able to continue this average for many periods. This is quite doable for 1 period/frequency but you have to think of a clever naming scheme to generalize it for multiple frequencies. Btw currently there is a window and windowName as options to fieldAverage. I don't have a clue yet what the inputs in windowName do. I wonder if hacking the windowName can get us somewhere... |
|
March 5, 2018, 16:47 |
|
#3 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
Your idea to use windowing and weights also sounds good. Is it already available in function objects or it was merely your approach to tackle the problem?! Actually, I am not sure what is the functionality of window option which is currently available! Have an idea what purpose it serves? I hope somebody from dev team will pass by! Regards, Syavash |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] How to define to right point for locationInMesh | Mirage12 | OpenFOAM Meshing & Mesh Conversion | 7 | March 13, 2016 15:07 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 14:06 |
latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 05:37 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |