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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vecfield_physics-0.2.0a0.tar.gz.
File metadata
- Download URL: vecfield_physics-0.2.0a0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
218f96717cb0777d4548d043fab8204d8e2003371451f2bc7fda520f2e3ec0b4
|
|
| MD5 |
a9c0de633b15b555dec8ca9518deb26d
|
|
| BLAKE2b-256 |
cf0a061118cbdc59cb0d532310ec2acfcd2dec035efaada0871f04c0099fd5c5
|
File details
Details for the file vecfield_physics-0.2.0a0-py3-none-any.whl.
File metadata
- Download URL: vecfield_physics-0.2.0a0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c474492ec97794270e05572731caa05d2a511167b3a2108b596f79576e402c2
|
|
| MD5 |
089b1fdbde8a5972556ff03572c841be
|
|
| BLAKE2b-256 |
2781cb927bda72df45d767fe45c444dae4271f28a3eed3b1328d2658ed3ec050
|