calculateMDFields.H
Go to the documentation of this file.
1const 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}
const List< DynamicList< molecule * > > & cellOccupancy
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
List< scalarField > allSpeciesN_RU(molecules.potential().nIds(), scalarField(mesh.nCells(), Zero))
List< vectorField > allSpeciesVelocitySum_RU(molecules.potential().nIds(), vectorField(mesh.nCells(), Zero))
List< scalarField > allSpeciesVelocityMagSquaredSum_RU(molecules.potential().nIds(), scalarField(mesh.nCells(), Zero))
List< scalarField > allSpeciesM_RU(molecules.potential().nIds(), scalarField(mesh.nCells(), Zero))
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:333