CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

udf wont work unsteady flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 28, 2015, 22:07
Default udf wont work unsteady flow
  #1
New Member
 
elliot ward
Join Date: Mar 2015
Posts: 10
Rep Power: 11
elliot is on a distinguished road
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)
}
elliot is offline   Reply With Quote

Old   March 28, 2015, 22:16
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Please don't double post topics, let's stay with your original topic as I've replied already.
`e` is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF problems with porous flow Nicolastheterminator Fluent UDF and Scheme Programming 0 April 8, 2014 09:12
Unsteady flow behind a heatsink timbru Main CFD Forum 0 February 19, 2014 11:44
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45
unsteady flow problems Daniel FLUENT 0 January 25, 2009 23:54
a UDF for unsteady flow mike FLUENT 0 August 7, 2007 08:06


All times are GMT -4. The time now is 00:27.