# UDF for pressure at outlet

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

 August 12, 2010, 06:19 UDF for pressure at outlet #1 New Member   Mireia Ayop Join Date: Apr 2010 Posts: 12 Rep Power: 9 Sponsored Links 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". Code: ``` #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); CTE=MDOT_OUT*R*T/S_OUT; begin_f_loop (f,t) { F_PROFILE(f,thread,nv) = CTE/actual_velocity; } end_f_loop (f,t) }``` Any suggestions would be greatly appreaciated

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post a.lynchy Fluent UDF and Scheme Programming 21 February 15, 2014 03:18 Stylianos OpenFOAM 3 March 23, 2010 13:28 jubs FLUENT 0 February 8, 2007 05:30 neil CFX 1 June 17, 2002 00:57 Jonas Larsson Main CFD Forum 1 April 29, 1999 10:44