Commit 0bd731f3 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'feature/cleanup-h2on2o2-fluidsystem' into 'master'

Cleanup of h2on2o2 fluidsystem.

Removed TODOS and unnecessary comments, added units

See merge request !64
parents 6f0ce81b 17137c22
...@@ -187,7 +187,6 @@ public: ...@@ -187,7 +187,6 @@ public:
static bool isIdealGas(int phaseIdx) static bool isIdealGas(int phaseIdx)
{ {
assert(0 <= phaseIdx && phaseIdx < numPhases); assert(0 <= phaseIdx && phaseIdx < numPhases);
if (phaseIdx == nPhaseIdx) if (phaseIdx == nPhaseIdx)
// let the components decide // let the components decide
return H2O::gasIsIdeal() && N2::gasIsIdeal() && O2::gasIsIdeal(); return H2O::gasIsIdeal() && N2::gasIsIdeal() && O2::gasIsIdeal();
...@@ -342,7 +341,7 @@ public: ...@@ -342,7 +341,7 @@ public:
} }
/*! /*!
* \brief Calculate the surface tension between water and air, * \brief Calculate the surface tension between water and air in \f$\mathrm{[\frac{N}{m}]}\f$,
* according to IAPWS Release on Surface Tension from September 1994. * according to IAPWS Release on Surface Tension from September 1994.
* The equation is valid between the triple Point (0.01C) and the critical temperature. * The equation is valid between the triple Point (0.01C) and the critical temperature.
* *
...@@ -351,15 +350,14 @@ public: ...@@ -351,15 +350,14 @@ public:
template <class FluidState> template <class FluidState>
static Scalar surfaceTension(const FluidState &fluidState) static Scalar surfaceTension(const FluidState &fluidState)
{ {
return 0.0625; const Scalar T = fluidState.temperature(); //K
// const Scalar T = fluidState.temperature(); //K const Scalar B = 0.2358 ; // [N/m]
// const Scalar B = 0.2358 ; // [N/m] const Scalar T_c = H2O::criticalTemperature(); //K
// const Scalar T_c = H2O::criticalTemperature(); //K const Scalar mu = 1.256;
// const Scalar mu = 1.256; const Scalar b = -0.625;
// const Scalar b = -0.625; //Equation to calculate surface Tension of Water According to IAPWS Release on Surface Tension from September 1994
// //Equation to calculate surface Tension of Water According to IAPWS Release on Surface Tension from September 1994 const Scalar surfaceTension = B*std::pow((1.-(T/T_c)),mu)*(1.+b*(1.-(T/T_c)));
// const Scalar surfaceTension = B*pow((1.-(T/T_c)),mu)*(1.+b*(1.-(T/T_c))); return surfaceTension; //surface Tension [N/m]
// return surfaceTension; //surface Tension [N/m]
} }
/**************************************** /****************************************
* thermodynamic relations * thermodynamic relations
...@@ -615,7 +613,6 @@ public: ...@@ -615,7 +613,6 @@ public:
int phaseIdx, int phaseIdx,
int compIdx) int compIdx)
{ {
// TODO!
DUNE_THROW(Dune::NotImplemented, "Diffusion coefficients"); DUNE_THROW(Dune::NotImplemented, "Diffusion coefficients");
} }
...@@ -742,7 +739,6 @@ public: ...@@ -742,7 +739,6 @@ public:
int phaseIdx, int phaseIdx,
int componentIdx) int componentIdx)
{ {
//TODO: Implement sub-routine for component enthalpy
DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx); DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
} }
...@@ -864,20 +860,6 @@ public: ...@@ -864,20 +860,6 @@ public:
+ c_pO2*fluidState.massFraction(nPhaseIdx, O2Idx); + c_pO2*fluidState.massFraction(nPhaseIdx, O2Idx);
} }
static Scalar saltDensity(int phaseIdx)
{
DUNE_THROW(Dune::NotImplemented, "saltDensity");
}
static Scalar saltMolarDensity(int phaseIdx)
{
DUNE_THROW(Dune::NotImplemented, "saltMolarDensity");
}
static Scalar solubilityLimit(int compIdx)
{
DUNE_THROW(Dune::NotImplemented, "solubilityLimit");
}
}; };
} // end namespace FluidSystems } // end namespace FluidSystems
......
...@@ -416,17 +416,6 @@ public: ...@@ -416,17 +416,6 @@ public:
Scalar permeabilityFactor() const Scalar permeabilityFactor() const
{ return permeabilityFactor_; } { return permeabilityFactor_; }
// /*!
// * \brief Returns the mole fraction of a component in the phase
// *
// * \param phaseIdx the index of the fluid phase
// * \param compIdx the index of the component
// */
// Scalar moleFraction(int phaseIdx, int compIdx) const
// {
// return this->fluidState_.moleFraction(phaseIdx, compIdx);
// }
/*! /*!
* \brief Returns the mole fraction of the salinity in the liquid phase * \brief Returns the mole fraction of the salinity in the liquid phase
*/ */
...@@ -478,8 +467,8 @@ public: ...@@ -478,8 +467,8 @@ public:
* *
* \param phaseIdx the index of the fluid phase * \param phaseIdx the index of the fluid phase
* \param compIdx the index of the component * \param compIdx the index of the component
* molality=\frac{n_{component}}{m_{solvent}} * \f$\mathrm{molality}=\frac{n_\mathrm{component}}{m_\mathrm{solvent}}
* =\frac{n_{component}}{n_{solvent}*M_{solvent}} * =\frac{n_\mathrm{component}}{n_\mathrm{solvent}*M_\mathrm{solvent}}\f$
* compIdx of the main component (solvent) in the * compIdx of the main component (solvent) in the
* phase is equal to the phaseIdx * phase is equal to the phaseIdx
*/ */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment