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

Pressure Outlet UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 30, 2018, 04:38
Default Pressure Outlet UDF
  #1
New Member
 
Madrid
Join Date: Apr 2018
Posts: 15
Rep Power: 8
miguwhynot is on a distinguished road
Hi, I'm trying to set up and atmospheric air flow over a sphere, so I have a velocity inlet with the desired velocity and a pressure outlet with the UDF for pressure.

#include "udf.h"
DEFINE_PROFILE(pressure_inlet, thread, position)
{
face_t f;
real t = CURRENT_TIME;
real v = 4;
real t1 = 11000/v;
real t2 = 20000/v;
real t3 = 32000/v;
begin_f_loop(f, thread)
{
if (t <= t1)
{
F_PROFILE(f, thread, position) = 101325.0*pow(((288.15-0.0065*v*t)/288.15),5.25577);
}
else if (t <= t2)
{
F_PROFILE(f, thread, position) = 22605*pow(2.718281828,(11000-v*t)/6340);
}
else if (t <= t3) {
F_PROFILE(f, thread, position) = 2447*pow((141.89+0.003*v*t)/216.65,-11.388);
}
else {
// Capture t values outside the allowed range:
// print a message to the console and stop.
Message("%d: Error: t=%e not allowed.\n",myid,t);
return;
}
end_f_loop(f,thread)

}
}

As you can see the UDF basically simulates the ascendent move of the sphere at "v" velocity.

I'm having trouble making the problem work with no physic model turn on, just conitnuity (getting reverse flow at outlet). Can you spot my mistake over here?

Also I'm not completly sure what to set in Operating Condition pressure (I think the value should be zero since my UDF gives the total pressure value). Thanks everyone in Advance.
Attached Images
File Type: png Sin título.png (19.8 KB, 3 views)

Last edited by miguwhynot; August 30, 2018 at 04:46. Reason: Attached residuals
miguwhynot is offline   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
Pressure Driven Supersonic Flow in Converging-Diverging Nozzle cdm OpenFOAM Running, Solving & CFD 7 August 28, 2019 02:37
UDF for pressure outlet backflow total temperature MrDaimon FLUENT 13 June 23, 2017 01:45
Question Concerning Pressure Value (Pressure outlet) and Reference Pressure (Physics) andy_flow STAR-CCM+ 1 July 9, 2013 09:44
Pulsatile pressure inlet with pressure outlet a.lynchy FLUENT 3 March 23, 2012 14:45
UDF to define or adjust pressure??? engahmed FLUENT 0 July 6, 2010 18:19


All times are GMT -4. The time now is 11:10.