|
[Sponsors] |
March 28, 2015, 23:07 |
udf wont work unsteady flow
|
#1 |
New Member
elliot ward
Join Date: Mar 2015
Posts: 10
Rep Power: 11 |
Hi all first time poster here so i'l keep it short and sweet.
Im trying to write a udf for a unsteady flow that varies with time step on a pipe in 2d, (I am having great difficulty). I have written a udf (below), however when I run it in fluent it only runs the last velocity and misses out the rest. Can anyone spot my mistake/s? Any help would be much appreciated. #include "udf.h" DEFINE_PROFILE(inlet_x_velocity, thread, position) { real x[ND_ND]; real y; real t = RP_Get_Real("physical-time-step"); face_t f; begin_f_loop(f, thread) {if (t<=10); F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, position) = 1; } {if (t<=11 && t>10); F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, position) = 0.5; } {if (t<=12 && t>11); F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, position) = 3; } {if (t<=13 && t>12); F_CENTROID(x,f,thread); y = x[1]; if (y<=7) F_PROFILE(f, thread, position) = 9; } if (t<=14 && t>13); { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, position) = 5; } end_f_loop(f, thread) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF problems with porous flow | Nicolastheterminator | Fluent UDF and Scheme Programming | 0 | April 8, 2014 10:12 |
Unsteady flow behind a heatsink | timbru | Main CFD Forum | 0 | February 19, 2014 12:44 |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 16:45 |
unsteady flow problems | Daniel | FLUENT | 0 | January 26, 2009 00:54 |
a UDF for unsteady flow | mike | FLUENT | 0 | August 7, 2007 09:06 |