|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 3 ![]() |
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!!! |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Aug 2011
Posts: 145
Rep Power: 6 ![]() |
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. |
|
|
|
|
|
|
|
|
#3 | |
|
Member
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 3 ![]() |
Thank you very much for your reply.
Quote:
|
||
|
|
|
||
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 04:43 |
| Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 05:59 |
| natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 06:29 |
| Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |
| Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 14:52 |