44void Foam::crankConRod::timeAdjustment()
126 return theta/(6.0*rpm_.value());
133 return t*(6.0*rpm_.value());
139 return timeToDeg(value());
169 return timeToDeg(deltaTValue());
177 conRodLength_.value()
178 + stroke_.value()/2.0
185 sqr(conRodLength_.value())
195 return degToTime(theta);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
virtual void readDict()
Read the control dictionary and set the write controls etc.
@ wcAdjustableRunTime
"adjustable" / "adjustableRunTime"
writeControls writeControl_
virtual bool read()
Read control dictionary, update controls and time.
Manage time in terms of engine RPM and crank-angle.
virtual void readDict()
Read the control dictionary and set the write controls etc.
virtual scalar timeToUserTime(const scalar t) const
Convert the real-time (s) into user-time (CA deg)
virtual scalar theta() const
Return current crank-angle.
virtual scalar userTimeToTime(const scalar theta) const
Convert the user-time (CA deg) to real-time (s).
scalar thetaRevolution() const
Return current crank-angle translated to a single revolution.
scalar degToTime(const scalar theta) const
Convert degrees to seconds (for given engine speed in RPM)
scalar timeToDeg(const scalar t) const
Convert seconds to degrees (for given engine speed in RPM)
virtual scalar deltaTheta() const
Return crank-angle increment.
virtual word unit() const
Return time unit.
virtual bool read()
Read the controlDict and set all the parameters.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
const scalar & value() const
Return const reference to value.
An abstract class for the time description of the piston motion.
dimensionedScalar pistonPosition() const
Return current piston position.
A class for handling file names.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const word dictName("faMeshDefinition")
const dimensionSet dimless
Dimensionless.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
dimensionedScalar sin(const dimensionedScalar &ds)
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
dimensionedScalar sqrt(const dimensionedScalar &ds)
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
dimensionedScalar cos(const dimensionedScalar &ds)
Unit conversion functions.