CFD Online Discussion Forums

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

Andrew Garrard February 10, 2005 08: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?

Please, Please help me, anyone.

Peter February 11, 2005 10: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 05: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

{

F_AREA(A, f, thread);

if(f == internal face); return 0.001 * A[1]; else return 0;

}

This should mean that the flux of the UDS through each plane (where y = const) is the same, right?


All times are GMT -4. The time now is 04:43.