35 namespace tetherPotentials
45 restrainedHarmonicSpring,
59 restrainedHarmonicSpringCoeffs_
61 tetherPotentialProperties.subDict(typeName +
"Coeffs")
65 restrainedHarmonicSpringCoeffs_.
get<scalar>(
"springConstant")
69 restrainedHarmonicSpringCoeffs_.
get<scalar>(
"rR")
81 return 0.5 * springConstant_ *
magSqr(r);
85 return 0.5 * springConstant_ * rR_ * rR_
86 + springConstant_ * rR_ * (magR - rR_);
97 return -springConstant_ * r;
101 return -springConstant_ * rR_ * r / magR;
113 restrainedHarmonicSpringCoeffs_ =
116 restrainedHarmonicSpringCoeffs_.
readEntry(
"springConstant", springConstant_);
117 restrainedHarmonicSpringCoeffs_.
readEntry(
"rR", rR_);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
Macros for easy insertion into run-time selection tables.
bool read(const dictionary &tetherPotentialProperties)
Read dictionary.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
virtual bool read(const dictionary &tetherPotentialProperties)=0
Read tetherPotential dictionary.
A class for handling words, derived from Foam::string.
defineTypeNameAndDebug(harmonicSpring, 0)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
scalar energy(const vector r) const
restrainedHarmonicSpring(const word &name, const dictionary &tetherPotentialProperties)
Construct from components.
addToRunTimeSelectionTable(tetherPotential, harmonicSpring, dictionary)
vector force(const vector r) const
const dictionary & tetherPotentialProperties() const
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)