Skip to main content

Python for Engineering

Project description

'''Engpy is a free and open-source Python library for Engineering computing

Engpy is targeted to take care of most engineering problems like caculus,
transforms, graphs, complex algebraic expressions, Matrices manipulation,
vector analysis, analyzing signals.

The Engpy consist of mainly 3 Datatypes:
1. Expr
    This is the core datatype of Engpy. Most other engpy are based on this class
    This class is responsible for any algebraic manipulations.

        1.  Simple Algebra: Addition, Subtraction, Multiplication, Division
                            Substitution of Expressions; a subject of the formula,
                            clear brackets, and fractions.
        2.  Caculus: linear and partial differentiation, integration, gradient
        3.  Trigonometry
        4.  logarithmic Expressions
        5.  Transforms: Laplace, Z-Transforms
        6.  Visualization: Graphs
        7.  Table of Values
        8.  Complex Number Manipulation
        9.  Solving Expressions
        10. Support the engpy AI Implementation for manipulating expressions

    Expr can be imported from engpy
    >>> from engpy import Expr

    See the doc file or Expr documentation to learn its usage

    To interact with Expr as Discrete objects, use the interface module.
    the interface module bridges between Expr Class and Expr datatypes.

    For example, y  = 2xcos3(2θ) - 7y^2sin(2ω) - ln(sqrt(z +3)); s = y - cos(5z)
    This can be enter directly into the Expr Class
    >>> from engpy import Expr
    >>> w = Expr('2xcos3(2theta) - 7y^2sin(2omega) - ln(sqrt(z +3)); s = y - cos(5z)')
    >>> s = w - 'cos(5z)'
    >>> w
    2xcos3(2θ) - 7y^2sin(2ω) - ln(sqrt(z + 3))
    >>> s
    2xcos3(2θ) - 7y^2sin(2ω) - ln(sqrt(z + 3)) - cos(5z)

    In Discrete form
    >>> from interface import *
    >>> o,x,t,y,z = Var('omega', 'x', 'theta','y','z')
    >>> w = 2*x*cos(2*t)**3 - 7*y**2*sin(2*o) - ln(sqrt(z + 3))
    >>> w
    2xcos3(2θ) - 7y^2sin(2ω) - ln(sqrt(z + 3))
    >>> s = w - cos(5*z)
    >>> s
    2xcos3(2θ) - 7y^2sin(2ω) - ln(sqrt(z + 3)) - cos(5z)


    Note that to cast Expr to string: use str(ExprObj) or format(ExprObj), repr(ExprObj)
    str(ExprObj) will return the ExprObj in its simplest lowest form
    format(ExprObj) will return the ExprObj in its normal form
    repr(ExprObj) will return the ExprObj in the most readable form

    it's recommended to use format or repr as they faster than str. Only use str when necessary






2. Matrix
    This datatype handles all Matrix operations and manipulations. This datatype
    rest on Expr Class.

    1. Simple Matrix Algebra: Addition, Subtraction, Multiplication, Division
                              Substitution of Matrices
    2. Determinant, Minors, Cofactors, Adjoin, transpose, rank
    3. Reduction: echelon, canonical, triangular decomposition

    4. Row and column Transformation operations
    5. Decomposition: Triangular, Symmetric, hermitian decomposition
    6. Matrix Geometry: eigenvalues, modal, spectral, nullspace
                       algebraic multiplicity, geometric multiplicity
                       of a Matrix
    7. Differentiation
    8. Solving and comparing Matrices

    The matrix module or Matrix Class/datatype comes in two implementations.
    as Matrix or Matrix_
    Both can be import from engpy
    >>> from engpy import Matrix
    or
    >>> from engpy import Matrix_

    See the Matrix_doc file or engpy Arrays documentation to learn its usage


3. Vector
    This data type holds the keys to vector analysis.
    1. Simple Vector Algebra: Addition, Subtraction, Substitution, Modulus
                              of Vectors
    2. Angles between Vectors
    3. Multiplication of Vector: Dot, and scalar product
    4. Vector Calculus: Differentiation and Integration
    5. Vector Operations: Tangents, normals, grad, directional derivatives,
                          div, curl
    6. Validating properties: solenoidal, irrotational, coplanar, orthogonality
    7. Scalar, Vector Triple product

    Vector Class can also be imported from engpy
    >>> from engpy import Vector


Note that All these three datatypes works with python operators, +, -, /, *, ~
e.g MatObj1 + MatObj2

'''

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

engpy-1.0.6.tar.gz (97.9 kB view details)

Uploaded Source

Built Distribution

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

engpy-1.0.6-py3-none-any.whl (111.9 kB view details)

Uploaded Python 3

File details

Details for the file engpy-1.0.6.tar.gz.

File metadata

  • Download URL: engpy-1.0.6.tar.gz
  • Upload date:
  • Size: 97.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.3

File hashes

Hashes for engpy-1.0.6.tar.gz
Algorithm Hash digest
SHA256 9b1084485ccd0c89bf219f188b54c2cc8116c02747a637065d494c57881866d9
MD5 99a70b5aacaec7cfc7aedd1d0e7bb1eb
BLAKE2b-256 203e909fe330f0273bc6c70f71ddb3dc041f409f57aa7d1b934fac8cebda4e37

See more details on using hashes here.

File details

Details for the file engpy-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: engpy-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 111.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.3

File hashes

Hashes for engpy-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 261946f1a9c174c26abb3b2e27ae94ef3a12767b9c3fc69f579448413f5fcc06
MD5 f5e0ec770b674ee78f28f8fb9ad4bd7b
BLAKE2b-256 86fbdf34f18ca633696e350e221a60c5a7f66fa719a1f71129ece5783c3104bb

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