|
[Sponsors] |
September 25, 2017, 10:39 |
Adding particles/parcels to kinematicCloud
|
#1 |
New Member
Join Date: Aug 2017
Posts: 10
Rep Power: 9 |
Hello everybody,
I hope you can help me understanding the kinematicCloud. I created one like this: Code:
const word kinematicCloudName ( args.optionLookupOrDefault<word>("cloudName", "mykinematicCloud") ); Info<< "Constructing kinematicCloud " << kinematicCloudName << endl; basicKinematicCloud mykinematicCloud ( kinematicCloudName, rho, U, mu, g ); As far as I understand, the kinematicCloud uses just parcels. So if i want to add single particles, I have to use one parcel per particle. I implemented something similar for the solidCloud for adding particles to the cloud: Code:
solidParticle* ptr1 = new solidParticle(mesh_, coordinates_, celli_, tetFacei_, tetPti_,tempDiam, tempU); Cloud<solidParticle>::addParticle(ptr1); For this: Code:
KinematicParcel* ptr1 = new KinematicParcel(mesh_, coordinates_, celli_, tetFacei_, tetPti_);//,tempDiam, tempU); Code:
In file included from xxx/src/lagrangian/intermediate/lnInclude/KinematicCloud.H:645:0, from xxx/src/lagrangian/intermediate/lnInclude/basicKinematicCloud.H:36, from myInterFoam.C:54: xxx/src/lagrangian/intermediate/lnInclude/KinematicCloud.C: In Elementfunktion »void Foam::KinematicCloud<CloudType>::injectLPT(const vector&, const scalar&, const vector&)«: xxx/src/lagrangian/intermediate/lnInclude/KinematicCloud.C:807:20: Fehler: missing template arguments before »*« token KinematicParcel* ptr1 = new KinematicParcel(mesh_, coordinates_, celli_, tetFacei_, tetPti_);//,tempDiam, tempU); |
|
September 26, 2017, 02:14 |
|
#2 |
Member
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 9 |
Hi!
I am also trying to do a similar thing. I have a questions regarding this. 1. What OpenFOAM Version are you using? 2. According to the error a template argument is missing so most probably you are missing an argument. Try referring to the template of kinematicParcel and kinematicCloud to find out the arguments to define a new kinematicParcel. Also, how are you adding a particle to the existing kinematicCloud? I have a solver which detects a droplet during the runtime and is able to find out the following information about the droplet:
Now since I don't know when a particle will be detected by my solver, I can't get an SOI where all the particles have to be added to the kinematicCloud for tracking. So, I want to keep my SOI as 0 and then add any newly detected particle to the cloud for further tracking. How are you adding a particle/parcel to your kinematicCloud? |
|
September 28, 2017, 04:14 |
|
#3 | |
New Member
Join Date: Aug 2017
Posts: 10
Rep Power: 9 |
Hey!
I'm using OpenFOAM 5.0 The constructors for the KinematicParcel-Template are: Code:
... // Constructors //- Construct from mesh, coordinates and topology // Other properties initialised as null inline KinematicParcel ( const polyMesh& mesh, const barycentric& coordinates, const label celli, const label tetFacei, const label tetPti ); //- Construct from a position and a cell, searching for the rest of the // required topology. Other properties are initialised as null. inline KinematicParcel ( const polyMesh& mesh, const vector& position, const label celli ); //- Construct from components inline KinematicParcel ( const polyMesh& mesh, const barycentric& coordinates, const label celli, const label tetFacei, const label tetPti, const label typeId, const scalar nParticle0, const scalar d0, const scalar dTarget0, const vector& torque0, const constantProperties& constProps ); ... For the missing template I think it should be something like: Code:
KinematicCloud<ParcelType>* ptr1 = new KinematicParcel(mesh_, coordinates_, celli_, tetFacei_, tetPti_); Quote:
But now I'm not sure if it's possible and was hoping for some help here... |
||
December 1, 2017, 09:34 |
|
#4 | |
New Member
Sandip Wadekar
Join Date: Oct 2014
Posts: 17
Rep Power: 12 |
Hi VIshwesh
I want to sample the spray particles at specified location/cell. I am using OF2.2.x I am writing for loop over the particle like this: Quote:
can you please share your code to sample the particle ? Thanks Sandip |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How I can introduce my power heat (W) in chtMultiRegionFoam? | aminem | OpenFOAM Pre-Processing | 32 | August 29, 2019 03:23 |
chtMultiRegionSimpleFoam: crash on parallel run | student666 | OpenFOAM Running, Solving & CFD | 3 | April 20, 2017 12:05 |
conjugateHeatFoam + interFoam | farhagim | OpenFOAM Programming & Development | 15 | July 19, 2016 08:55 |
chtMultiRegionSimpleFoam 3D problem | Lucie | OpenFOAM Pre-Processing | 2 | June 21, 2016 06:23 |
chtMultiRegionSimpleFoam | samiam1000 | OpenFOAM Running, Solving & CFD | 39 | March 31, 2016 09:43 |