|
[Sponsors] |
June 22, 2012, 12:18 |
working with Field
|
#1 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
Assume you have a scalarField or vectorField named fi(K), and you want to compute its average value in a spherical shell with thickness of one, say:
sigma( magSqr(fi(K)) ) i-0.5<k<i+0.5 k=sqrt(sqr(kx)+sqr(ky)+sqr(kz)) I know you can make a loop or use forAll but this way's gonna check every label once for every shell and that is pretty time consuming. Is there any better way? |
|
June 22, 2012, 17:02 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting an external B0_x field in MHD module | fferroni | FLUENT | 11 | August 1, 2022 08:20 |
funkySetBoundaryFields - Manipulation of existing field | jhertel | OpenFOAM Pre-Processing | 16 | May 18, 2020 06:32 |
chtMultiRegionFoam - exchange data between flow field and temperature | phsieh2005 | OpenFOAM Running, Solving & CFD | 0 | February 7, 2012 09:16 |
How to get the velocity field from the pressure field | Hermano | Main CFD Forum | 2 | November 29, 2011 08:32 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 11:16 |