chrono::utils::NonlinearSpringForce Class Reference
  Description
Utility class for specifying a nonlinear translational spring force with pre-tension.
F = P - mapK(length - rest_length)
#include <ChForceFunctors.h>
Inheritance diagram for chrono::utils::NonlinearSpringForce:

Collaboration diagram for chrono::utils::NonlinearSpringForce:

| Public Member Functions | |
| NonlinearSpringForce (double preload=0) | |
| NonlinearSpringForce (const std::vector< std::pair< double, double >> &dataK, double preload=0) | |
| void | add_pointK (double x, double y) | 
| virtual double | evaluate (double time, double rest_length, double length, double vel, const ChLinkTSDA &link) override | 
| Calculate and return the general spring-damper force at the specified configuration.  More... | |
| virtual rapidjson::Value | exportJSON (rapidjson::Document::AllocatorType &allocator) override | 
| Optional reporting function to generate a JSON value with functor information. | |
|  Public Member Functions inherited from chrono::utils::SpringForce | |
| SpringForce (double preload) | |
| void | enable_stops (double min_length, double max_length) | 
| void | set_stops (const std::vector< std::pair< double, double >> &data_bump, const std::vector< std::pair< double, double >> &data_rebound) | 
| void | set_stops (double bump_coefficient, double rebound_coefficient) | 
| double | evaluate_stops (double length) | 
| Additional Inherited Members | |
|  Protected Attributes inherited from chrono::utils::SpringForce | |
| double | m_P | 
| pre-tension | |
| bool | m_stops | 
| double | m_min_length | 
| double | m_max_length | 
| ChFunctionInterp | m_bump | 
| ChFunctionInterp | m_rebound | 
Member Function Documentation
◆ evaluate()
| 
 | overridevirtual | 
Calculate and return the general spring-damper force at the specified configuration.
If the link has internal ODE states, the current states can be accessed with link->GetStates().
- Parameters
- 
  time current time rest_length undeformed length length current length vel current velocity (positive when extending) link associated TSDA link 
Implements chrono::ChLinkTSDA::ForceFunctor.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/utils/ChForceFunctors.h
- /builds/uwsbel/chrono/src/chrono/utils/ChForceFunctors.cpp
