|
[Sponsors] |
August 12, 2010, 07:19 |
UDF for pressure at outlet
|
#1 |
New Member
Mireia Ayop
Join Date: Apr 2010
Posts: 12
Rep Power: 16 |
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 |
|
October 1, 2018, 13:55 |
|
#2 |
Senior Member
Yuehan
Join Date: Nov 2012
Posts: 142
Rep Power: 14 |
Hi,
have you solved this problem? |
|
|
|
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 |