CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Jul 2025
    Posts
    1

    Introducing the NKTg Law: A Simulation of Variable Inertia in C

    Hello everyone,

    I?d like to share a new conceptual physics law called the NKTg Law, which introduces a modified understanding of inertia where mass is no longer considered constant over time. This idea has emerged from re-examining planetary motion and interpreting NASA?s data on Earth?s mass variation.

    According to the NKTg Law, momentum and position are not sufficient to fully describe motion if the mass of an object changes over time. We introduce two new quantities:

    NKTg1 = x ? p (position ? momentum)

    NKTg2 = (dm/dt) ? p (mass change rate ? momentum)

    Where:

    x is position (in km)

    v is velocity (in km/s)

    m is mass (in kg)

    p = m ? v is momentum

    dm/dt is the mass loss rate (in kg/s)

    🔧 Simple C Simulation Code
    Code:
    #include <stdio.h>
    
    typedef struct {
        float x;        // position in km
        float v;        // velocity in km/s
        float m;        // mass in kg
        float dm_dt;    // mass change rate in kg/s
    } Body;
    
    void simulate_nktg(Body b) {
        float p = b.m * b.v;             // momentum
        float NKTg1 = b.x * p;           // position ? momentum
        float NKTg2 = b.dm_dt * p;       // mass change rate ? momentum
    
        printf("p = %.2e kg?km/s\n", p);
        printf("NKTg1 = x?p = %.2e km?kg?km/s\n", NKTg1);
        printf("NKTg2 = (dm/dt)?p = %.2e kg??km/s?\n", NKTg2);
    }
    
    int main() {
        Body earth = {
            .x = 1.496e+8,       // Distance to Sun (km)
            .v = 29.78,          // Orbital speed (km/s)
            .m = 5.972e+24,      // Earth mass (kg)
            .dm_dt = -2.4e+11    // Estimated annual mass loss (kg/year → simplified)
        };
    
        simulate_nktg(earth);
        return 0;
    }
    🧪 Example Output
    p = 1.78e+26 kg?km/s
    NKTg1 = x?p = 2.67e+34 km?kg?km/s
    NKTg2 = (dm/dt)?p = -4.28e+37 kg??km/s?

    📌 Notes
    This is a simplified simulation using approximate Earth values.

    The idea is to model systems where mass is not constant (e.g. evaporation, radiation, or cosmic systems).

    The code can be extended to compute over time intervals and apply numerical methods.

    🤝 Discussion
    Has anyone modeled similar physical systems with variable mass?

    Would this concept conflict with classical Newtonian assumptions in orbital mechanics?

    Any improvements to the simulation structure are welcome.

    Thanks for reading! Feedback is appreciated.
    Last edited by 2kaud; July 23rd, 2025 at 03:22 AM. Reason: Added code tags

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured