CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Flux in UDS (http://www.cfd-online.com/Forums/fluent/27696-flux-uds.html)

Ulrich May 29, 2000 11:43

Flux in UDS
 
Hi, I want to define 2 scalars with fluxfunction. The fluxfunctions are different in each direction and different for each scalar. That's why I want to compile the following source code:

#include "udf.h"

DEFINE_UDS_FLUX(scalar1,face,thread,1) { real F[ND_ND] /* for each direction(x,y,z)*/; real a,b,c;

F[0] = a; F[1] = b; F[2] = c; }

DEFINE_UDS_FLUX(scalar2,face,thread,2) { real F[ND_ND]; real u,v,w;

F[0] = u; F[1] = v; F[2] = w; }

Is this source code correct?

Tanks's for help.

Ulrich

Chris May 30, 2000 12:37

Re: Flux in UDS
 
You can not specify the value of the last argument to the UDF (where you have a "1" and a "2"). Fluent will pass an integer value indicating the scalar, you just need to hook the proper function to each scalar from the BCs panel.

Also, your functions don't do anything (they assign values from local variables "a", "b", and "c" to another local variable "F"). You probably want to store your fluxes someplace where Fluent will use them...


All times are GMT -4. The time now is 18:32.