class Neutral handling neutral species parameters
This commit is contained in:
parent
a8a392715d
commit
46205ff37e
6 changed files with 406 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
diffusivityModel/Particle/Particle.C
|
||||
diffusivityModel/Neutral/Neutral.C
|
||||
diffusivityModel/diffusivityModel/diffusivityModel.C
|
||||
|
||||
eReactingFoam.C
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
EXE_INC = \
|
||||
-IdiffusivityModel/Particle \
|
||||
-IdiffusivityModel/Neutral \
|
||||
-IdiffusivityModel/diffusivityModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
|
|
|
|||
120
diffusivityModel/Neutral/Neutral.C
Normal file
120
diffusivityModel/Neutral/Neutral.C
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "Neutral.H"
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "scalarList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
// const dataType Foam::Neutral::staticData();
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Neutral::Neutral(const dictionary& dict)
|
||||
:
|
||||
Particle(dict),
|
||||
wellDepth_(dict.lookupOrDefault("wellDepth", 0.0)),
|
||||
diameter_(dict.lookupOrDefault("diameter", 0.0)),
|
||||
dipoleMoment_(dict.lookupOrDefault("dipoleMoment", 0.0)),
|
||||
alpha_(dict.lookupOrDefault("dipolePolarizability", 0.0)),
|
||||
alphaQ_(dict.lookupOrDefault("quadpolePolarizability", 0.0)),
|
||||
C6_(dict.lookupOrDefault("dispersionCoef", 0.0)),
|
||||
Zrot_(dict.lookupOrDefault("rotationalRelaxation", 0.0))
|
||||
{
|
||||
|
||||
const entry* entryPtr = dict.lookupEntryPtr("tranlib", false, true);
|
||||
|
||||
if (entryPtr)
|
||||
{
|
||||
scalarList tranlib(entryPtr->stream());
|
||||
|
||||
wellDepth_ = tranlib[1];
|
||||
diameter_ = tranlib[2];
|
||||
dipoleMoment_ = tranlib[3];
|
||||
alpha_ = tranlib[4];
|
||||
// alphaQ_ = tranlib[0];
|
||||
// C6_ = tranlib[0];
|
||||
Zrot_ = tranlib[5];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Neutral::~Neutral()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::Neutral::operator=(const Neutral& rhs)
|
||||
{
|
||||
// Check for assignment to self
|
||||
if (this == &rhs)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Attempted assignment to self"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const Neutral& st)
|
||||
{
|
||||
os << static_cast<const Particle&>(st) << tab
|
||||
<< st.wellDepth_ << tab
|
||||
<< st.diameter_ << tab
|
||||
<< st.dipoleMoment_ << tab
|
||||
<< st.alpha_ << tab
|
||||
<< st.alphaQ_ << tab
|
||||
<< st.C6_ << tab
|
||||
<< st.Zrot_;
|
||||
|
||||
os.check("Ostream& operator<<(Ostream& os, const specie& st)");
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
174
diffusivityModel/Neutral/Neutral.H
Normal file
174
diffusivityModel/Neutral/Neutral.H
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::Neutral
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
NeutralI.H
|
||||
Neutral.C
|
||||
NeutralIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Neutral_H
|
||||
#define Neutral_H
|
||||
|
||||
#include "Particle.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class Istream;
|
||||
class Ostream;
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
class Neutral;
|
||||
Istream& operator>>(Istream&, Neutral&);
|
||||
Ostream& operator<<(Ostream&, const Neutral&);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Neutral Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Neutral
|
||||
:
|
||||
public Particle
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Lenard-Jones parameter - potential well depth
|
||||
//- epsilon / kB []
|
||||
scalar wellDepth_;
|
||||
|
||||
//- Lenard-Jones parameter - collision diameter []
|
||||
scalar diameter_;
|
||||
|
||||
//- Dipole moment []
|
||||
scalar dipoleMoment_;
|
||||
|
||||
//- Dipole polarizability []
|
||||
scalar alpha_;
|
||||
|
||||
//- Quadrupole polarizability []
|
||||
scalar alphaQ_;
|
||||
|
||||
//- Dispersion coefficient []
|
||||
scalar C6_;
|
||||
|
||||
//- Rotational relaxation collision number []
|
||||
scalar Zrot_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
Neutral(const Neutral&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const Neutral&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
|
||||
//- Static data staticData
|
||||
// static const dataType staticData;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
Neutral(const dictionary& dict);
|
||||
|
||||
//- Construct from Istream
|
||||
Neutral(Istream&);
|
||||
|
||||
//- Construct as copy
|
||||
// Neutral(const Neutral&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~Neutral();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
inline scalar wellDepth() const;
|
||||
|
||||
inline scalar diameter() const;
|
||||
|
||||
inline scalar dipoleMoment() const;
|
||||
|
||||
inline scalar alpha() const;
|
||||
|
||||
inline scalar alphaQ() const;
|
||||
|
||||
inline scalar C6() const;
|
||||
|
||||
inline scalar Zrot() const;
|
||||
|
||||
// Check
|
||||
|
||||
// Edit
|
||||
|
||||
// Write
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
// void operator=(const Neutral&);
|
||||
|
||||
|
||||
// Friend Functions
|
||||
|
||||
// Friend Operators
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Istream& operator>>(Istream&, Neutral&);
|
||||
friend Ostream& operator<<(Ostream&, const Neutral&);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "NeutralI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
107
diffusivityModel/Neutral/NeutralI.H
Normal file
107
diffusivityModel/Neutral/NeutralI.H
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::Neutral::wellDepth()
|
||||
const
|
||||
{
|
||||
return wellDepth_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::Neutral::diameter()
|
||||
const
|
||||
{
|
||||
return diameter_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::Neutral::dipoleMoment()
|
||||
const
|
||||
{
|
||||
return dipoleMoment_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::Neutral::alpha()
|
||||
const
|
||||
{
|
||||
return alpha_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::Neutral::alphaQ()
|
||||
const
|
||||
{
|
||||
return alphaQ_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::Neutral::C6()
|
||||
const
|
||||
{
|
||||
return C6_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::Neutral::Zrot()
|
||||
const
|
||||
{
|
||||
return Zrot_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -30,6 +30,7 @@ License
|
|||
#include "volFieldsFwd.H"
|
||||
#include "scalarMatrices.H"
|
||||
#include "Particle.H"
|
||||
#include "Neutral.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
|
|
@ -115,7 +116,8 @@ Foam::diffusivityModel::diffusivityModel(const psiReactionThermo& thermo)
|
|||
{
|
||||
readNeutrals = true;
|
||||
|
||||
// new Neutral (tranDict);
|
||||
Neutral n(tranDict);
|
||||
Info << n << endl;
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue