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

help with UDSI_G

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2009, 13:26
Default help with UDSI_G
  #1
Member
 
Akour
Join Date: May 2009
Posts: 79
Rep Power: 16
ak6g08 is on a distinguished road
hi,

Could anyone please tell me if there is a better way to calculate a user defined scalar gradient other than C_UDSI_G(c,t,i)...whenever I introduce this function my solution diverges very fast...even with residuals under 0.05! basically, I have 2 udfs, a poisson equation for voltage, and a ion transport equation. One of the sources appearing in the ion transport equation is the (gradient of the voltage*gradient of the charge...which are both UDSs)...the UDFs for the source terms are below, I read something about UDMIs maybe helping but im not quite sure how to implement these properly.please someone help!

Thanks a lot!
ak

charge sources:

DEFINE_SOURCE(spcharge_lin,c,t,dS,eqn)
{
real source,source_a,source_b;
static real kappa = .00000000882;

source_a = C_R(c,t)*kappa*C_UDSI_G(c,t,0)[0]*C_UDSI_G(c,t,1)[0];

source_b = C_R(c,t)*kappa*C_UDSI_G(c,t,0)[1]*C_UDSI_G(c,t,1)[1];

source=source_a+source_b;

dS[eqn] = 0;

return source;
}


voltage equation:

DEFINE_SOURCE(electric_source,c,t,dS,eqn)
{

dS[eqn] = 0;
return (C_R(c,t)*C_UDSI(c,t,1)/epsilon);

}


DEFINE_DIFFUSIVITY(electric_diff, c, t, i)
{
return 3.54;
}
ak6g08 is offline   Reply With Quote

Reply


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 16:52.