Interpreting Multiple UDFs
Really seems silly if multiple UDFs cannot be interpreted. I saw all the posts at this field and mostly people said to use single UDF. However, based on the type of UDF maybe it is preferable to use multiple UDFs.
Can somebody help me how to interpret multiple UDFs? Thanks, |
Quote:
If you have problems attach your udfs here. Daniele |
Quote:
I have solved the issue. |
Hi, I've had the exact same problem. But I have never coded in C before. can you help me write these 2 UDFs into one file?
Thanks! #include "udf.h" DEFINE_PROFILE(inlet_velocity_x, t, i) { real x[ND_ND]; /* this will hold the position vector*/ real y; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); y=x[1]; F_PROFILE(f,t,i) = 0.001474*(1-pow(((0.024-y)/0.024),3)); } end_f_loop(f,t) } and #include "udf.h" DEFINE_PROPERTY(pl_visc, c, t) { real mu; real temp = C_T(c,t); real gamma_dot=(4*0.000016)/(3.14159*0.024*0.024*0.024); { mu = (2*exp(-0.7*temp))*gamma_dot*-2; } return mu; } |
Quote:
Code:
#include "udf.h" |
Thanks!
for some reason it didn't work for me. maybe I forgot to remove '#include "udf.h"' as i Copied it togheter? but it works now - Thanks! |
All times are GMT -4. The time now is 15:22. |