44 void Foam::crankConRod::timeAdjustment()
61 Foam::crankConRod::crankConRod
64 const fileName& rootPath,
65 const fileName& caseName,
66 const fileName& systemName,
67 const fileName& constantName,
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);
virtual void readDict()
Read the control dictionary and set the write controls etc.
const Type & value() const noexcept
Return const reference to value.
virtual scalar theta() const
Return current crank-angle.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Unit conversion functions.
const word dictName("faMeshDefinition")
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensionedScalar pistonPosition() const
Return current piston position.
const dimensionSet dimless
Dimensionless.
writeControls writeControl_
Macros for easy insertion into run-time selection tables.
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 bool read()
Read the controlDict and set all the parameters.
"adjustable" / "adjustableRunTime"
dimensionedScalar cos(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
virtual scalar timeToUserTime(const scalar t) const
Convert the real-time (s) into user-time (CA deg)
dimensionedScalar sin(const dimensionedScalar &ds)
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
virtual void readDict()
Read the control dictionary and set the write controls etc.
scalar degToTime(const scalar theta) const
Convert degrees to seconds (for given engine speed in RPM)
defineTypeNameAndDebug(combustionModel, 0)
virtual scalar userTimeToTime(const scalar theta) const
Convert the user-time (CA deg) to real-time (s).
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
virtual bool read()
Read control dictionary, update controls and time.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
virtual word unit() const
Return time unit.
scalar thetaRevolution() const
Return current crank-angle translated to a single revolution.
static constexpr const zero Zero
Global zero (0)