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_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
const Cmpt & x() const noexcept
Access to the vector x component.
const Cmpt & z() const noexcept
Access to the vector z component.
const Cmpt & y() const noexcept
Access to the vector y component.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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, 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,...
const dictionary & tetherPotentialProperties() const
virtual bool read(const dictionary &tetherPotentialProperties)=0
Read tetherPotential dictionary.
tetherPotential(const tetherPotential &)=delete
No copy construct.
scalar energy(const vector r) const
pitchForkRing(const word &name, const dictionary &tetherPotentialProperties)
Construct from components.
bool read(const dictionary &tetherPotentialProperties)
Read dictionary.
vector force(const vector r) const
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
dimensionedScalar sqrt(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.