AGXDynamics  2.31.1.0
agxDriveTrain::CombustionEngine Class Referenceabstract

#include <CombustionEngine.h>

+ Inheritance diagram for agxDriveTrain::CombustionEngine:

Public Member Functions

 CombustionEngine (agx::Real displacementVolume)
 Create an combustion engine. More...
 
virtual bool addNotification (agxSDK::Simulation *simulation)=0
 
void addNotification (agxPowerLine::PowerLine *powerLine)
 
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agxPowerLine::SubGraph)
 
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agxPowerLine::Unit)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
void attach (agx::RigidBody *body)
 Define which body in the simulation this Unit is attached to. More...
 
agx::String buildDimensionsName () const
 
virtual bool connect (agxPowerLine::Connector *connector)
 Connect the unit to a connector. More...
 
virtual bool connect (agxPowerLine::Side mySide, agxPowerLine::Side connectorSide, agxPowerLine::Connector *connector)
 Connect the unit to a connector, specifying the side of each. More...
 
virtual bool connect (agxPowerLine::Unit *otherUnit)
 Connect the unit to another unit. More...
 
virtual bool connect (agxPowerLine::Side mySide, agxPowerLine::Side otherSide, agxPowerLine::Unit *other)
 
virtual bool disconnect (agxPowerLine::Unit *unit)
 
void disconnectAll ()
 
agxPowerLine::PhysicalDimension * getActiveDimension (size_t index)
 
const agxPowerLine::PhysicalDimension * getActiveDimension (size_t index) const
 
agx::Real getAngularVelocity () const
 returns the number of radians per second More...
 
const char * getClassName () const override
 
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 (const agxPowerLine::Unit *unit, agxPowerLine::ConnectorPtrVector &result)
 Append all connectors connecting this Unit to the given Unit to the 'result' Vector. More...
 
size_t getConnectors (agxPowerLine::ConnectorPtrVector &result) const
 
virtual void getConnectorsRecursive (ConnectorPtrVector &connectors)
 Fill the given vector with the Connectors that are held by this SubGraph. More...
 
virtual agx::Real getDeliveredTorque () const
 returns the amount of torque delivered from the rotational dimension More...
 
agxPowerLine::PhysicalDimension * getDimension (agxPowerLine::PhysicalDimension::Type type)
 
const agxPowerLine::PhysicalDimension * getDimension (agxPowerLine::PhysicalDimension::Type type) const
 
const agxPowerLine::PhysicalDimensionRefVector & getDimensions () const
 
agxPowerLine::PhysicalDimensionRefVector & getDimensions ()
 
virtual agx::Vec3 getDirection () const
 returns a vector in world coordinates that defines the rotational axis of the rotational unit. More...
 
agx::Real getDischargeCoefficient () const
 
agx::Real getDisplacementVolume () const
 
bool getEnable () const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
Connector * getEnclosingConnector ()
 
const Connector * getEnclosingConnector () const
 
SubGraph * getEnclosingGraph ()
 
const SubGraph * getEnclosingGraph () const
 
Unit * getEnclosingUnit ()
 
const Unit * getEnclosingUnit () const
 
Connector * getFirstInputConnector (const agxPowerLine::Unit *unit) const
 
Connector * getFirstOutputConnector (const agxPowerLine::Unit *unit) const
 
agx::Real getIdleThrottleAngle () const
 
bool getIgnoreForStoreRestoreStream () const
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
virtual agx::Real getInertia () const override
 Get the engine inertia. More...
 
agx::Real getInletPressure () const
 Get the current pressure in the inlet manifold, i.e.the pressure right before the cylinders. More...
 
agx::Real getInletVolume () const
 
size_t getInputConnectors (const agxPowerLine::Unit *unit, agxPowerLine::ConnectorPtrVector &result)
 
size_t getInputConnectors (agxPowerLine::ConnectorPtrVector &result) const
 
const agxPowerLine::ConnectorRefVector & getInternalConnectors () const
 
const agxPowerLine::UnitRefVector & getInternalUnits () const
 
agx::Real getMaxThrottleAngle () const
 
const agx::Name & getName () const
 
agx::Real getNrRevolutionsPerCycle () const
 
size_t getNumActiveDimensions () const
 The number of non-null PhysicalDimension in this Unit, not including internal Units. More...
 
virtual size_t getNumConnectableDimensions (Side side) const
 
size_t getNumConnections () const
 
size_t getOutputConnectors (const agxPowerLine::Unit *unit, agxPowerLine::ConnectorPtrVector &result)
 
size_t getOutputConnectors (agxPowerLine::ConnectorPtrVector &result) const
 
agx::Real getOutputTorque ()
 
void getOwnConnectedUnits (UnitPtrSetVector &unitSet, bool startFromCleanUnitSet=true) const
 Constructs the set of Units connected to this Unit's own dimensions. More...
 
void getOwnConnectedUnits (UnitPtrSetVector &unitSet, agxPowerLine::Side side, bool startFromCleanUnitSet=true) const
 
agxPowerLine::PowerLine * getPowerLine () const
 
int getReferenceCount () const
 
agxPowerLine::Unit * getRoot () const
 
SubGraph * getRootEnclosingGraph ()
 
const SubGraph * getRootEnclosingGraph () const
 
agxPowerLine::RotationalDimension * getRotationalDimension () const
 returns a pointer to the rotational dimension More...
 
agx::Real getRPM () const
 Get revolutions per minute. More...
 
agxPowerLine::Side getSide (const Connector *connector) const
 
agxStream::StorageAgent * getStorageAgent () const override
 
agx::Real getThrottle () const
 
agx::Real getThrottleAngle () const
 
agx::Real getThrottleBore () const
 
virtual void getUnitsRecursive (UnitPtrVector &units)
 Fill the given vector with the Units that are held by this SubGraph. More...
 
agx::Uuid getUuid () const
 
agx::Real getVolumetricEfficiency () const
 
bool hasConnector (const Connector *connector) const
 
template<typename T >
bool is () const
 Subclass test. More...
 
virtual bool isConnected (agxPowerLine::Unit *otherUnit) const
 
bool isEnclosedWithin (const SubGraph *component) const
 
bool isFinished () const
 
virtual bool isValid () const
 
virtual bool postRestore (agxStream::StorageStream &str)
 
virtual bool postStore (agxStream::StorageStream &str) const
 
virtual bool postUpdate (agx::Real timeStep) override
 
virtual void prepareForRestore ()
 
virtual void prepareForStore ()
 
virtual bool preUpdate (agx::Real timeStep) override
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
virtual bool removeNotification (agxUtil::ConstraintHolder *holder, agxSDK::Simulation *simulation)=0
 
void removeNotification (agxPowerLine::PowerLine *powerLine)
 
virtual bool restore (agxStream::StorageStream &str) override
 Restores internal data from stream. More...
 
virtual void restore (agxStream::InputArchive &in) override
 
void setAngularVelocityDamping (agx::Real damping)
 set the angular velocity damping around the local axis (direction) More...
 
bool setDischargeCoefficient (agx::Real dischargeCoefficient)
 Set the discharge coefficient of the flow past the throttle. More...
 
void setDisplacementVolume (agx::Real displacementVolume)
 Set the total Displacement volume of engine cylinders in m^2. More...
 
void setEnable (bool enable)
 Must be called to start the engine. More...
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object. More...
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More...
 
bool setIdleThrottleAngle (agx::Real throttleAngle)
 Set the idle throttle angle for the engine, i.e. More...
 
virtual void setInertia (agx::Real inertia) override
 Set the inertia for the engine. More...
 
bool setInletVolume (agx::Real inletVolume)
 Set the inlet manifold volume of the engine. More...
 
bool setMaxThrottleAngle (agx::Real throttleAngle)
 Set the largest angle the throttle plate is allowed to have, i.e. More...
 
void setName (const agx::Name &name)
 Set the name of this power line component. More...
 
bool setNrRevolutionsPerCycle (agx::Real nrRevolutionsPerCycle)
 Set how many revolutions per cycle the engine cylinders have. More...
 
void setRoot (agxPowerLine::Unit *root)
 
bool setThrottle (agx::Real throttle)
 Set the percentage that the throttle is open. More...
 
bool setThrottleAngle (agx::Real throttleAngle)
 Set the throttle plate angle directly, instead of percentage of throttle opening. More...
 
bool setThrottleAngleRange (agx::Real min, agx::Real max)
 Set the smallest and largest angle the throttle plate is allowed to have, i.e. More...
 
bool setThrottleBore (agx::Real throttleBore)
 Set the diameter of the throttle plate, which is assumed to be circular. More...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 
bool setVolumetricEfficiency (agx::Real volumetricEfficiency)
 Set the volumetric efficiency. More...
 
void spreadPowerLineToGraph ()
 
void spreadRootToGraph ()
 
virtual bool store (agxStream::StorageStream &str) const override
 Stores internal data into stream. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
virtual bool vetoConnect (agxPowerLine::Connector *connector) const
 

Static Public Member Functions

static agx::Real convertAngularVelocityToRPM (const agx::Real angVel)
 Convert between m/s and rpm. More...
 
static agx::Real convertRPMtoAngularVelocity (const agx::Real rpm)
 
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

 CombustionEngine ()=default
 
virtual ~CombustionEngine ()
 
bool activateDimension (PhysicalDimension *dimension)
 
void addInternalConnector (agxPowerLine::Connector *connector)
 
void addInternalUnit (agxPowerLine::Unit *unit)
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
void generateUuid ()
 
virtual bool hasValidInputConnection () const
 returns if it is possible to connect to this unit More...
 
void removeInternalConnector (agxPowerLine::Connector *connector)
 
void removeInternalUnit (agxPowerLine::Unit *unit)
 
agx::Bool replaceInternalUnit (agxPowerLine::Unit *oldUnit, agxPowerLine::Unit *newUnit)
 
void restorePre46 (agxStream::InputArchive &in)
 
void setPowerLine (PowerLine *powerLine)
 Point to the power line the unit is a part of. More...
 

Static Protected Member Functions

static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Protected Attributes

agx::observer_ptr< agx::RigidBody > m_attachBody
 
PhysicalDimensionRefVector m_dimensions
 
SubGraphObserver m_enclosingGraph
 
bool m_ignoreMeForStoreRestoreStream
 
ConnectorRefVector m_internalConnectors
 
UnitRefVector m_internalUnits
 
Mutex m_mutex
 
agx::Name m_name
 
ObserverContainer m_observers
 
PowerLine * m_powerLine
 
AtomicValue m_refCount
 
agxPowerLine::Unit * m_rootUnit
 
RotationalDimensionRef m_rotationalDimension
 

Detailed Description

Definition at line 26 of file CombustionEngine.h.

Constructor & Destructor Documentation

◆ CombustionEngine() [1/2]

agxDriveTrain::CombustionEngine::CombustionEngine ( agx::Real  displacementVolume)

Create an combustion engine.

Parameters
displacementVolume- the total displacement volume of the engine, which is the volume the pistons displace in the cylinder. Throttle bore, inlet volume are derived from the displacement volume as a default value. If you want more specific values for those parameters, you have to set them specifically.

◆ CombustionEngine() [2/2]

agxDriveTrain::CombustionEngine::CombustionEngine ( )
protecteddefault

◆ ~CombustionEngine()

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

Member Function Documentation

◆ activateDimension()

bool agxPowerLine::Unit::activateDimension ( PhysicalDimension *  dimension)
protectedinherited

◆ addInternalConnector()

void agxPowerLine::SubGraph::addInternalConnector ( agxPowerLine::Connector *  connector)
protectedinherited

◆ addInternalUnit()

void agxPowerLine::SubGraph::addInternalUnit ( agxPowerLine::Unit *  unit)
protectedinherited

◆ addNotification() [1/2]

virtual bool agxPowerLine::SubGraph::addNotification ( agxSDK::Simulation *  simulation)
pure virtualinherited

◆ addNotification() [2/2]

void agxPowerLine::Unit::addNotification ( agxPowerLine::PowerLine *  powerLine)
inherited

◆ AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE() [1/2]

agxPowerLine::SubGraph::AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE ( agxPowerLine::SubGraph  )
inherited

◆ AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE() [2/2]

agxPowerLine::Unit::AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE ( agxPowerLine::Unit  )
inherited

◆ allocateObserverVector()

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited

◆ as() [1/2]

template<typename T >
T* agx::Referenced::as ( )
inherited

Subclass casting.

Template type must match actual type, dynamic_cast assertion will fail otherwise.

Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().

◆ as() [2/2]

template<typename T >
const T* agx::Referenced::as ( ) const
inherited

◆ asSafe() [1/2]

template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

◆ asSafe() [2/2]

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited

◆ attach()

void agxPowerLine::Unit::attach ( agx::RigidBody *  body)
inherited

Define which body in the simulation this Unit is attached to.

If the body is nullptr the Unit is attached to world. This will override any parent body set to the power line the unit is a part of.

◆ buildDimensionsName()

agx::String agxPowerLine::Unit::buildDimensionsName ( ) const
inherited
Returns
A concatenation of the names of the bodies of the dimensions in this Unit.

◆ connect() [1/4]

virtual bool agxPowerLine::Unit::connect ( agxPowerLine::Connector *  connector)
virtualinherited

Connect the unit to a connector.

Parameters
connector- a connector
Returns
true and connects if there are physical dimensions that match

◆ connect() [2/4]

virtual bool agxPowerLine::Unit::connect ( agxPowerLine::Side  mySide,
agxPowerLine::Side  connectorSide,
agxPowerLine::Connector *  connector 
)
virtualinherited

Connect the unit to a connector, specifying the side of each.

Parameters
mySide- The side on this unit to connect.
connectorSide- The side on the connector to connect.
connector- The connector to connect.
Returns
True if the connection was made, false otherwise.

◆ connect() [3/4]

virtual bool agxPowerLine::Unit::connect ( agxPowerLine::Unit *  otherUnit)
virtualinherited

Connect the unit to another unit.

Parameters
otherUnit- another unit.

◆ connect() [4/4]

virtual bool agxPowerLine::Unit::connect ( agxPowerLine::Side  mySide,
agxPowerLine::Side  otherSide,
agxPowerLine::Unit *  other 
)
virtualinherited

◆ convertAngularVelocityToRPM()

static agx::Real agxPowerLine::RotationalUnit::convertAngularVelocityToRPM ( const agx::Real  angVel)
staticinherited

Convert between m/s and rpm.

◆ convertRPMtoAngularVelocity()

static agx::Real agxPowerLine::RotationalUnit::convertRPMtoAngularVelocity ( const agx::Real  rpm)
staticinherited

◆ create() [1/2]

static agxStream::Serializable* agxPowerLine::RotationalUnit::create ( )
inlinestaticinherited

Definition at line 102 of file RotationalUnit.h.

◆ create() [2/2]

static agxStream::Serializable* agxPowerLine::RotationalUnit::create ( agxStream::InputArchive &  )
inlinestaticinherited

Definition at line 102 of file RotationalUnit.h.

◆ deleteUsingDeleteHandler()

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited

◆ disconnect()

virtual bool agxPowerLine::Unit::disconnect ( agxPowerLine::Unit *  unit)
virtualinherited

◆ disconnectAll()

void agxPowerLine::Unit::disconnectAll ( )
inherited

◆ generateUuid()

void agxStream::Serializable::generateUuid ( )
protectedinherited

◆ getActiveDimension() [1/2]

agxPowerLine::PhysicalDimension* agxPowerLine::Unit::getActiveDimension ( size_t  index)
inherited
Returns
The index:th non-null PhysicalDimension in this Unit, not including internal Units, or nullptr.

◆ getActiveDimension() [2/2]

const agxPowerLine::PhysicalDimension* agxPowerLine::Unit::getActiveDimension ( size_t  index) const
inherited

◆ getAngularVelocity()

agx::Real agxPowerLine::RotationalUnit::getAngularVelocity ( ) const
inherited

returns the number of radians per second

◆ getClassName()

const char* agxPowerLine::RotationalUnit::getClassName ( ) const
inlineoverridevirtualinherited
Returns
the class name of this class.

Reimplemented from agxStream::Serializable.

Definition at line 102 of file RotationalUnit.h.

◆ getConnectableDimension()

virtual agxPowerLine::DimensionAndSide agxPowerLine::Unit::getConnectableDimension ( agxPowerLine::PhysicalDimension::Type  type,
agxPowerLine::Side  side 
)
virtualinherited
Returns
The dimension of the given types that accepts connections on the given side. Can be a PhysicalDimension owned by an internal Unit.

Reimplemented in agxPowerLine::TranslationalActuator, agxHydraulics::PistonActuator, agxPowerLine::Actuator, agxHydraulics::Accumulator, agxHydraulics::deprecated::PumpUnit, agxHydraulics::deprecated::MotorUnit, agxDriveTrain::deprecated::DriveTrainComponent, and agxPowerLine::Actuator1DOF.

◆ getConnectableDimensionTypes()

◆ getConnectableInputDimension()

agxPowerLine::PhysicalDimension* agxPowerLine::Unit::getConnectableInputDimension ( agxPowerLine::PhysicalDimension::Type  type)
inherited
Returns
The dimension of the given types that accepts connections. Can be a PhysicalDimension owned by an internal Unit.

◆ getConnectableOutputDimension()

agxPowerLine::PhysicalDimension* agxPowerLine::Unit::getConnectableOutputDimension ( agxPowerLine::PhysicalDimension::Type  type)
inherited

◆ getConnectedUnits()

void agxPowerLine::Unit::getConnectedUnits ( UnitPtrSetVector &  result,
agxPowerLine::Side  side 
)
inherited

◆ getConnectors() [1/2]

size_t agxPowerLine::Unit::getConnectors ( const agxPowerLine::Unit *  unit,
agxPowerLine::ConnectorPtrVector &  result 
)
inherited

Append all connectors connecting this Unit to the given Unit to the 'result' Vector.

Returns the index of the first Connector added. Will be one-past-end (result.size()) if no connectors are added.

Returns
The index of the first appended Connector.

◆ getConnectors() [2/2]

size_t agxPowerLine::Unit::getConnectors ( agxPowerLine::ConnectorPtrVector &  result) const
inherited

◆ getConnectorsRecursive()

virtual void agxPowerLine::SubGraph::getConnectorsRecursive ( ConnectorPtrVector &  connectors)
virtualinherited

Fill the given vector with the Connectors that are held by this SubGraph.

The collection is recursive, so internal Connectors will be collected.

Reimplemented in agxDriveTrain::Differential, and agxDriveTrain::deprecated::DriveTrainComponent.

◆ getConstructClassId()

static const char* agxPowerLine::RotationalUnit::getConstructClassId ( )
inlinestaticinherited

Definition at line 102 of file RotationalUnit.h.

◆ getDeleteHandler()

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.

◆ getDeliveredTorque()

virtual agx::Real agxPowerLine::RotationalUnit::getDeliveredTorque ( ) const
virtualinherited

returns the amount of torque delivered from the rotational dimension

◆ getDimension() [1/2]

agxPowerLine::PhysicalDimension* agxPowerLine::Unit::getDimension ( agxPowerLine::PhysicalDimension::Type  type)
inherited
Returns
The PhysicalDimension with the given type, or nullptr. Does not search internal Units.

◆ getDimension() [2/2]

const agxPowerLine::PhysicalDimension* agxPowerLine::Unit::getDimension ( agxPowerLine::PhysicalDimension::Type  type) const
inherited

◆ getDimensions() [1/2]

const agxPowerLine::PhysicalDimensionRefVector& agxPowerLine::Unit::getDimensions ( ) const
inherited
Returns
A vector containing the PhysicalDimensions in this Unit, not including internal Units.

◆ getDimensions() [2/2]

agxPowerLine::PhysicalDimensionRefVector& agxPowerLine::Unit::getDimensions ( )
inherited

◆ getDirection()

virtual agx::Vec3 agxPowerLine::RotationalUnit::getDirection ( ) const
virtualinherited

returns a vector in world coordinates that defines the rotational axis of the rotational unit.

◆ getDischargeCoefficient()

agx::Real agxDriveTrain::CombustionEngine::getDischargeCoefficient ( ) const
Returns
The discharge coefficient of the throttle flow.

◆ getDisplacementVolume()

agx::Real agxDriveTrain::CombustionEngine::getDisplacementVolume ( ) const
Returns
Displacement volume of engine cylinders

◆ getEnable()

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

◆ getEnableSerialization()

bool agxStream::Serializable::getEnableSerialization ( ) const
inherited
Returns
true if serialization is enabled for this object

Definition at line 273 of file Serializable.h.

◆ getEnableUuidGeneration()

bool agxStream::Serializable::getEnableUuidGeneration ( )
inherited
Returns
true if Uuid:s should be generated for each new Serializable object

◆ getEnclosingConnector() [1/2]

Connector* agxPowerLine::SubGraph::getEnclosingConnector ( )
inherited

◆ getEnclosingConnector() [2/2]

const Connector* agxPowerLine::SubGraph::getEnclosingConnector ( ) const
inherited

◆ getEnclosingGraph() [1/2]

SubGraph* agxPowerLine::SubGraph::getEnclosingGraph ( )
inherited

◆ getEnclosingGraph() [2/2]

const SubGraph* agxPowerLine::SubGraph::getEnclosingGraph ( ) const
inherited

◆ getEnclosingUnit() [1/2]

Unit* agxPowerLine::SubGraph::getEnclosingUnit ( )
inherited

◆ getEnclosingUnit() [2/2]

const Unit* agxPowerLine::SubGraph::getEnclosingUnit ( ) const
inherited

◆ getFirstInputConnector()

Connector* agxPowerLine::Unit::getFirstInputConnector ( const agxPowerLine::Unit *  unit) const
inherited

◆ getFirstOutputConnector()

Connector* agxPowerLine::Unit::getFirstOutputConnector ( const agxPowerLine::Unit *  unit) const
inherited

◆ getIdleThrottleAngle()

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

◆ getIgnoreForStoreRestoreStream()

bool agxPowerLine::Unit::getIgnoreForStoreRestoreStream ( ) const
inherited

◆ getIndex()

agx::UInt32 agxStream::Serializable::getIndex ( ) const
inherited

This index is given at creation of this object.

It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.

Returns
an instance index of this object. This is unique for the lifetime of this library instance.

Definition at line 247 of file Serializable.h.

◆ getInertia()

virtual agx::Real agxDriveTrain::CombustionEngine::getInertia ( ) const
overridevirtual

Get the engine inertia.

Reimplemented from agxPowerLine::RotationalUnit.

◆ getInletPressure()

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

Get the current pressure in the inlet manifold, i.e.the pressure right before the cylinders.

Returns
The inlet manifold pressure.

◆ getInletVolume()

agx::Real agxDriveTrain::CombustionEngine::getInletVolume ( ) const
Returns
Volume of the inlet manifold of the engine in m^2

◆ getInputConnectors() [1/2]

size_t agxPowerLine::Unit::getInputConnectors ( const agxPowerLine::Unit *  unit,
agxPowerLine::ConnectorPtrVector &  result 
)
inherited

◆ getInputConnectors() [2/2]

size_t agxPowerLine::Unit::getInputConnectors ( agxPowerLine::ConnectorPtrVector &  result) const
inherited

◆ getInternalConnectors()

const agxPowerLine::ConnectorRefVector& agxPowerLine::SubGraph::getInternalConnectors ( ) const
inherited

◆ getInternalUnits()

const agxPowerLine::UnitRefVector& agxPowerLine::SubGraph::getInternalUnits ( ) const
inherited

◆ getMaxThrottleAngle()

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

◆ getName()

const agx::Name& agxPowerLine::SubGraph::getName ( ) const
inherited
Returns
The name of this power line component.

◆ getNrRevolutionsPerCycle()

agx::Real agxDriveTrain::CombustionEngine::getNrRevolutionsPerCycle ( ) const
Returns
The number of revolutions per engine cylinder cycle

◆ getNumActiveDimensions()

size_t agxPowerLine::Unit::getNumActiveDimensions ( ) const
inherited

The number of non-null PhysicalDimension in this Unit, not including internal Units.

◆ getNumConnectableDimensions()

virtual size_t agxPowerLine::Unit::getNumConnectableDimensions ( Side  side) const
virtualinherited
Returns
The number of connectable PhysicalDimensions in this Unit, including internal.

◆ getNumConnections()

size_t agxPowerLine::Unit::getNumConnections ( ) const
inherited

◆ getOutputConnectors() [1/2]

size_t agxPowerLine::Unit::getOutputConnectors ( const agxPowerLine::Unit *  unit,
agxPowerLine::ConnectorPtrVector &  result 
)
inherited

◆ getOutputConnectors() [2/2]

size_t agxPowerLine::Unit::getOutputConnectors ( agxPowerLine::ConnectorPtrVector &  result) const
inherited

◆ getOutputTorque()

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

◆ getOwnConnectedUnits() [1/2]

void agxPowerLine::Unit::getOwnConnectedUnits ( UnitPtrSetVector &  unitSet,
bool  startFromCleanUnitSet = true 
) const
inherited

Constructs the set of Units connected to this Unit's own dimensions.

Does not consider internal units.

◆ getOwnConnectedUnits() [2/2]

void agxPowerLine::Unit::getOwnConnectedUnits ( UnitPtrSetVector &  unitSet,
agxPowerLine::Side  side,
bool  startFromCleanUnitSet = true 
) const
inherited

◆ getPowerLine()

agxPowerLine::PowerLine* agxPowerLine::Unit::getPowerLine ( ) const
inherited

◆ getReferenceCount()

int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.

◆ getRoot()

agxPowerLine::Unit* agxPowerLine::Unit::getRoot ( ) const
inherited

◆ getRootEnclosingGraph() [1/2]

SubGraph* agxPowerLine::SubGraph::getRootEnclosingGraph ( )
inherited

◆ getRootEnclosingGraph() [2/2]

const SubGraph* agxPowerLine::SubGraph::getRootEnclosingGraph ( ) const
inherited

◆ getRotationalDimension()

agxPowerLine::RotationalDimension* agxPowerLine::RotationalUnit::getRotationalDimension ( ) const
inherited

returns a pointer to the rotational dimension

◆ getRPM()

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

Get revolutions per minute.

◆ getSide()

agxPowerLine::Side agxPowerLine::Unit::getSide ( const Connector *  connector) const
inherited

◆ getStorageAgent()

agxStream::StorageAgent* agxPowerLine::RotationalUnit::getStorageAgent ( ) const
inlineoverridevirtualinherited
Returns
the storage agent

Implements agxStream::Serializable.

Definition at line 102 of file RotationalUnit.h.

◆ getThrottle()

agx::Real agxDriveTrain::CombustionEngine::getThrottle ( ) const
Returns
The current throttle.

◆ getThrottleAngle()

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

◆ getThrottleBore()

agx::Real agxDriveTrain::CombustionEngine::getThrottleBore ( ) const
Returns
Throttle bore, i.e. throttle plate diameter in meters.

◆ getUnitsRecursive()

virtual void agxPowerLine::SubGraph::getUnitsRecursive ( UnitPtrVector &  units)
virtualinherited

Fill the given vector with the Units that are held by this SubGraph.

The collection is recursive, so internal Units will be collected.

Reimplemented in agxDriveTrain::deprecated::DriveTrainComponent.

◆ getUuid()

agx::Uuid agxStream::Serializable::getUuid ( ) const
inherited
Returns
a unique id for this instance.

Definition at line 268 of file Serializable.h.

Referenced by agxSDK::UuidHashCollisionFilter::match().

◆ getVolumetricEfficiency()

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

◆ hasConnector()

bool agxPowerLine::Unit::hasConnector ( const Connector *  connector) const
inherited

◆ hasValidInputConnection()

virtual bool agxPowerLine::Unit::hasValidInputConnection ( ) const
protectedvirtualinherited

returns if it is possible to connect to this unit

◆ is()

template<typename T >
bool agx::Referenced::is ( ) const
inherited

◆ isConnected()

virtual bool agxPowerLine::Unit::isConnected ( agxPowerLine::Unit *  otherUnit) const
virtualinherited
Returns
true if this is connected the other through a connector

◆ isEnclosedWithin()

bool agxPowerLine::SubGraph::isEnclosedWithin ( const SubGraph *  component) const
inherited
Returns
True if this component is enclosed within the given component.

◆ isFinished()

bool agxStream::Serializable::isFinished ( ) const
inherited
Returns
true if this class is restored correctly and should not be deleted during destruction of an Archive.

Definition at line 252 of file Serializable.h.

References AGX_FORCE_INLINE.

◆ isValid()

virtual bool agxPowerLine::Unit::isValid ( ) const
virtualinherited
Returns
True if the unit and its connections and constraints are valid.

◆ postRestore()

virtual bool agxPowerLine::Unit::postRestore ( agxStream::StorageStream &  str)
virtualinherited

Reimplemented in agxDriveTrain::ElectricMotor.

◆ postStore()

virtual bool agxPowerLine::Unit::postStore ( agxStream::StorageStream &  str) const
virtualinherited

Reimplemented in agxDriveTrain::ElectricMotor.

◆ postUpdate()

virtual bool agxPowerLine::RotationalUnit::postUpdate ( agx::Real  timeStep)
overridevirtualinherited

Reimplemented from agxPowerLine::SubGraph.

◆ prepareForRestore()

virtual void agxPowerLine::SubGraph::prepareForRestore ( )
virtualinherited

◆ prepareForStore()

virtual void agxPowerLine::SubGraph::prepareForStore ( )
virtualinherited

◆ preUpdate()

virtual bool agxPowerLine::RotationalUnit::preUpdate ( agx::Real  timeStep)
overridevirtualinherited

◆ reference()

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.

This method should be used with care, always balanced with the same number of calls to unreference.

◆ removeInternalConnector()

void agxPowerLine::SubGraph::removeInternalConnector ( agxPowerLine::Connector *  connector)
protectedinherited

◆ removeInternalUnit()

void agxPowerLine::SubGraph::removeInternalUnit ( agxPowerLine::Unit *  unit)
protectedinherited

◆ removeNotification() [1/2]

virtual bool agxPowerLine::SubGraph::removeNotification ( agxUtil::ConstraintHolder *  holder,
agxSDK::Simulation *  simulation 
)
pure virtualinherited

◆ removeNotification() [2/2]

void agxPowerLine::Unit::removeNotification ( agxPowerLine::PowerLine *  powerLine)
inherited

◆ replaceInternalUnit()

agx::Bool agxPowerLine::SubGraph::replaceInternalUnit ( agxPowerLine::Unit *  oldUnit,
agxPowerLine::Unit *  newUnit 
)
protectedinherited

◆ restore() [1/2]

◆ restore() [2/2]

◆ restorePre46()

void agxPowerLine::Unit::restorePre46 ( agxStream::InputArchive &  in)
protectedinherited

◆ setAngularVelocityDamping()

void agxPowerLine::RotationalUnit::setAngularVelocityDamping ( agx::Real  damping)
inherited

set the angular velocity damping around the local axis (direction)

◆ setDeleteHandler()

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

◆ setDischargeCoefficient()

bool agxDriveTrain::CombustionEngine::setDischargeCoefficient ( agx::Real  dischargeCoefficient)

Set the discharge coefficient of the flow past the throttle.

It describes the ratio between the mass flow rate at the discharge end to that of the ideal mass flow at the discharge.

Parameters
dischargeCoefficient- value between 0 and 1 that. 1 means that the flow is ideal.
Returns
true of successful, false otherwise

◆ setDisplacementVolume()

void agxDriveTrain::CombustionEngine::setDisplacementVolume ( agx::Real  displacementVolume)

Set the total Displacement volume of engine cylinders in m^2.

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

◆ setEnableSerialization()

void agxStream::Serializable::setEnableSerialization ( bool  flag)
inherited

Set to false to disable serialization of this object.

It will just be ignored during serialization (writing). It is still possible to restore TO this object.

◆ setEnableUuidGeneration()

static void agxStream::Serializable::setEnableUuidGeneration ( bool  flag)
staticinherited

Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.

◆ setFinished()

void agxStream::Serializable::setFinished ( )
inherited

Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.

◆ setIdleThrottleAngle()

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

Set the idle throttle angle for the engine, i.e.

the smallest angle the throttle can have when the engine is running.

Parameters
throttleAngle- angle for idle throttle, must be larger than 0 and smaller than maximum throttle angle
Returns
true if successful, false otherwise

◆ setInertia()

virtual void agxDriveTrain::CombustionEngine::setInertia ( agx::Real  inertia)
overridevirtual

Set the inertia for the engine.

Reimplemented from agxPowerLine::RotationalUnit.

◆ setInletVolume()

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

Set the inlet manifold volume of the engine.

Parameters
inletVolume- inlet manifold volume in m^2, which must be larger than 0.
Returns
true of successful, false otherwise

◆ setMaxThrottleAngle()

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

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

the angle is has when the engine has full gas.

Parameters
throttleAngle- maximum throttle angle, must be smaller than pi/2 rad and larger than idle throttle angle.
Returns
true if successful, false otherwise

◆ setName()

void agxPowerLine::SubGraph::setName ( const agx::Name &  name)
inherited

Set the name of this power line component.

Parameters
name- The new name.

◆ setNrRevolutionsPerCycle()

bool agxDriveTrain::CombustionEngine::setNrRevolutionsPerCycle ( agx::Real  nrRevolutionsPerCycle)

Set how many revolutions per cycle the engine cylinders have.

Parameters
nrRevolutionsPerCycle- 1 for two-stroke engine, 2 for four-stroke engine
Returns
true if successful, false otherwise

◆ setPowerLine()

void agxPowerLine::Unit::setPowerLine ( PowerLine *  powerLine)
protectedinherited

Point to the power line the unit is a part of.

◆ setRoot()

void agxPowerLine::Unit::setRoot ( agxPowerLine::Unit *  root)
inherited

◆ setThrottle()

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

Set the percentage that the throttle is open.

Parameters
throttle- 0 means no gas (idle), 1 means full gas.
Returns
true if successful, false otherwise

◆ setThrottleAngle()

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

Set the throttle plate angle directly, instead of percentage of throttle opening.

Parameters
throttleAngle- angle in radians. Cannot be smaller than idle throttle and must be smaller than pi/2.
Returns
true if successful, false otherwise

◆ setThrottleAngleRange()

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

Set the smallest and largest angle 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, must be larger than 0 and smaller than maximum angle
max- maximum throttle angle, must be smaller than pi/2 rad and larger than minimum angle
Returns
true if successful, false otherwise

◆ setThrottleBore()

bool agxDriveTrain::CombustionEngine::setThrottleBore ( agx::Real  throttleBore)

Set the diameter of the throttle plate, which is assumed to be circular.

Parameters
throttleBore- throttle bore given in meters, which must be larger than 0.
Returns
true of successful, false otherwise

◆ setUuid()

void agxStream::Serializable::setUuid ( const agx::Uuid &  uuid)
inherited

Explicitly set a Uuid on a serializable object.

Use this method with great care, as it can result in non-unique identifiers in the system!

◆ setVolumetricEfficiency()

bool agxDriveTrain::CombustionEngine::setVolumetricEfficiency ( agx::Real  volumetricEfficiency)

Set the volumetric efficiency.

It describes the ratio of air volume drawn into the cylinders to the volume the cylinder sweeps, the displacement volume.

Parameters
volumetricEfficiency- the volumetric efficiency. Should be a value between 0 and 1.

◆ spreadPowerLineToGraph()

void agxPowerLine::SubGraph::spreadPowerLineToGraph ( )
inherited

◆ spreadRootToGraph()

void agxPowerLine::Unit::spreadRootToGraph ( )
inherited

◆ store() [1/2]

◆ store() [2/2]

◆ unreference()

void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.

This method should be used with care, always balanced with the same number of calls to reference.

Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().

◆ unreference_nodelete()

void agx::Referenced::unreference_nodelete ( ) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.

◆ ValidateCast()

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited

◆ vetoConnect()

virtual bool agxPowerLine::Unit::vetoConnect ( agxPowerLine::Connector *  connector) const
virtualinherited

Member Data Documentation

◆ m_attachBody

agx::observer_ptr<agx::RigidBody> agxPowerLine::Unit::m_attachBody
protectedinherited

Definition at line 326 of file Unit.h.

◆ m_dimensions

PhysicalDimensionRefVector agxPowerLine::Unit::m_dimensions
protectedinherited

Definition at line 324 of file Unit.h.

◆ m_enclosingGraph

SubGraphObserver agxPowerLine::SubGraph::m_enclosingGraph
protectedinherited

Definition at line 162 of file SubGraph.h.

◆ m_ignoreMeForStoreRestoreStream

bool agxPowerLine::Unit::m_ignoreMeForStoreRestoreStream
protectedinherited

Definition at line 328 of file Unit.h.

◆ m_internalConnectors

ConnectorRefVector agxPowerLine::SubGraph::m_internalConnectors
protectedinherited

Definition at line 164 of file SubGraph.h.

◆ m_internalUnits

UnitRefVector agxPowerLine::SubGraph::m_internalUnits
protectedinherited

Definition at line 163 of file SubGraph.h.

◆ m_mutex

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

◆ m_name

agx::Name agxPowerLine::SubGraph::m_name
protectedinherited

Definition at line 166 of file SubGraph.h.

◆ m_observers

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

◆ m_powerLine

PowerLine* agxPowerLine::SubGraph::m_powerLine
protectedinherited

Definition at line 165 of file SubGraph.h.

◆ m_refCount

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

◆ m_rootUnit

agxPowerLine::Unit* agxPowerLine::Unit::m_rootUnit
protectedinherited

Definition at line 330 of file Unit.h.

◆ m_rotationalDimension

RotationalDimensionRef agxPowerLine::RotationalUnit::m_rotationalDimension
protectedinherited

Definition at line 108 of file RotationalUnit.h.


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