CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF for pressure at outlet

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

LinkBack Thread Tools Display Modes
Old   August 12, 2010, 06:19
Default UDF for pressure at outlet
New Member
Mireia Misisuki
Join Date: Apr 2010
Posts: 12
Rep Power: 7
mireis is on a distinguished road
I'm trying to create a UDF function for the pressure at the outlet. I know the mass flow rate and temperature at this point so theoretically my pressure is a function of the velocity at the outlet. Is it possible to implement a UDF function that calculates the pressure as a function of the velocity?

I have tried with this one but Fluent says there is a "parse error".

#include "udf.h" 
#define MDOT_OUT 0.000005  /* desired mass flow rate at the outlet  kg/s */
#define S_OUT 0.00000003905707   /* outlet surface in the model where the mass flow rate is MDOT_OUT   m^2 */
#define R 63.32 /* universal constant for gases  J/kg/K */
#define T 300.13 /* temperature  K */
DEFINE_PROFILE(outlet_pressure, thread, nv)
Thread *t;
face_t f;
cell_t c;
real CTE;
real actual_velocity=C_U(c,t);
/* real pressure = C_P(c,t);
begin_f_loop (f,t)
F_PROFILE(f,thread,nv) = CTE/actual_velocity;
end_f_loop (f,t)

Any suggestions would be greatly appreaciated
mireis is offline   Reply With Quote


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
UDF to measure Mass Flow Rate a.lynchy Fluent UDF and Scheme Programming 21 February 15, 2014 03:18
ZeroGradient pressure Outlet BC prob (adjustPhi.C) Stylianos OpenFOAM 3 March 23, 2010 13:28
UDF for Pressure outlet condition jubs FLUENT 0 February 8, 2007 05:30
outlet boundary condition neil CFX 1 June 17, 2002 00:57
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 10:44

All times are GMT -4. The time now is 16:53.