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

UDF for Electrostatic Field

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2002, 15:18
Default UDF for Electrostatic Field
  #1
Zhenan Li
Guest
 
Posts: n/a
Hi,

Could you check this UDF for me please?

The electrostatic field defined using UDS. I want to add the electrostatic force acting on a charged particles in the field. The following is a simple code.

Thanks,

#include "udf.h"

#define PI 3.14159265

#define EPS 8.854e-12

DEFINE_DPM_BODY_FORCE(particle_body_force, p, i)

{

Thread *t;

real x[ND_ND];

real y;

real bforce;

real Q = 2.0e-6; /* Particle electric charge */

cell_t c;

C_CENTROID(x, c, t);

y = 0.3 - x[1];

bforce = C_UDSI_G(c,t,0)[i]*1000.0*Q + Q*Q/(16.0*PI*EPS*y*y)*(C_UDSI_G(c,t,0)[i]/NV_MAG(C_UDSI_G(c,t,0)));

return (bforce/P_MASS(p));

}
  Reply With Quote

Old   August 11, 2002, 21:58
Default Re: UDF for Electrostatic Field
  #2
Alamgir
Guest
 
Posts: n/a
Zhenan,

Could you plz help me, which particles u using, where did get information about Q, which equation u r using?

look, u wrote bforce= ..............., at the end of the equation there are 3 ))), I think this could be a problem. look according to your equation whether is it correct of not?

Alamgir
  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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drag coefficient, DPM. jorge poyatos FLUENT 14 January 20, 2012 13:41
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
Porosity field in Fluent wojciech FLUENT 1 September 20, 2010 11:19
Help Parallelizing UDF AndresC FLUENT 0 February 25, 2010 15:50
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03


All times are GMT -4. The time now is 16:55.