|
[Sponsors] |
August 13, 2012, 10:28 |
Problem ND_SET
|
#1 |
Member
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 14 |
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!!! |
|
August 16, 2012, 00:03 |
|
#2 |
Senior Member
|
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. |
|
August 16, 2012, 18:44 |
|
#3 | |
Member
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 14 |
Thank you very much for your reply.
Quote:
|
||
May 16, 2014, 19:45 |
|
#4 | |
New Member
Chuang Wei
Join Date: Aug 2012
Posts: 8
Rep Power: 14 |
Quote:
|
||
|
|
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 |