chemkinReader: compute species charge number
This commit is contained in:
parent
db10b8be0e
commit
d2ae04b978
3 changed files with 29 additions and 1 deletions
|
|
@ -637,7 +637,8 @@ bool finishReaction = false;
|
|||
(
|
||||
currentSpecieName,
|
||||
1.0,
|
||||
molecularWeight(currentSpecieComposition)
|
||||
molecularWeight(currentSpecieComposition),
|
||||
chargeNumber(currentSpecieComposition)
|
||||
),
|
||||
currentLowT,
|
||||
currentHighT,
|
||||
|
|
|
|||
|
|
@ -144,6 +144,28 @@ Foam::scalar Foam::chemkinReader::molecularWeight
|
|||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::chemkinReader::chargeNumber
|
||||
(
|
||||
const List<specieElement>& specieComposition
|
||||
) const
|
||||
{
|
||||
scalar nElemCharges = 0.0;
|
||||
|
||||
forAll(specieComposition, i)
|
||||
{
|
||||
label nAtoms = specieComposition[i].nAtoms;
|
||||
const word& elementName = specieComposition[i].elementName;
|
||||
|
||||
if (elementName[0] == 'e')
|
||||
{
|
||||
nElemCharges += nAtoms;
|
||||
}
|
||||
}
|
||||
|
||||
return nElemCharges;
|
||||
}
|
||||
|
||||
|
||||
void Foam::chemkinReader::checkCoeffs
|
||||
(
|
||||
const scalarList& reactionCoeffs,
|
||||
|
|
|
|||
|
|
@ -251,6 +251,11 @@ private:
|
|||
const List<specieElement>& specieComposition
|
||||
) const;
|
||||
|
||||
scalar chargeNumber
|
||||
(
|
||||
const List<specieElement>& specieComposition
|
||||
) const;
|
||||
|
||||
void finishElements(labelList& currentAtoms);
|
||||
|
||||
void checkCoeffs
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue