chrono::vehicle::ChShaftsPowertrain Class Referenceabstract

Description

Template for a powertrain model using shaft elements.

#include <ChShaftsPowertrain.h>

Inheritance diagram for chrono::vehicle::ChShaftsPowertrain:
Collaboration diagram for chrono::vehicle::ChShaftsPowertrain:

Public Member Functions

 ChShaftsPowertrain (const ChVector<> &dir_motor_block=ChVector<>(1, 0, 0))
 Construct a shafts-based powertrain model.
 
virtual double GetMotorSpeed () const override
 Return the current engine speed.
 
virtual double GetMotorTorque () const override
 Return the current engine torque.
 
virtual double GetTorqueConverterSlippage () const override
 Return the value of slippage in the torque converter.
 
virtual double GetTorqueConverterInputTorque () const override
 Return the input torque to the torque converter.
 
virtual double GetTorqueConverterOutputTorque () const override
 Return the output torque from the torque converter.
 
virtual int GetCurrentTransmissionGear () const override
 Return the current transmission gear.
 
virtual double GetOutputTorque () const override
 Return the ouput torque from the powertrain. More...
 
virtual void SetDriveMode (ChPowertrain::DriveMode mmode) override
 Use this function to set the mode of automatic transmission.
 
void SetSelectedGear (int igear)
 Use this function to shift from one gear to another. More...
 
void SetGearShiftLatency (double ml)
 Use this to define the gear shift latency, in seconds.
 
double GetGearShiftLatency (double ml)
 Use this to get the gear shift latency, in seconds.
 
virtual void Initialize (std::shared_ptr< ChBody > chassis, std::shared_ptr< ChShaft > driveshaft) override
 Initialize this powertrain system. More...
 
virtual void Synchronize (double time, double throttle, double shaft_speed) override
 Update the state of this powertrain system at the current time. More...
 
virtual void Advance (double step) override
 Advance the state of this powertrain system by the specified time step. More...
 
- Public Member Functions inherited from chrono::vehicle::ChPowertrain
DriveMode GetDriveMode ()
 Return the current mode of the transmission.
 

Protected Member Functions

virtual void SetGearRatios (std::vector< double > &gear_ratios)=0
 Set up the gears, i.e. More...
 
virtual double GetMotorBlockInertia () const =0
 Inertias of the component ChShaft objects.
 
virtual double GetCrankshaftInertia () const =0
 
virtual double GetIngearShaftInertia () const =0
 
virtual void SetEngineTorqueMap (std::shared_ptr< ChFunction_Recorder > &map)=0
 Engine speed-torque map.
 
virtual void SetEngineLossesMap (std::shared_ptr< ChFunction_Recorder > &map)=0
 Engine speed-torque braking effect because of losses.
 
virtual void SetTorqueConverterCapacityFactorMap (std::shared_ptr< ChFunction_Recorder > &map)=0
 Set the capacity factor map. More...
 
virtual void SetTorqeConverterTorqueRatioMap (std::shared_ptr< ChFunction_Recorder > &map)=0
 Set the torque ratio map. More...
 

Additional Inherited Members

- Public Types inherited from chrono::vehicle::ChPowertrain
enum  DriveMode { FORWARD, NEUTRAL, REVERSE }
 Driving modes. More...
 
- Protected Attributes inherited from chrono::vehicle::ChPowertrain
DriveMode m_drive_mode
 

Member Function Documentation

virtual void chrono::vehicle::ChShaftsPowertrain::Advance ( double  step)
overridevirtual

Advance the state of this powertrain system by the specified time step.

Since the state of a ShaftsPowertrain is advanced as part of the vehicle state, this function does nothing.

Implements chrono::vehicle::ChPowertrain.

virtual double chrono::vehicle::ChShaftsPowertrain::GetOutputTorque ( ) const
overridevirtual

Return the ouput torque from the powertrain.

This is the torque that is passed to a vehicle system, thus providing the interface between the powertrain and vehcicle cosimulation modules. Since a ShaftsPowertrain is directly connected to the vehicle's driveline, this function returns 0.

Implements chrono::vehicle::ChPowertrain.

void chrono::vehicle::ChShaftsPowertrain::Initialize ( std::shared_ptr< ChBody chassis,
std::shared_ptr< ChShaft driveshaft 
)
overridevirtual

Initialize this powertrain system.

This creates all the wrapped ChShaft objects and their constraints, torques etc. and connects the powertrain to the vehicle.

Parameters
[in]chassischassis o the associated vehicle
[in]driveshaftshaft connection to the vehicle driveline

Implements chrono::vehicle::ChPowertrain.

virtual void chrono::vehicle::ChShaftsPowertrain::SetGearRatios ( std::vector< double > &  gear_ratios)
protectedpure virtual

Set up the gears, i.e.

the transmission ratios of the various gears. A derived class must populate the vector gear_ratios, using the 0 index for reverse and 1,2,3,etc. for the forward gears.

void chrono::vehicle::ChShaftsPowertrain::SetSelectedGear ( int  igear)

Use this function to shift from one gear to another.

A zero latency shift is assumed. Note, index starts from 0.

virtual void chrono::vehicle::ChShaftsPowertrain::SetTorqeConverterTorqueRatioMap ( std::shared_ptr< ChFunction_Recorder > &  map)
protectedpure virtual

Set the torque ratio map.

Specify torque ratio as a function of the speed ratio.

virtual void chrono::vehicle::ChShaftsPowertrain::SetTorqueConverterCapacityFactorMap ( std::shared_ptr< ChFunction_Recorder > &  map)
protectedpure virtual

Set the capacity factor map.

Specify the capacity factor as a function of the speed ratio.

void chrono::vehicle::ChShaftsPowertrain::Synchronize ( double  time,
double  throttle,
double  shaft_speed 
)
overridevirtual

Update the state of this powertrain system at the current time.

The powertrain system is provided the current driver throttle input, a value in the range [0,1], and the current angular speed of the transmission shaft (from the driveline).

Parameters
[in]timecurrent time
[in]throttlecurrent throttle input [0,1]
[in]shaft_speedcurrent angular speed of the transmission shaft

Implements chrono::vehicle::ChPowertrain.