|
[Sponsors] |
February 21, 2018, 09:45 |
streamwise pressure gradient
|
#1 |
New Member
G Ionut
Join Date: Sep 2016
Posts: 29
Rep Power: 10 |
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 x-axis. 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, 12:19 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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, 12:43 |
|
#3 | |
New Member
G Ionut
Join Date: Sep 2016
Posts: 29
Rep Power: 10 |
Quote:
|
||
Tags |
fluent, pressure gradient, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Polyhedral mesh cyclic boundary problem | C-L | OpenFOAM | 13 | December 21, 2016 08:53 |
Straight Pipe with imported velocity profile. Pressure gradient? | Ahuja.Darsh | FLUENT | 7 | September 13, 2016 09:11 |
Pressure Outlet Guage pressure | Mohsin | FLUENT | 36 | April 29, 2016 18:16 |
question on simulating rotating channel with a pressure gradient | huangxianbei | CFX | 10 | January 15, 2014 00:00 |
Report Streamwise Pressure Gradient? | Will | FLUENT | 0 | July 12, 2008 23:01 |