peng-robinson test: fix it, so that it produces correct output

This commit is contained in:
Andreas Lauser
2014-07-23 15:31:49 +02:00
parent b02cff76b1
commit a7126a7a13
2 changed files with 214 additions and 55 deletions

View File

@@ -26,6 +26,8 @@
#include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh>
#include <opm/material/fluidmatrixinteractions/NullMaterial.hpp>
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
#include <opm/core/utility/ErrorMacros.hpp>
#include <opm/core/utility/Exceptions.hpp>
#include <opm/core/utility/Average.hpp>
@@ -248,6 +250,29 @@ public:
<< fluidState.temperature(/*phaseIdx=*/0));
}
/*!
* \brief Calculates the chemical equilibrium from the component
* fugacities in a phase.
*
* This is a convenience method which assumes that the capillary pressure is
* zero...
*/
template <class FluidState>
static void solve(FluidState &fluidState,
const ComponentVector &globalMolarities,
Scalar tolerance = 0.0)
{
ParameterCache paramCache;
paramCache.updateAll(fluidState);
typedef NullMaterialTraits<Scalar, numPhases> MaterialTraits;
typedef NullMaterial<MaterialTraits> MaterialLaw;
typedef typename MaterialLaw::Params MaterialLawParams;
MaterialLawParams matParams;
solve<MaterialLaw>(fluidState, paramCache, matParams, globalMolarities, tolerance);
}
protected:
template <class FluidState>