CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

C_UDSI_G in DEFINE_ADJUST

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 8, 2012, 09:55
Unhappy C_UDSI_G in DEFINE_ADJUST
  #1
New Member
 
OscarD
Join Date: Sep 2011
Posts: 4
Rep Power: 14
OscarD is on a distinguished road
I'm a new user of fluent in the version included in ANSYS13. I've read a lot of posts related with the problem that I'm having while trying to run am already compiled UDF I built that requires the estimation of the gradient of a UDS that is running OK in a transient simulation.

I've tried solve/set/expert temporary solver memory [yes], giving a determined value to the UDS during a DEFINE_INIT, etc.

I read somewhere that by initializating the calculation without having hooked the ADJUST and doing the hook after a couple of iterations might solve the problem, but I have not managed to do so...

The UDF I built is:

++++++++++++++++++++++++++++++++++++
#include "udf.h"

DEFINE_ADJUST(E_field,d)
{
Thread *t;
cell_t c;
real conduct,tempe,d1;

d1=3.213e-034;

if (! Data_Valid_P())
return;*/

if(NULL!=THREAD_STORAGE(t,SV_UDS_I(0))&&NULL!=T_ST ORAGE_R_NV(t,SV_UDSI_G(0)))
{
thread_loop_c(t,d)
{
if (FLUID_THREAD_P(t))

{
begin_c_loop(c,t)
{
tempe=C_T(c,t);
conduct=d1*pow(tempe,9.);
C_UDMI(c,t,0)=conduct;
C_UDMI(c,t,1)=-conduct*C_UDSI_G(c,t,0)[0];
}
end_c_loop(c,t)
}
}
}
}
+++++++++++++++++++++++++++++++++++++

Thanks in advance for any clue you can give me about it.
OscarD is offline   Reply With Quote

 

Tags
fluent, gradients, udf, udf issue


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:56.