
[Sponsors] 
February 6, 2013, 11:45 
what's 1.#IND?

#1 
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 6 
when I ran the following udf for the source of energy, s_p that I defined appears as a weired number, 1.#IND. Then
Error: Divergence detected in AMG solver: temperature Error Object: #f Any idea for this problem? DEFINE_SOURCE(energy_source, cell, thread, dS, eqn) { real source; real s_j, s_p; s_j = C_UDSI_DIFF(cell,thread,0)*NV_MAG2(C_UDSI_G(cell,t hread,0)); s_p =  C_UDSI_G(cell,thread,2)[0]*C_UDSI_G(cell,thread,0)[0] /  C_UDSI_G(cell,thread,2)[1]*C_UDSI_G(cell,thread,0)[1] /  C_UDSI_G(cell,thread,2)[2]*C_UDSI_G(cell,thread,0)[2]; s_p = s_p*C_T(cell,thread)*C_UDSI_DIFF(cell,thread,0); /* s_p = 0.; */ printf("s_j: %g\n", s_j); printf("s_p: %g\n", s_p); source = s_j + s_p; dS[eqn] = 0.0; return source; } Last edited by Raymond.Leoi; February 6, 2013 at 12:56. 

February 6, 2013, 12:24 

#2 
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 6 
It seems IND indicates indefinite. However, I already initialize all those gradient in DEFINE_INIT. 1.#IND still comes up. How can I fix it?


February 10, 2013, 20:08 

#3 
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 308
Rep Power: 9 

February 12, 2013, 09:11 

#4  
New Member
Join Date: Jan 2010
Location: Netherlands
Posts: 27
Rep Power: 9 
Quote:
Your problem might be because the gradients have not been assigned at the beginning of the iterations. You can use an 'if' condition to ensure that the gradients are available, otherwise return a zero source. Code:
if (NULL != THREAD_STORAGE(thread,SV_UDS_I(0)) && NULL != T_STORAGE_R_NV(thread,SV_UDSI_G(0))) { s_j = ... s_p = ... source = s_j+s_p; dS[eqn]= ... return source; } else { dS[eqn]=0; return 0; } in your case it should be: Code:
s_p = s_p*C_T(cell,thread)*C_UDSI_DIFF(cell,thread,0); source = s_j + s_p; dS[eqn] = s_p/C_T(cell,thread); return source; 

February 19, 2013, 08:42 

#5  
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 6 
Thanks for your suggestion, Akm. DS=0. means that the source term is fedback explicitly.
Quote:


February 20, 2013, 14:11 

#6 
New Member
Raghuvir
Join Date: May 2012
Location: India
Posts: 2
Rep Power: 0 
Hi,I have a similar problem. I am working on adding a body force to navier stokes equation, which is a function of voltage and charge density.
I added Voltage and charge density as two UDS,0 and 1 respectively. For UDS'0' (volt), I use poissons potential equation i.e., del^2(V) = rho_q/enod. So,diffusivity is 1 and source term is charge_density/e_nod. For UDS'1', I use charge conservation equation. i.e., grad(charge_density*mu_constant*E) = 0 where E = grad(V). So, I use flux equation, calculate gradv term at face by taking average of two neighbour cells or zero if its boundary. UDS0 : source = ( C_UDSI(c,t,1) ) / (8.8514e12) ; dS[eqn] = 0 ; return source ; UDS1: NV_VS_VS(fluxvec, =, C_UDSI_G(c0,t0,0), * , 0.5, + , C_UDSI_G (c1,t1,0) , * , 0.5 ) ; flux = NV_DOT(fluxvec, A)*2e4; /* Average flux through face */ return flux; Model : two electrodes surrounded by air. one electrode with 27k volt and charge density as 0.016. another electrode with 0 volt and o charge density. PROBLEM : I get Nan values for UDS1 (charge density) when I initialise it with anything except zero. If I initialise UDS1 with 0 then the residual monitors of UDS1 instantly go to e43 values. But I see changes in UDS scalars only near electrodes and near domain boundaries, rest of the domain has constant UDS values. I Tried initialising without udf and then adding them after some iterations....but no luck. I am guessing its sth to do with flux equation in that UDS1 equation. Could anyone please help me with finding the error. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
lift coefficient 1.#IND  arashm  FLUENT  0  July 28, 2010 11:13 