|
[Sponsors] |
runTime function for coalParcels (parallel running) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 30, 2023, 05:57 |
runTime function for coalParcels (parallel running)
|
#1 |
Senior Member
Alain Islas
Join Date: Nov 2019
Location: Mexico
Posts: 142
Rep Power: 6 |
Hi OpenFOAM friends,
I'm struggling with making my runTime function to work under parallel running. I know there are the returnReduce and gatherList functions, but don't know how to make it work appropriately. Under serial run is OK. Basically I have an injection of coalParcels trraveling through my domain. Whenever they fall inside a specified cellZone I want the function to remove the coalParcels. I'm wondering how to loop over the processors to get all the coalParcels and all the cells from my cellZone ? Any help / ideas are kindly appreciated Code:
codeExecute #{ word cellZoneName = "fluid_porousCells"; const label cellZoneID = mesh().cellZones().findZoneID(cellZoneName); const labelList& cellLabels = mesh().cellZones()[cellZoneID]; const reactingMultiphaseCloud& a = obr_.lookupObject<reactingMultiphaseCloud>("coalCloud1"); basicReactingMultiphaseCloud * q = (basicReactingMultiphaseCloud*) &a; Info << returnReduce(q->size(), sumOp<scalar>()) << endl; typedef typename Foam::ReactingMultiphaseParcel<Foam::ReactingParcel<Foam::ThermoParcel<Foam::KinematicParcel<Foam::particle>>>> parcelType; forAllIter(basicReactingMultiphaseCloud, *q, pIter) { if ( mesh().cellZones()[cellZoneID].whichCell(pIter().cell()) != -1 ) { parcelType& p = pIter(); q->deleteParticle(p); } } #}; Last edited by alainislas; November 3, 2023 at 02:30. |
|
October 30, 2023, 08:32 |
|
#2 |
Senior Member
Alain Islas
Join Date: Nov 2019
Location: Mexico
Posts: 142
Rep Power: 6 |
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error in enabling the python wrapper | Jinn | SU2 Installation | 2 | April 23, 2022 13:52 |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 17:22 |
parallel running error | B6_lacen | OpenFOAM Running, Solving & CFD | 0 | March 1, 2022 10:55 |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 09:31 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 14:00 |