Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #2304
Closed
Open
Issue created Dec 16, 2021 by Hans Skarsvåg@hansls

mixture density error perfectGas reactingTwoPhaseEulerFoam

Calculating the density of a mixture of 2 components with different moleweights give wrong density from perfectGas equation of state. Error appears in v2012 and v2106, but not in v1912. Attached case with gas mixture of water (steam) and air prints (T.gas p water.gas thermo:rho.gas air.gas) to postprocessing file. The density should be rho = 1/(Y1/rho1 + Y2/rho2), with Yi being the mass fraction of component i and rhoi = p/(8.31447*T/wi) where wi is the composition moleweight. For v2012 and v2106 the density is erroneously calculated with mass fractions replaced by mole fractions Yi -> Xi = Yi/wi/sum(Yj/wj). Attached case is for reactingTwoPhaseEulerFoam, but same bug has been observed in reactingFoam with 2 components.

density_perfectGas.zip

Edited Dec 17, 2021 by Hans Skarsvåg
Assignee
Assign to
Time tracking