CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   about F_UDMI (https://www.cfd-online.com/Forums/fluent-udf/62919-about-f_udmi.html)

lx33101128 March 24, 2009 00:47

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??

e0125583 March 24, 2009 02:56

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.

lx33101128 March 24, 2009 03:48

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?

e0125583 March 24, 2009 04:26

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.

lx33101128 March 24, 2009 06:56

Quote:

Originally Posted by e0125583 (Post 210547)
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.

yes i have changed the zone-ID as the wall's, but it works the same. it can be compiled.however, it can not iterate. i change another computer.the result is the same. it's very strange that you can do that. how did you do that?look forward to your reply!!

e0125583 March 26, 2009 05:17

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.

lx33101128 March 28, 2009 08:20

thanks very very very much! the problem has been solved.

ivanbuz August 28, 2009 03:11

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:

Originally Posted by lx33101128 (Post 211135)
thanks very very very much! the problem has been solved.


alexbog8 October 14, 2009 09:41

F_UDMI works only for boundary faces


All times are GMT -4. The time now is 20:46.