54 label singleStepDOFs = 0;
59 const label molId = mol().id();
61 scalar molMass(molecules.constProps(molId).mass());
63 singleStepTotalMass += molMass;
75 const label molId = mol().id();
77 const molecule::constantProperties cP(molecules.constProps(molId));
79 scalar molMass(cP.mass());
81 const diagTensor& molMoI(cP.momentOfInertia());
83 const vector& molV(mol().v());
87 vector molPiGlobal = mol().Q() & mol().pi();
94 if (
mag(molV) > singleStepMaxVelocityMag)
96 singleStepMaxVelocityMag =
mag(molV);
99 singleStepTotalLinearKE += 0.5*molMass*
magSqr(molV);
101 singleStepTotalAngularKE += 0.5*(molOmega & molMoI & molOmega);
103 singleStepTotalPE += mol().potentialEnergy();
105 singleStepTotalrDotf +=
tr(mol().rf());
107 singleStepDOFs += cP.degreesOfFreedom();
111 if (Pstream::parRun())
117 reduce(singleStepMaxVelocityMag, maxOp<scalar>());
119 reduce(singleStepTotalMass, sumOp<scalar>());
121 reduce(singleStepTotalLinearKE, sumOp<scalar>());
123 reduce(singleStepTotalAngularKE, sumOp<scalar>());
125 reduce(singleStepTotalPE, sumOp<scalar>());
127 reduce(singleStepTotalrDotf, sumOp<scalar>());
129 reduce(singleStepNMols, sumOp<label>());
131 reduce(singleStepDOFs, sumOp<label>());
136 Info<<
"Number of molecules in system = " 137 << singleStepNMols <<
nl 138 <<
"Overall number density = " 140 <<
"Overall mass density = " 142 <<
"Average linear momentum per molecule = " 145 <<
"Average angular momentum per molecule = " 148 <<
"Maximum |velocity| = " 149 << singleStepMaxVelocityMag <<
nl 150 <<
"Average linear KE per molecule = " 151 << singleStepTotalLinearKE/singleStepNMols <<
nl 152 <<
"Average angular KE per molecule = " 153 << singleStepTotalAngularKE/singleStepNMols <<
nl 154 <<
"Average PE per molecule = " 155 << singleStepTotalPE/singleStepNMols <<
nl 156 <<
"Average TE per molecule = " 159 singleStepTotalLinearKE
160 + singleStepTotalAngularKE
176 Info<<
"No molecules in system" <<
endl;
scalar singleStepTotalrDotf
vector singleStepTotalAngularMomentum(Zero)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
DiagTensor< scalar > diagTensor
A scalar version of the templated DiagTensor.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Vector< scalar > vector
A scalar version of the templated Vector.
scalar singleStepTotalMass
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
dimensioned< scalar > mag(const dimensioned< Type > &)
scalar singleStepMaxVelocityMag
scalar singleStepTotalLinearKE
vector singleStepTotalLinearMomentum(Zero)
scalar singleStepTotalAngularKE