CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   a problem with UDF (https://www.cfd-online.com/Forums/fluent/31883-problem-udf.html)

 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

Hi,

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,

Ale

 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.

Hi

ap

 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.

Hi

ap

 All times are GMT -4. The time now is 11:01.