33 namespace tetherPotentials
59 tetherPotentialProperties.typeDict(
typeName)
61 mu_(pitchForkRingCoeffs_.template
lookup<scalar>(
"mu")),
62 alpha_(pitchForkRingCoeffs_.template
lookup<scalar>(
"alpha")),
63 rOrbit_(pitchForkRingCoeffs_.template
lookup<scalar>(
"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_ =
104 pitchForkRingCoeffs_.
lookup(
"mu") >> mu_;
105 pitchForkRingCoeffs_.
lookup(
"alpha") >> alpha_;
106 pitchForkRingCoeffs_.
lookup(
"rOrbit") >> rOrbit_;
Macros for easy insertion into run-time selection tables.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & typeDict(const word &typeName) const
Find and return a type sub-dictionary.
virtual bool read(const dictionary &tetherPotentialProperties)=0
Read tetherPotential dictionary.
const dictionary & tetherPotentialProperties() const
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
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
defineTypeNameAndDebug(harmonicSpring, 0)
addToRunTimeSelectionTable(tetherPotential, harmonicSpring, dictionary)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Vector< scalar > vector
A scalar version of the templated Vector.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)