CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDS Diffusivity (https://www.cfd-online.com/Forums/fluent/38970-uds-diffusivity.html)

czh December 17, 2005 07:49

UDS Diffusivity
 
Hello,

Would like to define different uds diffusivity in different regions. tried to write the following c code and interpreted it, but the syntax error message appeared. can someone please help me comment on my code. thank you.

DEFINE_DIFFUSIVITY(potential_diff, c, t, i) { real D; Domain *domain;

domain = Get_Domain(1);

Thread *t1 = Lookup_Thread(domain,8); Thread *t2 = Lookup_Thread(domain,7); Thread *t3 = Lookup_Thread(domain,6); Thread *t4 = Lookup_Thread(domain,5); Thread *t5 = Lookup_Thread(domain,4); Thread *t6 = Lookup_Thread(domain,3); Thread *t7 = Lookup_Thread(domain,2);

if (t==t1||t==t4||t==t7) D = 6000.00; else D = 3000;

return D; }


elzubier December 18, 2005 00:53

Re: UDS Diffusivity
 
hello iam doing similar simulation and i have same problem would you share with me information to solve our problem thanks in advance regard

Alec Eiffel December 19, 2005 09:42

Re: UDS Diffusivity
 
Try this

#include "udf.h"

DEFINE_DIFFUSIVITY(potential_diff, c, t, i) {

real D;

Domain *domain;

domain = Get_Domain(1);

if (t==Lookup_Thread(domain,8)||t==Lookup_Thread(doma in,5)||t==Lookup_Thread(domain,2))

D = 6000.00;

else

D = 3000;

return D; }


All times are GMT -4. The time now is 11:10.