189 lines
4.4 KiB
C
189 lines
4.4 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/>.
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
#include "Particle.H"
|
|
|
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
|
|
inline const Foam::word& Foam::Particle::name()
|
|
const
|
|
{
|
|
return name_;
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::W()
|
|
const
|
|
{
|
|
return W_;
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::z()
|
|
const
|
|
{
|
|
return z_;
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::F()
|
|
const
|
|
{
|
|
return (geometry_);
|
|
}
|
|
|
|
|
|
inline Foam::Particle::Geometry Foam::Particle::geometry()
|
|
const
|
|
{
|
|
return geometry_;
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::Zrot()
|
|
const
|
|
{
|
|
return Zrot_;
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::zeta(const scalar T, const scalar wellDepth)
|
|
const
|
|
{
|
|
const scalar a3 = sqrt(pow3(pi));
|
|
const scalar a1 = a3/2.0;
|
|
const scalar a2 = sqr(pi) / 4.0 + 2.0;
|
|
|
|
const scalar t1 = sqrt(wellDepth/T);
|
|
const scalar t2 = wellDepth/T;
|
|
const scalar t3 = t1 * t2;
|
|
|
|
return 1.0 + a1 * t1 + a2 * t2 + a3 * t3;
|
|
}
|
|
|
|
inline Foam::scalar Foam::Particle::R()
|
|
const
|
|
{
|
|
return RR;
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::CvTrans()
|
|
const
|
|
{
|
|
return (3./2.)*R();
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::CvRot()
|
|
const
|
|
{
|
|
return (F()/2.)*R();
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::CvVib(const scalar p, const scalar T)
|
|
const
|
|
{
|
|
return Cv(p,T) - CvTrans() - CvRot();
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::Cv(const scalar p, const scalar T)
|
|
const
|
|
{
|
|
return thermo_.Cv(p,T) * W();
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::AB(const scalar rSc)
|
|
const
|
|
{
|
|
const scalar A = 5./2. - rSc;
|
|
const scalar B = Zrot() + (2./pi) * ((5./3.)*CvRot()/R() + rSc);
|
|
return (2./pi)*(A/B);
|
|
}
|
|
|
|
inline Foam::scalar Foam::Particle::fTrans(const scalar rSc)
|
|
const
|
|
{
|
|
return (5./2.) * (1. - AB(rSc) * CvRot() / CvTrans());
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::lambda(const scalar mu, const scalar D, const scalar Zrot, const GasState &state)
|
|
const
|
|
{
|
|
const scalar rSc = state.rho() * D / mu;
|
|
|
|
const scalar A = 5./2. - rSc;
|
|
const scalar B = Zrot + (2./pi) * ((5./3.)*CvRot()/R() + rSc);
|
|
const scalar AB = (2./pi) * (A/B);
|
|
|
|
const scalar fTrans = (5./2.) * (1.0 - AB * CvRot() / CvTrans());
|
|
const scalar fRot = rSc * (1.0 + AB);
|
|
const scalar fVib = rSc;
|
|
|
|
return (mu/W()) * (fTrans*CvTrans() + fRot*CvRot() + fVib*CvVib(state.p(), state.T()));
|
|
}
|
|
|
|
|
|
inline Foam::scalar Foam::Particle::lambda(const scalar mu, const scalar D, const GasState &state)
|
|
const
|
|
{
|
|
return lambda(mu, D, 0.0, state);
|
|
}
|
|
|
|
|
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
|
|
// ************************************************************************* //
|