|
[Sponsors] |
March 18, 2011, 03:31 |
Power load UDF
|
#1 |
Member
Join Date: Dec 2009
Posts: 41
Rep Power: 17 |
Hi everybody,
I have a question : i have to write an UDF for a thermal load on a surface (lateral surface of a truncated cone).The thermal load follows the law P(z) = a*z^b where z is the distance from the source. How could i set up my UDF? Thx mates. |
|
March 18, 2011, 05:49 |
|
#3 | |
Member
Join Date: Dec 2009
Posts: 41
Rep Power: 17 |
Thx for your answer
Could it be something like : Quote:
Thx again for your support! Last edited by Rich1979; March 18, 2011 at 06:06. |
||
March 18, 2011, 08:34 |
|
#4 |
Senior Member
|
it needs some changes:
Code:
#include "udf.h" #include "math.h" #define a 1 #define b 2 DEFINE_PROFILE (powerload, t, i) { real x[ND_ND]; real z; face_t f; begin_f_loop(f, t) { F_CENTROID(x,f,t); z = x[2]; F_PROFILE(f, t, i) = a*pow(z,b); } end_f_loop(f, t) } |
|
March 21, 2011, 02:05 |
|
#5 |
Member
Join Date: Dec 2009
Posts: 41
Rep Power: 17 |
Thx a lot Amir,your advise was very useful!I realized my udf
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
failing to load a UDF | IvanCFD | Fluent UDF and Scheme Programming | 13 | January 20, 2012 16:17 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
try to load a edited UDF | austin | Main CFD Forum | 0 | February 20, 2009 06:25 |
help on UDF compile and load | Sherry | FLUENT | 5 | October 29, 2005 12:37 |
udf power function | nd | FLUENT | 2 | September 2, 2005 14:39 |