Go to the documentation of this file.
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_);
const Cmpt & x() const
Access to the vector x component.
A class for handling words, derived from Foam::string.
const Cmpt & z() const
Access to the vector z component.
scalar energy(const vector r) const
virtual bool read(const dictionary &tetherPotentialProperties)=0
Read tetherPotential dictionary.
pitchForkRing(const word &name, const dictionary &tetherPotentialProperties)
Construct from components.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Vector< scalar > vector
A scalar version of the templated Vector.
vector force(const vector r) const
bool read(const dictionary &tetherPotentialProperties)
Read dictionary.
const Cmpt & y() const
Access to the vector y component.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
defineTypeNameAndDebug(harmonicSpring, 0)
const dictionary & tetherPotentialProperties() const
dimensionedScalar sqrt(const dimensionedScalar &ds)
addToRunTimeSelectionTable(tetherPotential, harmonicSpring, dictionary)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.