A Physics-Inspired Model (NKTg Law) for Variable-Mass Motion – Possible Application in Simulations?

Hi Rails Community,

I’m currently working on a theoretical physics model called the NKTg Law on Varying Inertia, which introduces a new way to describe motion in systems where mass changes over time (such as spacecraft burning fuel, dynamic particles, or complex simulations).

Although this might sound a bit “physicsy” for a Rails forum, I’d like to open a discussion on how such a model could be implemented or visualized in Rails or any Ruby-based backend if you’re into scientific computing or simulation tools.


:rocket: What is the NKTg Law?

It extends Newtonian motion using two core formulas:

# Where p is momentum (mass × velocity)
nktg1 = position * momentum
nktg2 = mass_change_rate * momentum

These two quantities (NKTg₁ and NKTg₂) describe how an object tends toward or away from equilibrium, based on its position, velocity, and mass change over time.


:light_bulb: Why Post This Here?

Because Ruby (and Rails) is more than web: we’re builders.

  • Have you ever built or wanted to build a simulation backend in Rails?
  • Are you working with physics data, sensor input, or data pipelines?
  • Would such a model (or data structure) fit in any Rails-like project?

Even if you’re not doing physics, this is also about modeling complex relationships in code.


:link: Learn More

I’ve posted the full explanation of the law here: :backhand_index_pointing_right: https://traiphieu.com/the-nktg-law-on-varying-inertia/


:raising_hands: Would love your thoughts

  • Has anyone used Rails for scientific or simulation work?
  • Would this kind of model be interesting for plugin/gem architecture?
  • Or maybe in conjunction with Ruby and WebAssembly?

Open to questions, collaborations, and even critiques.

Thanks for reading!

NKTgLaw