Go to the documentation of this file.
37 scalar adjustedTheta = theta;
48 scalar adjustedTheta = theta;
72 const word& bottomPatchName,
73 const word& poppetPatchName,
74 const word& stemPatchName,
75 const word& curtainInPortPatchName,
76 const word& curtainInCylinderPatchName,
77 const word& detachInCylinderPatchName,
78 const word& detachInPortPatchName,
80 const graph& liftProfile,
82 const scalar minTopLayer,
83 const scalar maxTopLayer,
84 const scalar minBottomLayer,
85 const scalar maxBottomLayer,
91 engineDB_(refCast<const engineTime>(
mesh.
time())),
100 detachFaces_(detachFaces),
101 liftProfile_(liftProfile),
102 liftProfileStart_(
min(liftProfile_.x())),
103 liftProfileEnd_(
max(liftProfile_.x())),
105 minTopLayer_(minTopLayer),
106 maxTopLayer_(maxTopLayer),
107 minBottomLayer_(minBottomLayer),
108 maxBottomLayer_(maxBottomLayer),
123 engineDB_(refCast<const engineTime>(mesh_.time())),
140 curtainInCylinderPatch_
145 detachInCylinderPatch_
156 liftProfile_(
"theta",
"lift", name_,
dict.
lookup(
"liftProfile")),
157 liftProfileStart_(
min(liftProfile_.x())),
158 liftProfileEnd_(
max(liftProfile_.x())),
177 adjustCrankAngle(theta),
186 return lift(engineDB_.theta()) >= minLift_;
194 lift(engineDB_.theta()),
207 lift(engineDB_.theta() - engineDB_.deltaTheta()),
210 )/(engineDB_.deltaTValue() + VSMALL);
219 if (bottomPatch_.active())
221 mpIDs[nMpIDs] = bottomPatch_.index();
225 if (poppetPatch_.active())
227 mpIDs[nMpIDs] = poppetPatch_.index();
246 <<
"curtainInPortPatch " << curtainInPortPatch_.name()
248 <<
"curtainInCylinderPatch " << curtainInCylinderPatch_.name()
250 <<
"detachInCylinderPatch " << detachInCylinderPatch_.name()
252 <<
"detachInPortPatch " << detachInPortPatch_.name()
scalar liftProfileStart_
Lift curve start angle.
scalar curVelocity() const
Return valve velocity for current time-step.
scalar curLift() const
Return current lift.
Class to create, store and output qgraph files.
A class for handling words, derived from string.
scalar adjustCrankAngle(const scalar theta) const
Adjust crank angle to drop within the limits of the lift profile.
bool isOpen() const
Is the valve open?
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Field< Type > interpolateXY(const scalarField &xNew, const scalarField &xOld, const Field< Type > &yOld)
Mesh consisting of general polyhedral cells.
scalar liftProfileEnd_
Lift curve end angle.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Interpolates y values from one curve to another with a different x distribution.
A list of keyword definitions, which are a keyword followed by any number of values (e....
void writeDict(Ostream &) const
Write dictionary.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
engineValve(const engineValve &)
Disallow default bitwise copy construct.
void setSize(const label)
Reset size of List.
scalar lift(const scalar theta) const
Return valve lift given crank angle in degrees.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
labelList movingPatchIDs() const
Return list of active patch labels for the valve head.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const Time & time() const
Return the top-level database.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
virtual const fileName & name() const
Return the name of the stream.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
static autoPtr< coordinateSystem > New(const objectRegistry &obr, const dictionary &dict)
Select constructed from dictionary and objectRegistry.
word name(const complex &)
Return a string representation of a complex.