1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
28 #include "addToRunTimeSelectionTable.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace pairPotentials
37 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39 defineTypeNameAndDebug(azizChen, 0);
41 addToRunTimeSelectionTable
49 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
54 const dictionary& azizChen
57 pairPotential(name, azizChen),
58 azizChenCoeffs_(azizChen.subDict(typeName + "Coeffs")),
59 epsilon_(readScalar(azizChenCoeffs_.lookup("epsilon"))),
60 rm_(readScalar(azizChenCoeffs_.lookup("rm"))),
61 A_(readScalar(azizChenCoeffs_.lookup("A"))),
62 alpha_(readScalar(azizChenCoeffs_.lookup("alpha"))),
63 C6_(readScalar(azizChenCoeffs_.lookup("C6"))),
64 C8_(readScalar(azizChenCoeffs_.lookup("C8"))),
65 C10_(readScalar(azizChenCoeffs_.lookup("C10"))),
66 D_(readScalar(azizChenCoeffs_.lookup("D"))),
67 gamma_(readScalar(azizChenCoeffs_.lookup("gamma")))
73 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
75 scalar azizChen::unscaledEnergy(const scalar r) const
83 F = exp(-pow(((D_ / x) - 1.0),2));
89 A_ * Foam::pow(x, gamma_)*exp(-alpha_*x)
91 (C6_/ Foam::pow(x, 6))
92 + (C8_/ Foam::pow(x, 8))
93 + (C10_/ Foam::pow(x, 10))
100 bool azizChen::read(const dictionary& azizChen)
102 pairPotential::read(azizChen);
104 azizChenCoeffs_ = azizChen.subDict(typeName + "Coeffs");
106 azizChenCoeffs_.lookup("epsilon") >> epsilon_;
107 azizChenCoeffs_.lookup("rm") >> rm_;
108 azizChenCoeffs_.lookup("A") >> A_;
109 azizChenCoeffs_.lookup("alpha") >> alpha_;
110 azizChenCoeffs_.lookup("C6") >> C6_;
111 azizChenCoeffs_.lookup("C8") >> C8_;
112 azizChenCoeffs_.lookup("C10") >> C10_;
113 azizChenCoeffs_.lookup("D") >> D_;
114 azizChenCoeffs_.lookup("gamma") >> gamma_;
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 } // End namespace pairPotentials
123 } // End namespace Foam
125 // ************************************************************************* //