CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF for fan model (https://www.cfd-online.com/Forums/fluent/45675-udf-fan-model.html)

 zhaoh August 9, 2007 22:27

UDF for fan model

Dear everyone I'm making the air flow through a fan. The relationship between the pressure difference and velocity is detaP=139-12V.I want use UDF to solve the problem. #include"udf.h" DEFINE_PROFILE(pressure,t,i) { real x[ND_ND]; real y; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t);

But i think the udf has some problems. For example,C_V(cell,thread) has some difference with the V(in the equation),V is stand for mean-face-velocity. Scecond, detaP is pressure difference not Gause pressure.Does the F_PROFILE(f,t,i)=139-12*C_V(cell,thread) adapt for detaP=139-12V？How to amend the UDF? Hope your reply!! Thank you so much...

 Yannian February 9, 2012 10:42

Dear zhaoh,
have you find out the solution for your question?I also concern the F_PROFILE(f,t,i) can add pressure difference or not?
Yannian

 niravtm007 February 19, 2012 08:30

UDF for pressure variation

Hii friends
My problem is flow through river channel, I have taken a orbitary region so at exit of my geometry flow exits into river itself. so i need to know how to apply UDf at exit, as pressure must vary with P=row*g*h. my exit cross section is not uniform so what should i do please help. is it possible to apply custom field function ???? in fluent please help ASAP :)

 Yannian February 20, 2012 04:49

Dear Nirav,
I think your probelm can be solved by UDF.The formula in your fomular is height whose direction assumed in y direction, so you can write udf in this way(You have to modify some line for your own coordinate):
#include "udf.h"
{
real z[ND_ND];
real y;
face_t f;
{
y=z[1];
row=1000;
g=9.8;
P0=101325;