Skip to main content

A package with useful physics formulas to make physics easy and fun for users!

Project description

easyphysics

A package with useful physics formulas to make physics easy and fun for users! It uses four functions to easily calculate four classic physics theories. By making the functions concise and supporting graphs to demonstrate the theories, physics beginners might find learning physics fun and not daunting! All functions in this package require only arguments in numeric format; no dataset files are needed. easyphysics can also generate easy-to-understand visualizations to further reveal the physics effects.

Installation

$ pip install easyphysics

Usage

The package has four functions which can provide solutions for Physics Equations. Input will be taken from the User and the solutions will be provided by the functions. The four functions are as follows:

  • freefall() calculates the time it takes for a falling object using the equation of motion height = 1/2*gt^2, given the height and gravity of the free fall. It returns the time it takes for the free fall, and a plot compares the time of the free fall on different planets with a list. The distance traveled by the falling object (height) and the acceleration of gravity (g, default = 9.8) are the function’s arguments.
  • gravitational_energy() calculates the energy possessed or acquired by an object due to a change in its position when it is present in a gravitational field = mgh
  • kinetic_energy() calculates the Kinetic Energy of an object. When work is done on an object, energy is transferred, and the object moves with a new constant speed. We call the energy that is transferred kinetic energy, and it depends on the mass and speed achieved. The kinetic energy equation is given as: KE = 1/2mv^2, Where KE is the kinetic energy, m is the body’s mass, and v is the body’s velocity.
  • static_friction_ground() calculates the friction force for static object. The formula is fr = mu * N, where the mu is the coefficient of friction which incorporating the characteristics of the surface.
from easyphysics.freefall import freefall
time, plot = freefall(height, g = 9.8)
time, plot = freefall(10, g = 15)
from easyphysics.kinetic_energy import kinetic_energy
KE = kinetic_energy(mass, velocity)
KE = kinetic_energy(0.6, 3)
from easyphysics.gravitational_energy import gravitational_energy
gravitational_energy(m,h, g = 9.80665)
ge = gravitational_energy(10, 1000, g = 9.8)
from easyphysics.static_friction import static_friction_ground
from easyphysics.static_friction import plot_frict
static_friction_ground(mu, m, g = 9.8)
force = static_friction_ground(0.2, 2)
plot_frict(0.2,2,9.8)

Fitting into the Python ecosystem

A similar well-known package sympy is available, which has a module in physics.sympy is a library for symbolic computation. The physics module focuses on solving advanced physics problems such as Hydrogen Wavefunction and Quantum physics.

easyphysics targets physics beginners rather than professionals, such as middle schoolers and people new to physics. It uses four functions to easily calculate four classic physics theories. By making the functions concise and supporting graphs to demonstrate the theories, physics beginners might find learning physics fun and not daunting! All functions in this package require only arguments in numeric format; no dataset files are needed. easyphysics can also generate easy-to-understand visualizations to further reveal the physics effects. The specific functions and visual components make easyphysics different from other packages.

Contributing

easyphysics was created by Revathy Ponnambalam, Nikita Susan Easow, Yaou Hu and Mengjun Chen. Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

easyphysics was created by Revathy Ponnambalam, Nikita Susan Easow, Yaou Hu and Mengjun Chen. It is licensed under the terms of the MIT license.

Credits

easyphysics was created with cookiecutter and the py-pkgs-cookiecutter template.

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

easyphysics-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

easyphysics-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file easyphysics-0.1.0.tar.gz.

File metadata

  • Download URL: easyphysics-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.9.15 Windows/10

File hashes

Hashes for easyphysics-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ff394d740c0cb34f2b5bda60f9ed7dbb3a96d7be5b1b574d759478e61b19088e
MD5 98369fe9a795b4f6acaa1e070a803c63
BLAKE2b-256 1af202b28fd70d469408dde5b62271cbdf1c1aa05dad1351937efd6a7bb120fc

See more details on using hashes here.

File details

Details for the file easyphysics-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: easyphysics-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.9.15 Windows/10

File hashes

Hashes for easyphysics-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a988a1ed54da92a45eafbb166bd236e101d157d1880ea39619c2801a1916ac5
MD5 cf45b4d85ec926aebe5df8315597e824
BLAKE2b-256 c5692572257f4cf66875e393e81242b576180ac9314dee45356da5f61b0fb898

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