Correct computation of molar densities (fixes small mass balances errors)
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()
respectivelygasMolarDensity()
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)
- liquidMolarDensity as
- 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
- co2:
- for wPhaseIdx:
- all general fluidstates have
setMolarDensity()
, and the volVars set the densities in the fluidstate and get them directly from the fluidstate instead of calculatingdensity()/averageMolarMass()
- exceptions:
- tracer: uses
fluidDensity_/fluidMolarMass_;
- tracer: uses
Edited by Timo Koch
Merge request reports
Activity
Filter activity
added 25 commits
-
d8a66f93...4b34362c - 19 commits from branch
next
- dfde9ee7 - [material] move molarDensity to fluidsystem
- 33dd546d - [material] add molarDensity to all fluidsystem, check liquidphase2c changes later again
- 68120a5a - [material] set molar density everywhere where density is set and include correct…
- 4462a71d - [fluidsystem] cleanup
- 45cb8a4e - [fluistates] get molarDensity from fluidState and not from FluidSystem
- dd0b1c0a - [material] fix paramCache + cleanup
Toggle commit list-
d8a66f93...4b34362c - 19 commits from branch
- Resolved by Katharina Heck
- Resolved by Katharina Heck
- Resolved by Katharina Heck
- Resolved by Katharina Heck
- Resolved by Katharina Heck
- Resolved by Katharina Heck
- Resolved by Katharina Heck
- Resolved by Katharina Heck
- Resolved by Katharina Heck
- Resolved by Katharina Heck
- Resolved by Katharina Heck
the molarDensity function has to be implemented to match the density function. If density is compositional then it's
density(fluidState, paramCache, phaseIdx)/fluidState.averageMolarMass(phaseIdx);
, non-compositional it'sdensity(fluidState, paramCache, phaseIdx)/ mainPhaseComponentMolarMass;
. If the density does different staff for each phase, the molarDensity also has to do different stuff per phase.Edited by Timo Kochadded 1 commit
- 4a9a62d2 - [fluidsystems]add more consistency to fluidsystem molarDensity
added 9 commits
-
4a9a62d2...00c125ff - 2 commits from branch
next
- 749b1f84 - [material] move molarDensity to fluidsystem
- c27af544 - [material] add molarDensity to all fluidsystem, check liquidphase2c changes later again
- bc9527b9 - [material] set molar density everywhere where density is set and include correct…
- 7b25ead7 - [fluidsystem] cleanup
- ac6ac67f - [fluistates] get molarDensity from fluidState and not from FluidSystem
- 2ec27f40 - [material] fix paramCache + cleanup
- a36dcf87 - [fluidsystems]add more consistency to fluidsystem molarDensity
Toggle commit list-
4a9a62d2...00c125ff - 2 commits from branch
added 90 commits
-
a36dcf87...fb37a384 - 83 commits from branch
next
- b684fcfc - [material] move molarDensity to fluidsystem
- a6d16cc1 - [material] add molarDensity to all fluidsystem, check liquidphase2c changes later again
- 71c53e00 - [material] set molar density everywhere where density is set and include correct…
- 68107c70 - [fluidsystem] cleanup
- fd362b5a - [fluistates] get molarDensity from fluidState and not from FluidSystem
- a61dc5fc - [material] fix paramCache + cleanup
- d7ba0660 - [fluidsystems]add more consistency to fluidsystem molarDensity
Toggle commit list-
a36dcf87...fb37a384 - 83 commits from branch
Please register or sign in to reply