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