33 namespace tetherPotentials
43 restrainedHarmonicSpring,
57 restrainedHarmonicSpringCoeffs_
59 tetherPotentialProperties.
subDict(typeName +
"Coeffs")
63 restrainedHarmonicSpringCoeffs_.template lookup<scalar>
70 restrainedHarmonicSpringCoeffs_.template lookup<scalar>
86 return 0.5 * springConstant_ *
magSqr(r);
90 return 0.5 * springConstant_ * rR_ * rR_
91 + springConstant_ * rR_ * (magR - rR_);
102 return -springConstant_ * r;
106 return -springConstant_ * rR_ * r / magR;
118 restrainedHarmonicSpringCoeffs_ =
119 tetherPotentialProperties.
subDict(typeName +
"Coeffs");
121 restrainedHarmonicSpringCoeffs_.
lookup(
"springConstant") >> springConstant_;
122 restrainedHarmonicSpringCoeffs_.
lookup(
"rR") >> rR_;
A list of keyword definitions, which are a keyword followed by any number of values (e...
Macros for easy insertion into run-time selection tables.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
bool read(const dictionary &tetherPotentialProperties)
Read dictionary.
virtual bool read(const dictionary &tetherPotentialProperties)=0
Read tetherPotential dictionary.
A class for handling words, derived from string.
defineTypeNameAndDebug(harmonicSpring, 0)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
scalar energy(const vector r) const
restrainedHarmonicSpring(const word &name, const dictionary &tetherPotentialProperties)
Construct from components.
dimensioned< scalar > mag(const dimensioned< Type > &)
addToRunTimeSelectionTable(tetherPotential, harmonicSpring, dictionary)
vector force(const vector r) const
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.