|
[Sponsors] |
March 8, 2012, 09:55 |
C_UDSI_G in DEFINE_ADJUST
|
#1 |
New Member
OscarD
Join Date: Sep 2011
Posts: 4
Rep Power: 14 |
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. |
|
Tags |
fluent, gradients, udf, udf issue |
|
|