
[Sponsors] 
November 7, 2012, 19:43 
Interpreting Multiple UDFs

#1 
New Member
yes
Join Date: Nov 2012
Posts: 12
Rep Power: 4 
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, 

November 8, 2012, 03:55 

#2  
Senior Member
Daniele
Join Date: Oct 2010
Location: Italy
Posts: 899
Rep Power: 15 
Quote:
If you have problems attach your udfs here. Daniele 

November 9, 2012, 14:21 

#3 
New Member
yes
Join Date: Nov 2012
Posts: 12
Rep Power: 4 

January 17, 2013, 09:36 

#4 
Member
Thomas Hoffmann
Join Date: Oct 2012
Posts: 67
Rep Power: 4 
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*(1pow(((0.024y)/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; } 

January 17, 2013, 10:05 

#5  
Senior Member
Daniele
Join Date: Oct 2010
Location: Italy
Posts: 899
Rep Power: 15 
Quote:
Code:
#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*(1pow(((0.024y)/0.024),3)); } end_f_loop(f,t) } 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; } 

January 18, 2013, 05:52 

#6 
Member
Thomas Hoffmann
Join Date: Oct 2012
Posts: 67
Rep Power: 4 
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! 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
how to set periodic boundary conditions  Ganesh  FLUENT  13  January 22, 2014 05:11 
OpenFOAM static build on Cray XT5  asaijo  OpenFOAM Installation  9  April 6, 2011 12:21 
how can i use multiple udfs  hami9293  Fluent UDF and Scheme Programming  11  February 23, 2010 07:20 
Multiple udfs?  David Harris  FLUENT  1  April 23, 2006 02:34 
Multiple UDFs  Graeme  FLUENT  4  August 28, 2004 15:47 