CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   Volume of cells (

vince August 5, 2003 11:27

Volume of cells
Hello everyone,

In a subroutine, I want to multiply a quantity (that I know the value) by the volume of the cell. My problem is to get the value of this volume. I have tried to use 'specvol'. Normally this variable can be get to the subroutine but I didn't succeed to do it.

Is anyone has an idea to get the volume of cell?



Glenn Horrocks August 5, 2003 18:12

Re: Volume of cells
Hi Vince,

Which code are you using?


vince August 6, 2003 08:28

Re: Volume of cells
Sorry for the omission, I use CFX 5.6.


Glenn Horrocks August 6, 2003 18:37

Re: Volume of cells
Hi Vince,

It looks like you are using CEL to calculate this. In the documentation, on P14 it says "specvol - units m^3 - Specific volume". I suspect this is a typo in the documentation as the units should be m^3 kg^-1 as specific volume is the inverse of density. This variable is not cell volume.

What you should be using is the Volume() function, shown on page 25.

The page numbers refer to the "CFX Expression Language" section of the documentation.


Ribeiro August 8, 2003 11:43

Re: Volume of cells
Hi Glenn

The volume of cell in CEL is volcvol. I found it in the VARIABLES file (CFXROOT/etc/5.6/)


bo August 13, 2003 11:12

Re: Volume of cells
seems that volume() can only be used to calculate the volume of a domain or a sub-domain, but a single cell.

bo August 13, 2003 11:20

Re: Volume of cells
I tried to use volcvol in my CEL FORTRAN subroutine like this: sub_for(x,y,z,T,t,volcvol)

But I got an error message: "Error in subroutine CEL_GETVAR : GET_FORCALC fails to get variable needed by Expression Language GETVAR originally called by subroutine DEF_USR_SRC"

Without volcvol, it works. Could you give me some hints how to make use of this varable?

i also tried to export this variable in CFX-Post but failed. Any suggestions?


Ribeiro August 13, 2003 15:38

Re: Volume of cells
The volcvol variable is exported to Post as Volume of Finite Volumes.

Indeed, I had some problems with this variable. Tried to use it with k-epsilon model and it didn't work. It is possible that this variable is not fully implemented since it is not listed in CFX-5 documentation. Cheers

Robin August 13, 2003 16:56

Re: Volume of cells

Look up volcvol in $CFXROOT\etc\VARIABLES for the short name, long name (Post) and MMS name of this variable (and others, for that matter).

I'm pretty sure this is always available.


bo August 13, 2003 18:30

Re: Volume of cells
Thank all you guys.

I found out why I could not export volcvol (Volume of Finite Volumes) in CFX post: the locator I selected is a SOLID domain. It may be the same reason with my subroutine.

Then the question becomes: how can I read/export "Volume of Finite Volumes" of a SOLID domain?

What I did: Define the SOLID domain as a FLUID domain, export the volcvol information I need, read the exported volcvol in my sub.

Any better solutions? Why not allowed to read/export when it's defined as a solid domain?

Best regards,


vince August 15, 2003 17:03

Re: Volume of cells
Sorry if I wasn't answer before, but I wasn't in my office.

Bo: as you, I had a problem to call this variable. I tried in a subroutine with the name volcvol, and I had the same answer as yours with a problem of GETVAR. But as Robin said, I think it's however possible to call it in a subroutine. As a post variable, the only thing I can say, is that I have no problem to see this variable in using Fieldview (an equivalent of POST). I'm surprised that you have a problem only when it is a solid and not when it is a fluid. I will tell you more when I succed in calling this variable


All times are GMT -4. The time now is 02:03.