1 // =============================================================================
2 // PROJECT CHRONO - http://projectchrono.org
3 //
4 // Copyright (c) 2014 projectchrono.org
5 // All rights reserved.
6 //
7 // Use of this source code is governed by a BSD-style license that can be found
8 // in the LICENSE file at the top level of the distribution and at
9 // http://projectchrono.org/license-chrono.txt.
10 //
11 // =============================================================================
12 // Authors: Radu Serban, Rainer Gericke
13 // =============================================================================
14 //
15 // FMTV front toebar leafspring axle.
16 //
17 // =============================================================================
18 
19 #ifndef FMTV_TOEBARLEAFSPRING_AXLE_H
20 #define FMTV_TOEBARLEAFSPRING_AXLE_H
21 
22 #include "chrono_vehicle/wheeled_vehicle/suspension/ChToeBarLeafspringAxle.h"
23 
24 #include "chrono_models/ChApiModels.h"
25 
26 namespace chrono {
27 namespace vehicle {
28 namespace fmtv {
29 
30 /// @addtogroup vehicle_models_fmtv
31 /// @{
32 
33 /// Toebar leafspring front axle subsystem for the FMTV vehicles.
34 class CH_MODELS_API FMTV_ToebarLeafspringAxle : public ChToeBarLeafspringAxle {
35   public:
36     FMTV_ToebarLeafspringAxle(const std::string& name);
~FMTV_ToebarLeafspringAxle()37     ~FMTV_ToebarLeafspringAxle() {}
38 
39   protected:
40     virtual const ChVector<> getLocation(PointId which) override;
41 
getAxleTubeMass()42     virtual double getAxleTubeMass() const override { return m_axleTubeMass; }
getSpindleMass()43     virtual double getSpindleMass() const override { return m_spindleMass; }
getKnuckleMass()44     virtual double getKnuckleMass() const override { return m_knuckleMass; }
getTierodMass()45     virtual double getTierodMass() const override { return m_tierodMass; }
getDraglinkMass()46     virtual double getDraglinkMass() const override { return m_draglinkMass; }
47 
getAxleTubeRadius()48     virtual double getAxleTubeRadius() const override { return m_axleTubeRadius; }
getSpindleRadius()49     virtual double getSpindleRadius() const override { return m_spindleRadius; }
getSpindleWidth()50     virtual double getSpindleWidth() const override { return m_spindleWidth; }
getKnuckleRadius()51     virtual double getKnuckleRadius() const override { return m_knuckleRadius; }
getTierodRadius()52     virtual double getTierodRadius() const override { return m_tierodRadius; }
getDraglinkRadius()53     virtual double getDraglinkRadius() const override { return m_draglinkRadius; }
54 
getAxleTubeCOM()55     virtual const ChVector<> getAxleTubeCOM() const override { return ChVector<>(0, 0, 0); }
56 
getAxleTubeInertia()57     virtual const ChVector<>& getAxleTubeInertia() const override { return m_axleTubeInertia; }
getSpindleInertia()58     virtual const ChVector<>& getSpindleInertia() const override { return m_spindleInertia; }
getKnuckleInertia()59     virtual const ChVector<>& getKnuckleInertia() const override { return m_knuckleInertia; }
getTierodInertia()60     virtual const ChVector<>& getTierodInertia() const override { return m_tierodInertia; }
getDraglinkInertia()61     virtual const ChVector<>& getDraglinkInertia() const override { return m_draglinkInertia; }
62 
getAxleInertia()63     virtual double getAxleInertia() const override { return m_axleShaftInertia; }
64 
getSpringRestLength()65     virtual double getSpringRestLength() const override { return m_springRestLength; }
66     /// Return the functor object for spring force.
getSpringForceFunctor()67     virtual std::shared_ptr<ChLinkTSDA::ForceFunctor> getSpringForceFunctor() const override { return m_springForceCB; }
68     /// Return the functor object for shock force.
getShockForceFunctor()69     virtual std::shared_ptr<ChLinkTSDA::ForceFunctor> getShockForceFunctor() const override { return m_shockForceCB; }
70 
71   private:
72     std::shared_ptr<ChLinkTSDA::ForceFunctor> m_springForceCB;
73     std::shared_ptr<ChLinkTSDA::ForceFunctor> m_shockForceCB;
74 
75     static const double m_axleShaftInertia;
76 
77     static const double m_axleTubeMass;
78     static const double m_spindleMass;
79     static const double m_knuckleMass;
80     static const double m_tierodMass;
81     static const double m_draglinkMass;
82 
83     static const double m_axleTubeRadius;
84     static const double m_spindleRadius;
85     static const double m_spindleWidth;
86     static const double m_knuckleRadius;
87     static const double m_tierodRadius;
88     static const double m_draglinkRadius;
89 
90     static const ChVector<> m_axleTubeInertia;
91     static const ChVector<> m_spindleInertia;
92     static const ChVector<> m_knuckleInertia;
93     static const ChVector<> m_tierodInertia;
94     static const ChVector<> m_draglinkInertia;
95 
96     static const double m_springCoefficient;
97     static const double m_springRestLength;
98     static const double m_springDesignLength;
99     static const double m_springMinLength;
100     static const double m_springMaxLength;
101 
102     static const double m_damperCoefficient;
103     static const double m_damperDegressivityExpansion;
104     static const double m_damperDegressivityCompression;
105 };
106 
107 /// @} vehicle_models_fmtv
108 
109 }  // namespace fmtv
110 }  // end namespace vehicle
111 }  // end namespace chrono
112 
113 #endif
114