Compute the average velocity at each layer

Hi everybody;
I want to divide my domain into 5 layers and calculate the average velocity at each layer. Can anyone suggest me how to do it ? I am thinking about using computeAverage(computeVelocityNorm) , but I am not sure how to divide into 5 layers.
Thank you

Hello,
is your domain 2d or 3d? what exactly do you mean by layer?

Hi Orestis;
my domain is 3D , my layer means region. I divided my domain into 5 rectangular regions and I would like to know the average velocity in that region.
Thank you

I guess you can use

Array<T,nDim> computeAverage(MultiTensorField3D<T,nDim>& tensorField, Box3D domain)

in dataProcessors/dataAnalysisWrapper3D.hh , where domain is each one of your 5 domains.

It would look like:

Array<T,3> avgVel = computeAverage(*computeVelocity(lattice), domain);