119 lines
3.6 KiB
C++
119 lines
3.6 KiB
C++
/*---------------------------------------------------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration |
|
|
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
|
\\/ M anipulation |
|
|
-------------------------------------------------------------------------------
|
|
License
|
|
This file is part of OpenFOAM.
|
|
|
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
|
|
|
|
inline Foam::scalar Foam::Coulomb::Omega11(const scalar Tstar)
|
|
const
|
|
{
|
|
constexpr scalar A = 0.5;
|
|
constexpr scalar B = -0.129;
|
|
return (A * loge (Tstar) + B) / sqr(Tstar);
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Coulomb::Omega22(const scalar Tstar)
|
|
const
|
|
{
|
|
constexpr scalar A = 0.5;
|
|
constexpr scalar B = 0.1165;
|
|
return (A * loge (Tstar) + B) / sqr(Tstar);
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Coulomb::epsK(const scalar T, const scalar rhoQc2)
|
|
const
|
|
{
|
|
return eij_ / DebyeLength(T, rhoQc2);
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Coulomb::DebyeLength(const scalar T, const scalar rhoQc2)
|
|
const
|
|
{
|
|
return sqrt(Foam::constant::electromagnetic::epsilon0.value()
|
|
* Foam::constant::physicoChemical::k.value()
|
|
* T / (rhoQc2 + ROOTVSMALL));
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Coulomb::DebyeLength(const GasState &state)
|
|
const
|
|
{
|
|
return sqrt(Foam::constant::electromagnetic::epsilon0.value()
|
|
* Foam::constant::physicoChemical::k.value()
|
|
* state.T() / (state.rhoQc2() + ROOTVSMALL));
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Coulomb::D(const scalar p, const scalar T, const scalar rhoQc2)
|
|
const
|
|
{
|
|
scalar sigmaij_ = DebyeLength(T, rhoQc2);
|
|
|
|
return Interaction::D(Wij_, p, T, (Foam::Particle::pi * sqr(sigmaij_) * Omega11(T/eij_/sigmaij_)));
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Coulomb::mu(const scalar p, const scalar T, const scalar rhoQc2)
|
|
const
|
|
{
|
|
scalar sigmaij_ = DebyeLength(T, rhoQc2);
|
|
|
|
return Interaction::mu(2.0*Wij_, T, (Foam::Particle::pi * sqr(sigmaij_) * Omega22(T/eij_/sigmaij_)));
|
|
}
|
|
|
|
|
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
|
|
// ************************************************************************* //
|