35namespace 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_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
virtual bool read()
Re-read model coefficients if they have changed.
const Cmpt & z() const
Access to the vector z component.
const Cmpt & y() const
Access to the vector y component.
const Cmpt & x() const
Access to the vector x 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, bool mandatory=true) const
Base class for film (stress-based) force models.
const dictionary & tetherPotentialProperties() const
scalar energy(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)
dimensionedScalar sqrt(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.