33 namespace tetherPotentials
57 restrainedHarmonicSpringCoeffs_
59 tetherPotentialProperties.typeDict(
typeName)
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_ =
121 restrainedHarmonicSpringCoeffs_.
lookup(
"springConstant") >> springConstant_;
122 restrainedHarmonicSpringCoeffs_.
lookup(
"rR") >> rR_;
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 &tetherPotentialProperties)=0
Read tetherPotential dictionary.
const dictionary & tetherPotentialProperties() const
scalar energy(const vector r) const
bool read(const dictionary &tetherPotentialProperties)
Read dictionary.
vector force(const vector r) const
restrainedHarmonicSpring(const word &name, const dictionary &tetherPotentialProperties)
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(harmonicSpring, 0)
addToRunTimeSelectionTable(tetherPotential, harmonicSpring, 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.
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)