Go to the documentation of this file.
35 namespace pairPotentials
59 lennardJonesCoeffs_(pairPotentialProperties.
subDict(typeName +
"Coeffs")),
60 sigma_(lennardJonesCoeffs_.get<scalar>(
"sigma")),
61 epsilon_(lennardJonesCoeffs_.get<scalar>(
"epsilon"))
72 scalar ir2 = (sigma_/r)*(sigma_/r);
75 scalar ir6 = ir2*ir2*ir2;
77 return 4.0 * epsilon_*(ir6*(ir6 - 1.0));
87 lennardJonesCoeffs_.
readEntry(
"sigma", sigma_);
88 lennardJonesCoeffs_.
readEntry(
"epsilon", epsilon_);
A class for handling words, derived from Foam::string.
addToRunTimeSelectionTable(pairPotential, azizChen, dictionary)
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
defineTypeNameAndDebug(azizChen, 0)
Macros for easy insertion into run-time selection tables.
const dictionary & pairPotentialProperties() const
bool read(const dictionary &pairPotentialProperties)
Read dictionary.
lennardJones(const word &name, const dictionary &pairPotentialProperties)
Construct from components.
virtual bool read(const dictionary &pairPotentialProperties)=0
Read pairPotential dictionary.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
scalar unscaledEnergy(const scalar r) const