CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   how write UDF (https://www.cfd-online.com/Forums/fluent/73135-how-write-udf.html)

lnjxhl February 28, 2010 08:38

how write UDF
 
1 Attachment(s)
In wall BC of attachments, I want to set specified value equal to zero in uds0 in local wall location, and that set specified flux equal to zero in uds0 in other wall location, how write udf?

lnjxhl February 28, 2010 21:14

hello,everyone.
is there anyone who do DC nontransfer plasma modelling?
i want to ask some questions about the anode spot .
thank you very much for your attention! best wishes for everyone!

lnjxhl March 2, 2010 08:01

DEFINE_PROFILE(anode_spot,thread,position)
{
real NV_VEC(n);
real x;
real y;
real z;
face_t f;
Thread *t0=NULL;
begin_f_loop(f,thread)
{
F_CENTROID(n,f,thread);
x=n[0];
y=n[1];
z=n[2];
if(((x-0.004)*(x-0.004)*(x-0.004)+y*y*y+(z-0.008)*(z-0.008)*(z-0.008))<0.0025*0.0025*0.0025)
F_PROFILE(f,thread,position)=0;
else
cell_t c0=F_C0(f,thread);
t0=THREAD_T0(thread);
F_PROFILE(f,thread,position)=C_UDSI(c0,t0,V);
}
end_f_loop(f,thread)
}

please help me check right or wrong, thanks a lot.

lnjxhl March 3, 2010 08:32

urgent --help me
 
Please everyone help me,urgent.

I will wait for your help online,thanks.

Quote:

Originally Posted by lnjxhl (Post 247779)
In wall BC of attachments, I want to set specified value equal to zero in uds0 in local wall location, and that set specified flux equal to zero in uds0 in other wall location, how write udf?



All times are GMT -4. The time now is 06:30.