since this was done in a semi-automatic way compilation for stuff not
used by the non-decoupled tests may be non-functional. I spared the
decoupled stuff because it does not compile ATM so I did not have a
way verify that it still works...
it seems that the issue which triggered to make the tabulation "dumb"
was not related to the tabulation. I guess that it had something to do
with the fact that I used -ffast-math without -fno-finite-math-only...
tested on GCC 4.3 and GCC 4.6. Due to an incompatibility between those
two compilers (GCC 4.3 expects that there's no semicolon behind
static_assert(), GCC 4.6 requires one), it only compiles on GCC 4.6.
this is required to make sure that the relation
\rho^\kappa_g = X^\kappa_g \rho_g
holds unconditionally. note, that we define the sum of the mass
fractions to be the same as the sum of the mole fractions.
(also note, that this change only affects the case where the gas phase
is not present.)
we used to tabulate along the vapor pressure curve. it turns out that
if a phase is not present, the component might get queried for
unphysical values, which lead to breakdowns. now we just sample the
specified pressure range uniformly...
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.)
- 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.)
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.
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...
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...