CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF for Electrostatic Field

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

LinkBack Thread Tools Display Modes
Old   August 7, 2002, 15:18
Default UDF for Electrostatic Field
Zhenan Li
Posts: n/a

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.


#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
Posts: n/a

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?

  Reply With Quote


Thread Tools
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 On
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 14:41
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
Porosity field in Fluent wojciech FLUENT 1 September 20, 2010 11:19
Help Parallelizing UDF AndresC FLUENT 0 February 25, 2010 16:50
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03

All times are GMT -4. The time now is 13:48.