Quantity
A value with units. Dimensions track automatically through every operation: 100+ units, offset temperatures, no silent unit errors.
Write physics as plain Python functions, wire them into solvable systems, and get results with automatic unit tracking, from a quick calculation to a coupled multi-physics study.
$ python start_anvil.py # provisions, launches, # opens the workbench. # no setup, no npm.
Learn them once; they scale from a one-liner to a coupled system.
A value with units. Dimensions track automatically through every operation: 100+ units, offset temperatures, no silent unit errors.
A physics function turned into a reusable, inspectable component. 166 built in across 33 domains, or register your own.
Wire relations into a solvable graph. Anvil detects coupling and picks the solver: forward, Gauss-Seidel, or Newton.
Pre-built systems, parametric sweeps, and sensitivity analysis, exportable to CSV or JSON.
import anvil, numpy as np from anvil import Q, System # call a built-in relation directly r = anvil.R.isentropic_ratios(M=2.0, gamma=1.4) # {'T0_T': 1.8, 'P0_P': 7.824, 'rho0_rho': 4.347} # load a pre-built system, set inputs, solve nozzle = anvil.S.rocket_nozzle.copy() nozzle.set(P0=10e6, T0=3200) nozzle.solve_forward().summary() # sweep in parallel, then rank sensitivities sweep = nozzle.sweep("P0", np.linspace(5e6, 20e6, 8), parallel=4) nozzle.sensitivity(outputs=["thrust", "Isp"]).summary()
Everything is plain Python. A relation is an ordinary function; a system is a graph of them.
Anvil orders the computation, tracks units through every step, and switches to an iterative solver when it detects coupling, without you configuring anything.
The core needs only NumPy and SciPy. Everything heavier is an optional extra.
Real physics only. No mock results.
Every adapter runs the actual tool. If a solver or library is not installed, Anvil raises a clear install-hint error instead of returning a plausible-looking approximation. Run anvil doctor to see what is available on your machine. When Anvil gives you a number, it came from real computation.