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

uds flux - drift velocity - udf

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 11, 2011, 05:51
Post uds flux - drift velocity - udf
  #1
Member
 
john
Join Date: Nov 2010
Posts: 50
Rep Power: 15
johnwinter is on a distinguished road
Hi All,

I am calculation ion density using UDS udf, i have a flux term in transport equation as (u+mu.E). My udf is given below. I could see nothing wrong with my udf but ion density is rising gradually beyond input value with every iteration due to this term

DEFINE_UDS_FLUX(ion_flux,f,t,i)
{
#if !RP_HOST
double NV_VEC(A), NV_VEC(E_vec), F_Evec[ND_ND] = {0.}, E_flux = 0.;
cell_t c0, c1 = -1;
Thread *t0, *t1 = NULL;
c0 = F_C0(f,t);
t0 = F_C0_THREAD(f,t);
F_AREA(A,f,t);
if (BOUNDARY_FACE_THREAD_P(t))
{
E_flux = 0.0;
}
else
{
c1 = F_C1(f,t);
t1 = F_C1_THREAD(f,t);
NV_DS(E_vec, =, E_X(c0,t0), E_Y(c0,t0), E_Z(c0,t0), *, ionmob);
NV_DS(E_vec, +=, E_X(c1,t1), E_Y(c1,t1), E_Z(c1,t1), *, ionmob);
E_flux = NV_DOT(E_vec,A)/2.0;
}

if (i==0)
{
return (F_FLUX(f,t)/rho+E_flux);

}

else return (0.);

#endif
#if RP_HOST
return 0.0;
#endif
}

After 3 iterations i could see that the iondensity value at the node near electorde is rising beyond my input value.

Any suggestion are welcome.

PS: I am stroing E_X, E_Y and E_Z values using memory option.

Thanks
John

Last edited by johnwinter; August 12, 2011 at 01:05.
johnwinter is offline   Reply With Quote

Old   August 12, 2011, 06:29
Default
  #2
Member
 
john
Join Date: Nov 2010
Posts: 50
Rep Power: 15
johnwinter is on a distinguished road
i need results badly. please somebody help!
johnwinter is offline   Reply With Quote

Old   February 9, 2017, 11:26
Default
  #3
New Member
 
Join Date: Apr 2012
Posts: 17
Rep Power: 13
beastieboys6 is on a distinguished road
Hi, John,

I'm facing exactly the same problem when using similar UDF.
I was wondering if you had solved problem. If you had, could you share the solution? Thanks.

Or if there is anyone knowing the soluation? Any suggestion would be highly appreciated.
beastieboys6 is offline   Reply With Quote

Old   November 25, 2017, 05:07
Default SS..Any update on ion Density UDF
  #4
New Member
 
Tamil Nadu
Join Date: Nov 2017
Posts: 2
Rep Power: 0
sivajiseepana is on a distinguished road
HI do you got any progress on above, kindly post your reply
sivajiseepana is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
3D UDF Paraboilc Velocity Profile (Can't Maintain) Sing FLUENT 12 August 7, 2017 07:25
UDF error - parabolic velocity profile - 3D turbine Zaqie Fluent UDF and Scheme Programming 9 June 25, 2016 20:08
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 02:29
Urgent! Help on UDF to set inlet velocity Ray Hong FLUENT 4 December 30, 2005 13:32
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 11:30.