
[Sponsors] 
February 21, 2018, 08:45 
streamwise pressure gradient

#1 
New Member
G Ionut
Join Date: Sep 2016
Posts: 29
Rep Power: 8 
Hello,
I need some help to calculate the streamwise pressure gradient for my UDF in Ansys Fluent. I have considered two 2D cases: Case A, a horizontal pipe and Case B, a tilted pipe (as in the figures below). The two cases have the same geometry, mesh and coordinate system, the difference is that the second pipe is tilted. For Case A the streamwise pressure gradient is found using the C_P_G(c,t)[0] function from fluent, the pressure gradient along the xaxis. For Case B the above function is not valid. How can the streamwise pressure gradient can be calculated for the considered case? 

February 21, 2018, 11:19 

#2 
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 25 
Just use the definition of streamwise pressure gradient.
The streamwise pressure gradient is the inner product between the pressure gradient and the unit vector in the direction of the flow. How do you calculate the unit vector in the direction of the flow? Divide the velocity vector by its magnitude. Code:
real UVDF[ND_ND]; /*UVDF = unit vector in direction of Flow */ real flowmag; ... flowmag=sqrt(C_U(c,t)*C_U(c,t)+C_V(c,t)*C_V(c,t)+C_W(c,t)*C_W(c,t)); UVDF[0]=C_U(c,t)/flowmag; UVDF[1]=C_V(c,t)/flowmag; UVDF[2]=C_W(c,t)/flowmag; Code:
real SPG; /* SPG = streamwise pressure gradient */ ... SPG = UVDF[0]*C_P_G(c,t)[0]+UVDF[1]*C_P_G(c,t)[1]+UVDF[2]*C_P_G(c,t)[2]; 

February 21, 2018, 11:43 

#3  
New Member
G Ionut
Join Date: Sep 2016
Posts: 29
Rep Power: 8 
Quote:


Tags 
fluent, pressure gradient, udf 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Polyhedral mesh cyclic boundary problem  CL  OpenFOAM  13  December 21, 2016 07:53 
Straight Pipe with imported velocity profile. Pressure gradient?  Ahuja.Darsh  FLUENT  7  September 13, 2016 08:11 
Pressure Outlet Guage pressure  Mohsin  FLUENT  36  April 29, 2016 17:16 
question on simulating rotating channel with a pressure gradient  huangxianbei  CFX  10  January 14, 2014 23:00 
Report Streamwise Pressure Gradient?  Will  FLUENT  0  July 12, 2008 22:01 