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

outlet pressure

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2010, 09:11
Default outlet pressure
  #1
New Member
 
omid
Join Date: Mar 2010
Posts: 17
Rep Power: 16
om1234 is on a distinguished road
Hi all
i'm going to analysis 2d centrifugal pump.in outlet line,i try to define static pressure in a single face of grid. i use this udf. but it doesn't work correctlly.

#include"udf.h"

DEFINE_PROFILE(pressure_outlet, t, i) * this macro is used to define values in BCs*/
{
real pr;
face_t f;
int j;
real p;
int k;
real y;
real x[ND_ND];
if(!Data_Valid_P()) /*check for the availability of data*/
return;
begin_f_loop(f,t)
{
for(k=0;k<12;k++)
p=F_P(f,t); /*F_P read the pressure of each face and assign it to p*/
F_UDMI(f,t,k)= p; /*this macro is used to store/access the values of the user-defined memory on the face.the outlet boundary is devided to 12 subline.so i set the number of memory 12.define>user deine>memory*/

printf("wwwwwwww:%f\n",F_UDMI(f,t,k));
}
end_f_loop(f,t)

begin_f_loop(f, t)
{
for(j=0;j<12;j++)
F_CENTROID(x,f,t);
y=x[0]; /* the outlet line is horizontal and i need the x coordinate*/
if (y<-0.027) /* there is a face centroid in this interior*/
{
F_PROFILE(f,t,i)=100000; /*desired value of the defined face cell*/
}
else
{
pr=F_UDMI(f,t,j); /* access to stored values for each face*/
F_PROFILE(f, t, i) = pr;
}
printf("rrrrrrrrr:%f\n",F_PROFILE(f,t,i));
}
end_f_loop(f, t)
}
om1234 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 BC for combustion chamber Giuki FLUENT 1 July 19, 2011 11:35
Pressure Outlet setting CoG STAR-CCM+ 4 June 9, 2010 21:47
what actually is the 'zero pressure outlet b. c.' hwe001 CFX 4 June 7, 2010 15:22
Pressure Drop in outlet Vent Abdul FLUENT 2 October 28, 2008 12:13
Backflow occuring at a pressure outlet? Dave FLUENT 1 August 12, 2004 17:39


All times are GMT -4. The time now is 09:48.