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

Problem ND_SET

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 13, 2012, 10:28
Default Problem ND_SET
  #1
Member
 
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 14
fevi84 is on a distinguished road
Hi

I need help!!!

I need create a vector in 2D from to the cordenates x and y. I have the x component, tx_l, and the y component, ty_l. I tried with the follow UDF:

real tx_l, ty_l;
real t_l [ND_ND]

tx_l = mu_l*C_DUDX(cell,thread_l)*C_UDSI_G(cell,thread_l, 0)[0] + 0.5*mu_l*C_UDSI_G(cell,thread_l,0)[1]*(C_DUDY(cell,thread_l) + C_DVDX(cell,thread_l));

ty_l = mu_l*C_DVDY(cell,thread_l)*C_UDSI_G(cell,thread_l, 0)[1] + 0.5*mu_l*C_UDSI_G(cell,thread_l,0)[0]*(C_DUDY(cell,thread_l) + C_DVDX(cell,thread_l));

ND_SET(t_l[0], t_l[1], tx_l, ty_l)

But this not works. The error is:

error: macro "ND_SET" requires 6 arguments, but only 4 given

Also I tried with:

t_l[0] = tx_l;
t_l[1] = ty_l;

In this case gave no error, but I'm not sure if well.

Anyone knows, how create a vector using the ND_SET macro in this case, which I have the components?

Thanks!!!
fevi84 is offline   Reply With Quote

Old   August 16, 2012, 00:03
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 22
blackmask will become famous soon enough
ND_SET requires 6 arguments no matter what the value of ND_ND is. you have to write something like
ND_SET(t_l[0], t_l[1], NULL, tx_l, ty_l, NULL)
because the 3rd and 6th arguments must appear but are not used if ND_ND is 2.
It is ok you assign the value for t_I array directly, which is almost the same as what the macro ND_SET does.
blackmask is offline   Reply With Quote

Old   August 16, 2012, 18:44
Default
  #3
Member
 
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 14
fevi84 is on a distinguished road
Thank you very much for your reply.

Quote:
Originally Posted by blackmask View Post
ND_SET requires 6 arguments no matter what the value of ND_ND is. you have to write something like
ND_SET(t_l[0], t_l[1], NULL, tx_l, ty_l, NULL)
because the 3rd and 6th arguments must appear but are not used if ND_ND is 2.
It is ok you assign the value for t_I array directly, which is almost the same as what the macro ND_SET does.
fevi84 is offline   Reply With Quote

Old   May 16, 2014, 19:45
Default
  #4
New Member
 
Chuang Wei
Join Date: Aug 2012
Posts: 8
Rep Power: 14
danieldmgy is on a distinguished road
Quote:
Originally Posted by blackmask View Post
ND_SET requires 6 arguments no matter what the value of ND_ND is. you have to write something like
ND_SET(t_l[0], t_l[1], NULL, tx_l, ty_l, NULL)
because the 3rd and 6th arguments must appear but are not used if ND_ND is 2.
It is ok you assign the value for t_I array directly, which is almost the same as what the macro ND_SET does.
Thank you so much for help! It works like a charm!
danieldmgy is offline   Reply With Quote

Reply


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
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 06:59
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 15:13.