CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS (https://www.cfd-online.com/Forums/ansys/)
-   -   Volume average of a scalar? (https://www.cfd-online.com/Forums/ansys/83587-volume-average-scalar.html)

 mecarlg January 4, 2011 13:26

Volume average of a scalar?

Hello,

Can anybody help me with this please? I have a flow field with one volume and I want to calculate the volume averaged scalar concentration in a sub-volume.

It is easy to do for the whole volume (report->volume integrals) but how do you create a sub-volume not part of the mesh file? You can only create points, lines and surfaces in the Fluent GUI, any tricks for creating a volume?

I have released the scalar from a sub-volume using a UDF but I'm having difficulty calculating the scalar concentration in other sub-volumes. I do have other models with the volumes decomposed already but its not very efficient if you need to know a volume average somewhere else.

Any help is much appreciated.

Carlos.

 Nikolopoulos January 21, 2011 14:18

There is not a simple solution to your problem.

However I do this:
- Define a User defined memory (UDM, under fluent-> define->user-defined-> Memory).
- Define as a user Field function the variable you want to average
- Patch UDM to zero for the whom volume
- Define your sub-volume in the Fluent-> Adapt-> Iso-Value or Region or Volume
- Patch the User Field function to the UDM for Registers to Patch -> (Name of volume)

Now your UDM stores the variable inside the defined volume and Zeros in the other places.

Now a Sum in the whole volume will give you the SUM in the sub-volume.
With a few calculations you can get average values.

I hope this helped.
The other way is to do it via UDF

 billwangard January 25, 2011 16:25

Sub Volumes

If your subvolume is a hex, sphere, or cylinder, you can use the adaption tool to create registers to mark the cells of your subvolume.

This is done under the Adapt->Region menu. Combine registers of spheres and cylinders to get complex shapes --- if necessary.

Use the adaption register to separate the volume using the adaption register. This will split off the cells and create the sub-volume.

You can simply go to your Report->Volume integrals menu now and integrate your quantity on the newly created sub volume.

You can merge the volumes back together if necessary.

Regards,
Bill Wangard, Ph.D.
President
Engrana LLC
847-424-2486

 Nikolopoulos January 26, 2011 02:30

Nice billwangard!!!!!

I didn't know that!

 All times are GMT -4. The time now is 16:11.