| brunoc |
November 29, 2012 11:27 |
1. Take the equation of your cylinder, such as 
2. Create an expression for the radius radius = sqrt(x^2 + y^2)
3. Create a other expressions to check whether you're inside the cylinder: insideCylinderZdir = if(radius < , yourvariable, 0) insideCylinder = if( zCylinderInf < z && z < zCylinderTop, insideCylinderZdir, 0 ) where 'zCylinderInf' and 'zCylinderTop' are the extreme positions of your cylinder in it's axial direction.
4. Create an expression to average 'insideCylinder' over your entire domain: cylAve = volumeAve(insideCylinder)@domain That should do it.
Cheers.
|