Chrono::Engine C++ API
Public Member Functions
chrono::ChShaftsPlanetary Class Reference

#include <ChShaftsPlanetary.h>

Inheritance diagram for chrono::ChShaftsPlanetary:
Inheritance graph
[legend]
Collaboration diagram for chrono::ChShaftsPlanetary:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChShaftsPlanetary ()
 ~ChShaftsPlanetary ()
void Copy (ChShaftsPlanetary *source)
virtual int GetDOC_c ()
virtual void InjectConstraints (ChLcpSystemDescriptor &mdescriptor)
virtual void ConstraintsBiReset ()
virtual void ConstraintsBiLoad_C (double factor=1., double recovery_clamp=0.1, bool do_clamp=false)
virtual void ConstraintsBiLoad_Ct (double factor=1.)
virtual void ConstraintsLoadJacobians ()
virtual void ConstraintsLiLoadSuggestedSpeedSolution ()
virtual void ConstraintsLiLoadSuggestedPositionSolution ()
virtual void ConstraintsLiFetchSuggestedSpeedSolution ()
virtual void ConstraintsLiFetchSuggestedPositionSolution ()
virtual void ConstraintsFetch_react (double factor=1.)
virtual int Initialize (ChSharedPtr< ChShaft > &mshaft1, ChSharedPtr< ChShaft > &mshaft2, ChSharedPtr< ChShaft > &mshaft3)
ChShaftGetShaft1 ()
ChShaftGetShaft2 ()
ChShaftGetShaft3 ()
void SetTransmissionRatios (double mr1, double mr2, double mr3)
void SetTransmissionRatios (double t0)
double GetTransmissionR1 ()
double GetTransmissionR2 ()
double GetTransmissionR3 ()
double GetTorqueReactionOn1 ()
double GetTorqueReactionOn2 ()
double GetTorqueReactionOn3 ()
virtual void Update (double mytime)
void StreamIN (ChStreamInBinary &mstream)
void StreamOUT (ChStreamOutBinary &mstream)

Detailed Description

Class for defining a planetary gear between three one-degree-of-freedom parts (that is, shafts that can be used to build 1D models of power trains - this is more efficient than simulating power trains modeled full 3D ChBody objects). Planetary gears can be used to make, for instance, the differentials of cars. While traditional gear reducers have one input and one output, the planetary gear have two inputs and one output (or, if you prefer, one input and two outputs).


Constructor & Destructor Documentation

chrono::ChShaftsPlanetary::ChShaftsPlanetary ( )

Constructor.

CLASS FOR SHAFTS.


Member Function Documentation

void chrono::ChShaftsPlanetary::ConstraintsBiLoad_C ( double  factor = 1.,
double  recovery_clamp = 0.1,
bool  do_clamp = false 
) [virtual]

Adds the current C (constraint violation) to the known term (b_i) of encapsulated ChLcpConstraints

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChShaftsPlanetary::ConstraintsBiLoad_Ct ( double  factor = 1.) [virtual]

Adds the current Ct (partial t-derivative, as in C_dt=0-> [Cq]*q_dt=-Ct) to the known term (b_i) of encapsulated ChLcpConstraints

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChShaftsPlanetary::ConstraintsFetch_react ( double  factor = 1.) [virtual]

Fetches the reactions from the lagrangian multiplier (l_i) of encapsulated ChLcpConstraints. Mostly used after the LCP provided the solution in ChLcpConstraints. Also, should convert the reactions obtained from dynamical simulation, from link space to intuitive react_force and react_torque.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChShaftsPlanetary::ConstraintsLiFetchSuggestedSpeedSolution ( ) [virtual]

After the LCP solver has found the l_i lagangian multipliers for the SPEED problem, this function will be called to store the solutions in a cache (to be implemented in ChLink sub classes) so that it can be later retrieved with ConstraintsLiLoadSuggestedSpeedSolution(). If you do not plan to implement a l_i cache, just do not override this function in child classes and do nothing.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChShaftsPlanetary::ConstraintsLiLoadSuggestedSpeedSolution ( ) [virtual]

Fills the solution of the constraint (the lagrangian multiplier l_i) with an initial guess, if any. This can be used for warm-starting the LCP solver before starting the solution of the SPEED problem, if some approximate solution of constraint impulese l_i already exist (ex. cached from a previous LCP execution) When implementing this in sub classes, if no guess is available, set l_i as 0.

Reimplemented from chrono::ChPhysicsItem.

int chrono::ChShaftsPlanetary::Initialize ( ChSharedPtr< ChShaft > &  mshaft1,
ChSharedPtr< ChShaft > &  mshaft2,
ChSharedPtr< ChShaft > &  mshaft3 
) [virtual]

Use this function after planetary gear creation, to initialize it, given three shafts to join. Although there's no special requirement, you may think of the three typical moving parts of an apycycloidal reducer: the carrier, the input gear, and the gear with inner teeth that usually is kept fixed (but the ChShaftsPlanetary does not require that one shaft is fixed - it's up to you) Each shaft must belong to the same ChSystem.

Parameters:
mshaft1first shaft to join (carrier wheel -usually the output)
mshaft2second shaft to join (wheel -usually the input)
mshaft3third shaft to join (wheel -other input, or fixed)
void chrono::ChShaftsPlanetary::InjectConstraints ( ChLcpSystemDescriptor mdescriptor) [virtual]

Tell to a system descriptor that there are contraints of type ChLcpConstraint in this object (for further passing it to a LCP solver) Basically does nothing, but maybe that inherited classes may specialize this.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChShaftsPlanetary::SetTransmissionRatios ( double  mr1,
double  mr2,
double  mr3 
)

Set the transmission ratios r1 r2 r3 as in r1*w1 + r2*w2 + r3*w3 = 0 For example, for the car differential, if you assume that shaft 1 is the carrier and shafts 2 and 3 go to the wheel hubs, you must use r1=-2, r2=1, r3=1 to satisfy the kinematics -2*w1+w2+w3=0 of the differential; equivalently, you may use r1=1, r2=-0.5, r3=-0.5 (the equation would hold the same).

void chrono::ChShaftsPlanetary::SetTransmissionRatios ( double  t0)

Setting the transmission ratios r1 r2 r3 for r1*w1 + r2*w2 + r3*w3 = 0 may be cumbersome, but when you deal with typical planetary devices, this function provides a shortcut to setting them for you, given a single parameter 't0', that is the speed ratio t'=w3'/w2' of the inverted planetary. That ratio is simple to get: to invert the planetary, imagine to hold fixed the wheel of shaft 1 (that is w1' =0), move the shaft 2 and see which is the speed of shaft 3, to get the ratio t'=w3'/w2'. Generally, shaft 1 is called the 'carrier'. For example, in normal operation of an epicycloidal reducer, the carrier (shaft 1) is used as output, shaft 2 is the input, and shaft 3 is hold fixed to get one degree of freedom only; but in 'inverted' operation imagine the carrier is fixed, so t' can be easily got as t'=-z2/z3, with z=n.of teeth. In a car differential, again with shaft 1 as carrier, one can see that t'=w3'/w2' so t'=-1. See the Willis theory for more details on these formulas. Note that t' must be different from 1 (singularity) Once you get t', simply use this function and it will set r1 r2 r3 automatically.

void chrono::ChShaftsPlanetary::StreamIN ( ChStreamInBinary mstream) [virtual]

Method to allow deserializing a persistent binary archive (ex: a file) into transient data.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChShaftsPlanetary::StreamOUT ( ChStreamOutBinary mstream) [virtual]

Method to allow serializing transient data into a persistent binary archive (ex: a file).

Reimplemented from chrono::ChPhysicsItem.