CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

C_DUDX problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 9, 2010, 07:06
Default C_DUDX problem
  #1
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 16
marye is on a distinguished road
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!!
marye is offline   Reply With Quote

Old   June 9, 2010, 20:53
Default
  #2
tez
New Member
 
Tez
Join Date: Oct 2009
Posts: 12
Rep Power: 17
tez is on a distinguished road
I would change the %d to %f in printf
tez is offline   Reply With Quote

Old   June 10, 2010, 05:52
Default
  #3
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 16
marye is on a distinguished road
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;"
marye is offline   Reply With Quote

Reply

Tags
derivative velocity, fluent, udf


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 01:08.