Go to the documentation of this file.
80 rpm_(dict_.lookup(
"rpm")),
88 dict_.readIfPresent(
"bore", bore_);
89 dict_.readIfPresent(
"stroke", stroke_);
90 dict_.readIfPresent(
"clearance", clearance_);
94 startTime_ = degToTime(startTime_);
95 value() = degToTime(value());
96 deltaTSave_ = deltaT_;
129 return theta/(6.0*rpm_.value());
136 return t*(6.0*rpm_.value());
142 return timeToDeg(value());
168 return timeToDeg(deltaTValue());
176 conRodLength_.value()
177 + stroke_.value()/2.0
184 sqr(conRodLength_.value())
197 pistonPosition(theta())
206 "pistonDisplacement",
208 pistonPosition(theta() - deltaTheta()) - pistonPosition().value()
219 pistonDisplacement().value()/(deltaTValue() + VSMALL)
226 return degToTime(theta);
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from string.
A class for handling file names.
scalar deltaTheta() const
Return crank-angle increment.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimVelocity
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionedScalar pistonSpeed() const
Return piston speed for current time step.
Unit conversion functions.
scalar timeToDeg(const scalar t) const
Convert seconds to degrees (for given engine speed in RPM)
virtual bool read()
Read control dictionary, update controls and time.
void timeAdjustment()
Adjust read time values.
Constant dispersed-phase particle diameter model.
const word dictName("particleTrackDict")
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
scalar thetaRevolution() const
Return current crank-angle translated to a single revolution.
virtual scalar timeToUserTime(const scalar t) const
Convert the real-time (s) into user-time (CA deg)
Generic dimensioned Type class.
bool readIfPresent(const dictionary &)
Update the value of dimensioned<Type> if found in the dictionary.
virtual void readDict()
Read the control dictionary and set the write controls etc.
virtual void readDict()
Read the control dictionary and set the write controls etc.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
virtual scalar userTimeToTime(const scalar theta) const
Convert the user-time (CA deg) to real-time (s).
scalar theta() const
Return current crank-angle.
virtual bool read()
Read the controlDict and set all the parameters.
writeControls writeControl_
dimensionedScalar pistonPosition() const
Return current piston position.
engineTime(const engineTime &)
Disallow default bitwise copy construct.
word name(const complex &)
Return a string representation of a complex.
scalar degToTime(const scalar theta) const
Convert degrees to seconds (for given engine speed in RPM)
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar pistonDisplacement() const
Return piston displacement for current time step.