33 namespace functionObjects
50 Foam::functionObjects::multiValveEngineState::mve()
const
52 return refCast<const fvMeshMovers::multiValveEngine>(
mesh_.
mover());
96 writeCommented(
file(),
"Time");
97 writeTabbed(
file(),
"piston from TDC");
98 writeTabbed(
file(),
"piston speed");
99 writeTabbed(
file(),
"piston displacement");
100 writeTabbed(
file(),
"piston clearance");
110 writeTabbed(
file(), valve.
name +
" lift");
111 writeTabbed(
file(), valve.
name +
" speed");
112 writeTabbed(
file(), valve.
name +
" displacement");
135 Log <<
"Piston: " <<
nl
136 <<
" position from TDC: " << piston.
position() <<
" m" <<
nl
137 <<
" speed = " << piston.
speed() <<
" m/s" <<
nl
158 <<
" lift: " << (valve.
isOpen() ? valve.
lift() : 0)
160 << (valve.
isOpen() ?
"(open)" :
"(closed)") <<
nl
161 <<
" speed: " << valve.
speed() <<
" m/s" <<
nl
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static bool master(const label communicator=0)
Am I the master process.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Abstract base-class for Time/database functionObjects.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const fvMesh & mesh_
Reference to the fvMesh.
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...
virtual bool write()
Write function.
Writes the multi-valve engine motion state.
multiValveEngineState(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual void writeFileHeader(const label i)
File header information.
virtual ~multiValveEngineState()
Destructor.
virtual bool execute()
Execute, currently does nothing.
virtual bool write()
Write the multiValveEngineState.
virtual bool read(const dictionary &)
Read the multiValveEngineState data.
virtual bool read(const dictionary &)
Read optional controls.
const word name
Name of the object.
scalar clearance() const
Return clearance estimate.
scalar displacement() const
Return piston displacement for current time-step.
scalar position(const scalar theta) const
Return the piston position for the given CA theta.
scalar speed() const
Return piston position for current time-step.
bool isOpen() const
Is the valve open?
scalar lift(const scalar theta) const
Return valve position for the given time.
scalar displacement() const
Return valve displacement for current time-step.
scalar speed() const
Return current valve speed.
A mesh mover using explicit node translation based on scaled distance functions per moving object....
const valveList & valves
Container for all valves.
const pistonObject & piston
Piston object.
const fvMeshMover & mover() const
Return the mover function class.
A class for handling words, derived from string.
#define Log
Report write to Foam::Info if the local log switch is true.
defineTypeNameAndDebug(adjustTimeStepToCombustion, 0)
addToRunTimeSelectionTable(functionObject, adjustTimeStepToCombustion, dictionary)
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.