Skip to main content

A package for physics motion calculations

Project description

Physics equations of motion solver

This is a package for physics motion calculations.

Installation

pip install agnm

Usage

Displacement

Displacement is calculated using formula:

x = (vi-vf)/2*t 
from agnm.motion import displacement

displacement(1, 2.3, 3)  # output: 2.65
# or use named variables
displacement(vf=2.3, t=1, vi=3)  # output: 2.65

Change in position

Change in position is calculated using formula:

x = vi*t+1/2*a*t^2
from agnm.motion import change_in_position

change_in_position(1, 3, 2)  # output: 12.0
# or use named variables
change_in_position(a=2, t=3, vi=1)  # output: 12.0

Final velocity

Final velocity is calculated using one of formulas:

vf = (vi^2+2a*x)^1/2
vf = vi+a*t
from agnm.motion import v_final

# using first equation
v_final(vi=1, a=3, x_delta=1.5)  # output: 10.0
# using second equation
v_final(vi=1, a=2.3, t=2)  # output: 5.6

Average velocity

Average velocity is calculated using one of formulas:

va = x/t
va = (vi+vf)/2
from agnm.motion import v_average

# using first equation
v_average(x_delta=1, t=3)  #output: 0.3333333333333333
# using second equation
v_average(vi=1, vf=2.6)  #output: 0.8

Acceleration

Acceleration velocity is calculated using one of formulas:

a = v/t
a = (vf+vi)/t
from agnm.motion import acceleration

# using first equation
acceleration(v_delta=5, t=2.5)
#output: 2.0
# using second equation
acceleration(vi=1, vf=6, t=2.5)
#output: 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agnm-1.0.3.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agnm-1.0.3-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file agnm-1.0.3.tar.gz.

File metadata

  • Download URL: agnm-1.0.3.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for agnm-1.0.3.tar.gz
Algorithm Hash digest
SHA256 adc59a6cb38d5c70787e855dacb129a1ec4d30077775afcfbae8ed67c3c1c0af
MD5 22ede18c3cc365ddba63c7e93d966714
BLAKE2b-256 17bf6b3bfc3f774ace45220236bae945b7aed8d368bbc7bf9ad238d40a4622ce

See more details on using hashes here.

File details

Details for the file agnm-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: agnm-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for agnm-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8e0149cea190a0468a4339ca87e4bc0289249e74bc3ad2306ccde1832492a1a2
MD5 5f3a4d1c26346a346dc54dbc78b87b0d
BLAKE2b-256 1525775f355b62729fc53f649f51c10fc100e5a71f353dd14bbe0e193fdaf994

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page