Skip to content
Snippets Groups Projects
Commit c4ab1b32 authored by Katharina Heck's avatar Katharina Heck Committed by Timo Koch
Browse files

[cleanup][material] update nonequilibrium fluidstate

parent 373e27de
No related branches found
No related tags found
2 merge requests!666Feature/mpnc on next,!617[WIP] Next
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
* multi-phase, multi-component fluid system without using * multi-phase, multi-component fluid system without using
* any assumptions. * any assumptions.
*/ */
#ifndef DUMUX_GENERIC_FLUID_STATE_HH #ifndef DUMUX_NONEQUILIBRIUM_FLUID_STATE_HH
#define DUMUX_GENERIC_FLUID_STATE_HH #define DUMUX_NONEQUILIBRIUM_FLUID_STATE_HH
#include <cmath> #include <cmath>
#include <algorithm> #include <algorithm>
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
namespace Dumux namespace Dumux
{ {
/*! /*!
* \ingroup FluidStates * \ingroup FluidStates
* \brief Represents all relevant thermodynamic quantities of a * \brief Represents all relevant thermodynamic quantities of a
...@@ -45,8 +46,8 @@ template <class Scalar, class FluidSystem> ...@@ -45,8 +46,8 @@ template <class Scalar, class FluidSystem>
class NonEquilibriumFluidState class NonEquilibriumFluidState
{ {
public: public:
enum { numPhases = FluidSystem::numPhases }; static constexpr int numPhases = FluidSystem::numPhases;
enum { numComponents = FluidSystem::numComponents }; static constexpr int numComponents = FluidSystem::numComponents;
NonEquilibriumFluidState() NonEquilibriumFluidState()
{ {
...@@ -116,7 +117,14 @@ public: ...@@ -116,7 +117,14 @@ public:
* @copydoc Dumux::CompositionalFluidState::fugacity() * @copydoc Dumux::CompositionalFluidState::fugacity()
*/ */
Scalar fugacity(int phaseIdx, int compIdx) const Scalar fugacity(int phaseIdx, int compIdx) const
{ return pressure_[phaseIdx]*fugacityCoefficient_[phaseIdx][compIdx]*moleFraction_[phaseIdx][compIdx]; } {
return pressure_[phaseIdx]*fugacityCoefficient_[phaseIdx][compIdx]*moleFraction_[phaseIdx][compIdx];
}
Scalar fugacity(int compIdx) const
{
return fugacity(0, compIdx);
}
/*! /*!
* @copydoc Dumux::CompositionalFluidState::molarVolume() * @copydoc Dumux::CompositionalFluidState::molarVolume()
...@@ -140,8 +148,16 @@ public: ...@@ -140,8 +148,16 @@ public:
/*! /*!
* @copydoc Dumux::CompositionalFluidState::temperature() * @copydoc Dumux::CompositionalFluidState::temperature()
*/ */
Scalar temperature(int phaseIdx) const Scalar temperature(const int phaseIdx) const
{ return temperature_[phaseIdx]; } { return temperature_[phaseIdx]; }
/*!
* \brief Get the equilibrium temperature \f$\mathrm{[K]}\f$ of the fluid phases.
*/
Scalar temperature() const
{
return temperatureEquil_ ;
}
/*! /*!
* @copydoc Dumux::CompositionalFluidState::pressure() * @copydoc Dumux::CompositionalFluidState::pressure()
...@@ -178,13 +194,17 @@ public: ...@@ -178,13 +194,17 @@ public:
* \brief Set the temperature \f$\mathrm{[K]}\f$ of a fluid phase * \brief Set the temperature \f$\mathrm{[K]}\f$ of a fluid phase
*/ */
void setTemperature(int phaseIdx, Scalar value) void setTemperature(int phaseIdx, Scalar value)
{ temperature_[phaseIdx] = value; } {
temperature_[phaseIdx] = value;
}
/*! /*!
* \brief Set the temperature \f$\mathrm{[K]}\f$ of all fluid phases. * \brief Set the temperature \f$\mathrm{[K]}\f$ of all fluid phases.
*/ */
void setTemperature(Scalar value) void setTemperature(Scalar value)
{DUNE_THROW(Dune::NotImplemented, "This is a fluidstate for non-equilibrium, temperature in which phase?");} {
temperatureEquil_ = value;
}
/*! /*!
* \brief Set the fluid pressure of a phase \f$\mathrm{[Pa]}\f$ * \brief Set the fluid pressure of a phase \f$\mathrm{[Pa]}\f$
...@@ -319,7 +339,8 @@ protected: ...@@ -319,7 +339,8 @@ protected:
Scalar density_[numPhases]; Scalar density_[numPhases];
Scalar enthalpy_[numPhases]; Scalar enthalpy_[numPhases];
Scalar viscosity_[numPhases]; Scalar viscosity_[numPhases];
Scalar temperature_[numPhases]; Scalar temperature_[numPhases]; //
Scalar temperatureEquil_;
}; };
} // end namespace Dumux } // end namespace Dumux
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment