Skip to main content

A Python library that deals with properties of matter.

Project description

MatterPy

MatterPy is a Python library that calculates various properties of matter, including charge, volume, density, instantaneous velocity and speed, mass, gravitational force, temperature, gas pressure, voltage, and more.

To Install

  pip install MatterPy

To Use

After installation, make sure to create an instance of the object. For example:

  newtons_apple = matter()

After this, use the set functions to setup information. (These set methods take input, then use it to perform calculations, before storing it in a variable. This variable can be retrieved using the get methods that are shown later):

setCharge(electrons): Sets the charge of the object in Coulombs, based on the number of electrons provided as an argument.
setVolumeCube(length): Sets the volume of the object to a cube with side length length.
setVolumeCone(radius, height): Sets the volume of the object to a cone with base radius radius and height height.
setVolumeCylinder(radius, height): Sets the volume of the object to a cylinder with base radius radius and height height.
setVolumeSphere(radius): Sets the volume of the object to a sphere with radius radius.
setVolumeRectPrism(length, w, h): Sets the volume of the object to a rectangular prism with length length, width w, and height h.
setDensity(mass): Sets the density of the object, based on its mass and volume. Note that the volume must be set before calling this function.
setInstVelocity(x1, y1, z1, x2, y2, z2, t1, t2): Sets the instantaneous velocity of the object, based on its position at two different times.
setInstSpeed(x1, y1, z1, x2, y2, z2, t1, t2): Sets the instantaneous speed of the object, based on its position at two different times.
setMass(mass): Sets the mass of the object.
setVelocity(velocity): Sets the velocity of the object.
setHeight(height): Sets the height of the object.
setVolts(voltage): Sets the voltage of the object.
setLocalGravityForce(g): Sets the local gravitational force.
setTemperature(temp): Sets the temperature of the object.
setAtomicNumber(number)
setAtomicMass(mass)
setResistance(voltage, current)
setCapacitance(charge, voltage)
setHalfLife(life)
setSphereSurfaceArea(radius)
setCylinderSurfaceArea(radius, height)
setConeSurfaceArea(radius, height)
setRectSurfaceArea(length, width, height)

Here are some functions that you can use to retrieve information about your object:
getCharge() # retrieves the charge of the object in Coulombs
getVolume() # retrieves the volume of the object in cubic meters
getDensity() # retrieves the density of the object in kilograms per cubic meter
getInstVelocity() # retrieves the instantaneous velocity of the object in meters per second
getInstSpeed() # retrieves the instantaneous speed of the object in meters per second
getLocalGravity() # retrieves the local gravitational force in meters per second squared
getGasPressure(gas_density) # retrieves the gas pressure in pascals, based on the gas density and temperature
getVolts() # retrieves the voltage of the object in volts
getKineticEnergy()
getDecayRate()
getNuclearBindingEnergy()
getResistance()
getSurfaceArea()
luminosity(radius)
getSchwarzschildFrequency()
getEscapeVelocity(radius)
getSchwarzschildRadius()
getCapacitance()
getWeight()
returnConsts() # returns physics constants

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

MatterPy-0.0.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

MatterPy-0.0.4-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file MatterPy-0.0.4.tar.gz.

File metadata

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

File hashes

Hashes for MatterPy-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1bfa08371a16edeebe65a5ef9b624e9df34a03f1d6389bd68e8d6ef748b338f7
MD5 6279dd6615e5235c1de99627f120e78e
BLAKE2b-256 c84b71018b4e59b49c937fbb7affcf3ddb6ea4345aeee0d67f151c44f909c188

See more details on using hashes here.

File details

Details for the file MatterPy-0.0.4-py3-none-any.whl.

File metadata

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

File hashes

Hashes for MatterPy-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a69900ec82fe9333a258f6668f629c09fdbb06568befc2b1d2f23cad56c6a820
MD5 07911fcf2fb7eaff501ef13ecd516726
BLAKE2b-256 a60a09c6cd0e95bbbbf117f55dcca4d937555a9d8caebd574130ea3b35135432

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