44void Foam::crankConRod::timeAdjustment()
61Foam::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());
177 conRodLength_.value()
178 + stroke_.value()/2.0
185 sqr(conRodLength_.value())
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
scalar deltaTValue() const noexcept
Return time step value.
virtual void readDict()
Read the control dictionary and set the write controls etc.
@ wcAdjustableRunTime
"adjustable" / "adjustableRunTime"
const fileName & rootPath() const noexcept
The root path.
writeControls writeControl_
virtual bool read()
Read control dictionary, update controls and time.
const fileName & caseName() const noexcept
The case name.
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
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
const scalar & value() const noexcept
An abstract class for the time description of the piston motion.
engineTime(const word &name, const fileName &rootPath, const fileName &caseName, const fileName &systemName="system", const fileName &constantName="constant", const fileName &dictName="engineGeometry")
Construct from objectRegistry arguments.
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(const scalar deg) noexcept
Conversion from degrees to radians.
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 expressions::valueTypeCode::INVALID.
dimensionedScalar cos(const dimensionedScalar &ds)
Unit conversion functions.