CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Help with UDS FLUX (http://www.cfd-online.com/Forums/fluent/35704-help-uds-flux.html)

 Andrew Garrard February 10, 2005 09:35

Help with UDS FLUX

If there is anyone who can help me with this I would be very, very grateful. I have been trying to do this for two weeks now with no luck.

I am trying to model the species mass fraction in an electrochemical system. The charged ions are drawn towards an oppositely charged electrode. I know the equation for the flux of the species. There is NO flow.

I have reduced the problem to a 2D, rectangular grid. At the top a flux of species in using a UDS flux. At the Bottom an opposite flux of species out. The net gain of species in the system should be zero.

I set my UDS_FLUX term so that is returns a constant * area of horizontal face. The constant is the same as the flux on the top and bottom wall, but that shouldn't matter. The UDS_FLUX takes the retuned value and multiplies it by the value of the UDS I have removed diffusion by setting the value to zero.

I cannot get the value of the UDS to settle on a fixed value, it just keeps going up.

I know that you shouldn't set two NEUMANN B.C's, but when you do it with diffusion, it settles nicely to a constant species mass fraction gradient. Why dose it not with my model?

 Peter February 11, 2005 11:13

Re: Help with UDS FLUX

Andrew, Maybe you could post the main part of the your define uds flux udf and there may be a clue in there.

 Andrew Garrard February 14, 2005 06:47

Re: Help with UDS FLUX

OK, I am using a massivly simplified 2d model to try to understand what is going on - a 5 x 5 2D grid. Fluxes on the top and bottom face, say 0.001.

The UDF is a little like this. I just want the mass flux to be the same through each cell (later I will link it as a function of another variable)

DEFINE_UDS_FLUX

{