Project Chrono: chrono::ChLinkTSDA::ForceFunctor Class Reference

Public Member Functions | List of all members
chrono::ChLinkTSDA::ForceFunctor Class Referenceabstract

## Description

Class to be used as a callback interface for calculating the general spring-damper force.

`#include <ChLinkTSDA.h>`

Inheritance diagram for chrono::ChLinkTSDA::ForceFunctor:
[legend]

## Public Member Functions
virtual double | evaluate (double time, double rest_length, double length, double vel, const ChLinkTSDA &link)=0
| Calculate and return the general spring-damper force at the specified configuration.
virtual rapidjson::Value | exportJSON (rapidjson::Document::AllocatorType &allocator)
| Optional reporting function to generate a JSON value with functor information.

## Member Function Documentation

## ◆ evaluate()

virtual double chrono::ChLinkTSDA::ForceFunctor::evaluate | ( | double | time,
|  | double | rest_length,
|  | double | length,
|  | double | vel,
|  | const ChLinkTSDA & | link )
| pure virtual

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

Implemented in chrono::vehicle::DegressiveDamperForce, chrono::vehicle::fmtv::MTV_ShockForceRear, chrono::vehicle::fmtv::MTV_SpringForceRear, chrono::vehicle::LinearDamperForce, chrono::vehicle::LinearSpringDamperForce, chrono::vehicle::LinearSpringForce, chrono::vehicle::MapSpringDamperForce, chrono::vehicle::NonlinearDamperForce, chrono::vehicle::NonlinearSpringDamperForce, and chrono::vehicle::NonlinearSpringForce.

## ◆ exportJSON()

virtual rapidjson::Value chrono::ChLinkTSDA::ForceFunctor::exportJSON | ( | rapidjson::Document::AllocatorType & | allocator | ) |
| inlinevirtual

Optional reporting function to generate a JSON value with functor information.

Reimplemented in chrono::vehicle::DegressiveDamperForce, chrono::vehicle::LinearDamperForce, chrono::vehicle::LinearSpringDamperForce, chrono::vehicle::LinearSpringForce, chrono::vehicle::MapSpringDamperForce, chrono::vehicle::NonlinearDamperForce, chrono::vehicle::NonlinearSpringDamperForce, chrono::vehicle::NonlinearSpringForce, and chrono::vehicle::SpringForce.

The documentation for this class was generated from the following file:

- D:/W/B/src/chrono-9.0.1/src/chrono/physics/ChLinkTSDA.h