33 namespace tetherPotentials
59 tetherPotentialProperties.
subDict(typeName +
"Coeffs")
61 mu_(
readScalar(pitchForkRingCoeffs_.lookup(
"mu"))),
62 alpha_(
readScalar(pitchForkRingCoeffs_.lookup(
"alpha"))),
63 rOrbit_(
readScalar(pitchForkRingCoeffs_.lookup(
"rOrbit")))
71 scalar
p =
sqrt(r.
x()*r.
x() + r.
y()*r.
y());
73 scalar pMinusRSqr =
sqr(p - rOrbit_);
76 -0.5 * mu_ * pMinusRSqr
77 + 0.25 * pMinusRSqr * pMinusRSqr
78 + 0.5 * alpha_ * r.
z() * r.
z();
84 scalar
p =
sqrt(r.
x()*r.
x() + r.
y()*r.
y());
86 scalar pMinusR = (p - rOrbit_);
90 (mu_ -
sqr(pMinusR)) * pMinusR * r.
x()/(p + VSMALL),
91 (mu_ -
sqr(pMinusR)) * pMinusR * r.
y()/(p + VSMALL),
101 pitchForkRingCoeffs_ =
102 tetherPotentialProperties.
subDict(typeName +
"Coeffs");
104 pitchForkRingCoeffs_.
lookup(
"mu") >> mu_;
105 pitchForkRingCoeffs_.
lookup(
"alpha") >> alpha_;
106 pitchForkRingCoeffs_.
lookup(
"rOrbit") >> rOrbit_;
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Vector< scalar > vector
A scalar version of the templated Vector.
Macros for easy insertion into run-time selection tables.
pitchForkRing(const word &name, const dictionary &tetherPotentialProperties)
Construct from components.
virtual bool read(const dictionary &tetherPotentialProperties)=0
Read tetherPotential dictionary.
A class for handling words, derived from string.
scalar energy(const vector r) const
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
defineTypeNameAndDebug(harmonicSpring, 0)
addToRunTimeSelectionTable(tetherPotential, harmonicSpring, dictionary)
vector force(const vector r) const
bool read(const dictionary &tetherPotentialProperties)
Read dictionary.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.