35 namespace tetherPotentials
61 tetherPotentialProperties.subDict(typeName +
"Coeffs")
63 mu_(pitchForkRingCoeffs_.
get<scalar>(
"mu")),
64 alpha_(pitchForkRingCoeffs_.
get<scalar>(
"alpha")),
65 rOrbit_(pitchForkRingCoeffs_.
get<scalar>(
"rOrbit"))
73 scalar
p =
sqrt(r.x()*r.x() + r.y()*r.y());
75 scalar pMinusRSqr =
sqr(
p - rOrbit_);
78 -0.5 * mu_ * pMinusRSqr
79 + 0.25 * pMinusRSqr * pMinusRSqr
80 + 0.5 * alpha_ * r.z() * r.z();
86 scalar
p =
sqrt(r.x()*r.x() + r.y()*r.y());
88 scalar pMinusR = (
p - rOrbit_);
92 (mu_ -
sqr(pMinusR)) * pMinusR * r.x()/(
p + VSMALL),
93 (mu_ -
sqr(pMinusR)) * pMinusR * r.y()/(
p + VSMALL),
103 pitchForkRingCoeffs_ =
106 pitchForkRingCoeffs_.
readEntry(
"mu", mu_);
107 pitchForkRingCoeffs_.
readEntry(
"alpha", alpha_);
108 pitchForkRingCoeffs_.
readEntry(
"rOrbit", rOrbit_);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
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 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...
pitchForkRing(const word &name, const dictionary &tetherPotentialProperties)
Construct from components.
scalar energy(const vector r) const
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::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...
vector force(const vector r) const
addToRunTimeSelectionTable(tetherPotential, harmonicSpring, dictionary)
const dictionary & tetherPotentialProperties() const
bool read(const dictionary &tetherPotentialProperties)
Read dictionary.