|
[Sponsors] |
June 9, 2010, 07:06 |
C_DUDX problem
|
#1 |
New Member
marie
Join Date: May 2010
Posts: 21
Rep Power: 16 |
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!! |
|
June 9, 2010, 20:53 |
|
#2 |
New Member
Tez
Join Date: Oct 2009
Posts: 12
Rep Power: 17 |
I would change the %d to %f in printf
|
|
June 10, 2010, 05:52 |
|
#3 |
New Member
marie
Join Date: May 2010
Posts: 21
Rep Power: 16 |
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;" |
|
Tags |
derivative velocity, fluent, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 05:43 |
Incoherent problem table in hollow-fiber spinning | Gianni | FLUENT | 0 | April 5, 2008 11:33 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 15:52 |