calculateMDFields.H
Go to the documentation of this file.
1 const List<DynamicList<molecule*>>& cellOccupancy = molecules.cellOccupancy();
2 
4 {
5  const List<molecule*>& molsInCell = cellOccupancy[cell];
6 
7  forAll(molsInCell, mIC)
8  {
9  molecule* mol = molsInCell[mIC];
10 
11  const label molId = mol->id();
12 
13  const vector& molU = mol->U();
14 
15  allSpeciesN_RU[molId][cell]++;
16 
17  allSpeciesM_RU[molId][cell] += mol->mass();
18 
19  allSpeciesVelocitySum_RU[molId][cell] += molU;
20 
21  allSpeciesVelocityMagSquaredSum_RU[molId][cell] += molU & molU;
22  }
23 }
allSpeciesVelocityMagSquaredSum_RU
List< scalarField > allSpeciesVelocityMagSquaredSum_RU(molecules.potential().nIds(), scalarField(mesh.nCells(), Zero))
allSpeciesVelocitySum_RU
List< vectorField > allSpeciesVelocitySum_RU(molecules.potential().nIds(), vectorField(mesh.nCells(), Zero))
allSpeciesM_RU
List< scalarField > allSpeciesM_RU(molecules.potential().nIds(), scalarField(mesh.nCells(), Zero))
cellOccupancy
const List< DynamicList< molecule * > > & cellOccupancy
Definition: calculateMDFields.H:1
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
allSpeciesN_RU
List< scalarField > allSpeciesN_RU(molecules.potential().nIds(), scalarField(mesh.nCells(), Zero))
forAll
forAll(cellOccupancy, cell)
Definition: calculateMDFields.H:3