|
[Sponsors] |
correct UDF code for unsteady pressure boundary |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 2, 2005, 12:38 |
correct UDF code for unsteady pressure boundary
|
#1 |
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) } |
|
|
|
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 |