FreeFOAM The Cross-Platform CFD Toolkit
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 }
24 
25 // ************************ vim: set sw=4 sts=4 et: ************************ //