cleaning up FluidStateCompositionModules.hpp a little bit.
mostly removing the twophaselflag_, which is not used anywhere. not functionality changes.
This commit is contained in:
parent
7762589cea
commit
13469c63a0
@ -172,40 +172,34 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Scalar& K(unsigned compIdx) const
|
const Scalar& K(unsigned compIdx) const
|
||||||
{ return K_[compIdx]; }
|
{
|
||||||
|
return K_[compIdx];
|
||||||
/*!
|
}
|
||||||
* \brief Set the K value of a component [-]
|
|
||||||
*/
|
|
||||||
void setKvalue(unsigned compIdx, const Scalar& value)
|
|
||||||
{
|
|
||||||
K_[compIdx] = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief The L value of a composition [-]
|
|
||||||
*/
|
|
||||||
const Scalar& L() const
|
|
||||||
{ return L_; }
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Set the L value [-]
|
|
||||||
*/
|
|
||||||
void setLvalue(const Scalar& value)
|
|
||||||
{ L_ = value; }
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The twophaseflag
|
* \brief Set the K value of a component [-]
|
||||||
*/
|
*/
|
||||||
const bool& twophaseflag(unsigned /*phaseIdx*/) const
|
void setKvalue(unsigned compIdx, const Scalar& value)
|
||||||
{ return twophaseflag_; }
|
{
|
||||||
|
K_[compIdx] = value;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set the twophaseflag
|
* \brief The L value of a composition [-]
|
||||||
*/
|
*/
|
||||||
void setTwophaseflag(const bool& value)
|
const Scalar& L() const
|
||||||
{ twophaseflag_ = value; }
|
{
|
||||||
|
return L_;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Set the L value [-]
|
||||||
|
*/
|
||||||
|
void setLvalue(const Scalar& value)
|
||||||
|
{
|
||||||
|
L_ = value;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Wilson formula to calculate K
|
* \brief Wilson formula to calculate K
|
||||||
*
|
*
|
||||||
@ -218,13 +212,15 @@ public:
|
|||||||
const auto& p_crit = FluidSystem::criticalPressure(compIdx);
|
const auto& p_crit = FluidSystem::criticalPressure(compIdx);
|
||||||
const auto& p = asImp_().pressure(0); //for now assume no capillary pressure
|
const auto& p = asImp_().pressure(0); //for now assume no capillary pressure
|
||||||
|
|
||||||
const auto& tmp = exp(5.37 * (1+acf) * (1-T_crit/T)) * (p_crit/p);
|
const auto tmp = exp(5.37 * (1+acf) * (1-T_crit/T)) * (p_crit/p);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const Implementation& asImp_() const
|
const Implementation& asImp_() const
|
||||||
{ return *static_cast<const Implementation*>(this); }
|
{
|
||||||
|
return *static_cast<const Implementation*>(this);
|
||||||
|
}
|
||||||
|
|
||||||
std::array<std::array<Scalar,numComponents>,numPhases> moleFraction_;
|
std::array<std::array<Scalar,numComponents>,numPhases> moleFraction_;
|
||||||
std::array<Scalar,numPhases> averageMolarMass_;
|
std::array<Scalar,numPhases> averageMolarMass_;
|
||||||
@ -232,7 +228,6 @@ protected:
|
|||||||
std::array<Scalar,numPhases> Z_;
|
std::array<Scalar,numPhases> Z_;
|
||||||
std::array<Scalar,numComponents> K_;
|
std::array<Scalar,numComponents> K_;
|
||||||
Scalar L_;
|
Scalar L_;
|
||||||
bool twophaseflag_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -251,8 +246,7 @@ public:
|
|||||||
static_assert(static_cast<int>(numPhases) == static_cast<int>(numComponents),
|
static_assert(static_cast<int>(numPhases) == static_cast<int>(numComponents),
|
||||||
"The number of phases must be the same as the number of (pseudo-) components if you assume immiscibility");
|
"The number of phases must be the same as the number of (pseudo-) components if you assume immiscibility");
|
||||||
|
|
||||||
FluidStateImmiscibleCompositionModule()
|
FluidStateImmiscibleCompositionModule() = default;
|
||||||
{ }
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The mole fraction of a component in a phase []
|
* \brief The mole fraction of a component in a phase []
|
||||||
@ -323,8 +317,7 @@ class FluidStateNullCompositionModule
|
|||||||
public:
|
public:
|
||||||
enum { numComponents = 0 };
|
enum { numComponents = 0 };
|
||||||
|
|
||||||
FluidStateNullCompositionModule()
|
FluidStateNullCompositionModule() = default;
|
||||||
{ }
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The mole fraction of a component in a phase []
|
* \brief The mole fraction of a component in a phase []
|
||||||
|
Loading…
Reference in New Issue
Block a user