C_DUDX problem
Hello,
I wrote a very simple program : #include"udf.h" #include"mem.h" DEFINE_PROPERTY(cell_visco, c, t) { real mu_lam; real U1= C_DUDX(c,t); real U2 = C_DUDY(c,t); real U3 = C_DUDZ(c,t); real V1= C_DVDX(c,t); real V2 = C_DVDY(c,t); real V3 = C_DVDZ(c,t); real W1= C_DWDX(c,t); real W2 = C_DWDY(c,t); real W3 = C_DWDZ(c,t); if (U1>0.000005) mu_lam = 1.; else mu_lam = 2.; printf ("%d",U1); } On Fluent's windows, I have the result 0 each time whereas on my file result, I have dx-velocity-dx = 5.467863753E-003,.......... and never 0 The dx-velocity-dx dy-velocity-dx dz-velocity-dx dx-velocity-dy dy-velocity-dy dz-velocity-dy dx-velocity-dz dy-velocity-dz dz-velocity-dz can't be determine with C_DUDX(c,t) C_DUDY(c,t)..... etc ???? If you have any ideas... Thank you!! :) |
I would change the %d to %f in printf
|
Thank you for your answer! And you're right!
But I still had the same problem... I think it was just because I didn't put "return mu_lam;" |
All times are GMT -4. The time now is 22:31. |