CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Urgent-Problem in UDF (

Josh March 2, 2006 12:01

Urgent-Problem in UDF
I am using a user defined scalar transport equation (UDS) in which the SOURCE term is defined by the macro DEFINE_SOURCE (name, c, t, dS, eqn).

In this macro, I need to calculate the diameters of all the particles in a cell which can be calculated in discrete phase model (DPM) as P_DIAM (p).

Since the Tracked_particle pointer p is not an argument in DEFINE_SOURCE (name, c, t, dS, eqn), it can not be recognized if P_DIAM (p) is directly used.

How can I get the particle diameter in a cell when using DEFINE_SOURCE (name, c, t, dS, eqn)? Is there any other parameter in FLUENT which stands for the particle diameters in a cell?

RoM March 2, 2006 12:15

Re: Urgent-Problem in UDF
There is no easy way to access particle diameters during fluid iterations. Diameters are not stored in cells because fluent does not need them for fluid iterations. If you need the diameters you will have to write an additional udf which stores the needed diameters in user defined memories for later access. This has to be done during the particle tracking.

Another option would be to calculate the UDS source term during the particle tracking, store it in an UDM and retrieve it later.

Good Luck, RoM

Josh March 2, 2006 12:35

Re: Urgent-Problem in UDF
Thank you very much! Your suggestions are very constructive. I have to make a try even though it is hard for me.


Lourival March 2, 2006 16:54

Re: Urgent-Problem in UDF
Another way, you could do something with the MACRO: DEFINE_DPM_SCALAR_UPDATE as is in the example of the same macro.

You can try, post the results and erros...


Josh March 3, 2006 00:01

Re: Urgent-Problem in UDF
Thank you very much for your suggestion. I will try this as well.


All times are GMT -4. The time now is 18:14.