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

correct UDF code for unsteady pressure boundary

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2005, 12:38
Default correct UDF code for unsteady pressure boundary
  #1
James W
Guest
 
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

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


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