Catalog/eng-collision-1d

Engineering

1-D collision (elastic/inelastic) API

Solves a one-dimensional two-body collision (elastic, perfectly inelastic, or with a coefficient of restitution e) by conserving momentum, returning final velocities and kinetic energy lost. Answers 'What are the velocities after an elastic collision?', 'How much energy is lost in an inelastic collision?'.

Price$0.06per request
MethodPOST
Route/v1/engineering/collision-1d
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
engineeringmechanicsphysicscollisionelasticinelasticrestitutionmomentum
API URLhttps://x402.hexl.dev/v1/engineering/collision-1d
Integration docs
Example request
{
  "mass1Kg": 2,
  "velocity1Ms": 3,
  "mass2Kg": 1,
  "velocity2Ms": 0,
  "type": "inelastic"
}
Example response
{
  "mass1Kg": 2,
  "velocity1Ms": 3,
  "mass2Kg": 1,
  "velocity2Ms": 0,
  "restitution": 0,
  "finalVelocity1Ms": 2,
  "finalVelocity2Ms": 2,
  "totalMomentumKgMs": 6,
  "kineticEnergyBeforeJ": 9,
  "kineticEnergyAfterJ": 6,
  "kineticEnergyLostJ": 3,
  "formula": "momentum conserved; v relative separation = e * v relative approach",
  "interpretation": "Perfectly inelastic: bodies move together."
}
Input schema
{
  "type": "object",
  "required": [
    "mass1Kg",
    "velocity1Ms",
    "mass2Kg",
    "velocity2Ms"
  ],
  "properties": {
    "mass1Kg": {
      "type": "number",
      "description": "mass of body 1 (kg)",
      "examples": [
        2
      ]
    },
    "velocity1Ms": {
      "type": "number",
      "description": "initial velocity of body 1 (m/s)"
    },
    "mass2Kg": {
      "type": "number",
      "description": "mass of body 2 (kg)"
    },
    "velocity2Ms": {
      "type": "number",
      "description": "initial velocity of body 2 (m/s)"
    },
    "type": {
      "type": "string",
      "enum": [
        "elastic",
        "inelastic"
      ],
      "examples": [
        "inelastic"
      ]
    },
    "restitution": {
      "type": "number",
      "description": "coefficient of restitution e in [0,1]"
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}