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

Force dependent on particle position

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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


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
print position of Lagrangian particle? sven82 OpenFOAM Running, Solving & CFD 4 June 16, 2016 08:58
how to perform temperature gradient on a particle (Thermophoretic Force) wwt650420 FLUENT 3 March 23, 2011 02:10
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 21:19
Help: UDF of "particle body force" !!! zhaoh FLUENT 3 January 16, 2007 20:17


All times are GMT -4. The time now is 18:42.