|
[Sponsors] |
July 18, 2011, 11:20 |
Access particle data in main function
|
#1 |
New Member
Join Date: Oct 2010
Posts: 13
Rep Power: 15 |
Hello,
I would like to write a post processing tool for Euler-Lagrange-Simulations that reads particle properties and stores for each cell the particle mass weighted velocity of all particles located in the respective cell. I created a vector field: Code:
volVectorField effU ( IOobject ( "effU", mesh.time().timeName(), U.mesh(), IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedVector("effU", dimensionSet(0,1,-1,0,0,0,0), vector(0,0,0)) ); Code:
forAll(parcels, pI) { Info << pI << endl; } Code:
forAll(parcels, pI) { Foam::label cellI = parcels[pI].cell(); effU[cellI] += parcels[pI].Volume()*parcels[pI].rho()*parcels[parcelI].U(); w[cellI] += parcels[pI].Volume()*parcels[pI].rho(); } effU = effU/w; I am sorry that I ask such a basic question but I have never programmed on that level in OpenFOAM. Thank you for any help! All the best, Moritz Remark: The template solver for my post processing tool is porousExplicitSourceReactingParcelFoam from OF 2.0.x. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 09:31 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 00:35 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |
Saving particle (DPM) data to file? | Philip | FLUENT | 2 | June 12, 2006 01:41 |
How to update polyPatchbs localPoints | liu | OpenFOAM Running, Solving & CFD | 6 | December 30, 2005 17:27 |