CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF problem! (https://www.cfd-online.com/Forums/fluent/31075-udf-problem.html)

 ann March 10, 2003 04:58

UDF problem!

Hi, I simulate gas-solid two-phase flow using discrete phase model. I want to simulate a body force on particles using UDF. But in the force expression, there are varibles about gas phase such as gas velocity, gas density. My C code using UDF is as following:

#include "udf.h"

#include "dpm.h"

DEFINE_DPM_BODY_FORCE(forcerot, p, i)

{

float forcerot;

forcerot=C_R(c,t)/P_RHO(p)*x[0]*C_V(c,t);

return(forcerot);

}

where P_RHO(p) (particle density) can obtain, but C_R(c,t) (gas density)£¬x[0] (x component of location)£¬ C_V(c,t) (y component of gas velocity) are unknown. How can I get the values of these variables?

Thanks for any help in advance!

Regards, ann

 hedonists March 12, 2003 21:42

Re: UDF problem!

I have the same problem, too. I tried to write a UDF of the drag force, taking into account the slip correction factor which is a function of local Pressure and Temperature. And I could not obtain the pressure values for the current particle position. For your problem, I guess you can assume the gas temperature to be equal to the particle temperature, and you can obtain the particle temperature using the Macro P_T(p).

 All times are GMT -4. The time now is 17:05.