|
[Sponsors] |
Accessing the position and diameter of lagrangian particles |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 22, 2014, 10:35 |
Accessing the position and diameter of lagrangian particles
|
#1 |
New Member
Ah Cai
Join Date: Dec 2010
Location: Malaysia
Posts: 16
Rep Power: 15 |
Hi all,
I am working on a code to track lagrangian particles by refering to Jelena Andric's work: http://www.tfd.chalmers.se/~hani/kur...dric_Final.pdf I successfully replicated the work in OF20x. My problem now is that I am unable to access the position and diameter of the particles. I know that there is a function in particle.H to access position but I don't know how to tap into it and get access it. I tried Code:
const particle& par = particle.Foam::particle::position(); Anyone have any idea how to output the diameter and positions of all the particles inside the domain?? Thanks. Regards, Ahcai |
|
March 25, 2014, 18:42 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Concerning output of diameters and positions: these are usually written at every regular output in a folder lagrangian inside the timestep. So no need to reinvent the wheel there.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 26, 2014, 09:35 |
|
#3 | |
New Member
Ah Cai
Join Date: Dec 2010
Location: Malaysia
Posts: 16
Rep Power: 15 |
Quote:
Thanks for your advice. Frankly speaking, indeed I am in this phase and struggling to get out of it. I only started using OpenFOAM for a year and have been self-studying it up till now. Same goes for C++. I have an overall picture of the working of C++ (although still not an expert), I have understood the working of class, how to access them and so on... However, I am still unable to link the knowledge of C++ to OpenFOAM. To me, they are similar yet different at the same time. Any advice on how to link them to a novice in OpenFOAM? As for the diameter and position, I am aware that the they are output (including the velocity of particles) in the lagrangian folder at each timestep. However, I still can't find a way to access them. The reason for accessing them is so that I can do some additional calculation on them before they are output. Any advice on how to get them out? Thanks~ |
||
March 31, 2014, 20:22 |
|
#4 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
Another possibility might be the new particle-parser in swak4Foam (shown in this presentation http://openfoamwiki.net/staticPages/...tml#/sec-2-1-4 ) but its hard to tell if that might work without knowing what you want to calculate Other than that the codes in $FOAM_SRC/lagrangian/intermediate/submodels/CloudFunctionObjects/ might give you an idea how to get particle info out of a cloud
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|||
Tags |
diameter, lagrangian particle, position |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Lagrangian material particles | bramv101 | STAR-CCM+ | 5 | October 23, 2017 06:27 |
foamToVTK not working on lagrangian particles | BigBlueDart | OpenFOAM Post-Processing | 1 | July 25, 2013 04:26 |
Histogram on a selected volume, Droplet diameter profile | crevoise | STAR-CCM+ | 0 | May 17, 2013 07:12 |
Straight through cyclone with particles | rogerhoffmann | CFX | 1 | May 21, 2012 19:42 |
Lagrangian particles (change density and diameter) | kel85uk | OpenFOAM | 1 | July 22, 2011 05:01 |