Commit Graph

341 Commits

Author SHA1 Message Date
Andreas Lauser
3b750e641e fluid states: recover from assigning non-finite values as mole fraction 2012-07-12 21:24:29 +02:00
Bernd Flemisch
b7ef17c119 added more tests to CMakeLists, removed check for WaterContaminantFluidSystem 2012-07-12 21:24:28 +02:00
Bernd Flemisch
40c9ed4e79 remove unnecessary pardiso.hh includes 2012-07-12 21:24:28 +02:00
Bernd Flemisch
f9029c1bfa remove unused headers 2012-07-12 21:24:28 +02:00
Andreas Lauser
021b3f3cc8 fix compilation on g++ 4.2 2012-07-12 21:24:28 +02:00
Andreas Lauser
488f5dc4c8 fluid states: fix the documentation
IMHO it is perfectly okay to have some references to wikipedia for
basic stuff. Reason: Other online sources are also not reliable and
can usually found in the reference section of the wikipedia
article. (also, even for normal textbooks, there are the occational
errors.)
2012-07-12 21:24:28 +02:00
Benjamin Faigle
67f146b783 improved documentation 2012-07-12 21:24:28 +02:00
Andreas Lauser
3d92e604cb H2O-N2 fluid system: some cosmetic cleanup of the viscosity 2012-07-12 21:24:28 +02:00
Andreas Lauser
a7d1339292 brine: add heatCapacity() methods 2012-07-12 21:24:28 +02:00
Andreas Lauser
7fa134c3b7 tabulated component: also catch Dune::NotImplemented when creating the tables 2012-07-12 21:24:27 +02:00
Bernd Flemisch
b99d4b9365 changed to NonwettingPhase, since renaming has not been decided 2012-07-12 21:24:27 +02:00
Andreas Lauser
f65b45868b fix the fluid systems test.
{gas|liquid}HeatCapacity was not defined for the tabulated component
2012-07-12 21:24:27 +02:00
Andreas Lauser
3394db4ac9 h2o-n2 fluid systems: some further improvements
mainly to make the heat capacity consistent with the enthalpy
2012-07-12 21:24:27 +02:00
Andreas Lauser
ca53026549 H2O-N2 fluid system: some cleanups and corrections
- extend some comments
- assume an ideal mixture for gas everywhere, i.e. use the partial
  pressure to calculate the "partial" specific quantities like
  e.g. the specific partial enthalpies of water and nitrogen
- let the water and nitrogen component determine the "partial
  densities" of gas if the complex relations are enabled. before, an
  ideal gas was assumed. (now the individual components can be
  non-ideal gases, but we still assume an ideal mixture.)
2012-07-12 21:24:27 +02:00
Andreas Lauser
c26c960825 h2o-n2 fluid system: oops 2012-07-12 21:24:27 +02:00
Andreas Lauser
288cc638a3 H2O-N2 fluid system: implement heatCapacity() correctly 2012-07-12 21:24:27 +02:00
Andreas Lauser
766d400438 parameter cache: set the temperature and pressure exclude flags if updateComposition was called
for mixtures using cubic EOS, this means that the parameters of the
pure components do not need to be re-calculated if updateComposition()
is called. (they only depend on temperature!) this is a actually a
quite important optimization for cubic EOS because calculating the
parameters of the pure components is the most expensive part in
calculating parameters of the mixture.
2012-07-12 21:24:26 +02:00
Andreas Lauser
29ca3ae5fb avoid some compiler warnings 2012-07-12 21:24:26 +02:00
Andreas Lauser
0f7c940e23 make the peng-robinson EOS faster by tabulating the critical points
For cubic EOS, the critical values only depends on the attractive
paramter "a" and the co-volume of the fluid "b" which makes them an
easy prey for tabulation. also added: a class which does bi-linear
interpolation on an arbitrary function.

TODO: extend Dumux::Tabulated2DFunction so that upper and lower limit
      curves f(x) and g(x) can be specified and the sampling points do
      not need to be equidistant anymore. If this is done, use it for
      Dumux::TabulatedMaterial2.

MORE TODO: In Dumux::Tabulated2DFunction, do not use linear
           interpolation, but take the partial derivatives at the
           sampling points into account. then, interpolate the partial
           derivatives linearly between the sample points. I have not
           spend too much time thinking about the, though...
2012-07-12 21:24:26 +02:00
Andreas Lauser
3a3f0a0d9a introduce overlay fluid states for pressure, temperature and saturation
an overlay fluid state takes an arbitrary other fluid state as an
argument to which it forwards everything except the quantity which it
overlays.

also, the fluidsystems test now tests all fluid states for API conformance...
2012-07-12 21:24:26 +02:00
Andreas Lauser
f135ad5738 some fixes to the peng-robinson EOS and the base class of the parameter cache 2012-07-12 21:24:26 +02:00
Andreas Lauser
238a636452 decoupled: make test_dec2p2cproblem compile, fix include of "defaultcomponents.hh" in old_fluidsystems/h2o_n2_system.hh 2012-07-12 21:24:26 +02:00
Andreas Lauser
71ed920c65 H2O-N2 fluid system: avoid division by zero if composition of gas is zero
this fixes the NCP flash test
2012-07-12 21:24:26 +02:00
Andreas Lauser
6ff2720d44 do not include stuff from the property system in the fluid systems
this makes the fluid framework work standalone, as requested
e.g. today by Knuth-Andreas Lie of OPM fame...
2012-07-12 21:24:26 +02:00
Andreas Lauser
1a340e90d4 Added adapter to maintain usage of FluidSystem<TypeTag> 2012-07-12 21:24:26 +02:00
Andreas Lauser
4feb11a8a7 fix the non-equilibrium fluid state and the assign methods of both compositional fluid states 2012-07-12 21:24:26 +02:00
Andreas Lauser
532fefc8a2 insert emacs and vi modelines to make indentation more consistent 2012-07-12 21:24:25 +02:00
Andreas Lauser
dd48992ab5 fluidsystems test: tighten it further
now it will fail if the fluid system tries to access any saturation or
a quantity for a phase which was not queried. also, the parameter
cache may no longer access quantities of phases which have not been
modified in the updatePhase*() methods.
2012-07-12 21:24:25 +02:00
Andreas Lauser
0ee328259a also test interstital fluid -- TRAIL fluid system
dammed copy & paste!
2012-07-12 21:24:25 +02:00
Andreas Lauser
d64a93059f add test to check the API of all fluid systems
if new fluid systems become available, the test should be
extended. also, there the same test should be used for all fluid
systems in dumux-devel.
2012-07-12 21:24:25 +02:00
Andreas Lauser
cad58909bc fix valgrind complaint in the h2o-n2 fluid system
now we assume an ideal mixture of the gas phase again. we probably
want that, as the 2p2c model as currently implemented does not support
non-ideal mixtures, because the MiscibleMultiPhaseComposition
constraint solver does not support this yet. (On a different note, a
reference is missing for the approach taken for the fugacity
coefficients of the gas phase for the "gas as non-ideal mixture"
code.)
2012-07-12 21:24:25 +02:00
Andreas Lauser
1d8528d52a fluid states: avoid possible division by zero in massFraction()
if the mean molar mass is zero, then the sum of the mass fractions
will be zero anyway, which means that the result should be still correct.
2012-07-12 21:24:25 +02:00
Andreas Lauser
9ac34f9a3d move all "Dumux independent" fluidsystems to Dumux::FluidSystems
and remove the "FluidSystem" postfix from the class names. e.g.
Dumux::H2ON2FluidSystem becomes Dumux::FluidSystems::H2ON2 . this
commit does not change anything beyond that...
2012-07-12 21:24:25 +02:00
Andreas Lauser
1e58e039e6 isIncompressible() -> isCompressible() 2012-07-12 21:24:25 +02:00
Andreas Lauser
8e6dd7eb52 make everything compile on older systems (Ubuntu 8.04 LTS)
this means GCC 4.2.4, automake  1.10.1, autoconf 2.61, autoheader 2.61, libtool 1.5.26
2012-07-12 21:24:25 +02:00
Andreas Lauser
66040aca04 add flash solver for the immiscible models
it determines pressures + saturations if there are compressible fluid
phases, if not it determines all saturations but leaves the pressures
alone...
2012-07-12 21:24:25 +02:00
Andreas Lauser
9d476df2bc fluid systems/components: introduce isIncompressible(phaseIdx)
it returns -- guess what? -- whether a fluid phase is assumed to be
incompressible. this method is useful e.g. for flash calculations.
2012-07-12 21:24:24 +02:00
Andreas Lauser
9f152dbfc1 resubmit documentation deleted in r6896 and copied further details from h20-air 2012-07-12 21:24:24 +02:00
Andreas Lauser
a43c7072a2 move files "settablephase.hh" and "fluidstate.hh" to "old_fluidsystems"
these are no longer required in the new framework
2012-07-12 21:24:24 +02:00
Andreas Lauser
d6f55476cf MpNc test problem: make the liquid phase consist of pure water instead of pure nitrogen
oops.

if "useSimpleRelations" in the H2O-N2 fluid system is set to true and
the density of the phases is not normalized by sum of the mole
fractions, the results are identical with the ones on trunk.
2012-07-12 21:24:24 +02:00
Andreas Lauser
b4df1d9d3c added more refernce vtu files and tests 2012-07-12 21:24:24 +02:00
Andreas Lauser
d3235dc761 added reference vtu files to some tests 2012-07-12 21:24:24 +02:00
Andreas Lauser
3150d4f135 h2o-n2 fluid system: avoid circular dependency of fugacity and fugacity coefficient
the fugacity coefficient must be independent of the fugacity since its
whole point is to, well, define the fugacity. if this worked before,
then probably only because the fugacity was undefined and smaller than
10^-3...
2012-07-12 21:24:24 +02:00
Andreas Lauser
993f1c4db9 transferred complex relations from the old H2O-N2 fluid system to the new one 2012-07-12 21:24:24 +02:00
Andreas Lauser
9aeef9bc99 decoupled models/old fluid framework: do not use property defaults anymore 2012-07-12 21:24:24 +02:00
Andreas Lauser
84f9b0fe0c remove the "MpNc" prefix from the direcories of the new fluid framework
also rename the "fluidsystems" directory to "old_fluidsystems". Since
this is a separate SVN branch, nobody's feelings should be hurt by
this commit...
2012-07-12 21:24:23 +02:00
Andreas Lauser
c3bf42309a ncp flash: remove some artifacts, ++compile
the build broke because EquilibriumFluidState was renamed to
CompositionalFluidState
2012-07-12 21:24:23 +02:00
Andreas Lauser
a582ebeec8 add a flash constraint solver based on non-linear complementarity functions
also add a test
2012-07-12 21:24:23 +02:00
Andreas Lauser
504a005c65 renamed equilibrium fluid state to compositional fluid state 2012-07-12 21:24:23 +02:00
Andreas Lauser
3e04d2151a All fluid systems which do not need a parameter cache now offer both the simple and the general interface. 2012-07-12 21:24:23 +02:00