Try and delete all the file writing stuff and just display it in the console using Message();
Also, CX_Find_Cell_With_Point might only work with 3d inputs, so try adding a third index to pt (pt[2]);. Also, I'm using "real" values instead of "static double", although "real" and "double" should be the same on 64-bit machines. You should also have an if-condition, if the cell couldn't be found. Something like this: (I've not tested it). Code:
#include "udf.h" |
Quote:
Thank you so much. My problem has been solved with your help. |
Trouble in running this code
Quote:
I would be really glad if someone could help me with my issue. I have tried running this code on ANSYS R 19.0 Academic version and it gives me the following error. error C2664: 'CX_Find_Cell_With_Point' : cannot convert parameter 2 from 'real [3]' to 'double []' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Thanks Bhargav Sriram Siddani |
Hi, youjfwhu!
If running fluent with multiple nodes, your udf code might generate access-violation because of lacking search error treatment. You should consider the case cx_cell = NULL. CX_Find_Cell_With_Point() is run on all nodes containing partial mesh, and does not always return valid cell ID. |
Quote:
|
All times are GMT -4. The time now is 07:29. |