|
[Sponsors] |
Please help (an UDF for regulating the mass flow rate) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 7, 2015, 10:13 |
Please help (an UDF for regulating the mass flow rate)
|
#1 |
New Member
saad
Join Date: Apr 2015
Posts: 6
Rep Power: 0 |
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" DEFINE_EXECUTE_AT_END(measure_mass_flow) { Domain *d; real flow=0.; face_t f; Thread *t; t= Lookup_Thread(d, 12); d = Get_Domain(1); thread_loop_f(t,d) { begin_f_loop(f,t) { flow+=F_FLUX(f,t); } end_f_loop(f,t) } printf("MASS Flow Rate: %g\n",flow); flow=0.; } |
|
July 7, 2015, 12:09 |
|
#2 |
Senior Member
|
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. |
|
July 30, 2015, 13:32 |
|
#3 |
New Member
Asim
Join Date: Jul 2015
Posts: 1
Rep Power: 0 |
HI,
My case is rectangular channel with 0.45 mm to 3.6 mm and length 260.6 mm.it 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. |
|
|
|
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 |