|February 3, 2009, 05:34||
C_UDSI_G() use in DEFINE_ADJUST
Hi, I found a solution for the archived post below. Here an example for C_UDSI_G() use in DEFINE_ADJUST
real my_mag = 0.0;
if (NULL != THREAD_STORAGE(t,SV_UDS_I(uds_index)) &&
NULL != T_STORAGE_R_NV(t,SV_UDSI_G(uds_index)))
my_mag = NV_MAG(C_UDSI_G(c,t,uds_index));
When I use a C_UDSI_G in DEFINE_ADJUST, the access_violation error came out.
if I start iteration without hooking the adjust fuction,the iteration executed ,after some steps, I hooked the adjust function and initialized ,the iteration continues . I guess this is because the gradient of C_UDSI(C_UDSI_G ) isn't allocated yet ,but the codes do contain the if (! Data_Valid_P())return; sentence?
I check the id.h in the src file as: FLUENT_EXPORT boolean Data_Valid_P(void); The FLUENT_EXPORT usually provides a GUI operation interface.am i right?
can some one give me some suggestion that how to let Fluent iterate when hooked a adjust function which contains C_UDSI_G other then let it iterate some step without hooking this adjust function? and the reason for this? thanks in advance
|July 5, 2013, 00:12||
Join Date: Aug 2012
Posts: 8Rep Power: 6
I have the same problem to solve a transient problem. I guess you are right that C_UDSI_G needs couple of timesteps to be allocated.
It turns out no more than 4 timesteps works for me. The reason for that is unknown and I cannot find explaination in UDF manual. But anyway, just don't use the serveral inital timesteps. This may work.
|Thread||Thread Starter||Forum||Replies||Last Post|
|C_UDSI_G(c,t,UU) returning NAN||Travis||FLUENT||1||February 17, 2009 06:51|
|Could I use DEFINE_ADJUST to set B.C ?||pour||FLUENT||0||May 22, 2008 13:07|
|C_UDSI_G() in DEFINE_ADJUST||shuqin||FLUENT||2||June 18, 2006 00:12|
|About DEFINE_ADJUST||sagga||FLUENT||1||February 3, 2006 10:49|
|DEFINE_ADJUST||Tomm||FLUENT||0||December 7, 2005 11:53|