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
13 // =============================================================================
14 //
15 // UAZBUS leafspring axle.
16 //
17 // =============================================================================
18 
19 #ifndef UAZBUS_LEAFSPRING_AXLE_H
20 #define UAZBUS_LEAFSPRING_AXLE_H
21 
22 #include "chrono_vehicle/wheeled_vehicle/suspension/ChLeafspringAxle.h"
23 
24 #include "chrono_models/ChApiModels.h"
25 
26 namespace chrono {
27 namespace vehicle {
28 namespace uaz {
29 
30 /// @addtogroup vehicle_models_uaz
31 /// @{
32 
33 /// Leafspring axle subsystem for the uaz vehicle.
34 
35 class CH_MODELS_API UAZBUS_LeafspringAxle : public ChLeafspringAxle {
36   public:
37     UAZBUS_LeafspringAxle(const std::string& name);
38     ~UAZBUS_LeafspringAxle();
39 
40 
41   protected:
42     virtual const ChVector<> getLocation(PointId which) override;
43 
getAxleTubeMass()44     virtual double getAxleTubeMass() const override { return m_axleTubeMass; }
getSpindleMass()45     virtual double getSpindleMass() const override { return m_spindleMass; }
46 
getAxleTubeRadius()47     virtual double getAxleTubeRadius() const override { return m_axleTubeRadius; }
getSpindleRadius()48     virtual double getSpindleRadius() const override { return m_spindleRadius; }
getSpindleWidth()49     virtual double getSpindleWidth() const override { return m_spindleWidth; }
50 
getAxleTubeCOM()51     virtual const ChVector<> getAxleTubeCOM() const override { return ChVector<>(0,0,0); }
52 
getAxleTubeInertia()53     virtual const ChVector<>& getAxleTubeInertia() const override { return m_axleTubeInertia; }
getSpindleInertia()54     virtual const ChVector<>& getSpindleInertia() const override { return m_spindleInertia; }
55 
getAxleInertia()56     virtual double getAxleInertia() const override { return m_axleShaftInertia; }
57 
getSpringRestLength()58     virtual double getSpringRestLength() const override { return m_springRestLength; }
59     /// Return the functor object for spring force.
getSpringForceFunctor()60     virtual std::shared_ptr<ChLinkTSDA::ForceFunctor> getSpringForceFunctor() const override { return m_springForceCB; }
61     /// Return the functor object for shock force.
getShockForceFunctor()62     virtual std::shared_ptr<ChLinkTSDA::ForceFunctor> getShockForceFunctor() const override { return m_shockForceCB; }
63 
64   private:
65     std::shared_ptr<ChLinkTSDA::ForceFunctor> m_springForceCB;
66     std::shared_ptr<ChLinkTSDA::ForceFunctor> m_shockForceCB;
67 
68     static const double m_axleShaftInertia;
69 
70     static const double m_axleTubeMass;
71     static const double m_spindleMass;
72 
73     static const double m_axleTubeRadius;
74     static const double m_spindleRadius;
75     static const double m_spindleWidth;
76 
77     static const ChVector<> m_axleTubeInertia;
78     static const ChVector<> m_spindleInertia;
79 
80     static const double m_springCoefficient;
81     static const double m_springRestLength;
82     static const double m_springDesignLength;
83     static const double m_springMinLength;
84     static const double m_springMaxLength;
85 
86     static const double m_damperCoefficient;
87     static const double m_damperDegressivityExpansion;
88     static const double m_damperDegressivityCompression;
89 };
90 
91 /// @} vehicle_models_uaz
92 
93 }  // end namespace uaz
94 }  // end namespace vehicle
95 }  // end namespace chrono
96 
97 #endif
98