Skip to content
Permalink
Browse files

equationOfState::Boussinesq, PengRobinsonGas, icoPolynomial added mis…

…sing departure functions
  • Loading branch information...
Henry Weller
Henry Weller committed Oct 17, 2018
1 parent 91d3f06 commit 625c6854fd4d22c4753d515b43d2f98b35f79084
@@ -147,7 +147,6 @@ Foam::scalar Foam::Polynomial<PolySize>::value(const scalar x) const
{
scalar val = this->v_[0];

// avoid costly pow() in calculation
scalar powX = 1;
for (label i=1; i<PolySize; ++i)
{
@@ -171,7 +170,6 @@ Foam::scalar Foam::Polynomial<PolySize>::derivative(const scalar x) const

if (PolySize > 1)
{
// avoid costly pow() in calculation
deriv += this->v_[1];

scalar powX = 1;
@@ -198,7 +196,6 @@ Foam::scalar Foam::Polynomial<PolySize>::integral
const scalar x2
) const
{
// avoid costly pow() in calculation
scalar powX1 = x1;
scalar powX2 = x2;

@@ -96,7 +96,9 @@ inline Foam::scalar Foam::Boussinesq<Specie>::rho
template<class Specie>
inline Foam::scalar Foam::Boussinesq<Specie>::H(scalar p, scalar T) const
{
return 0;
const scalar rho = this->rho(p, T);

return (p/rho)*(1 - rho0_*beta_*T/rho);
}


@@ -182,13 +182,10 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::E(scalar p, scalar T) const
template<class Specie>
inline Foam::scalar Foam::PengRobinsonGas<Specie>::Cv(scalar p, scalar T) const
{
const scalar Tr = T/Tc_;
const scalar a = 0.45724*sqr(RR*Tc_)/Pc_;
const scalar b = 0.07780*RR*Tc_/Pc_;
const scalar kappa = 0.37464 + 1.54226*omega_ - 0.26992*sqr(omega_);
const scalar alpha = sqr(1 + kappa*(1 - sqrt(Tr)));

const scalar A = a*alpha*p/sqr(RR*T);
const scalar B = b*p/(RR*T);

const scalar Z = this->Z(p, T);
@@ -95,7 +95,9 @@ inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::H
scalar T
) const
{
return 0;
const scalar rho = this->rho(p, T);

return (p/rho)*(1 + (T/rho)*rhoCoeffs_.derivative(T));
}


0 comments on commit 625c685

Please sign in to comment.
You can’t perform that action at this time.