CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   problem with very simple ufd (

Ralf Schmidt September 13, 2006 05:28

problem with very simple ufd

I have a problem with a very simple udf. I have a cuboid volume, and i want about a quater of it to have a very high viscous resistant.

I wrote a simple udf that defines the resistant, but it dosn't work... the flow through the cuboid is straight where it should be rederacted by the high resistance zone.

That is my udf:

#include "udf.h"



real x[ND_ND];

real a;

cell_t c;




if( x[0] < -150)

if( x[1] < 1200)

if( x[2] < -250){

a = 10000000000;



a = 0;

F_PROFILE(c,t,i) = a;




cadaei September 13, 2006 09:15

Re: problem with very simple ufd
are the values of the centroid x correct? they seem very large to be in metres

Ralf Schmidt September 13, 2006 09:33

Re: problem with very simple ufd
the volume is defined in mm. The cuboid is 300(x) by 150(z) by 600(y) mm. Its center is at -150(x), -250(z), 1200 (y) mm.

So the values I define are right in the middle of the volume.

The grid is also scaled in mm.

I noticed now, that even when I change the value for "a" after the else statement, there is no change in the simulation.

What is the problem??


Scott September 14, 2006 16:35

Re: problem with very simple ufd
The UDF documentation clearly states that all units in UDFs must be in SI, so length is in metres.

Ralf Schmidt September 15, 2006 10:38

Thats it!

Thanks for that! I think, thats it! The simulation shows more or less the results, i expected, but it is very slow...

Thanks anyway...


All times are GMT -4. The time now is 03:58.