Torsionbars

Torsion bars are used when you want to have a certain amount of resistance to torque between two levers. They are defined using 4 nodes, which define the end of the first lever, the two nodes that serve as the axis, and the end of second lever.

They are used to simulate structures that resist forces in torsion like sway bars, and to help rigidify flat structures like ladder chassis and shock mounts of suspension arms without the use of rigidifier nodes.

If a beam located between 2 consecutive nodes of a torsion bar breaks, the torsion bar itself will break.

Anisotropic Torsionbars

Anisotropic torsionbars are the torsionbar equivalent of anisotropic beams (the beams with varying stiffness and damping values between compression and expansion). These torsionars resist torque differently depending in which direction the lever has twisted. Imagining one of the levers as fixed in 3D space might help you visualize this. Twisting one of the levers is the same as twisting the other in the opposite direction.

A torsionbar becomes an anisotropic torsionbar once the spring2 and/or damp2 values are defined. Depending on which way the lever has twisted depending to the starting point, the torsionbar will use either spring and damp, or spring2 and damp2 values to resist torque. Precompression angle will offset the starting point like it normally offsets the spawn angle. This is useful for making a torsionbar equivalent of a support beam - setting spring and damp to 0 and using precompressionAngle to set the angle at which the torsionbar will start resisting torque using spring2 and damp2.

Required arguments

string
type
The first lever end node
string
type
The first axis node
string
type
The second axis node
string
type
The second lever end node

Optional arguments

number
type
The stiffness of the torsion bar (Nm/rad)
number
type
The damping of the torsion bar (Nm.s/rad)
number
type
spring
default
The stiffness of the torsion bar (Nm/rad) on the other side of the spawn angle
Using this property will make the torsionbar anisotropic.
number
type
damp
default
The damping of the torsion bar (Nm.s/rad) on the other side of the spawn angle
Using this property will make the torsionbar anisotropic.
number
type
How much torque the torsion bar can take before deforming (Nm)
number
type
How much torque the torsion bar can take before breaking (Nm)
number
type
0
default
How much the torsion bar will twist on spawn (rad)
Also offsets the reference angle for anisotropic torsionbars.
number
type
0
default
Time it takes for the torsion bar to twist on spawn (s)
string
type
Name of the torsionbar, used by some systems such as the adaptive sway bar controller

Simple Example

Standard torsion bars

    "torsionbars": [
        ["id1:", "id2:", "id3:", "id4:"],
        {"spring":10000000, "damp":100, "deform":25000, "strength":100000},
        //rigidify steering arm
        ["oma1tl", "oma1l", "oma1r", "omatiltr"],
        ["oma1tr", "oma1r", "oma1l", "omatiltl"],
    ],

Advanced Example

Anisotropic torsion bars

"torsionbars": [
  ["id1:", "id2:", "id3:", "id4:"],
  //steering limiters
  {"deform":25000, "strength":125000},
  ["fh3r","fax2r","fax1r","fax3r",{"precompressionAngle":0.75,"precompressionTime":0,"spring":200000,"damp":1,"spring2":0,"damp2":0}],
  ["fh3r","fax1r","fax2r","fax3r",{"precompressionAngle":1.05,"precompressionTime":0,"spring":200000,"damp":1,"spring2":0,"damp2":0}],
  ["fh3l","fax1l","fax2l","fax3l",{"precompressionAngle":0.75,"precompressionTime":0,"spring":200000,"damp":1,"spring2":0,"damp2":0}],
  ["fh3l","fax2l","fax1l","fax3l",{"precompressionAngle":1.05,"precompressionTime":0,"spring":200000,"damp":1,"spring2":0,"damp2":0}],
],
Last modified: December 10, 2024

Any further questions?

Join our discord
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this forum thread.