OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

engineTime Class Reference

Inheritance diagram for engineTime:

Inheritance graph
[legend]
Collaboration diagram for engineTime:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 58 of file engineTime.H.


Public Member Functions

 engineTime (const word &name, const fileName &rootPath, const fileName &caseName, const fileName &systemName="system", const fileName &constantName="constant")
 Construct from objectRegistry arguments.
virtual ~engineTime ()
scalar degToRad (const scalar rad) const
 Convert degrees to radians.
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).
scalar pistonPosition (const scalar theta) const
 Calculate the piston position from the engine geometry.
const dictionary & engineDict () const
 Return the engine geometry dictionary.
const dimensionedScalar & conRodLength () const
 Return the engines connecting-rod length.
const dimensionedScalar & bore () const
 Return the engines bore.
const dimensionedScalar & stroke () const
 Return the engines stroke.
const dimensionedScalar & clearance () const
 Return the engines clearance-gap.
const dimensionedScalar & rpm () const
 Return the engines current operating RPM.
scalar theta () const
 Return current crank-angle.
scalar thetaRevolution () const
 Return current crank-angle translated to a single revolution.
scalar deltaTheta () const
 Return crank-angle increment.
dimensionedScalar pistonPosition () const
 Return current piston position.
dimensionedScalar pistonDisplacement () const
 Return piston displacement for current time step.
dimensionedScalar pistonSpeed () const
 Return piston speed for current time step.
scalar userTimeToTime (const scalar theta) const
 Convert the user-time (CA deg) to real-time (s).
scalar timeToUserTime (const scalar t) const
 Convert the real-time (s) into user-time (CA deg).
bool read ()
 Read the controlDict and set all the parameters.

Constructor & Destructor Documentation

engineTime ( const word &  name,
const fileName &  rootPath,
const fileName &  caseName,
const fileName &  systemName = "system",
const fileName &  constantName = "constant" 
)

Construct from objectRegistry arguments.

virtual ~engineTime (  )  [inline, virtual]

Definition at line 98 of file engineTime.H.


Member Function Documentation

scalar degToRad ( const scalar  rad  )  const

Convert degrees to radians.

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).

scalar pistonPosition ( const scalar  theta  )  const

Calculate the piston position from the engine geometry.

and given crank angle.

const dictionary& engineDict (  )  const [inline]

Return the engine geometry dictionary.

Definition at line 125 of file engineTime.H.

const dimensionedScalar& conRodLength (  )  const [inline]

Return the engines connecting-rod length.

Definition at line 131 of file engineTime.H.

const dimensionedScalar& bore (  )  const [inline]

Return the engines bore.

Definition at line 137 of file engineTime.H.

const dimensionedScalar& stroke (  )  const [inline]

Return the engines stroke.

Definition at line 143 of file engineTime.H.

const dimensionedScalar& clearance (  )  const [inline]

Return the engines clearance-gap.

Definition at line 149 of file engineTime.H.

const dimensionedScalar& rpm (  )  const [inline]

Return the engines current operating RPM.

Definition at line 155 of file engineTime.H.

scalar theta (  )  const

Return current crank-angle.

scalar thetaRevolution (  )  const

Return current crank-angle translated to a single revolution.

(value between -180 and 180 with 0 = top dead centre)

scalar deltaTheta (  )  const

Return crank-angle increment.

dimensionedScalar pistonPosition (  )  const

Return current piston position.

dimensionedScalar pistonDisplacement (  )  const

Return piston displacement for current time step.

dimensionedScalar pistonSpeed (  )  const

Return piston speed for current time step.

scalar userTimeToTime ( const scalar  theta  )  const [virtual]

Convert the user-time (CA deg) to real-time (s).

Reimplemented from TimeState.

scalar timeToUserTime ( const scalar  t  )  const [virtual]

Convert the real-time (s) into user-time (CA deg).

Reimplemented from TimeState.

bool read (  )  [virtual]

Read the controlDict and set all the parameters.

Reimplemented from Time.


The documentation for this class was generated from the following file: Copyright © 2000-2007 OpenCFD Ltd