This component belongs to the category of ForceField. This component allows to simulate springs with Polynomial stress strain behavior. If we note:
- the spring force
- the cross section (always 1.0)
- the stress-strain non-linear function
- the original length and the current length of the spring
- the point displacement
the generic non-linear force can thus be written: where is polynom as follows: and
The dedication of jacobian matrix for PolynomialSpringForceField is given below:
Note that a RestShapePolynomialSpringsForceField does exist. It will compute the same non-linear force with regards to the rest shape of one single object. To avoid Nan problems when a spring has a zero length, an exponential addition to the denominator has been added. As a result, the stress simulation is shifted compared with polynomial values, but it keeps its nonlinearity:
More details were given in the pull-request #1342.
The polynomial parameters are set as two arrays:
- polynomialDegree: describing the set of polynomial degrees for every spring
- polynomialStiffness: describing the set of polynomial coefficients sequentially combined in one vector.
The coefficients are put from smaller degree to bigger one, and the free coefficient is always zero (since for no strain we have no stress). For examples the coefficients for polynomials [3,2,4] will be put as [a1,a2,a3,b1,b2,c1,c2,c3,c4].
- firstObjectPoints corresponding to the indices of the points related to the first object
- secondObjectPoints corresponding to the indices of the points related to the second object
- compressible: indicating if object compresses without reaction force
The PolynomialSpringsForceField requires two different objects to link, which means two MechanicalObjects on which the non-linear spring will act. On the other hand, RestShapePolynomialSpringsForceField will act on one single body, i.e. one MechanicalObject.
This component is used as follows in XML format:
or using Python:
An example scene involving a PolynomialSpringsForceField is available in examples/Components/forcefield/PolynomialSpringsForceField.scn
Last modified: 28 September 2022