Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 4.13 KB

File metadata and controls

48 lines (39 loc) · 4.13 KB

GenXdev.Helpers.Physics

Overview

GenXdev.Helpers.Physics is a physics calculation library in PowerShell. It covers kinematics, forces, energy, waves, optics, gravitation, and fluid dynamics — over 25 specialized calculation functions plus a general-purpose unit converter. I added this for analyzing events seen in online videos, don't use it for production grade calculations, I am not qualified to check them for scientific accuracy ;-)

What It Offers

Command Aliases What it does
Convert-PhysicsUnit Convert values between physics units within the same category
Get-KineticEnergyByMassAndVelocity Calculate kinetic energy (½mv²)
Get-PotentialEnergyByMassHeightAndGravity Calculate gravitational potential energy (mgh)
Get-MomentumByMassAndVelocity Calculate linear momentum (mv)
Get-CentripetalAccelerationByVelocityAndRadius Calculate centripetal acceleration (v²/r)
Get-ImpactVelocityByHeightAndGravity Calculate velocity at impact from a given height
Get-FreeFallTime Calculate time to fall a given distance
Get-TerminalVelocityByMassGravityDensityAndArea Calculate terminal velocity
Get-ProjectileRangeByInitialSpeedAndAngle Calculate projectile range
Get-EscapeVelocityByMassAndRadius Calculate escape velocity for a celestial body
Get-OrbitalVelocityByRadiusAndMass Calculate orbital velocity
Get-WaveSpeedByFrequencyAndWavelength Calculate wave speed (v = fλ)
Get-DopplerFrequencyShiftBySourceSpeedAndObserverSpeed Calculate Doppler-shifted frequency
Get-RefractionAngleByIncidentAngleAndIndices Calculate refraction angle via Snell's law

How It All Comes Together

Physics is a self-contained calculation toolkit. Each Get-* cmdlet takes the physical quantities as parameters and returns the calculated result with proper units. Convert-PhysicsUnit ties them together as the universal converter — it handles length, mass, time, temperature, velocity, force, energy, pressure, and more, all within a single cmdlet that resolves the conversion category from the unit names.

The cmdlets are designed for pipeline use: calculate a value, then feed it into the next calculation. For example, get the orbital velocity of a satellite, convert the result to km/s, or calculate escape velocity and compare it to the orbital velocity at that radius.

See Also