CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   C_VOLUME (http://www.cfd-online.com/Forums/fluent/40891-c_volume.html)

C_VOLUME

Hello

I'm trying to get the volume of each cell in my geometry. I am in 2D axisymetrique. I kno that C_VOLUME(cell, thread) give us the volume of each cell, but when I sum all my cell volume I don't have the right volume of my geometry. My geometry is a simple tube: r=0.05m and L=0.15m So the volume will be V=pi*r*r*L=1.17*10^-3 But when I use C_VOLUME I find V=1,87*10^-4!!! I don't understand why??? Could anyone help me please?

Thanks

Re: C_VOLUME

I try to use C_VOLUME_2D but it give me the volume as if I wasn't in 2D axisymetric but only in 2D So it give me V=L*r*1=0.0075

 Gernot May 9, 2006 08:38

Re: C_VOLUME

One possibility is that you donīt have set the right scale-factor. You can check it there :

grid / scale

Re: C_VOLUME

Thank you. But I verify and I set the good scale. C_VOLUME work well when I'm in 2D, so my function seems to be correct. But in axisymetric it does'nt work.

 RoM May 15, 2006 10:43

Re: C_VOLUME

C_VOLUME returns cell_volume/(2*PI) for axisymmetric.

RoM

Re: C_VOLUME

thank you... It's work

 mactech001 January 21, 2013 01:45

Dear Gernot,

where can i check for grid/scale please?

 mactech001 January 21, 2013 02:10

problem in cell volume value for source term

1 Attachment(s)
Dear all,

i may have a problem in using C_VOLUME to calculate the source in my UDF application.

i've the following UDF code that attempts to apply a temperature-dependent source term to a solid cell.

#include "udf.h"
#include "mem.h"

{
real source;
int Ro=12e-3; /*12mOhm at 20C*/
int To=20; /*temperature 20C*/
int Iphase=20; /*Arms*/

Message("source output: %g\n",source);

return source;
}

While running 100 iterations, i observe in the Message output that the C_VOLUME of the solid cell is changing rather than keeping at a constant value as expected. why is this happening please?

The final outcome of the run was:
Error: Divergence detected in AMG solver: temperature
Error Object: #f

Then, i go into the solid cell's 'Parameter' menu (as shown attached), and verified that the volume it calculates in the output parameter is correct: 2.57e-5 [m3]. How can i use this output parameter in UDF please?