CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Please help (an UDF for regulating the mass flow rate)

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

LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2015, 10:13
Default Please help (an UDF for regulating the mass flow rate)
New Member
Join Date: Apr 2015
Posts: 6
Rep Power: 0
swidi is on a distinguished road
Hello friends I really need your help

I am trying to control the injection of the mass flow rate at a velocity inlet using a UDF. In fact I want to have the same mass flow rate at the inlet and at the outlet-pressour. So I need to put a condition at my velocity-inlet like if the two mass flow rates are not equal it has to stop injecting ( water ) until they ll be equal
I begun by this UDF, it only needs the regulation part

#include "udf.h"
Domain *d;
real flow=0.;
face_t f;
Thread *t;
t= Lookup_Thread(d, 12);
d = Get_Domain(1);

printf("MASS Flow Rate: %g\n",flow);
swidi is offline   Reply With Quote

Old   July 7, 2015, 12:09
Senior Member
sbaffini's Avatar
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,147
Blog Entries: 29
Rep Power: 38
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Why do you expect the mass flow rate at the pressure outlet to be different from the inlet one?

However, the task is more difficult than the way you approached it. Both inlet and outlet surfaces can be irregularly distributed among different processes in parallel. So you need to consider this beforehand.

Moreover, even in serial, you need the flow variable to be available outside the routine computing it (which, by the way, i would write as a DEFINE_ADJUST instead of EXECUTE_AT_END) and a DEFINE_PROFILE routine to use it.
sbaffini is offline   Reply With Quote

Old   July 30, 2015, 13:32
New Member
Join Date: Jul 2015
Posts: 1
Rep Power: 0
asimavd is on a distinguished road
My case is rectangular channel with 0.45 mm to 3.6 mm and length 260.6 is small part of counter flow heat exchanger, with just 12 channels with four rows of hot and cold fluid flow channels.
re no is 1202 and 911 for hot and cold fluid respectively. I know the pressure inlet and temperature inlet and mass flow.
can someone tell me the BC and whether I should go for compressible flow or incompressible flow.
asimavd is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF to measure Mass Flow Rate a.lynchy Fluent UDF and Scheme Programming 31 October 4, 2018 15:10
Mass flow rate of phase in post mat_cfd CFX 0 September 3, 2013 08:55
Convergence problem with target mass flow rate ADL FLUENT 2 May 29, 2012 22:11
Mass Flow Rate student87 CFX 4 January 2, 2010 05:45
How to define mass flow rate using UDF? SAMUEL FLUENT 3 December 25, 2004 01:36

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