CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   USER_FORTRAN call variable at adjacent nodes (

fipellac October 8, 2010 10:42

USER_FORTRAN call variable at adjacent nodes

I implemented already an Additional Variable under the form of a Transport equation. I didnīt get good results and I would like to have full control on the implemented transport equation.
The problem is essentially the presence of the diffusive term in the equation provided by Ansys CFX (I donīt need it) and the presence of the volume fraction in the formulation of each term.

For this reason I decided to implement a new variable linked to User_CEL. Inside the routine then, linearize the system and solve it iteratively.

I would like to receive some information regarding the following aspect:

1) Convective term: div(U*variable)

Which is the function I need to call the East, West, North, South, Top, Bottom values related to the actual control volume?
In this way I could linearize the convective term too.

Thank you in advance,


joey2007 October 8, 2010 13:15

There is a argument called oper in getvar. May be you can call it with DIV or something like that.

ghorrocks October 9, 2010 05:50

CFX uses tet, prism and hex element meshes, which form polyhedral control volumes at the nodes. There is no concept of N, S, E, W. Read the documentation for details of how the mesh is handled.

But I repeat my original question - why can't you do what you want using a normal additional variable and what are you trying to do anyway?

joey2007 October 9, 2010 14:05

Glenn is right. May be we can help you, when you tell us what it means that you get no good results.

fipellac October 11, 2010 05:06

It means that the comparison of the simulation results with the experimental one is very bad. The form of the transport equation I want to implement differs from the transport equation that is possible to implement in CFX.

I worked during the last months to implement a one group interfacial area transport equation for the calculation of the interfacial area density. In a gas dispersed liquid continuous simulation. (bubble column D=200mm H= ca. 8 m, experimental data from Research center Dresden Germany).
The MUSIG approach even producing goos results needs really a lot of resources.
Other researcher implemented the same models in their own codes and the results seems to be very good in isothermal and non isothermal condition.

Could you please tell me something more about the oper argument in the user_getvar function? Where could I read something more about it.



fipellac May 20, 2011 05:37

it is not easy to implement but it is possible to create a mapping subroutine (junction box) reading the cfx5 file of the mesh. you can order the points in a clear and easy way. then you should compare during the solution stage in a user cel/junction box the actual point with the point in the list created at the beginning of the simulation and search for the neighbours. it will speed down the computational time but will allow you to do gradients with an higher order of accuracy than the central differences scheme adopted by ANSYS CFX.

rickyc December 10, 2011 12:02


can you tell me how did you manage to create the mapping subroutine, please? Did you use theCAL_MESHMAP subroutine in a junction box?
I am trying to have access to the adjacent nodes because I want to do a volume averaging of a variable.

Thank you!

All times are GMT -4. The time now is 00:55.