33 namespace pairPotentials
57 lennardJonesCoeffs_(pairPotentialProperties.subDict(typeName +
"Coeffs")),
58 sigma_(lennardJonesCoeffs_.template lookup<scalar>(
"sigma")),
59 epsilon_(lennardJonesCoeffs_.template lookup<scalar>(
"epsilon"))
70 scalar ir2 = (sigma_/r)*(sigma_/r);
73 scalar ir6 = ir2*ir2*ir2;
75 return 4.0 * epsilon_*(ir6*(ir6 - 1.0));
85 lennardJonesCoeffs_.
lookup(
"sigma") >> sigma_;
86 lennardJonesCoeffs_.
lookup(
"epsilon") >> epsilon_;
Macros for easy insertion into run-time selection tables.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
virtual bool read(const dictionary &pairPotentialProperties)=0
Read pairPotential dictionary.
const dictionary & pairPotentialProperties() const
bool read(const dictionary &pairPotentialProperties)
Read dictionary.
scalar unscaledEnergy(const scalar r) const
lennardJones(const word &name, const dictionary &pairPotentialProperties)
Construct from components.
A class for handling words, derived from string.
defineTypeNameAndDebug(azizChen, 0)
addToRunTimeSelectionTable(pairPotential, azizChen, dictionary)
word name(const bool)
Return a word representation of a bool.