CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   a problem with UDF (

Baz July 24, 2003 15:48

a problem with UDF
Hi, I have a problem with interpreted UDF . I wrote a simple initialization function for density gradient and after I initialize the solution, I can see contours of variable density. But, even after one iteration the density changes into constant. Why? Thank you for help.

ccc July 24, 2003 22:56

Re: a problem with UDF
hi, I have similar problems. if anyone know, think in advance.

Ale July 25, 2003 05:12

Re: a problem with UDF

perhaps I didn't get the point, but that's what I think: If you initialize a variable, however you do that, you give an initial approximation of the solution. If your model doesn't change the density during the calculation, and you've set a constant value for density in the Materials panel, at the second iteration you'll get that value in all the domain.

You should probably write a DEFINE_PROPERTY macro in your UDF, defining the law of change of your density during the simulation.

Good luck,


ap July 25, 2003 09:53

Re: a problem with UDF
I agree with Ale.

If you keep constant the density in Material properties, FLUENT will use your initialization value just to compute the first iteration.



Lola July 26, 2003 18:39

Re: a problem with UDF
I thought after 'first iteration', the solution is NOT 'converged'. Why would I bother checking any solution in some intermediate iterations??

ap July 27, 2003 19:22

Re: a problem with UDF
I'm not telling the solution is converged after the first iteration.

I just say that if you initialize a density value, but you keep constant density in the material properties, FLUENT will use the value specified there (Material properties) to do all computation except for the first iteration.



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