about F_UDMI
#include "udf.h"
DEFINE_ADJUST(test, d) { Domain *subdomain; Thread *t; face_t f; int zone_ID = 1;/*the zone_ID of wall*/ subdomain =Get_Domain(1); t=Lookup_Thread(subdomain,zone_ID); begin_f_loop(f,t) { Message("test1"); F_UDMI(f,t,0) =0; Message("test2"); } end_f_loop(f, t) } followings are the error information: test1 Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. the error information tells that i can not access the F_UDMI,but there are examples in the manual which use it. why?? |
maybe it's a stupid question, but did you set the number of user-defined memories to 1 before compiling the udf? (define-userdefined-memory)
I tried it and the udf works in my case. |
it can't be possible. i have tried many times. it works the same. did you hook the adjust in the User-Defined-Function Hook window?
|
yes I did. the only thing I changed in the source code is the zone-ID, because I do not have a zone-ID 1 in my case file. did you try the udf on another zone-ID? As far as I experienced, zone-ID 1 is always skipped when reading a mesh file and therefor not defined.
|
Quote:
|
I am running fluent 6.2.16 on a linux system (32bit).
I use a simple cube with inlet,outlet and 4 walls. I set the number of userdefined memories to 1. then I compile and load the udf. I hook test::libudf to the adjust-function hook. Then I initialize and start iterating. I get the message test1test2 for every face of the specified zone-ID in the console. |
thanks very very very much! the problem has been solved.
|
can you tell us how you solved it? I have a UDF with F_UDMI and it does not work, and I have to change it to C_UDMI and make it work.
Thanks! Quote:
|
F_UDMI works only for boundary faces
|
All times are GMT -4. The time now is 20:46. |