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

How to write a UDF for gas flow rate?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2018, 06:23
Question How to write a UDF for gas flow rate?
  #1
Member
 
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11
Oula is on a distinguished road
Hello everyone

I need to write a UDF for a boundary condition of a gas flow rate. In my simulation using Fluent, I need to simulate a process lasts for ~ 5 hours. During the process a specific gas flow rate (53 cubic feet per hour) is injected through pipes to the fluid domain. The gas is injected at the beginning of the cycle lets say after few seconds and then it is injected at every hour of the flow time of the simulation.

So how can I write the suitable UDF for this flow rate?. Does the code below work for this case? how can I develop it to fit my case?. Please help me

#include "udf.h“

DEFINE_PROFILE(transient_mf, thread, position)
{
face_t f ;

real t = RP_Get_Real("flow-time"); /* to calculate the physical flow time*/

begin_f_loop(f, thread)
{
if (t==3600)
{
F_PROFILE(f, thread, position) = 53;
}
else
{
F_PROFILE(f, thread, position) = 0;}
}
end_f_loop(f, thread)
}

Regards
Oula
Oula 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 to access interior surface to calculate mass flow rate shahjehan Fluent UDF and Scheme Programming 0 August 11, 2015 15:44
Udf for velocity/ flow rate? zeeshan latif Fluent UDF and Scheme Programming 1 April 12, 2015 08:18
Basic UDF for unsteady mass flow rate emmkell Fluent UDF and Scheme Programming 2 September 9, 2013 05:48
Periodic channel flow with time dependent mass flow rate QBeast FLUENT 3 May 10, 2013 14:14
How to calculate phase flow rate? sangramroy FLUENT 0 January 11, 2012 14:02


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