Skip to main content

Numerical vector calculus for physics

Project description

vecfield

Numerical vector calculus for physics (v0.1.0)
Experimental, educational, and physics-focused.

vecfield is a small Python library for numerical vector calculus on 2D scalar and vector fields, designed to closely mirror how fields are treated in physics (electrostatics, fluids, diffusion).

The emphasis is on clarity, correctness, and physical meaning, not performance or abstraction depth.


✨ Core idea

In physics, many systems are described by a scalar field (such as a potential), from which all other quantities are derived:

[ \mathbf{E} = -\nabla V,\quad \nabla \cdot \mathbf{E},\quad \nabla \times \mathbf{E},\quad \nabla^2 V ]

vecfield lets you write this almost exactly as the math.


🚀 Features (v0.1.0)

  • 2D scalar and vector fields on a uniform rectangular grid
  • Gradient, divergence, curl (2D)
  • Laplacian via operator composition
  • Vector field magnitude
  • Visualization (contours + quiver plots)
  • Clean, physics-oriented API
  • No circular imports, no hidden state

📦 Installation

From the project root:

python -m pip install -e .

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

vecfield_physics-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

vecfield_physics-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vecfield_physics-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for vecfield_physics-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c3d172f186ea56dfaab638c96306d5ea7bc7769d03be28b023d6d0bef1fbdfae
MD5 bc7c4c7cd217e0cfc723eb2f5374373e
BLAKE2b-256 01fff35f645bfd6611956d555e5cc69881fb8d71d13d22f3b0db13f0bda5b62a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vecfield_physics-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3678ffc59e1d50cb8336ab4f53a8807dcaf60f6c6fdd93f39db0b74ecde2609
MD5 24868362cd3e9d7a0aa16fae50a87a9e
BLAKE2b-256 5405e8890f1ec8a228e29df1f34b6804e00212217ed2f362e6675b8a60a9466b

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