33 namespace pairPotentials
57 lennardJonesCoeffs_(pairPotentialProperties.typeDict(
typeName)),
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & typeDict(const word &typeName) const
Find and return a type 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.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
defineTypeNameAndDebug(azizChen, 0)
addToRunTimeSelectionTable(pairPotential, azizChen, dictionary)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.