Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
openfoam
openfoam
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 352
    • Issues 352
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • openfoamopenfoam
  • Issues
  • #1812

Closed
Open
Opened Aug 17, 2020 by Darrin Stephens@Darrin

Incorrect mixture density in heRhoThermo

Summary

The mixture density is calculated incorrectly in heRhoThermo when using multiComponentMixture. The mixture density is being calculated as sum of Y_i*rho_i. Whilst correct for most material properties, this formula is not correct for density.

Steps to reproduce

To help demonstrate this I have provided a test application and case. rhoReactionThermoTest.tar.gz Compile the provided application Test-rhoReactionThermo and execute using the provided test case.

Example case

A simple test case is provided to use with the provided application. cavity.tar.gz A simple mixture of Air (Y=0.99) and H2O (Y=0.01). The density of the mixture as calculated by multiComponentMixture is reported.

What is the current bug behaviour?

The mixture density is calculated as 0.011188

What is the expected correct behavior?

The correct mixture density is 0.00121211. The mass fraction of Air and H2O is 0.99 and 0.01 respectively. The component densities are specified as 0.0012 and 1 for Air and H2O respectively.

Environment information

Build : b45f8f6f-20200629 OPENFOAM=2006 Arch : "LSB;label=32;scalar=64" Operating system : ubuntu 18.04

Possible fixes

The fix for this is to change the mixture density calculation in heRhoThermo to use cellVolMixture instead of cellMixture. A patch containing the suggested fix is attached. fix_mixture_density.patch

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: Development/openfoam#1812