Skip to main content

A package for solving 1D kinematics problems.

Project description

Project Description

A python package for solving 1D kinematics problems.

Installation

pip install kinematics5

Inspiration

As a high school AP physics tutor, I wanted to make a python package for solving kinematics problems.

Modules & Functions

Below are function definitions from the OneD module. The OneD module contains 4 functions. They represent the 4 kinematic equations.

eq1

Function Signature

def eq1(initial_velocity: Optional[int | float] = None,
        final_velocity: Optional[int | float] = None,
        acceleration: Optional[int | float] = None,
        time: Optional[int | float] = None) -> tuple | bool:

Kinematic Equation:

vf = vi + at

Overview: The function needs at least 3 arguments but can take 4. If 't' is less than 0, an error will be raised. If less than 3 arguments are given, an error will be raised. If 3 arguments are given, the function will return a tuple of all 4 arguments (the arg. that wasn't given is computed and returned in the tuple). If 4 arguments are given the function will return a bool letting the caller know if the 4 values they entered satisfy the equation (1% error tolerance).

eq2

Function Signature

def eq2(displacement: Optional[int | float] = None,
        initial_velocity: Optional[int | float] = None,
        final_velocity: Optional[int | float] = None,
        time: Optional[int | float] = None) -> tuple | bool:

Kinematic Equation:

d = (vf + vi)t / 2

Overview: The function needs at least 3 arguments but can take 4. If 't' is less than 0, an error will be raised. If less than 3 arguments are given, an error will be raised. If 3 arguments are given, the function will return a tuple of all 4 arguments (the arg. that wasn't given is computed and returned in the tuple). If 4 arguments are given the function will return a bool letting the caller know if the 4 values they entered satisfy the equation (1% error tolerance).

eq3

Function Signature

def eq3(displacement: Optional[int | float] = None,
        initial_velocity: Optional[int | float] = None,
        acceleration: Optional[int | float] = None,
        time: Optional[int | float] = None) -> tuple | bool:

Kinematic Equation:

d = vit + (0.5)at2

Overview: The function needs at least 3 arguments but can take 4. If 't' is less than 0, an error will be raised. If less than 3 arguments are given, an error will be raised. If 3 arguments are given, the function will return a tuple of all 4 arguments (the arg. that wasn't given is computed and returned in the tuple). If 't' was the missing variable, t will be returned as a list with 2 elements. If 4 arguments are given the function will return a bool letting the caller know if the 4 values they entered satisfy the equation (1% error tolerance).

eq4

Function Signature

def eq4(displacement: Optional[int | float] = None,
        initial_velocity: Optional[int | float] = None,
        final_velocity: Optional[int | float] = None,
        acceleration: Optional[int | float] = None) -> tuple | bool:

Kinematic Equation:

vf2 = vi2 + 2ad

Overview: The function needs at least 3 arguments but can take 4. If less than 3 arguments are given, an error will be raised. If 3 arguments are given, the function will return a tuple of all 4 arguments (the arg. that wasn't given is computed and returned in the tuple). If 'vi' or 'vf' was the missing variable, they will be returned as a list with 2 elements. If 4 arguments are given the function will return a bool letting the caller know if the 4 values they entered satisfy the equation (1% error tolerance).

PyPI Link

Link to the package PyPI - kinematics5.

Lastest Version

0.0.5

License

Distributed under the terms of the MIT license, kinematics5 is free and open source software.

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

kinematics5-0.0.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

kinematics5-0.0.5-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file kinematics5-0.0.5.tar.gz.

File metadata

  • Download URL: kinematics5-0.0.5.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for kinematics5-0.0.5.tar.gz
Algorithm Hash digest
SHA256 f1bd54225b2b78fe28c3b16aea563c96b08ab4791432b9b800528f762bd4375d
MD5 296fc6c8beb8774147a649938cdbe091
BLAKE2b-256 482e5866f2f32a07930b19f9b7e43dc02315297b5b57fa106bf08e7d2331957c

See more details on using hashes here.

File details

Details for the file kinematics5-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: kinematics5-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for kinematics5-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b8ed5160682bcd0f71ef057c10bb45d6b61854e60be946ebfe0c5091ea474545
MD5 a2eb1dc376576f48b9c56716c7365f71
BLAKE2b-256 bb8f79f2dab5700fd676485acf000777f55ff0c7b78346ab7069d4660c29169f

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