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

udf unsteady flow.

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 28, 2015, 21:54
Default udf 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)
}

Last edited by elliot; March 28, 2015 at 22:03. Reason: needs to be in udf & scheming
elliot is offline   Reply With Quote

 


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
unsteady inlet velocity udf jill FLUENT 8 February 10, 2015 06:04
Unsteady interna flow yhoarau OpenFOAM Running, Solving & CFD 2 June 5, 2012 10:42
Unsteady flow and DPM moloykb FLUENT 5 March 21, 2012 03:28
unsteady UDF Sukanta Bhattacharjee FLUENT 0 August 20, 2007 11:11
a UDF for unsteady flow mike FLUENT 0 August 7, 2007 08:06


All times are GMT -4. The time now is 09:43.