CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   DT_CG use (https://www.cfd-online.com/Forums/fluent/137978-dt_cg-use.html)

Isitv2A June 26, 2014 06:09

DT_CG use
 
i want to know the position of CG for this i use in my udf the DT_CG(dt)


for( i=0 ; i<3; i++)

x_cg = DT_CG (dt) ;

where x_cg habe been declared as a real .

message error (" impossible de convertir de 'real *' en 'real' ")


can someone explain me how to use correctly DT_CG ?


thanks !

pakk June 26, 2014 08:15

DT_CG is a vector (with 2 or 3 dimensions).
So you should also define x_cg as a vector.

real x_cg[ND_ND];

And then assign it using:

NV_V(x_cg,=,DT_CG(dt));

I think.

Isitv2A June 26, 2014 10:07

ok i will try


at first i declared x-cg like that " real x_cg[3) " to have a vector 3dim

than i use a loop to define x-cg[i]=Dt-cg(dt) [i]


All times are GMT -4. The time now is 21:53.