CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

correct UDF code for unsteady pressure boundary

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

LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2005, 11:38
Default correct UDF code for unsteady pressure boundary
James W
Posts: n/a
I am trying to set the pressure on a pressure outlet boundary on a 3d pipe. The pressure is a pressure wave.

the magnitude of the pulse when measured using a monitor point by fluent is less than that calculated by the UDF.

I have my suspicions that the problem maybe due to the UDF code. Especially the section where it loops over the boundary - should this be different in 2d and 3d?

I will admit i am not fully up to spead on the UDF code and have adapted some from a 2d example i seen in a tutorial.

I have included the code below. If its not this then any other ideas, using the RSM model. unsteady coupled solver, 10 iterations per timestep. convergence seams good.

#include "udf.h"

DEFINE_PROFILE(unsteady_pressure, thread, position) {

float t, pressure; face_t f;

/* Get real flow time from fluent using RP_Get_Real command*/

t = RP_Get_Real("flow-time");

/* Set pressure dependant on time for pulse duration */

if (t<=0.00821) { pressure = 60000*sin(3.14159*t/0.00821); } else { pressure = 0; }

/* loop over the whole boundary condition */

begin_f_loop(f, thread) {

F_PROFILE(f, thread, position) = pressure; } end_f_loop(f, thread)


  Reply With Quote


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 turbine simulation Saturn CFX 58 July 3, 2020 01:13
Neumann Pressure Boundary Condition with UDF Balder Fluent UDF and Scheme Programming 8 July 6, 2012 11:21
How can I implement time varying pressure boundary condtion through UDF nacaairfoil FLUENT 0 October 11, 2011 13:03
pressure oscillation near pressure outlet boundary kino Main CFD Forum 5 April 13, 2011 11:03
transient simulation of a rotating rectangle icesniffer CFX 1 August 8, 2009 07:25

All times are GMT -4. The time now is 14:57.