Parameters: |
---|
This is the base class for all forces in a System. It should never be created directly. Forces are created by instantiating a specific type of force..
See trep.forces - Forces for the built-in types of forces. Additional forces can be added through either the Python or C-API.
Forces are used to include non-conservative and control forces in a mechanical system. Forces must be expressed in the generalized coordinates of the system. Conservative forces like gravity or spring-like potentials should be implemented using Potential instead.
The name of this force or None.
Parameters: | q (Config) – Configuration variable |
---|
Calculate the force on configuration variable q at the current state of the system.
Desired Calculation | Required |
---|---|
Continuous Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Discrete Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Parameters: |
---|
Calculate the derivative of the force on configuration variable q with respect to the value of q1.
Desired Calculation | Required |
---|---|
Continuous Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Discrete Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Parameters: |
---|
Calculate the derivative of the force on configuration variable q with respect to the velocity of dq1.
Desired Calculation | Required |
---|---|
Continuous Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Discrete Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Parameters: |
---|
Calculate the derivative of the force on configuration variable q with respect to the value of u1.
Desired Calculation | Required |
---|---|
Continuous Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Discrete Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Parameters: |
---|
Calculate the second derivative of the force on configuration variable q with respect to the value of q1 and the value of q2.
Desired Calculation | Required |
---|---|
Continuous Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Discrete Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Parameters: |
---|
Calculate the second derivative of the force on configuration variable q with respect to the velocity of dq1 and the value of q2.
Desired Calculation | Required |
---|---|
Continuous Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Discrete Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Parameters: |
---|
Calculate the second derivative of the force on configuration variable q with respect to the velocity of dq1 and the velocity of q2.
Desired Calculation | Required |
---|---|
Continuous Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Discrete Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Parameters: |
---|
Calculate the second derivative of the force on configuration variable q with respect to the value of u1 and the value of q2.
Desired Calculation | Required |
---|---|
Continuous Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Discrete Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Parameters: |
---|
Calculate the second derivative of the force on configuration variable q with respect to the value of u1 and the velocity of q2.
Desired Calculation | Required |
---|---|
Continuous Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Discrete Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Parameters: |
---|
Calculate the second derivative of the force on configuration variable q with respect to the value of u1 and the value of u2.
Desired Calculation | Required |
---|---|
Continuous Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
Discrete Dynamics | ? |
1st Derivative | ? |
2nd Derivative | ? |
It is important that the derivatives of f() are correct. The easiest way to check their correctness is to approximate each derivative using numeric differentiation. These methods are provided to perform this test. The derivatives are only compared at the current configuration of the system. For improved coverage, try running each test several times at different configurations.
Parameters: |
|
---|---|
Return type: | Boolean indicating if all tests passed |
Check the derivatives against the approximate numeric derivative calculated from one less derivative (ie, approximate f_dq() from f() and f_dudq() from f_du()).
See System.test_derivative_dq(), System.test_derivative_ddq(), and System.test_derivative_du() for details of the approximation and comparison.