CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Force dependent on particle position

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 27, 2011, 07:17
Default Force dependent on particle position
  #1
New Member
 
jranita's Avatar
 
Join Date: Feb 2011
Posts: 1
Rep Power: 0
jranita is on a distinguished road
Hi,

I am having some trouble calculating a force that is dependent on particle position.

In my case I must access the particle position from within particleForces.

My C++ is not brilliant, I am more of a Fortran, C, Ruby, ... guy.

Anyway I included Particle.H and vector.H in particleForces.C
In the calculation function added:
const vector& position_,
const ParticleType& p,

But I dont know how to get the current particle position...

while compiling I get:
particleForces/particleForces.C:220: error: ‘ParticleType’ was not declared in this scope
particleForces/particleForces.C:220: error: ‘p’ was not declared in this scope

Any suggestions?
How to obtain the current particle position in particleForces?

Thanks
jranita is offline   Reply With Quote

Old   August 23, 2011, 19:44
Default
  #2
New Member
 
Join Date: Aug 2011
Posts: 1
Rep Power: 0
davebritz is on a distinguished road
Hi, I'm trying to do a similar thing at the moment and seem to be stuck at the same point. I'm wondering if you ever got an answer to this question or found a way to do it?

Thanks
davebritz is offline   Reply With Quote

Reply

Tags
particle forces, particle position

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
how to perform temperature gradient on a particle (Thermophoretic Force) wwt650420 FLUENT 3 March 23, 2011 03:10
print position of Lagrangian particle? sven82 OpenFOAM Running, Solving & CFD 3 March 9, 2010 08:09
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01:29
how to know position of particle in PTK areriko CFX 0 November 19, 2007 22:19
Help: UDF of "particle body force" !!! zhaoh FLUENT 3 January 16, 2007 21:17


All times are GMT -4. The time now is 05:49.