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 Members List Search Today's Posts Mark Forums Read

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

Reply

Tags
gradient at boundary, gradient boundary, pressure, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 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 08:29.