|
[Sponsors] |
November 7, 2012, 19:43 |
Interpreting Multiple UDFs
|
#1 |
New Member
yes
Join Date: Nov 2012
Posts: 12
Rep Power: 14 |
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
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27 |
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: 14 |
||
January 17, 2013, 09:36 |
|
#4 |
Member
Thomas Hoffmann
Join Date: Oct 2012
Posts: 67
Rep Power: 14 |
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; } |
|
January 17, 2013, 10:05 |
|
#5 | |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27 |
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*(1-pow(((0.024-y)/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: 14 |
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! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
how can i use multiple udfs | hami9293 | Fluent UDF and Scheme Programming | 15 | May 27, 2020 20:25 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |
Multiple udfs? | David Harris | FLUENT | 1 | April 23, 2006 03:34 |
Multiple UDFs | Graeme | FLUENT | 4 | August 28, 2004 16:47 |