|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 6 ![]() |
One easy question. How to calculate volume average of a volScalarField? I think the average() is not the function I want. Can somebody tell me? Thanks!
|
|
|
|
|
|
|
|
|
#2 |
|
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,165
Rep Power: 30 ![]() ![]() |
That's the problem with easy questions. Nobody wants to answer them because you can only embarrass yourself by saying somthing stupid.
Nevertheless: sum(mesh.V()*myField)/sum(mesh.V()) (weighted average of the cell-values)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,697
Rep Power: 17 ![]() |
volScalarField a = ...; a.weightedAverage(mesh.V()); Hrv
__________________
Hrvoje Jasak |
|
|
|
|
|
|
|
|
#4 |
|
Member
pooyan
Join Date: Nov 2011
Posts: 60
Rep Power: 3 ![]() |
||
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| calculate the average velocity of particles | robert | FLUENT | 0 | August 1, 2008 09:44 |
| how to calculate the average | kumar | Main CFD Forum | 0 | July 13, 2006 12:17 |
| calculate average in Paraview | alain | Main CFD Forum | 0 | March 14, 2006 05:49 |
| how to calculate the average pressure | lenson | CD-adapco | 0 | March 4, 2005 03:24 |
| calculate average magnitude | Ethan | CD-adapco | 1 | June 3, 2003 12:34 |