CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF for pressure at outlet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 12, 2010, 07:19
Default UDF for pressure at outlet
  #1
New Member
 
Mireia Ayop
Join Date: Apr 2010
Posts: 12
Rep Power: 16
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".

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
mireis is offline   Reply With Quote

Old   October 1, 2018, 13:55
Default
  #2
Senior Member
 
Yuehan
Join Date: Nov 2012
Posts: 142
Rep Power: 14
wc34071209 is on a distinguished road
Hi,

have you solved this problem?
wc34071209 is offline   Reply With Quote

Reply


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
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 01:57
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 11:44


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