CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   DPM UDF in 2ddp (

hedonist April 1, 2003 22:43

DPM UDF in 2ddp
Hi, All

I wrote a UDF drag, and it worked perfectly in Fluent 2d case. However, Dp=P_DIAM(p) always return 0 when I change to the 2ddp solver. Do you know why?

Best Regards!

Alex Munoz April 2, 2003 00:50

Re: DPM UDF in 2ddp
Hi my hedonist friend

Perhap I can help you but you need to tell me what do you mean with 2ddp solver.

By the way, also explain me those symbols that you wrote as a present!, If it is what I thought your present was quit unpolite


Alex Munoz

Alexandre April 2, 2003 02:19

Re: DPM UDF in 2ddp
Did you declare your variable correctly? (using real ... ) for example ?

i use this with the 2ddp solver and have no problem.

hedonist April 2, 2003 11:48

Re: DPM UDF in 2ddp
Dear Alex,

The present I gave you was a bowl of potato chips. Is it impolite?

When I switch from 2d to 2ddp, I deleted the 2d directory under /aix43/, and mkdir aix43/2ddp. Then I compiled the udf, start fluent 2ddp, open the udflib, and run particle track. The returned Dp was always 0.

#include "udf.h"

#include "dpm.h"

DEFINE_DPM_DRAG(udf_drag, Re, p)


double drag_force;

double Dp=P_DIAM(p)

.... }

Alex Munoz April 2, 2003 15:52

Re: DPM UDF in 2ddp
Hi Hedonist

I apologize for undertanding wrong your present!

About you problem Alexandre is right you must to specify all your variables real. Look at this:

Note that in FLUENT, real is a typedef that switches between float for single-precision arithmetic, and double for double-precision arithmetic. Since the interpreter makes this assignment automatically, it is good programming practice to use the real typedef when declaring all float and double data type variables in your UDF.

Best regards


hedonist April 3, 2003 16:34

Re: DPM UDF in 2ddp
Thanks, Alex. But I have tried both real and double, neither of them works in 2ddp case. I must have met a ghost.

All times are GMT -4. The time now is 15:36.