|
[Sponsors] |
What's the meaning of "prime2Mean" in fieldAverage function of OpenFOAM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 23, 2017, 04:42 |
What's the meaning of "prime2Mean" in fieldAverage function of OpenFOAM
|
#1 |
New Member
Abiy Melaku
Join Date: Jul 2016
Location: Western University
Posts: 5
Rep Power: 10 |
Hello Guys,
Does anybody know the meaning of "prime2Mean" option that's specified when we want to calculate average of the a field. Please look the following code. Thank you very much! Code:
functions { fieldAverage1 { type fieldAverage; libs ("libfieldFunctionObjects.so"); writeControl writeTime; fields ( U { mean on; prime2Mean on; base time; } ); } } |
|
August 23, 2017, 12:23 |
|
#2 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hello
it means that you get the average of the product of the fluctuations of the variable. For instances, in your case you have U. It means that you get UPrime2Mean, it is , so you get the symmTensor where you have the Reynolds stresses. For a scalar T, you get , the time average of the squared fluctuations. |
|
September 1, 2017, 18:27 |
|
#3 |
Member
Atul Kumar
Join Date: Dec 2015
Location: National Centre for Combustion Research and Development
Posts: 48
Rep Power: 10 |
Hi ,
If I use Umean = U - squrt(Uprime2mean) will it be the right thing to find mean value. As mean is instantaneous - fluctuating field. |
|
March 18, 2018, 10:18 |
|
#4 |
New Member
Qi Xueyu
Join Date: Mar 2018
Posts: 7
Rep Power: 8 |
I don't think so. I have caculated it. the equation is not correct. you can see the case /tutorials/incompressible/pimpleFoam/LES/channel395; And you remove the functions{...} ,then get the result to compare with the result without remove the functions. you can find the U and U_0 are same. but you cann't connect the relationship between U and UMeasure and UPrime2Mean. I'm confused with it too!
|
|
March 18, 2018, 10:24 |
|
#5 | |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16 |
Quote:
|
||
March 18, 2018, 10:36 |
|
#6 | |
New Member
Qi Xueyu
Join Date: Mar 2018
Posts: 7
Rep Power: 8 |
Quote:
I'am caculating the result.the case 40s, first point. U_0=(0.00631659 -9.16861e-07 -0.0020712);//i don't understand the varible's mean... U=(0.00625804 4.31012e-06 -0.00207582); UMean=(0.00956163 5.37524e-05 -0.00152819); UX=0.00625804;UMeanx=0.00956163; Uprime2Mean=(6.34187e-06 2.28789e-08 -1.65954e-07 1.92607e-08 1.25591e-07 1.12799e-05); U'=UX-UMean; but the equation Uprime2Mean !=sqrt(U'*U'); this is my confused! |
||
March 18, 2018, 10:43 |
|
#7 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16 |
Because thats not how you calculate the standard deviation!
You calculate it like follows: // variance S = mean(U U) - mean(U)mean(U) // std. Dev S = sqrt(S) |
|
March 18, 2018, 11:40 |
|
#8 | |
New Member
Qi Xueyu
Join Date: Mar 2018
Posts: 7
Rep Power: 8 |
Quote:
mean(UxUx)=UMeanx*UMeanx+Uprime2Mean(1,1); mean(UyUy)=UMeany*UMeany+Uprime2Mean(2,2); mean(UzUz)=UMeanz*UMeanz+Uprime2Mean(3,3); For instance : mean(uxux)=0.00956163^2+6.34187e-06=0.0000977666382569; mean(uyuy)=5.37524e-05^2+1.92607e-08=2.215002050576E-08 mean(uzuz)=-0.00152819^2+1.12799e-05=0.0000136152646761 mean(uxux)=1/t*integral(uxux)dt;y and z are same. but how to calculate the ux , uy , uz ? |
||
March 21, 2019, 06:08 |
|
#9 |
Senior Member
|
hi!
which mean do you mean? you are mixing Ux and ux so it is hard to understand what are you looking for. Time averaged mean velocity one already have in UMean array.
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at |
|
March 21, 2019, 06:36 |
|
#10 |
Senior Member
|
the only official description I found is here:
https://cpp.openfoam.org/v3/a00751.html#details But I found it is confusing as most of OpenFOAM documentations. Instead of I would raver write Otherwise you cannot get a tensor for a vector field for example. Or at least some special multiplication operator should be used instead of power 2.
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at |
|
March 21, 2019, 06:50 |
|
#11 | |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16 |
Quote:
Both forms are correct, it's just a matter of taste! The first form (vector notation) assumes x to be a vector, and as such, the outer product can be perfectly written as |
||
March 21, 2019, 06:53 |
|
#12 |
Senior Member
|
wouldn't it give a scalar for the vector? outer product is actually (a*a^T) to give a tensor, for example in N-S the convective term is not U^2 but U U^T
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at |
|
March 21, 2019, 07:16 |
|
#13 | |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hi,
if you look into the programmers' guide (link), there you can see in Section 1.3.4 how OpenFOAM deals with the outer product. Then, in Section 1.3.6: Quote:
I hope it helps to answer your question. |
||
March 21, 2019, 07:18 |
|
#14 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16 |
an outer product is an outer product, irrespective of notation! Meaning that an outer product between two euclidean vectors return a tensor. The definition given by you is more natural in Linear Algebra, and real analysis, whereas the tensor algebra intended in OF follows more the notation common in some books of functional analysis
|
|
March 21, 2019, 07:19 |
|
#15 | |
Senior Member
|
Thank you Agustin! if that means the outer product, it is fine)))
Cheers! Quote:
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at |
||
March 21, 2019, 07:20 |
|
#16 | |
Senior Member
|
Dear Santiago, for me aa or a^2 is a dot product, that is why I find it confusing. But if they accept it as an outer product I agree
Quote:
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at |
||
March 21, 2019, 07:42 |
|
#17 |
Senior Member
|
the last thing I dont like at
https://cpp.openfoam.org/v3/a00751.html#details is that the ^2 operator is out of the averaging since to find Reynolds-like stress we average the product of the fluctuating part, but not multiply the the average of the fluctuations, which are actually zero in the ideal case. So it should be:
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 12:58 |
[swak4Foam] installation problem with version 0.2.3 | Claudio87 | OpenFOAM Community Contributions | 9 | May 8, 2013 11:20 |
New OpenFOAM Forum Structure | jola | OpenFOAM | 2 | October 19, 2011 07:55 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |
Droplet Evaporation | Christian | Main CFD Forum | 2 | February 27, 2007 07:27 |