Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • dumux dumux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 104
    • Issues 104
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 92
    • Merge requests 92
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • dumux-repositoriesdumux-repositories
  • dumuxdumux
  • Merge requests
  • !498

Correct computation of molar densities (fixes small mass balances errors)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Simon Emmert requested to merge feature/useComplexRelations into master Jun 01, 2017
  • Overview 76
  • Commits 18
  • Pipelines 0
  • Changes 92

Closes #450 (closed) Depends !836 (merged)

-name change is subject to further discussion (new Issue: #509 (closed))

  • Introduce liquidMolarDensity and gasMolarDensity for components
  • Use more meaningful functions in computation of the molar density
  • in tutorial include liquidmolardensity in mycompressible component
  • introduce molardensity in new liquid and gas component

in component LNAPL include a liquidmolardensity -> opened Issue #464 (closed)

To summarize the changes:

  • introduced liquidMolarDensity() respectively gasMolarDensity() in all fluid components
    • liquidMolarDensity as liquidDensity(temperature, pressure)/molarMass();
    • gasMolarDensity as IdealGas::molarDensity(temperature, pressure);
    • exceptions are:
      • brine: salinity is included in the liquidMolarDensity
      • co2: is not considered an ideal gas, therefore gasDensity(temperature, pressure)/molarMass(); is used
      • h2o: gasMolarDensity uses IAPWS by gasDensity(temperature, pressure)/molarMass();
      • mesitylene: liquidMolarDensity was already implemented with a law from Reid et al. 1987 (see Doxygen)
      • xylene: liquidMolarDensity was already implemented with a law from Reid et al. 1987 (see Doxygen)
  • introduced molarDensity() in all fluidsystems
    • for wPhaseIdx: MainComponent::liquidMolarDensity(temperature, pressure)
    • for a gas nPhaseIdx and !useComplexRelations: IdealGas::molarDensity(temperature, pressure)
    • for a gas nPhaseIdx and useComplexRelations: Component1::gasMolarDensity(temperature, pressure) + Component2::gasMolarDensity(temperature, pressure) + ...
    • for a NAPL nPhaseIdx: NAPL::liquidMolarDensity(temperature, pressure);
    • exceptions are:
      • co2: density(fluidState, phaseIdx)/fluidState.averageMolarMass(phaseIdx)
      • spe5: uses Peng-Robinson molarVolume calculation as before
  • all general fluidstates have setMolarDensity(), and the volVars set the densities in the fluidstate and get them directly from the fluidstate instead of calculating density()/averageMolarMass()
  • exceptions:
    • tracer: uses fluidDensity_/fluidMolarMass_;
Edited Jul 04, 2018 by Timo Koch
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/useComplexRelations