|
[Sponsors] |
August 11, 2015, 05:55 |
Compute mean vorticity field
|
#1 |
Member
Olie
Join Date: Oct 2013
Posts: 51
Rep Power: 13 |
I'd like to compute the time averaged vorticity and stream function fields for a case I'm running. If I just wanted the time averaged velocity field, for example, I could put something like:
Code:
fieldAverage1 { type fieldAverage; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl outputTime; fields ( U { mean on; prime2Mean on; base time; } ); } Either a way of forcing openFoam to compute the vorticity and stream function fields during solving and calculating the mean at the same time, or waiting till the end to use the utilities to compute those fields and then computing the time average would be fine. Thanks! |
|
August 12, 2015, 05:01 |
|
#2 |
Senior Member
|
Hi,
Both these utilities can be included as function objects. So they can at least be created during the run. Something like this should be added to the "functions" part of the controlDict, probably a bit more information is needed: Code:
vorticity { type vorticity; outputControl timeStep; outputInterval 1; } Regards, Tom |
|
August 12, 2015, 11:25 |
|
#3 |
Member
Olie
Join Date: Oct 2013
Posts: 51
Rep Power: 13 |
Thanks Tom, I'm trying this at the moment, but I'm not convinced it's going to work, as streamFunction doesn't appear to be a function you can use in controlDict.. It looks to only work as a post-processing utility.
So still looking for a way of time-averaging fields AFTER I've finished solving if anyone has any ideas... Thanks |
|
August 12, 2015, 13:09 |
|
#4 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
Maybe you can use swak4foam to generate the vorticity field and then use the field average function object to average vorticity.
I might have some code that does what you are searching for, if you are not able of average the vorticity let me know and I will search for the code |
|
August 14, 2015, 06:26 |
Thanks
|
#5 | |
Member
Olie
Join Date: Oct 2013
Posts: 51
Rep Power: 13 |
Quote:
|
||
August 14, 2015, 07:07 |
|
#6 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
So you create a vorticty field with swak4foam, and the average it with a fieldAverage functionObject
Code:
functions { vorticity { type expressionField; autowrite true; dimension [0 0 -1 0 0 0 0]; fieldName "vorticity"; expression "curl(U)"; verbose true; autowrite true; outputControl timeStep; } fieldAverage1 { type fieldAverage; functionObjectLibs ( "libfieldFunctionObjects.so" ); enabled true; outputControl outputTime; fields ( vorticity { mean on; prime2Mean on; base time; } ); } } Last edited by ssss; August 14, 2015 at 10:12. |
|
August 14, 2015, 07:13 |
|
#7 |
Member
Olie
Join Date: Oct 2013
Posts: 51
Rep Power: 13 |
Excellent this looks most helpful, thanks a lot.
N.B. I think the dimension should read [0 0 -1 0 0 0 0], no? Vorticity's units are s^{-1}? Last edited by odellar; August 14, 2015 at 09:36. Reason: Added a N.B. regarding units of vorticity. |
|
August 14, 2015, 10:12 |
|
#8 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
||
January 9, 2017, 10:03 |
|
#9 | |
Member
Anirudh Kulkarni
Join Date: May 2016
Posts: 62
Rep Power: 10 |
Quote:
|
||
Tags |
fieldaverage, utilities |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
problems after decomposing for running | alessio.nz | OpenFOAM | 7 | March 5, 2021 05:49 |
creating an internal field? | maybee | OpenFOAM Programming & Development | 2 | February 4, 2021 18:15 |
To compute Average flowfield with oodles | flying | OpenFOAM Running, Solving & CFD | 3 | May 5, 2009 09:46 |
vorticity calculation at symmetryplane | benconnell | OpenFOAM | 0 | April 14, 2009 19:45 |