|
[Sponsors] |
ensemble averaging for oscillating components in the domain |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 29, 2015, 00:20 |
ensemble averaging for oscillating components in the domain
|
#1 |
Member
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 17 |
I have a domain inside which a plate is vibrating as a sinusoidal function. I have managed to impart the mesh motion. The issue is now obtaining the time averaged fields with fieldAverage. Because, what I really need is an ensemble average with respect to different phase shift/positions of the plate. If I turn on the fieldAverage from the controlDict, this is going to average over all the time steps (in-turn all the phases of impingement plate motion) which is going to result in an erroneous time averaged flow field? So, to avoid this, I decided to keep the fieldAverage option off and just write the instantaneous fields at different phase locations of the impingement plate motion. At this point I have about 10 time directories at each phase location of the plate motion(ie 0, pi/2, pi, 3pi/2, 2pi. ).
Now I decided to use execFlowFunctionObjects to get the time average of the fields during post-processing. I am looking to average all the 10 time directories at a particular phase location(for example at pi/2). I am not sure if execFlowFunctionObjects does what I need. Is there a cleaner/correct way of doing this in runtime?If so, the fieldAverage function has to be modified I guess. Also now I am confused how Umean and the fluctuating components and in-turn the average over time is calculated. Is calculating the time averaged fields based on this mean velocity locked at a particular phase shift correct? I'd be really pleased to get some pointers! Thanks a lot. Thangam. |
|
May 2, 2015, 00:48 |
|
#2 |
Member
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 17 |
To put it short,
1) I have a plate moving as a sinusoidal function in a domain. 2) I want the time averaged statistics at 8 different phases of the sine curve. ie 0, pi/4, pi/2, 3pi/4, pi etc. 3) Now I want to average with respect to the individual phases. To do this, the crudest way to do it would be to create these 8 directories first and write data (i dont know how!) into respective folders for the respective time step increments. When calculating the averages, read the fields from these directories for the previous time steps to average within the phase. I believe there will be a change to the way writeControl works. Because data has to be written to different directories for fieldaveraging. Secondly, the fieldAveraging itself to use the previous time step in these 8 directories. I am not sure how to go about it. |
|
May 17, 2015, 16:06 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Thangam,
Without a test case, there isn't much more I can do than simply diagnose the problem, since this would require testing. But as far as I can figure out from the source code, it's not possible to use the current fieldAverage function object to do averages with specific time snapshots. In addition, if your simulation is transient, then you must be very certain that the time snapshots are exactly at the right phase positions. The part that would need testing is that this function object can be modified to do what you need to be done. But aside from it taking some considerable time to study and develop the modified function object, it's also necessary to also test it. Either way, the trick of using execFlowFunctionObjects with the "-time <ranges>" should pretty much solve your problem. Although, now that I think of it... the modification to the file: Code:
src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C ... mmm... after inspecting the source code and remembering some details, the trick would be for you to use is when you configure these two lines in the function object (to be used with the solver) for a particular averaging of one specific phase: Code:
timeStart 0; timeEnd 10; outputControl outputTime; outputInterval 1; For example, if your "deltaT" is 0.001 and each "pi/2" phase occurs at 0.5 seconds:
Code:
timeStart 0.5; //in seconds timeEnd 10; //in seconds outputControl adjustableTime; outputInterval 2000; Code:
timeStart 1.0; //in seconds timeEnd 10; //in seconds outputControl adjustableTime; outputInterval 2000; Code:
timeStart 1.5; //in seconds timeEnd 10; //in seconds outputControl adjustableTime; outputInterval 2000; Code:
timeStart 2.0; //in seconds timeEnd 10; //in seconds outputControl adjustableTime; outputInterval 2000; Best regards, Bruno
__________________
|
|
June 1, 2015, 01:39 |
|
#4 |
Member
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 17 |
Thanks a lot for your time. I managed to solve the issue with postAverage utility found elsewhere in the forum. I tested it and does what I require for the moment. Will post a test case soon.
Thangam. |
|
July 16, 2015, 10:00 |
|
#5 |
Member
SM
Join Date: Dec 2010
Posts: 97
Rep Power: 16 |
Hi Thangam
Can you elaborate how you fixed the issue and the link to postAverage utility? Also a test case will be very helpful. Thanks & regards |
|
July 17, 2015, 08:12 |
|
#6 |
Member
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 17 |
Hi SM,
Well, there was no straight forward method to this and I had to do a work around to achieve this. Typically you may need to do the following: 1) Choose the writeInterval such that you have data at required time scales of investigation and do not use the fieldAverage in the controlDict(turn it to false). If you use fieldAverage, you loose all the phase information and you only get a long time average (you may do so if you don't want the phase information!) 2) For example, if you have 8 time directories in a sinusoid or time period, ie, pi/2, pi and so on, and you have these set of 8 time directories for as many cycles as you want (to have a smooth mean curve), you need to sort all the time directories of similar phases together i.e all pi/2 directories into one directory, all pi into another etc. A small bash script based on modulo arithmetic on the directory names should do the job of sorting the time directories. 3) I used the postAverageTurbulenceFields from the link here: 4) You can run the utility into the final 8 directories which are sorted phase wise. And then you have the last time step with the ensemble average of as many time directories you provided! Cheers. Thangam. |
|
November 5, 2015, 03:02 |
|
#8 | |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14 |
Quote:
Thanky you for you post. I read this method and found it to be not easy to realize as you have to save the required time directories. If the mesh size is large, then the disk space needed is large. Have you ever found a easier way? Xianbei |
||
Tags |
ensemble, les, oscillating wall, time average |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting rotating frame of referece. | RPFigueiredo | CFX | 3 | October 28, 2014 05:59 |
Appropriate Boundary conditions for jet flow in open domain | shrutidhara.123 | FLUENT | 0 | August 5, 2014 11:27 |
air bubble is disappear increasing time using vof | xujjun | CFX | 9 | June 9, 2009 08:59 |
CHT Problem - Domain Imbalance | Parthipan | CFX | 5 | September 11, 2007 11:13 |
rotating domain in rotating domain, different axis | Robert Stringer | CFX | 3 | December 4, 2006 08:04 |