195 lines
4.3 KiB
C++
195 lines
4.3 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/>.
|
|
|
|
Class
|
|
Foam::Particle
|
|
|
|
Description
|
|
|
|
SourceFiles
|
|
ParticleI.H
|
|
Particle.C
|
|
ParticleIO.C
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
#ifndef Particle_H
|
|
#define Particle_H
|
|
|
|
#include "word.H"
|
|
#include "scalar.H"
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
namespace Foam
|
|
{
|
|
|
|
// Forward declaration of classes
|
|
class Istream;
|
|
class Ostream;
|
|
class dictionary;
|
|
|
|
// Forward declaration of friend functions and operators
|
|
class Particle;
|
|
Istream& operator>>(Istream&, Particle&);
|
|
Ostream& operator<<(Ostream&, const Particle&);
|
|
|
|
|
|
/*---------------------------------------------------------------------------*\
|
|
Class Particle Declaration
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
class Particle
|
|
{
|
|
|
|
public:
|
|
|
|
//- Enumeration defining the particle geometry
|
|
enum Geometry
|
|
{
|
|
ATOM = 0,
|
|
LINEAR = 2,
|
|
NONLINEAR = 3
|
|
};
|
|
|
|
|
|
protected:
|
|
|
|
// Private data
|
|
|
|
//- Species name
|
|
word name_;
|
|
|
|
//- Molecular weight [kg / kmol]
|
|
scalar W_;
|
|
|
|
//- Number of elementary charges
|
|
scalar z_;
|
|
|
|
//- Geometry
|
|
Geometry geometry_;
|
|
|
|
|
|
// Private Member Functions
|
|
|
|
//- Disallow default bitwise copy construct
|
|
Particle(const Particle&);
|
|
|
|
//- Disallow default bitwise assignment
|
|
void operator=(const Particle&);
|
|
|
|
|
|
public:
|
|
|
|
// Static data members
|
|
|
|
//- Universal gas constant (default in [J/(kmol K)])
|
|
static const scalar RR;
|
|
|
|
//- Elementary charge (default in [C])
|
|
static const scalar e;
|
|
|
|
//- Avogadro number (default in [1/mol])
|
|
static const scalar NA;
|
|
|
|
//- Boltzmann constant (default in [J/K])
|
|
static const scalar k;
|
|
|
|
//- 1 Angstom in meter
|
|
static const scalar Angstrom;
|
|
|
|
//- 1 Debye in [ Coulomb x meter ]
|
|
static const scalar Debye;
|
|
|
|
//- Circumference / Diameter
|
|
static const scalar pi;
|
|
|
|
//- Electric constant (Vacuum permittivity) [F/m]
|
|
static const scalar eps0;
|
|
|
|
|
|
// Constructors
|
|
|
|
//- Construct from components
|
|
Particle(const dictionary& dict);
|
|
|
|
//- Construct from Istream
|
|
Particle(Istream&);
|
|
|
|
//- Construct as copy
|
|
// Particle(const Particle&);
|
|
|
|
|
|
//- Destructor
|
|
~Particle();
|
|
|
|
|
|
// Member Functions
|
|
|
|
// Access
|
|
inline const word& name() const;
|
|
|
|
inline scalar W() const;
|
|
|
|
inline scalar z() const;
|
|
|
|
inline scalar F() const;
|
|
|
|
inline Geometry geometry() const;
|
|
|
|
// Check
|
|
|
|
// Edit
|
|
|
|
// Write
|
|
|
|
|
|
// Member Operators
|
|
|
|
// void operator=(const Particle&);
|
|
|
|
|
|
// Friend Functions
|
|
|
|
// Friend Operators
|
|
|
|
// IOstream Operators
|
|
|
|
friend Istream& operator>>(Istream&, Particle&);
|
|
friend Ostream& operator<<(Ostream&, const Particle&);
|
|
};
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
} // End namespace Foam
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
#include "ParticleI.H"
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
#endif
|
|
|
|
// ************************************************************************* //
|