Coder Social home page Coder Social logo

gabri432 / python-physics Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 39 KB

A Python library for making calculations for Physics.

Home Page: https://pypi.org/project/physics-gabri432/

License: MIT License

Python 100.00%
calculations formulas library physics

python-physics's Introduction

physics-gabri432

GitHub

A library containing several physics formulas and constants for making various calculations.

Project structure

Description

  • Body.py, a class to ease the use of some formulas;
  • classical.py, collection of formulas from Cinematics and Dynamics fields;
  • constants.py, collection of constants from all fields;
  • electromagnetism.py, collection of formulas from Electromagnetism field;
  • fluids.py, collection of formulas from Fluids field;
  • gravity.py, collection of formulas from Gravitation field;
  • mathem.py, collection of utility math formulas;
  • relativity.py, collection of formulas from Relativity field;
  • thermodynamics.py, collection of formulas from Thermodynamics field;

How to install it

pip install physics-gabri432

How to use the library

Use functions

import physics
from physics import classical  #importing the classical module
print(classical.force(3,4))    #using a function from the classical module

Result

>>> (12, 'N') // Respectevely, the result and the measurement unit

Or create a custom object and use its methods

from physics.Body import Body       #importing the Body class
earth = Body('Earth', 5.97e24, 0)   #Initializing a variable 'earth' with its name, mass and speed.
print(earth)                        #Showing the string representation of the class.
print(earth.grav_field(6.371e6))    #using a function from the classical module

Result

>>> Name: Earth         // The string representation of a Body object
    Mass: 5.97e+24 kg
    Speed: 0 m/s.
>>> (9.810360234523877, 'm/s^2') // Respectevely, the result and the measurement unit

python-physics's People

Contributors

gabri432 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.