CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   problem with UDF (http://www.cfd-online.com/Forums/fluent-udf/118336-problem-udf.html)

nikiii May 25, 2013 12:32

problem with UDF
 
Hi,
I solved a UDS for voltage.
Now I am trying to obtain the derivative of voltage by writing this UDF:
# include "udf.h"
# define domain_ID 1
DEFINE_ON_DEMAND(store_gradient)
{
Domain *domain;
cell_t c;
Thread *t;
domain=Get_Domain(1);
thread_loop_c (t,domain)
{
begin_c_loop (c,t)
{
C_UDMI(c,t,0) = NV_MAG(C_UDSI_G(c,t,0));
}
end_c_loop (c,t)
}
}
It compiled successfully, but when I display the contour of UDM, in all the domain it has magnitude zero!!!
What's the wrong
Thank you for advising me.

shashank312 May 26, 2013 02:01

What is the UDS equation you are solving?

rou May 26, 2013 07:28

Hello,I have a problem with UDF
in fluent a message appear:
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.
Error Object: ()
can any one help me

shashank312 May 26, 2013 12:56

Post your UDF here and folks will take a look.

nikiii May 27, 2013 10:39

hi;
thank you for your attention.
but i solved my problems.
dear rou after compiling your UDF you must press enter in fluent page then type solve/set/expert and press enter. you must type yes in front of the second text "keep temporary solver memory from being freed?". after it you can execute on demand.
good luck.

rou May 29, 2013 06:36

hi,
thank you for your help nikiii but when I initialize the program it write no UDF
I don't know what's the problem?


All times are GMT -4. The time now is 00:29.