some documentation and stylistic updates
This commit is contained in:
@@ -72,7 +72,7 @@ template <class T>
|
||||
inline bool CheckDefined(const T &value)
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
unsigned int tmp = VALGRIND_CHECK_MEM_IS_DEFINED(&value, sizeof(T));
|
||||
auto tmp = VALGRIND_CHECK_MEM_IS_DEFINED(&value, sizeof(T));
|
||||
return tmp == 0;
|
||||
#else
|
||||
return true;
|
||||
@@ -108,7 +108,7 @@ template <class T>
|
||||
inline bool CheckDefined(const T *value, int size)
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
unsigned int tmp = VALGRIND_CHECK_MEM_IS_DEFINED(value, size*sizeof(T));
|
||||
auto tmp = VALGRIND_CHECK_MEM_IS_DEFINED(value, size*sizeof(T));
|
||||
return tmp == 0;
|
||||
#else
|
||||
return true;
|
||||
@@ -255,8 +255,6 @@ inline void SetNoAccess(const T &value)
|
||||
*
|
||||
* \param value Pointer to the first object of the array.
|
||||
* \param size The size of the array in number of objects
|
||||
*
|
||||
* \param value The object which's memory valgrind should complain if accessed
|
||||
*/
|
||||
template <class T>
|
||||
inline void SetNoAccess(const T *value, int size)
|
||||
|
||||
@@ -88,8 +88,6 @@ public:
|
||||
|
||||
/*!
|
||||
* \brief Diffusion coefficent [m^2/s] for molecular mesitylene in liquid water.
|
||||
*
|
||||
* \todo
|
||||
*/
|
||||
template <class Scalar>
|
||||
static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
|
||||
|
||||
@@ -239,8 +239,8 @@ private:
|
||||
* \brief Returns the equilibrium molality of CO2 (mol CO2 / kg water) for a
|
||||
* CO2-water mixture at a given pressure and temperature
|
||||
*
|
||||
* \param T the temperature [K]
|
||||
* \param pg the gas phase pressure [Pa]
|
||||
* \param temperature The temperature [K]
|
||||
* \param pg The gas phase pressure [Pa]
|
||||
*/
|
||||
static Scalar molalityCO2inPureWater_(Scalar temperature, Scalar pg) {
|
||||
Scalar A = computeA_(temperature, pg); // according to Spycher, Pruess and Ennis-King (2003)
|
||||
|
||||
@@ -82,8 +82,6 @@ public:
|
||||
|
||||
/*!
|
||||
* \brief Diffusion coefficent [m^2/s] for molecular CO2 in liquid water.
|
||||
*
|
||||
* \todo
|
||||
*/
|
||||
template <class Scalar>
|
||||
static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
|
||||
|
||||
@@ -98,13 +98,13 @@ public:
|
||||
|
||||
/*!
|
||||
* \brief Diffusion coefficent [m^2/s] for mesitylene in liquid water.
|
||||
*
|
||||
* \todo
|
||||
*/
|
||||
template <class Scalar>
|
||||
static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
|
||||
{
|
||||
return 1.e-9; // This is just an order of magnitude. Please improve it!
|
||||
// This is just an order of magnitude estimate. Please
|
||||
// improve!
|
||||
return 1.e-9;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -146,13 +146,13 @@ public:
|
||||
/*!
|
||||
* \brief Returns true iff the gas phase is assumed to be compressible
|
||||
*/
|
||||
static const bool gasIsCompressible()
|
||||
static bool gasIsCompressible()
|
||||
{ return true; }
|
||||
|
||||
/*!
|
||||
* \brief Returns true iff the gas phase is assumed to be ideal
|
||||
*/
|
||||
static const bool gasIsIdeal()
|
||||
static bool gasIsIdeal()
|
||||
{ return false; }
|
||||
|
||||
/*!
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
visco_CO2 = (mu0 + dmu)/1.0E6; /* conversion to [Pa s] */
|
||||
|
||||
return visco_CO2;
|
||||
};
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Specific isobaric heat capacity of the component [J/kg]
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of TCE.
|
||||
*/
|
||||
static Scalar molarMass()
|
||||
{ return 131.39e-3; /* [kg/mol] */ };
|
||||
{ return 131.39e-3; /* [kg/mol] */ }
|
||||
|
||||
/*!
|
||||
* \brief The vapor pressure in \f$\mathrm{[Pa]}\f$ of pure TCE
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
* \param T temperature of component in \f$\mathrm{[K]}\f$
|
||||
*/
|
||||
static Scalar vaporPressure(Scalar T)
|
||||
{ return 3900; /* [Pa] (at 20C) */ };
|
||||
{ return 3900; /* [Pa] (at 20C) */ }
|
||||
|
||||
/*!
|
||||
* \brief Returns true iff the gas phase is assumed to be compressible
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
return IdealGas<Scalar>::density(molarMass(),
|
||||
temperature,
|
||||
pressure);
|
||||
};
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns true iff the gas phase is assumed to be ideal
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
|
||||
*/
|
||||
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
|
||||
{ return 5.7e-4; /* [Pa s] */ };
|
||||
{ return 5.7e-4; /* [Pa s] */ }
|
||||
|
||||
/*!
|
||||
* \brief The enthalpy of pure TCE at a given pressure and temperature \f$\mathrm{[J/kg]}\f$.
|
||||
|
||||
@@ -517,13 +517,13 @@ public:
|
||||
/*!
|
||||
* \brief Returns true iff the gas phase is assumed to be compressible
|
||||
*/
|
||||
static const bool gasIsCompressible()
|
||||
static bool gasIsCompressible()
|
||||
{ return true; }
|
||||
|
||||
/*!
|
||||
* \brief Returns true iff the liquid phase is assumed to be compressible
|
||||
*/
|
||||
static const bool liquidIsCompressible()
|
||||
static bool liquidIsCompressible()
|
||||
{ return true; }
|
||||
|
||||
/*!
|
||||
@@ -601,7 +601,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns true iff the gas phase is assumed to be ideal
|
||||
*/
|
||||
static const bool gasIsIdeal()
|
||||
static bool gasIsIdeal()
|
||||
{ return false; }
|
||||
|
||||
/*!
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
|
||||
*/
|
||||
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
|
||||
{ return 8e-3; };
|
||||
{ return 8e-3; }
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief
|
||||
* \brief The density of pure mesitylene vapor at a given pressure and temperature \f$\mathrm{[kg/m^3]}\f$.
|
||||
*
|
||||
* \param temperature temperature of component in \f$\mathrm{[K]}\f$
|
||||
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
|
||||
|
||||
@@ -44,10 +44,11 @@ namespace Opm
|
||||
* At the moment, this class can only handle the sub-critical fluids
|
||||
* since it tabulates along the vapor pressure curve.
|
||||
*
|
||||
* \tparam Scalar The type used for scalar values
|
||||
* \tparam Scalar The component which ought to be tabulated
|
||||
* \tparam Scalar The type used for scalar values
|
||||
* \tparam RawComponent The component which ought to be tabulated
|
||||
* \tparam useVaporPressure If true, tabulate all quantities along the
|
||||
* vapor pressure curve, if false use the pressure range [p_min, p_max]
|
||||
* vapor pressure curve, if false use the
|
||||
* pressure range [p_min, p_max]
|
||||
*/
|
||||
template <class Scalar, class RawComponent, bool useVaporPressure=true>
|
||||
class TabulatedComponent
|
||||
|
||||
@@ -650,9 +650,9 @@ protected:
|
||||
// if the phase's fugacity coefficients are composition
|
||||
// dependent, update them as well.
|
||||
if (!FluidSystem::isIdealMixture(phaseIdx)) {
|
||||
for (int compIdx = 0; compIdx < numComponents; ++compIdx) {
|
||||
Scalar phi = FluidSystem::fugacityCoefficient(fluidState, paramCache, phaseIdx, compIdx);
|
||||
fluidState.setFugacityCoefficient(phaseIdx, compIdx, phi);
|
||||
for (int fugCompIdx = 0; fugCompIdx < numComponents; ++fugCompIdx) {
|
||||
Scalar phi = FluidSystem::fugacityCoefficient(fluidState, paramCache, phaseIdx, fugCompIdx);
|
||||
fluidState.setFugacityCoefficient(phaseIdx, fugCompIdx, phi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,7 +260,6 @@ public:
|
||||
* p_C = p_e\overline{S}_w^{-1/\lambda}
|
||||
* \f]
|
||||
*
|
||||
* \param Sw Effective saturation of the wetting phase \f$[-]\f$
|
||||
* \param params The parameters of the capillary pressure curve
|
||||
* (for Brooks-Corey: Entry pressure and shape factor)
|
||||
*/
|
||||
@@ -287,7 +286,6 @@ public:
|
||||
\overline{S}_w = (\frac{p_C}{p_e})^{-\lambda}
|
||||
\f]
|
||||
*
|
||||
* \param pc Capillary pressure \f$[Pa]\f$
|
||||
* \param params The parameters of the capillary pressure curve
|
||||
* (for Brooks-Corey: Entry pressure and shape factor)
|
||||
*/
|
||||
@@ -326,7 +324,6 @@ public:
|
||||
-\frac{p_e}{\lambda} \overline{S}_w^{-1/\lambda - 1}
|
||||
\f]
|
||||
*
|
||||
* \param Sw Effective saturation of the wetting phase \f$[-]\f$
|
||||
* \param params The parameters of the capillary pressure curve
|
||||
* (for Brooks-Corey: Entry pressure and shape factor)
|
||||
*/
|
||||
@@ -348,7 +345,6 @@ public:
|
||||
* regard to the capillary pressure according to Brooks and
|
||||
* Corey.
|
||||
*
|
||||
* \param pcnw Capillary pressure \f$[Pa]\f$
|
||||
* \param params The parameters of the capillary pressure curve
|
||||
* (for Brooks-Corey: Entry pressure and shape factor)
|
||||
*/
|
||||
@@ -370,7 +366,6 @@ public:
|
||||
* the medium implied by the Brooks-Corey
|
||||
* parameterization.
|
||||
*
|
||||
* \param Sw Effective saturation of the wetting phase \f$[-]\f$
|
||||
* \param params The parameters of the capillary pressure curve
|
||||
* (for Brooks-Corey: Entry pressure and shape factor)
|
||||
*/
|
||||
@@ -406,7 +401,6 @@ public:
|
||||
* the medium as implied by the Brooks-Corey
|
||||
* parameterization.
|
||||
*
|
||||
* \param Sw Effective saturation of the wetting phase \f$[-]\f$
|
||||
* \param params The parameters of the capillary pressure curve
|
||||
* (for Brooks-Corey: Entry pressure and shape factor)
|
||||
*/
|
||||
|
||||
@@ -277,10 +277,6 @@ public:
|
||||
* \brief The capillary pressure-saturation curve.
|
||||
*
|
||||
*
|
||||
* \param Sw Absolute saturation of the wetting phase
|
||||
* \f$\overline{S}_w\f$. It is converted to effective
|
||||
* saturation and then handed over to the material law
|
||||
* actually used for calculation.
|
||||
* \param params A object that stores the appropriate coefficients
|
||||
* for the respective law.
|
||||
*
|
||||
@@ -411,8 +407,6 @@ public:
|
||||
/*!
|
||||
* \brief The relative permeability for the wetting phase.
|
||||
*
|
||||
* \param Sw Absolute saturation of the wetting phase \f$\overline{S}_w\f$. It is converted to effective saturation
|
||||
* and then handed over to the material law actually used for calculation.
|
||||
* \param params A container object that is populated with the appropriate coefficients for the respective law.
|
||||
* Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container
|
||||
* is constructed accordingly. Afterwards the values are set there, too.
|
||||
|
||||
@@ -127,9 +127,11 @@ public:
|
||||
{
|
||||
temperature_ = fs.temperature(/*phaseIdx=*/0);
|
||||
|
||||
#ifndef NDEBUG
|
||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||
assert(fs.temperature(phaseIdx) == temperature_);
|
||||
assert(std::abs(fs.temperature(phaseIdx) - temperature_) < 1e-30);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -38,10 +38,17 @@ public:
|
||||
* \brief Constants for ORing the quantities of the fluid state that have not changed since the last update.
|
||||
*/
|
||||
enum ExceptQuantities {
|
||||
None = 0, //!< All quantities have been (potentially) modified.
|
||||
Temperature = 1, //< The temperature has not been modified
|
||||
Pressure = 2, //< The pressures have not been modified
|
||||
Composition = 4 //< The compositions have not been modified
|
||||
//! All quantities have been (potentially) modified.
|
||||
None = 0,
|
||||
|
||||
//! The temperature has not been modified
|
||||
Temperature = 1,
|
||||
|
||||
//! The pressures have not been modified
|
||||
Pressure = 2,
|
||||
|
||||
//! The compositions have not been modified
|
||||
Composition = 4
|
||||
};
|
||||
|
||||
ParameterCacheBase()
|
||||
|
||||
Reference in New Issue
Block a user