CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Help please UDF flow direction (https://www.cfd-online.com/Forums/fluent/79783-help-please-udf-flow-direction.html)

val17lr September 3, 2010 10:19

Help please UDF flow direction
 
Hello

I have a problem, I wrote an UDF file in order to create a pressure gradient on an inlet. Eveything works, except that the direction of my flow is wrong.

In fact, the flow goes to the "+y" axis, but I want it to go to the "-y" axis ( I want to change the sign).

Here is my UDF:

#include "udf.h"
DEFINE_PROFILE(pressure_profile,t,i)
{
real x[ND_ND];
real y;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y = x[1];
F_PROFILE(f,t,i) = -12750*y + 115100;
}
end_f_loop(f,t)
}

Anyone have a solution? I can't change anything on the inlet y-component of flow direction (normal, i select 'UDF pressure_profile') under boundaries conditions..

Thank you (excuse my english is poor, I'm french)

val17lr September 3, 2010 13:21

Up please!!!!

I just need this to finish my diploma thesis!!!

val17lr September 4, 2010 05:30

Anybody?

I'm sure the solution is not difficult but I don't find it.


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