CFD Online Logo CFD Online URL
www.cfd-online.com
Home > Forums > Fluent UDF and Scheme Programming

Basic UDF for unsteady mass flow rate

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 23, 2009, 11:39
Default Basic UDF for unsteady mass flow rate
  #1
New Member
 
Emma
Join Date: Sep 2009
Posts: 7
Rep Power: 2
emmkell is on a distinguished road
Hi All

Shown below is a UDF that I am using in order to turn on and off mass flow rate (to simulate inhalation). The UDF is interpreted by Ansys Fluent with no problems, but when i run the model, it is activating the flow after 1 second, but it is not switching it back off.

Would anyone have any idea why this is? Any help is greatly appreciated

#include "udf.h"

DEFINE_PROFILE(unsteady_mass_flow_rate, thread, position)
{

face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
if (CURRENT_TIME <= 1)
F_PROFILE(f, thread, position) = 0;
else if (1 < t <= 2)
F_PROFILE(f, thread, position) = 0.00003;
else
F_PROFILE(f, thread, position) = 0;
}
end_f_loop(f, thread)
}
emmkell is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The reporting of mass flow rate summer FLUENT 1 July 12, 2007 09:35
mass flow rate entering and exiting a cell samir bensaid FLUENT 0 July 4, 2007 05:37
User defined function of mass flow rate Eric FLUENT 1 April 22, 2005 18:15
How to define mass flow rate using UDF? SAMUEL FLUENT 3 December 25, 2004 00:36
Mass flow rate Siang FLUENT 1 December 23, 2003 02:47


All times are GMT -4. The time now is 12:38.