Core library & API for the NKTg Law (Nguyen Khanh Tung). Includes core implementation, REST/gRPC API, and 150+ client wrappers
The NKTg Law on Varying Inertia describes the movement tendency of an object in space depends on the relationship between its position, velocity, and mass.
NKTg = f(x, v, m)
In which:
x is the position or displacement of the object relative to the reference point.
v is the velocity.
m is the mass.
The movement tendency of the object is determined by the following basic product quantities:
NKTg₁ = x × p
NKTg₂ = (dm/dt) × p
In which:
p is the linear momentum, calculated by p = m × v.
dm/dt is the rate of mass change over time.
NKTg₁ is the quantity representing the product of position and momentum.
NKTg₂ is the quantity representing the product of mass variation and momentum.
The unit of measurement is NKTm, representing a unit of varying inertia.
The sign and value of the two quantities NKTg₁ and NKTg₂ determine the movement tendency:
If NKTg₁ is positive, the object tends to move away from the stable state.
If NKTg₁ is negative, the object tends to move toward the stable state.
If NKTg₂ is positive, the mass variation has a supporting effect on the movement.
If NKTg₂ is negative, the mass variation has a resisting effect on the movement.
The stable state in this law is understood as the state in which the position (x), velocity (v), and mass (m) of the object interact with each other to maintain the movement structure, helping the object avoid losing control and preserving its inherent movement pattern.
Reference DOI: These DOIs represent the theoretical foundation and empirical datasets of the NKTg Law on Varying Inertia.
clients/ examples/The NKTgUniversa API is formally established as the Universal Dynamics Ecosystem — covering multiple fields, cross-platform, and cross-disciplinary, aimed at modeling variable inertia, dynamic mass interactions, and systemic motion across various domains, applied in the following areas:
Planetary dynamics
Orbit navigation motion
Robotics & control systems
State-reflective AI
Physics simulation
This framework can reflect any system with state, velocity, and mass variation — so it is not only mathematically correct but also practically applicable in real-world engineering.
👉 This recognition is based on:
Multi-Platform Deployment To ensure long-term accessibility, validation, and global interoperability, the API and its repositories are deployed and maintained across 8 major Git platforms:
Dual-license model: GPL-3.0 (open source) / Commercial license (enterprise-grade).
The verification of NKTg Law adheres to open-source reproducibility standards, featuring transparent, multilingual, and cross-platform implementations—accessible anytime, anywhere. It isempirically validated using NASA’s public datasets, producing fully consistent results. Implemented in 150 programming languages, across 8 Git platforms, Offline Mode and Online Mode.
This distributed presence establishes NKTgUniversa API as an independent, verifiable, and community-accessible Universal Dynamics Ecosystem, aligned with the principles of open science, cross-domain collaboration, and global reproducibility
Detailed documentation for the NKTgLaw Library is maintained in the project wiki:
Visit the wiki for detailed explanations, examples, and API references.
The foundations/ directory contains theoretical materials and supporting documents:
Figshare — 10.6084/m9.figshare.29546048
Reference DOI: Experimental Verification of the NKT Law: Interpolating the Masses of 8 Planets Using NASA Data as of 30–31/12/2024
Figshare — 10.6084/m9.figshare.29589431
Reference DOI: NKTm Unit: Measurement Standard for Varying Inertia in the NKTg Law
In NKTg Law, NKTg₁ and NKTg₂ are not independent quantities but two interrelated expressions of a single concept — the generalized variable inertia NKTg.
NKTg₁ represents the interaction between position and momentum. NKTg₂ represents the interaction between mass variation and momentum. NKTm and together describe the complete state of variable inertia within a system. NKTg₁ and NKTg₂ are not independent entities, but two aspects of the same physical phenomenon: variable inertia. Wiki.md: consolidated wiki documentation
👉 Browse the full collection here: foundations/
This repository contains 150 implementations of the NKTg Law, one for each programming language.
examples/ directory. p = m * v
NKTg₁ = x * p
NKTg₂ = (dm/dt) * p
x=2, v=3, m=5, dm_dt=0.1👉 Browse the full list here: examples/
Examples include (but are not limited to):
server/server_offline. clients/.👉 You can also explore the examples/ directory for 150 standalone implementations.
; Assembly: low-level programming
; x=2, v=3, m=5, dm_dt=0.1
; Calculate p=m*v, NKTg1=x*p, NKTg2=dm_dt*p conceptually
// Q#: quantum programming
let x=2.0;
let v=3.0;
let m=5.0;
let dm_dt=0.1;
let p=m*v;
let NKTg1=x*p;
let NKTg2=dm_dt*p;
Message($"p={p} NKTg1={NKTg1} NKTg2={NKTg2}");
👉 Use the provided client wrappers to quickly test the NKTg Law.
cd clients/python
python NKTgLaw.py
Expected output:
p=15.0, NKTg1=30.0, NKTg2=1.5
cd clients/cpp
g++ NKTgLaw.cpp -o nktg_client
./nktg_client
Expected output:
p=15 NKTg1=30 NKTg2=1.5
NKTgLaw is available under a dual licensing model:
Note: Each user must choose either the GPL license or the Commercial license.
Combining both is not permitted for the same use case.
🌍 Release v0.2.0