thermopysical library in calculating compressibility for burned products
Summary
Library in evaluating compressibility of burned products is based on the properties of reactants not on those of products, probably by typing error. See the source code of member function psib() in lines around 612 and 627 $src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C
Steps to reproduce
Use XiFoam solver, and run a tutorial case, e.g. moriyoshiHomogeneous. Use very different values of molecular weight for reactants and products. Use constant density for both reactants and products. Compare the calculated burned density by the code and your input. You will notice they are different. Since the burned density (or psib() ) is recalcualted based on the molecular weight of reactants.
Example case
Run tutorial moriyoshiHomogeneous, but change the molecualr weight of reactants and products to be very different values since the tuturial uses very similar values in constant/thermopysicalProperties.
What is the current bug behaviour?
You will notice, the burned density is calculated based on the molecular wieght by reactants not by products.
What is the expected correct behavior?
The burned density should be calculated based on the molecular wieght by products.
Environment information
- OpenFOAM version :v1812
- Operating system :centos
- Hardware info :
- Compiler :gcc
Possible fixes
The bug can be easily fixed by changing the keywords from reactants to products as follows in the file of member function psib() in $src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C as follows
forAll(psibCells, celli)
{
psibCells[celli] =
this->**cellProducts**(celli).psi(pCells[celli], TbCells[celli]);
}... forAll(ppsib, facei)
{
ppsib[facei] =
this->**patchFaceProducts**
(patchi, facei).psi(pp[facei], pTb[facei]);
}