337 virtual
bool preUpdate(
agx::Real timeStep) override;
340 virtual
bool store(
agxStream::StorageStream& str) const override;
343 virtual
bool restore(
agxStream::StorageStream& str) override;
352 void initParameters();
358 void computeMaxThrottleArea();
363 void computeVolumetricEfficiencyCoefficients();
370 agx::Real computeFlowGain(
agx::Real r);
376 agx::Real computeFlowGainDerivative(
agx::Real r);
383 agx::Real computeThrottleAreaGain(
agx::Real alpha);
394 void stepPressure(
agx::Real timeStep);
404 agx::Real m_inletVolume;
405 agx::Real m_inletPressure;
407 agx::Real m_throttleAngle;
409 agx::Real m_maxThrottleArea;
411 agx::Real m_inletTemperature;
412 agx::Real m_ambientPressure;
414 agx::Real m_airGasConstant;
419 agx::Real m_idleInletPressure;
426 agx::Real m_thermalEfficiency;
428 agx::Real m_indicatedTorque;
429 agx::Real m_frictionTorque;
430 agx::Real m_pumpTorque;
432 agx::Real m_outputTorque;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
The model of the combustion engine consists of two subsystems: namely, the intake manifold dynamics a...
agx::Real computeIndicatedTorque(agx::Real N, agx::Real p)
Compute the engine indicated torque.
agx::Real getMaxThrottleAngle() const
CombustionEngine(const CombustionEngineParameters ¶ms)
Create a combustion engine from specific parameters.
bool setThrottleAngleRange(agx::Real min, agx::Real max)
Set the minimum and maximum angle that the throttle plate is allowed to have, i.e.
void setNrRevolutionsPerCycle(CombustionEngineParameters::RevolutionsPerCycle nrRevolutionsPerCycle)
Set the number of crankshaft revolutions during one engine operating cycle.
agx::Real getMaxVolumetricEfficiency() const
CombustionEngine()
Create a combustion engine.
bool setAirFuelRatio(agx::Real ratio)
Set the stoichiometric air-fuel ratio.
agx::Real getPumpTorque() const
bool loadLibraryProperties(const agx::String &name)
Load named CombustionEngineParameters from the Material Library for the current CombustionEngine.
agx::Real getHeatValue() const
bool setThrottle(agx::Real throttle)
Set the fraction or the percentage of the throttle openning.
agx::Real getThermalEfficiency() const
agx::Real getInletVolume() const
void setEnable(bool enable)
Must be called to start the engine.
agx::Real getFrictionTorque() const
agx::Real getFuelConsumptionRate()
bool setMaxThrottleAngle(agx::Real throttleAngle)
Set the maximum angle that the throttle plate is allowed to have, i.e.
agx::Real getVolumetricEfficiency(agx::Real N, agx::Real p) const
agx::Real getInletPressure() const
Get the current pressure in the inlet manifold.
bool setInletVolume(agx::Real inletVolume)
Set the inlet manifold volume of the engine.
bool setThrottleAngle(agx::Real throttleAngle)
Set the opening angle of the throttle plate directly, as opposed to the fraction/percentage of the th...
bool setThrottlePinBoreRatio(agx::Real throttlePinBoreRatio)
Set the ratio between throttle pin diameter and throttle bore diameter.
agx::Real getCylinderAirMassFlow()
static agx::StringVector getAvailableLibraryProperties()
Returns a vector with all the named CombustionEngineProperties that were found in the Material Librar...
CombustionEngineParameters & getCombustionEngineParameters()
Return directly a reference to allow the constructs like engine.getCombustionEngineParameters()....
agx::Real getInletTemperature() const
agx::Real getThrottle() const
agx::Real computeFrictionTorque(agx::Real N)
Compute the engine friction torque losses.
agx::Real getAirFuelRatio() const
agx::Real getRPM() const
returns the number of revolutions per minute
agx::Real getOutputTorque() const
agx::Real getIndicatedTorque() const
agx::Real computePumpTorque(agx::Real p)
Compute the pumping torque losses.
agx::Real getThrottleAngle() const
static bool readLibraryProperties(const agx::String &name, CombustionEngineParameters ¶meters)
Load the named parameters and copy data into parameters.
bool setHeatValue(agx::Real heatValue)
Set the heat value of the fuel, Unit: J/kg.
agx::Real getCurrentVolumetricEfficiency() const
CombustionEngineParameters::RevolutionsPerCycle getNrRevolutionsPerCycle() const
agx::Real getThrottleAirMassFlow()
bool setMaxVolumetricEfficiency(agx::Real maxVolumetricEfficiency)
Set the maximum volumetric efficiency of the engine.
void setInletTemperature(agx::Real inletTemperature)
The inlet manifold is where the fuel and air to be mixed.
agx::Real getIdleThrottleAngle() const
bool setIdleThrottleAngle(agx::Real throttleAngle)
Set the idle throttle angle, i.e.
void setCombustionEngineParameters(const CombustionEngineParameters ¶meters)
Set the parameters for this combustion engine.
agx::Real getThrottlePinBoreRatio() const
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.
A Shaft is the most basic PowerLine Unit.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
A library of agxPowerLine components designed to model the various parts of a vehicle drive train.
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Parameters that specifies the performance of a combustion engine.