|
[Sponsors] |
Time averaging of new variable using fieldAverage |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 5, 2017, 16:59 |
Time averaging of new variable using fieldAverage
|
#1 |
Member
Mirage
Join Date: Jul 2012
Posts: 43
Rep Power: 14 |
Dear Foamers,
I m writing the heat flux as output only for the last time step and I would like to average this latter parameter over the time using the fieldAverage function. It works fine for standard variable like p or U. I am getting UMean and pMean as an output and the values are physical after averaging over a long time. However I am not able to average any new variable, that I m calculating in my customized solver. Here is the function, that I writing in controlDict: Code:
fieldAverage1 { type fieldAverage; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl outputTime; fields ( TurbFlux { mean on; prime2Mean on; base time; } } I am wondering, what i am doing wrong. I appreciate any help ! Cheers ! Last edited by Mirage; February 6, 2017 at 23:34. |
|
February 6, 2017, 23:37 |
|
#2 |
Member
Mirage
Join Date: Jul 2012
Posts: 43
Rep Power: 14 |
Should I define the new variable in the OpenFoam libraries ?
Any help or answer is appreciated |
|
February 8, 2017, 06:35 |
|
#3 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hello
I passed through this two weeks ago. First of all, if you can include that variable in your code, that's is the easiest, but if you define Turbflux for example as a Swak4Foam field in yout controlDict, please take a look to this: https://www.cfd-online.com/Forums/openfoam-programming-development/142749-using-fieldaverage-together-swak4foam-expressionfield.html#post622399 BTW, are you trying to get the turbulent heat flux from your simulations? |
|
February 11, 2017, 18:54 |
|
#4 |
Member
Mirage
Join Date: Jul 2012
Posts: 43
Rep Power: 14 |
Thanks !!
I managed to calculate the turb flux using the expressionfield of swak4foam tool. However I am really interested on calculating the average variable in the code. I could define the flux as variable in the solver. Nevertheless I was not able to average it. fieldaverage function is not allowing the averaging of non-standard OF variables. Do you know, if I could define the time averaging on the solver? |
|
February 12, 2017, 07:37 |
|
#5 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hi,
you may take a look into the code of fieldAverage. Me, I've never tried to do so. What I do is, in my solver, define some auxiliar variables, that I use later to create my turbulent heat flux. The THF is defined as <u'T'>, but it can be decomposed, follogind the ensemble averaging, as <u'T'>=<UT> - <U> <T>, so you need to create a variable UT, you get the mean of UT, U and T, and then with expressionField you get u'T'. This is what I do, but fi you find any other easier way to get it, make us know! |
|
March 29, 2017, 23:43 |
|
#6 |
New Member
Harshal Akolekar
Join Date: Aug 2016
Location: Melbourne
Posts: 25
Rep Power: 10 |
Hi,
Is it possible to find the field average (over a certain time interval) of volScalarFields in the defined in the member functions of OpenFoam - without using the swak4foam? For example - the production term in the k equation. I have already defined this as an IO object and have a data set for this term in my time directories, but it does not produce field averages and instead states: Field Pkt not found in database for averaging If anyone has any ideas, it would be appreciated. Regards, Harshal |
|
November 9, 2019, 22:30 |
|
#7 | |
Senior Member
Join Date: Jan 2013
Posts: 135
Rep Power: 13 |
Hi Harshal,
Have you found a solution to this? Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
simpleFoam error - "Floating point exception" | mbcx4jc2 | OpenFOAM Running, Solving & CFD | 12 | August 4, 2015 03:20 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 14:58 |
AMI interDyMFoam for mixer nu problem | danny123 | OpenFOAM Programming & Development | 8 | September 6, 2013 03:34 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 10:14 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 21:09 |