Skip to main content

A library for solving simple mechanics problems

Project description

My Library

This is a Python library for solving simple mechanics problems. Currently, it includes functions for the following calculations:

  1. final_velocity(initial_velocity, acceleration, time): This function calculates the final velocity of an object given the initial velocity, acceleration, and time. The inputs and output are in meters per second (m/s).

  2. displacement(initial_velocity, time, acceleration): This function calculates the displacement of an object given the initial velocity, time, and acceleration. The inputs and output are in meters (m).

  3. force(mass, acceleration): This function calculates the force exerted on an object given the mass and acceleration. The mass is in kilograms (kg), the acceleration is in meters per second squared (m/s²), and the output is in newtons (N).

  4. kinetic_energy(mass, velocity): This function calculates the kinetic energy of an object given the mass and velocity. The mass is in kilograms (kg), the velocity is in meters per second (m/s), and the output is in joules (J).

  5. pendulum_period(length, gravity): This function calculates the period of a simple pendulum given the length of the pendulum and the acceleration due to gravity. The length is in meters (m), the gravity is in meters per second squared (m/s²), and the output is in seconds (s).

Usage

Here's an example of how to use the final_velocity function:

import mechanics

v = mechanics.final_velocity(0, 9.8, 10)
print(v)  # Prints: 98.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

mechanics-0.1.3.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

mechanics-0.1.3-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file mechanics-0.1.3.tar.gz.

File metadata

  • Download URL: mechanics-0.1.3.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for mechanics-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c67cb8d54b2f558af168d9b04878553bf6b579d11fd86a4729c3d5f03d4e0c5e
MD5 b5e27a12f151c8ebe2546032421737bc
BLAKE2b-256 63daedede093e89671a9d9b1ccfcd07a3f509a31bd8e27a18efe638c4765b523

See more details on using hashes here.

File details

Details for the file mechanics-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: mechanics-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for mechanics-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 41d71c380f07a480ad86704ab69e19adedecd63079614e43b2e7964f7d61c558
MD5 51d39ba565f0a9b5d2fbeb1f49fb7e21
BLAKE2b-256 f1c6b74bd7bfd2db8451861fc9315de41007a5b84f58def87727d137b8304a52

See more details on using hashes here.

Supported by

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