AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxDriveTrain::CombustionEngine Class Reference

The model of the combustion engine consists of two subsystems: namely, the intake manifold dynamics and the rotational dynamics. More...

#include <CombustionEngine.h>

+ Inheritance diagram for agxDriveTrain::CombustionEngine:

Public Member Functions

 CombustionEngine ()
 Create a combustion engine.
 
 CombustionEngine (const CombustionEngineParameters &params)
 Create a combustion engine from specific parameters.
 
agx::Real computeCylinderAirMassFlowRate (agx::Real N, agx::Real p)
 Compute the engine air mass flow rate at current engine speed N and inlet pressure p.
 
agx::Real computeFrictionTorque (agx::Real N)
 Compute the engine friction torque losses.
 
agx::Real computeIndicatedTorque (agx::Real N, agx::Real p)
 Compute the engine indicated torque.
 
agx::Real computePumpTorque (agx::Real p)
 Compute the pumping torque losses.
 
agx::Real getAirFuelRatio () const
 
CombustionEngineParameters & getCombustionEngineParameters ()
 Return directly a reference to allow the constructs like engine.getCombustionEngineParameters().displacementVolume; engine.getCombustionEngineParameters().maxTorque; Warning: there is no setCombustionEngineParameters() method, since that requires reinitialization.
 
agx::Real getCurrentVolumetricEfficiency () const
 
agx::Real getCylinderAirMassFlow ()
 
bool getEnable () const
 
agx::Real getFrictionTorque () const
 
agx::Real getFuelConsumptionRate ()
 
agx::Real getHeatValue () const
 
agx::Real getIdleThrottleAngle () const
 
agx::Real getIndicatedTorque () const
 
agx::Real getInletPressure () const
 Get the current pressure in the inlet manifold.
 
agx::Real getInletTemperature () const
 
agx::Real getInletVolume () const
 
agx::Real getMaxThrottleAngle () const
 
agx::Real getMaxVolumetricEfficiency () const
 
CombustionEngineParameters::RevolutionsPerCycle getNrRevolutionsPerCycle () const
 
agx::Real getOutputTorque () const
 
agx::Real getPumpTorque () const
 
agx::Real getRPM () const
 returns the number of revolutions per minute
 
agx::Real getThermalEfficiency () const
 
agx::Real getThrottle () const
 
agx::Real getThrottleAirMassFlow ()
 
agx::Real getThrottleAngle () const
 
agx::Real getThrottlePinBoreRatio () const
 
agx::Real getVolumetricEfficiency (agx::Real N, agx::Real p) const
 
bool loadLibraryProperties (const agx::String &name)
 Load named CombustionEngineParameters from the Material Library for the current CombustionEngine.
 
bool setAirFuelRatio (agx::Real ratio)
 Set the stoichiometric air-fuel ratio.
 
void setCombustionEngineParameters (const CombustionEngineParameters &parameters)
 Set the parameters for this combustion engine.
 
void setEnable (bool enable)
 Must be called to start the engine.
 
bool setHeatValue (agx::Real heatValue)
 Set the heat value of the fuel, Unit: J/kg.
 
bool setIdleThrottleAngle (agx::Real throttleAngle)
 Set the idle throttle angle, i.e.
 
void setInletTemperature (agx::Real inletTemperature)
 The inlet manifold is where the fuel and air to be mixed.
 
bool setInletVolume (agx::Real inletVolume)
 Set the inlet manifold volume of the engine.
 
bool setMaxThrottleAngle (agx::Real throttleAngle)
 Set the maximum angle that the throttle plate is allowed to have, i.e.
 
bool setMaxVolumetricEfficiency (agx::Real maxVolumetricEfficiency)
 Set the maximum volumetric efficiency of the engine.
 
void setNrRevolutionsPerCycle (CombustionEngineParameters::RevolutionsPerCycle nrRevolutionsPerCycle)
 Set the number of crankshaft revolutions during one engine operating cycle.
 
bool setThrottle (agx::Real throttle)
 Set the fraction or the percentage of the throttle openning.
 
bool setThrottleAngle (agx::Real throttleAngle)
 Set the opening angle of the throttle plate directly, as opposed to the fraction/percentage of the throttle opening.
 
bool setThrottleAngleRange (agx::Real min, agx::Real max)
 Set the minimum and maximum angle that the throttle plate is allowed to have, i.e.
 
bool setThrottlePinBoreRatio (agx::Real throttlePinBoreRatio)
 Set the ratio between throttle pin diameter and throttle bore diameter.
 
- Public Member Functions inherited from agxDriveTrain::Shaft
 Shaft ()
 Create a shaft.
 
 AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxDriveTrain::Shaft)
 
agx::Real getAccumulatedAngle () const
 
virtual bool postUpdate (agx::Real timeStep) override
 Post update will update the accumulated angle.
 
virtual bool preUpdate (agx::Real timeStep) override
 Functions called by a static function.
 
virtual bool restore (agxStream::StorageStream &str) override
 Restores internal data from stream.
 
void setAccumulatedAngle (agx::Real angle)
 Set the accumulated shaft angle in radians.
 
virtual bool store (agxStream::StorageStream &str) const override
 Stores internal data into stream.
 
- Public Member Functions inherited from agxPowerLine::RotationalUnit
 RotationalUnit ()
 Create a rotational unit.
 
 RotationalUnit (agx::RigidBody *body, agx::UInt8 slot)
 
 AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxPowerLine::RotationalUnit)
 
agx::Real getAngle () const
 
agx::Real getAngularVelocity () const
 returns the number of radians per second
 
virtual agx::Real getDeliveredTorque () const
 returns the amount of torque delivered from the rotational dimension
 
virtual agx::Vec3 getDirection () const
 returns a vector in world coordinates that defines the rotational axis of the rotational unit.
 
virtual agx::Real getInertia () const
 
agxPowerLine::RotationalDimension * getRotationalDimension () const
 returns a pointer to the rotational dimension
 
agx::Real getRPM () const
 returns the number of revolutions per minute
 
virtual bool postUpdate (agx::Real timeStep) override
 
virtual bool preUpdate (agx::Real timeStep) override
 
virtual bool restore (agxStream::StorageStream &str) override
 Restores internal data from stream.
 
void setAngularVelocityDamping (agx::Real damping)
 set the angular velocity damping around the local axis (direction)
 
virtual void setInertia (agx::Real inertia)
 set the inertia for the rotational dimension of the rotational unit.
 
virtual bool store (agxStream::StorageStream &str) const override
 Stores internal data into stream.
 
- Public Member Functions inherited from agxPowerLine::Unit
 Unit ()
 Constructor.
 
void addNotification (agxPowerLine::PowerLine *powerLine)
 
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agxPowerLine::Unit)
 
void attach (agx::RigidBody *body)
 Define which body in the simulation this Unit is attached to.
 
agx::String buildDimensionsName () const
 
virtual bool connect (agxPowerLine::Connector *connector)
 Connect the unit to a connector.
 
virtual bool connect (agxPowerLine::Side mySide, agxPowerLine::Side connectorSide, agxPowerLine::Connector *connector)
 Connect the unit to a connector, specifying the side of each.
 
virtual bool connect (agxPowerLine::Side mySide, agxPowerLine::Side otherSide, agxPowerLine::Unit *other)
 
virtual bool connect (agxPowerLine::Unit *otherUnit)
 Connect the unit to another unit.
 
virtual bool disconnect (agxPowerLine::Unit *unit)
 
void disconnectAll ()
 
agxPowerLine::PhysicalDimension * getActiveDimension (size_t index)
 
const agxPowerLine::PhysicalDimension * getActiveDimension (size_t index) const
 
virtual agxPowerLine::DimensionAndSide getConnectableDimension (agxPowerLine::PhysicalDimension::Type type, agxPowerLine::Side side)
 
virtual void getConnectableDimensionTypes (agxPowerLine::PhysicalDimension::TypeVector &types, agxPowerLine::Side side) const
 
agxPowerLine::PhysicalDimension * getConnectableInputDimension (agxPowerLine::PhysicalDimension::Type type)
 
agxPowerLine::PhysicalDimension * getConnectableOutputDimension (agxPowerLine::PhysicalDimension::Type type)
 
void getConnectedUnits (UnitPtrSetVector &result, agxPowerLine::Side side)
 
size_t getConnectors (agxPowerLine::ConnectorPtrVector &result) const
 
size_t getConnectors (const agxPowerLine::Unit *unit, agxPowerLine::ConnectorPtrVector &result)
 Append all connectors connecting this Unit to the given Unit to the 'result' Vector.
 
agxPowerLine::PhysicalDimension * getDimension (agxPowerLine::PhysicalDimension::Type type)
 
const agxPowerLine::PhysicalDimension * getDimension (agxPowerLine::PhysicalDimension::Type type) const
 
agxPowerLine::PhysicalDimensionRefVector & getDimensions ()
 
const agxPowerLine::PhysicalDimensionRefVector & getDimensions () const
 
Connector * getFirstInputConnector (const agxPowerLine::Unit *unit) const
 
Connector * getFirstOutputConnector (const agxPowerLine::Unit *unit) const
 
bool getIgnoreForStoreRestoreStream () const
 
size_t getInputConnectors (agxPowerLine::ConnectorPtrVector &result) const
 
size_t getInputConnectors (const agxPowerLine::Unit *unit, agxPowerLine::ConnectorPtrVector &result)
 
size_t getNumActiveDimensions () const
 The number of non-null PhysicalDimension in this Unit, not including internal Units.
 
virtual size_t getNumConnectableDimensions (Side side) const
 
size_t getNumConnections () const
 
size_t getOutputConnectors (agxPowerLine::ConnectorPtrVector &result) const
 
size_t getOutputConnectors (const agxPowerLine::Unit *unit, agxPowerLine::ConnectorPtrVector &result)
 
void getOwnConnectedUnits (UnitPtrSetVector &unitSet, agxPowerLine::Side side, bool startFromCleanUnitSet=true) const
 
void getOwnConnectedUnits (UnitPtrSetVector &unitSet, bool startFromCleanUnitSet=true) const
 Constructs the set of Units connected to this Unit's own dimensions.
 
agxPowerLine::PowerLine * getPowerLine () const
 
agxPowerLine::Unit * getRoot () const
 
agxPowerLine::Side getSide (const Connector *connector) const
 
bool hasConnector (const Connector *connector) const
 
virtual bool isConnected (agxPowerLine::Unit *otherUnit) const
 
virtual bool isValid () const
 
virtual bool postRestore (agxStream::StorageStream &str)
 
virtual bool postStore (agxStream::StorageStream &str) const
 
void removeNotification (agxPowerLine::PowerLine *powerLine)
 
virtual void restore (agxStream::InputArchive &in) override
 
virtual bool restore (agxStream::StorageStream &str) override
 Restores internal data from stream.
 
void setRoot (agxPowerLine::Unit *root)
 
void spreadRootToGraph ()
 
virtual void store (agxStream::OutputArchive &out) const override
 
virtual bool store (agxStream::StorageStream &str) const override
 Stores internal data into stream.
 
virtual bool vetoConnect (agxPowerLine::Connector *connector) const
 
- Public Member Functions inherited from agxPowerLine::SubGraph
 SubGraph ()
 
virtual bool addNotification (agxSDK::Simulation *simulation)=0
 
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agxPowerLine::SubGraph)
 
virtual void getConnectorsRecursive (ConnectorPtrVector &connectors)
 Fill the given vector with the Connectors that are held by this SubGraph.
 
Connector * getEnclosingConnector ()
 
const Connector * getEnclosingConnector () const
 
SubGraph * getEnclosingGraph ()
 
const SubGraph * getEnclosingGraph () const
 
Unit * getEnclosingUnit ()
 
const Unit * getEnclosingUnit () const
 
const agxPowerLine::ConnectorRefVector & getInternalConnectors () const
 
const agxPowerLine::UnitRefVector & getInternalUnits () const
 
const agx::Name & getName () const
 
SubGraph * getRootEnclosingGraph ()
 
const SubGraph * getRootEnclosingGraph () const
 
virtual void getUnitsRecursive (UnitPtrVector &units)
 Fill the given vector with the Units that are held by this SubGraph.
 
bool isEnclosedWithin (const SubGraph *component) const
 
virtual bool postUpdate (agx::Real timeStep)
 
virtual void prepareForRestore ()
 
virtual void prepareForStore ()
 
virtual bool preUpdate (agx::Real timeStep)
 
virtual bool removeNotification (agxUtil::ConstraintHolder *holder, agxSDK::Simulation *simulation)=0
 
virtual void restore (agxStream::InputArchive &in) override
 
virtual bool restore (agxStream::StorageStream &str)
 Restores internal data from stream.
 
void setName (const agx::Name &name)
 Set the name of this power line component.
 
void spreadPowerLineToGraph ()
 
virtual void store (agxStream::OutputArchive &out) const override
 
virtual bool store (agxStream::StorageStream &str) const
 Stores internal data into stream.
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings.
 
virtual const char * getClassName () const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object.
 
virtual StorageAgent * getStorageAgent () const =0
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object.
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object.
 

Static Public Member Functions

static agx::StringVector getAvailableLibraryProperties ()
 Returns a vector with all the named CombustionEngineProperties that were found in the Material Library.
 
static bool readLibraryProperties (const agx::String &name, CombustionEngineParameters &parameters)
 Load the named parameters and copy data into parameters.
 
- Static Public Member Functions inherited from agxDriveTrain::Shaft
static agxStream::Serializable * create (agxStream::InputArchive &)
 
- Static Public Member Functions inherited from agxPowerLine::RotationalUnit
static agx::Real convertAngularVelocityToRPM (const agx::Real angVel)
 Convert between m/s and rpm.
 
static agx::Real convertRPMtoAngularVelocity (const agx::Real rpm)
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
 

Protected Member Functions

virtual ~CombustionEngine ()
 
void initParameters ()
 
- Protected Member Functions inherited from agxDriveTrain::Shaft
virtual ~Shaft ()
 
- Protected Member Functions inherited from agxPowerLine::RotationalUnit
virtual ~RotationalUnit ()
 
- Protected Member Functions inherited from agxPowerLine::Unit
virtual ~Unit ()
 
bool activateDimension (PhysicalDimension *dimension)
 
virtual bool hasValidInputConnection () const
 returns if it is possible to connect to this unit
 
void restorePre46 (agxStream::InputArchive &in)
 
void setPowerLine (PowerLine *powerLine)
 Point to the power line the unit is a part of.
 
- Protected Member Functions inherited from agxPowerLine::SubGraph
virtual ~SubGraph ()
 
void addInternalConnector (agxPowerLine::Connector *connector)
 
void addInternalUnit (agxPowerLine::Unit *unit)
 
void removeInternalConnector (agxPowerLine::Connector *connector)
 
void removeInternalUnit (agxPowerLine::Unit *unit)
 
agx::Bool replaceInternalUnit (agxPowerLine::Unit *oldUnit, agxPowerLine::Unit *newUnit)
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor.
 
 Serializable (const Serializable &other)
 Copy constructor.
 
void generateUuid ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 
- Protected Attributes inherited from agxDriveTrain::Shaft
agx::Real m_accumulatedAngle
 
- Protected Attributes inherited from agxPowerLine::RotationalUnit
RotationalDimensionRef m_rotationalDimension
 
- Protected Attributes inherited from agxPowerLine::Unit
agx::observer_ptr< agx::RigidBody > m_attachBody
 
PhysicalDimensionRefVector m_dimensions
 
bool m_ignoreMeForStoreRestoreStream
 
agxPowerLine::Unit * m_rootUnit
 
- Protected Attributes inherited from agxPowerLine::SubGraph
SubGraphObserver m_enclosingGraph
 
ConnectorRefVector m_internalConnectors
 
UnitRefVector m_internalUnits
 
agx::Name m_name
 
PowerLine * m_powerLine
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

The model of the combustion engine consists of two subsystems: namely, the intake manifold dynamics and the rotational dynamics.

The model of the intake manifold dynamics implemented here is described in example 7.2, in "Modeling and control of engines and drivelines" by Lars Eriksson and Lars Nielsen,

  1. Regarding the model of the rotational dynamics, it is defined in the section 10.1.5 of the same book.

Definition at line 36 of file CombustionEngine.h.

Constructor & Destructor Documentation

◆ CombustionEngine() [1/2]

agxDriveTrain::CombustionEngine::CombustionEngine ( )

Create a combustion engine.

Default CombustionEngineParameters use data from VolvoV60.json

◆ CombustionEngine() [2/2]

agxDriveTrain::CombustionEngine::CombustionEngine ( const CombustionEngineParameters &  params)

Create a combustion engine from specific parameters.

Parameters
params- The typical engine parameters including the displacement volume, rated torque, rated power, rated engine RPM, etc.

◆ ~CombustionEngine()

virtual agxDriveTrain::CombustionEngine::~CombustionEngine ( )
protectedvirtual

Member Function Documentation

◆ computeCylinderAirMassFlowRate()

agx::Real agxDriveTrain::CombustionEngine::computeCylinderAirMassFlowRate ( agx::Real  N,
agx::Real  p 
)

Compute the engine air mass flow rate at current engine speed N and inlet pressure p.

Parameters
N- The engine speed in radian per second.
p- The inlet pressure in pa.

◆ computeFrictionTorque()

agx::Real agxDriveTrain::CombustionEngine::computeFrictionTorque ( agx::Real  N)

Compute the engine friction torque losses.

Parameters
N- The engine speed in radian per second.

◆ computeIndicatedTorque()

agx::Real agxDriveTrain::CombustionEngine::computeIndicatedTorque ( agx::Real  N,
agx::Real  p 
)

Compute the engine indicated torque.

Parameters
N- The engine speed in radian per second.
p- The inlet pressure in pa.

◆ computePumpTorque()

agx::Real agxDriveTrain::CombustionEngine::computePumpTorque ( agx::Real  p)

Compute the pumping torque losses.

Parameters
p- The inlet manifold pressure in pa.

◆ getAirFuelRatio()

agx::Real agxDriveTrain::CombustionEngine::getAirFuelRatio ( ) const
Returns
The stoichiometric air-fuel ratio.

◆ getAvailableLibraryProperties()

static agx::StringVector agxDriveTrain::CombustionEngine::getAvailableLibraryProperties ( )
static

Returns a vector with all the named CombustionEngineProperties that were found in the Material Library.

Returns
A vector with the names of all found CombustionEngineProperties in the MaterialLibrary

◆ getCombustionEngineParameters()

CombustionEngineParameters & agxDriveTrain::CombustionEngine::getCombustionEngineParameters ( )

Return directly a reference to allow the constructs like engine.getCombustionEngineParameters().displacementVolume; engine.getCombustionEngineParameters().maxTorque; Warning: there is no setCombustionEngineParameters() method, since that requires reinitialization.

It is best to delete and create new instance.

◆ getCurrentVolumetricEfficiency()

agx::Real agxDriveTrain::CombustionEngine::getCurrentVolumetricEfficiency ( ) const
Returns
The volumetric efficiency at the current engine speed and inlet pressure.

◆ getCylinderAirMassFlow()

agx::Real agxDriveTrain::CombustionEngine::getCylinderAirMassFlow ( )
Returns
The cylinder air mass flow rate in kg/s.

◆ getEnable()

bool agxDriveTrain::CombustionEngine::getEnable ( ) const
Returns
True if the engine is running, false otherwise.

◆ getFrictionTorque()

agx::Real agxDriveTrain::CombustionEngine::getFrictionTorque ( ) const
Returns
The torque of friction loss that the engine components consumes.

◆ getFuelConsumptionRate()

agx::Real agxDriveTrain::CombustionEngine::getFuelConsumptionRate ( )
Returns
The fuel consumption rate in kg/s.

◆ getHeatValue()

agx::Real agxDriveTrain::CombustionEngine::getHeatValue ( ) const
Returns
The heat value of the fuel air mixture.

◆ getIdleThrottleAngle()

agx::Real agxDriveTrain::CombustionEngine::getIdleThrottleAngle ( ) const
Returns
Idle throttle angle, the smallest angle the throttle plate can have when the engine is running at idle.

◆ getIndicatedTorque()

agx::Real agxDriveTrain::CombustionEngine::getIndicatedTorque ( ) const
Returns
The current indicated torque that the engine has.

◆ getInletPressure()

agx::Real agxDriveTrain::CombustionEngine::getInletPressure ( ) const

Get the current pressure in the inlet manifold.

Returns
The inlet manifold pressure in Pa.

◆ getInletTemperature()

agx::Real agxDriveTrain::CombustionEngine::getInletTemperature ( ) const
Returns
The temperature of the inlet manifold in K.

◆ getInletVolume()

agx::Real agxDriveTrain::CombustionEngine::getInletVolume ( ) const
Returns
The volume of the inlet manifold of the engine in m^3.

◆ getMaxThrottleAngle()

agx::Real agxDriveTrain::CombustionEngine::getMaxThrottleAngle ( ) const
Returns
The maximum throttle angle that the throttle plate is allowed to have.

◆ getMaxVolumetricEfficiency()

agx::Real agxDriveTrain::CombustionEngine::getMaxVolumetricEfficiency ( ) const
Returns
The maximum volumetric efficiency of the engine.

◆ getNrRevolutionsPerCycle()

CombustionEngineParameters::RevolutionsPerCycle agxDriveTrain::CombustionEngine::getNrRevolutionsPerCycle ( ) const
Returns
The number of crankshaft revolutions per engine operating cycle.

◆ getOutputTorque()

agx::Real agxDriveTrain::CombustionEngine::getOutputTorque ( ) const
Returns
The current torque that the engine can supply.

◆ getPumpTorque()

agx::Real agxDriveTrain::CombustionEngine::getPumpTorque ( ) const
Returns
The torque of pumping loss that the engine breaths air in and out.

◆ getRPM()

agx::Real agxDriveTrain::CombustionEngine::getRPM ( ) const

returns the number of revolutions per minute

◆ getThermalEfficiency()

agx::Real agxDriveTrain::CombustionEngine::getThermalEfficiency ( ) const
Returns
The thermal efficiency of the engine.

◆ getThrottle()

agx::Real agxDriveTrain::CombustionEngine::getThrottle ( ) const
Returns
The current throttle fraction between 0 (idling) and 1 (full openning).

◆ getThrottleAirMassFlow()

agx::Real agxDriveTrain::CombustionEngine::getThrottleAirMassFlow ( )
Returns
The throttle air mass flow rate in kg/s.

◆ getThrottleAngle()

agx::Real agxDriveTrain::CombustionEngine::getThrottleAngle ( ) const
Returns
The openning angle of the throttle plate.

◆ getThrottlePinBoreRatio()

agx::Real agxDriveTrain::CombustionEngine::getThrottlePinBoreRatio ( ) const
Returns
The ratio between throttle pin and throttle bore diameters.

◆ getVolumetricEfficiency()

agx::Real agxDriveTrain::CombustionEngine::getVolumetricEfficiency ( agx::Real  N,
agx::Real  p 
) const
Returns
The volumetric efficiency at the specified engine speed and inlet pressure.
Parameters
N- The engine speed in radian per second.
p- The inlet pressure in pa.

◆ initParameters()

void agxDriveTrain::CombustionEngine::initParameters ( )
protected

◆ loadLibraryProperties()

bool agxDriveTrain::CombustionEngine::loadLibraryProperties ( const agx::String &  name)

Load named CombustionEngineParameters from the Material Library for the current CombustionEngine.

Returns
True if properties could be loaded

◆ readLibraryProperties()

static bool agxDriveTrain::CombustionEngine::readLibraryProperties ( const agx::String &  name,
CombustionEngineParameters &  parameters 
)
static

Load the named parameters and copy data into parameters.

Parameters
name- Name of the CombustionEngineParameters that should be loaded
parameters- Result of loading the parameters.
Returns
true if name parameters exist. False if not.

◆ setAirFuelRatio()

bool agxDriveTrain::CombustionEngine::setAirFuelRatio ( agx::Real  ratio)

Set the stoichiometric air-fuel ratio.

Ideal ratio of air to fuel needed for complete combustion, e.g. gasoline. Petrol: 14.7 Diesel 14.5

Parameters
ratio- The stoichiometric air-fuel ratio (Default: 14.6).

◆ setCombustionEngineParameters()

void agxDriveTrain::CombustionEngine::setCombustionEngineParameters ( const CombustionEngineParameters &  parameters)

Set the parameters for this combustion engine.

Parameters
parameters- The parameters that make up this combustionEngine.

◆ setEnable()

void agxDriveTrain::CombustionEngine::setEnable ( bool  enable)

Must be called to start the engine.

Parameters
enable- True to start the engine, false turns it off (Default: false).

◆ setHeatValue()

bool agxDriveTrain::CombustionEngine::setHeatValue ( agx::Real  heatValue)

Set the heat value of the fuel, Unit: J/kg.

Diesel: 45.4 MJ/Kg Petrol: 44.4 MJ/Kg

Parameters
heatValue- the energy that the fuel can deliver per kg of fuel mass (Default: 42500000).

◆ setIdleThrottleAngle()

bool agxDriveTrain::CombustionEngine::setIdleThrottleAngle ( agx::Real  throttleAngle)

Set the idle throttle angle, i.e.

the smallest angle that the throttle can have when the engine is running at idle condition.

Parameters
throttleAngle- Angle of idle throttle in radians, must be larger than 0 and smaller than pi/2 (Default: 0.1745 radians, equal to 10 degrees).
Returns
True if successful, false otherwise.

◆ setInletTemperature()

void agxDriveTrain::CombustionEngine::setInletTemperature ( agx::Real  inletTemperature)

The inlet manifold is where the fuel and air to be mixed.

The lower temperature yields more power. In the current model, this is a constant.

Parameters
inletTemperature- The temperature of the inlet manifold in K (Default: 300).

◆ setInletVolume()

bool agxDriveTrain::CombustionEngine::setInletVolume ( agx::Real  inletVolume)

Set the inlet manifold volume of the engine.

Parameters
inletVolume- The inlet manifold volume in m^3, which must be larger than 0 (Default: 1.1 * displacementVolume).
Returns
True of successful, false otherwise.

◆ setMaxThrottleAngle()

bool agxDriveTrain::CombustionEngine::setMaxThrottleAngle ( agx::Real  throttleAngle)

Set the maximum angle that the throttle plate is allowed to have, i.e.

the angle when the engine has full gas.

Parameters
throttleAngle- maximum throttle angle in radians, must be smaller than pi/2 rad and larger than idle throttle angle (Default: PI/2).
Returns
True if successful, false otherwise.

◆ setMaxVolumetricEfficiency()

bool agxDriveTrain::CombustionEngine::setMaxVolumetricEfficiency ( agx::Real  maxVolumetricEfficiency)

Set the maximum volumetric efficiency of the engine.

The volumetric efficiency refers to the ratio of air volume drawn into the cylinders to the volume the cylinder sweeps.

Parameters
maxVolumetricEfficiency- The maximum value of the volumetric efficiency. It is usually within the range of 0.8 to 0.95 (Default: 0.92).

◆ setNrRevolutionsPerCycle()

void agxDriveTrain::CombustionEngine::setNrRevolutionsPerCycle ( CombustionEngineParameters::RevolutionsPerCycle  nrRevolutionsPerCycle)

Set the number of crankshaft revolutions during one engine operating cycle.

Parameters
nrRevolutionsPerCycle- Specifies type of engine: two-stroke engine or four-stroke engine (Default: 2).

◆ setThrottle()

bool agxDriveTrain::CombustionEngine::setThrottle ( agx::Real  throttle)

Set the fraction or the percentage of the throttle openning.

Parameters
throttle- 0 is idle/fully closed, 1 means fully open (Default: 0.0).
Returns
True if successful, false otherwise.

◆ setThrottleAngle()

bool agxDriveTrain::CombustionEngine::setThrottleAngle ( agx::Real  throttleAngle)

Set the opening angle of the throttle plate directly, as opposed to the fraction/percentage of the throttle opening.

Parameters
throttleAngle- Angle in radians. It should be larger than the idle throttle angle and smaller than pi/2 (Default: 0.0).
Returns
True if successful, false otherwise.

◆ setThrottleAngleRange()

bool agxDriveTrain::CombustionEngine::setThrottleAngleRange ( agx::Real  min,
agx::Real  max 
)

Set the minimum and maximum angle that the throttle plate is allowed to have, i.e.

the angle at idle and the angle at full gas.

Parameters
min- Angle for idle throttle in radians, must be larger than 0 and smaller than pi/2 (Default: 0.1745 radians, equal to 10 degrees).
max- Maximum throttle angle in radians, must be smaller than pi/2 rad and larger than minimum angle (Default: PI/2.0).
Returns
True if successful, false otherwise.

◆ setThrottlePinBoreRatio()

bool agxDriveTrain::CombustionEngine::setThrottlePinBoreRatio ( agx::Real  throttlePinBoreRatio)

Set the ratio between throttle pin diameter and throttle bore diameter.

Parameters
throttlePinBoreRatio- the ratio between throttle pin and throttle bore diameters, which should be varying within the range of [1/12, 1/6] (Default: 0.1).
Returns
True of successful, false otherwise.

The documentation for this class was generated from the following file: