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

UDF for zero pressure gradient at BC outlet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 26, 2018, 13:15
Smile UDF for zero pressure gradient at BC outlet
  #1
New Member
 
Alessandro
Join Date: Sep 2018
Location: Italy
Posts: 1
Rep Power: 0
ghordog is on a distinguished road
Hi everyone! I'm a quite new user with Fluent and tried for several days to create an UDF for my case without success. I'll explain it:
I have an airbox with an inlet and two different outlets, the discharge (small) one and the main (big) one. Time steady, pressure based.

In the small one I have to set this Boundary Condition: Pressure =0 (atmospheric pressure) and Velocity gradient = 0. But if I've correctly understand reading other threads here, Velocity gradient in all inlet and outlet BCs is always set to 0 by default, so in this outlet I should just choose the Pressure outlet BC and set gauge pressure = 0 right?

In the big pressure outlet instead I've to set zero gradient for both velocity and pressure so, for the assumption made before, I've to write and UDF just for zero pressure gradient. I've made several up to this:

Code:
/*****outlet BC - zero pressure gradient*****/

#include "udf.h"
DEFINE_PROFILE(outlet_pressure_big, thread, position)
{
face_t f;
real t = CURRENT_TIME;
float C_P_G(c,t)[2];
C_P_G(c,t)[2] = 0;
begin_f_loop(f,thread)
{
F_PROFILE(f, thread, position) = C_P_G(c,t)[2];
}
end_f_loop(f, thread)
but I received these two errors:
line 8: parse error. -in the line float C_P_G(c,t)[2];-
line 9: invalid type conversion: float -> pointer to char. -in the line C_P_G(c,t)[2] = 0;-

Probably the solution will be very easy but since I'm still a newbie with Fluent in this moment i can't figure it out myself, I'd really appreciate your help, thanks!
ghordog is offline   Reply With Quote

Old   April 28, 2022, 06:12
Default
  #2
Member
 
subhankar
Join Date: May 2016
Posts: 36
Rep Power: 10
SUBHANKAR is on a distinguished road
Hi Alessandro,

I am also stuck in a similar problem. How were you able to give the zero pressure gradient condition at the outlet?

Thank you
Subhankar
SUBHANKAR is offline   Reply With Quote

Reply

Tags
gradient at boundary, gradient boundary, pressure, udf


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
Wind tunnel Boundary Conditions in Fluent metmet FLUENT 6 October 30, 2019 13:23
how to put udf inlet velocity and udf outlet pressure in fluent raminostadi Fluent UDF and Scheme Programming 4 July 3, 2017 07:43
Pressure inlet vs outlet position, transient, time dependent pressure and gravity silent2608 FLUENT 0 February 6, 2016 11:19
UDF for species-mass-fraction gradient at outlet sisir FLUENT 0 June 9, 2007 03:40
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 13:57.