|October 15, 2014, 06:22||
UDF for pressure outlet (resistance)
Join Date: Feb 2011
Posts: 132Rep Power: 6
I try to write a UDF to set the pressure at the outlets of my geometry according to the equation p=R*Q (p: pressure, R: resistance and Q: volume flow rate) for a fixed value of “R” at each outlet which corresponds to the resistance of the downstream vessels. Therefore, I have to use/readout the outflow at each outlet to calculate the pressure. My first guess of the UDF was:
#define Density 1050.
#define R1 3.590987710898600e+10
QMout1=0.0; //initial value
QMout1+=F_FLUX(f,thread); //sum of mass flow rate of all faces of the outlet at the same time step
Qout1=QMout1/Density; //calculate volume flow rate
Pout1=R1*Qout1; //calculate pressure
I checked the results (static pressure and volume flow rate) for several time steps at several outlets and found the equation was satisfied.
However, I am not sure, if this makes sense, since I thought I must e.g. use the volume flow rate of the previous time step and solve the equation iteratively. But I am a bit confused how to integrate this at the UDF!? And what about the first time step? I certainly need to make a proper initial guess, don’t I? Does anybody have an idea how to fix this UDF? I am thankful for any help and idea!
|Thread||Thread Starter||Forum||Replies||Last Post|
|multiphase udf||ak2009||Fluent UDF and Scheme Programming||0||June 7, 2012 00:15|
|UDF to adjust pressure outlet||a.lynchy||FLUENT||3||February 13, 2012 05:03|
|UDF for Pressure outlet condition||jubs||FLUENT||0||February 8, 2007 05:30|
|UDF Hydrostatic Pressure Outlet||Bridget||FLUENT||0||May 16, 2006 17:55|
|UDF in Fluent to Match Mass Flow at Pressure Outlet||Jonas Larsson||Main CFD Forum||1||April 29, 1999 10:44|