1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 namespace pairPotentials
36 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
38 defineTypeNameAndDebug(azizChen, 0);
40 addToRunTimeSelectionTable
48 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
53 const dictionary& azizChen
56 pairPotential(name, azizChen),
57 azizChenCoeffs_(azizChen.subDict(typeName + "Coeffs")),
58 epsilon_(readScalar(azizChenCoeffs_.lookup("epsilon"))),
59 rm_(readScalar(azizChenCoeffs_.lookup("rm"))),
60 A_(readScalar(azizChenCoeffs_.lookup("A"))),
61 alpha_(readScalar(azizChenCoeffs_.lookup("alpha"))),
62 C6_(readScalar(azizChenCoeffs_.lookup("C6"))),
63 C8_(readScalar(azizChenCoeffs_.lookup("C8"))),
64 C10_(readScalar(azizChenCoeffs_.lookup("C10"))),
65 D_(readScalar(azizChenCoeffs_.lookup("D"))),
66 gamma_(readScalar(azizChenCoeffs_.lookup("gamma")))
72 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
74 scalar azizChen::unscaledEnergy(const scalar r) const
82 F = exp(-pow(((D_ / x) - 1.0),2));
88 A_ * Foam::pow(x, gamma_)*exp(-alpha_*x)
90 (C6_/ Foam::pow(x, 6))
91 + (C8_/ Foam::pow(x, 8))
92 + (C10_/ Foam::pow(x, 10))
99 bool azizChen::read(const dictionary& azizChen)
101 pairPotential::read(azizChen);
103 azizChenCoeffs_ = azizChen.subDict(typeName + "Coeffs");
105 azizChenCoeffs_.lookup("epsilon") >> epsilon_;
106 azizChenCoeffs_.lookup("rm") >> rm_;
107 azizChenCoeffs_.lookup("A") >> A_;
108 azizChenCoeffs_.lookup("alpha") >> alpha_;
109 azizChenCoeffs_.lookup("C6") >> C6_;
110 azizChenCoeffs_.lookup("C8") >> C8_;
111 azizChenCoeffs_.lookup("C10") >> C10_;
112 azizChenCoeffs_.lookup("D") >> D_;
113 azizChenCoeffs_.lookup("gamma") >> gamma_;
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 } // End namespace pairPotentials
122 } // End namespace Foam
124 // ************************************************************************* //