Go to the documentation of this file.
44 void Foam::crankConRod::timeAdjustment()
61 Foam::crankConRod::crankConRod
87 dict_.readIfPresent(
"bore", bore_);
88 dict_.readIfPresent(
"stroke", stroke_);
89 dict_.readIfPresent(
"clearance", clearance_);
93 startTime_ = degToTime(startTime_);
94 value() = degToTime(value());
96 deltaT_ = degToTime(deltaT_);
97 deltaTSave_ = deltaT_;
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);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
A class for handling words, derived from Foam::string.
A class for handling file names.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static constexpr const zero Zero
Global zero (0)
dimensionedScalar sin(const dimensionedScalar &ds)
virtual scalar deltaTheta() const
Return crank-angle increment.
virtual word unit() const
Return time unit.
const word dictName("faMeshDefinition")
Unit conversion functions.
virtual bool read()
Read the controlDict and set all the parameters.
virtual bool read()
Read control dictionary, update controls and time.
virtual scalar userTimeToTime(const scalar theta) const
Convert the user-time (CA deg) to real-time (s).
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
bool readIfPresent(const dictionary &dict)
scalar thetaRevolution() const
Return current crank-angle translated to a single revolution.
virtual scalar theta() const
Return current crank-angle.
An abstract class for the time description of the piston motion.
Macros for easy insertion into run-time selection tables.
"adjustable" / "adjustableRunTime"
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
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)
scalar timeToDeg(const scalar t) const
Convert seconds to degrees (for given engine speed in RPM)
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.
writeControls writeControl_
defineTypeNameAndDebug(combustionModel, 0)
scalar degToTime(const scalar theta) const
Convert degrees to seconds (for given engine speed in RPM)
dimensionedScalar pistonPosition() const
Return current piston position.
virtual void readDict()
Read the control dictionary and set the write controls etc.
const dimensionSet dimless
Dimensionless.
dimensionedScalar cos(const dimensionedScalar &ds)