Skip to main content

SciEng Formulary

SciEng Formulary is a curated, machine-readable library of verified scientific and engineering formulas for humans, Python programs, and AI agents.

Every formula carries:

  • its equation;
  • input variables and the output variable, each with a dimension and a reference SI unit;
  • assumptions and applicability limits, written so you can tell when not to use it;
  • one or more authoritative references, rendered in IEEE style;
  • an executable Python evaluator;
  • numerical verification cases that the evaluator must reproduce.

It is meant for engineers, scientists and students, and for the programs, AI agents and CAD/CAE/analysis workflows that need a formula they can look up, check and evaluate:

scientific or engineering question
  -> search for a formula
  -> inspect its variables and assumptions
  -> inspect its authoritative references
  -> evaluate it
  -> use the result in any downstream workflow

The package uses only the Python standard library.

Installation

Once SciEng Formulary is published on PyPI (it has not been released yet):

pip install sciengformulary

Until then, install it from a clone; see Development.

Quick start

from sciengformulary import formulas

f = formulas.get("aerodynamics.dynamic_pressure")
print(f.equation)                    # q = 0.5 * rho * V^2
print(f.input_names)                 # ('rho', 'V')
print(f.assumptions[0])              # when the formula applies
print(f.references[0].format_ieee()) # verified source, IEEE style

result = f.evaluate(rho=1.225, V=120.0)  # 8820.0 (Pa, for SI inputs)

More of the API:

formulas.list()                       # every formula, sorted by id
formulas.search("normal shock")       # deterministic keyword search
f.verification_cases                  # known input/output cases
f.verify()                            # re-run them; raises ValueError on a mismatch
f.to_dict()                           # all metadata, including structured references
                                      # and verification cases, as JSON-ready data

A formula can also be imported directly:

from sciengformulary.catalog.aerodynamics import dynamic_pressure

What is in the catalog

The catalog contains 415 formulas in 18 knowledge domains, including 84 formulas contributed by @jwchin06 and 11 chemistry-related E3 formulas. See the contribution inventory and provenance review.

Domain Formulas Examples
aerodynamics 35 lift and drag, induced drag, isentropic and normal-shock relations, 1976 standard atmosphere layers, Barrowman rocket stability, stall and climb, Sears-Haack wave drag
chemical_equilibrium 12 activities, pH, buffers, solubility, van t Hoff equation
chemical_kinetics 8 Arrhenius law, reaction rates, zero- and second-order consumption
chemistry 24 amounts, concentrations, stoichiometry, colligative properties, extraction, combustion ratios
chromatography 9 retention, resolution, theoretical plates, van Deemter model, TLC
electrical 2 Ohm's law, conductor resistance
electrochemistry 7 cell and Nernst potentials, electrolysis, Tafel current, thermal voltage
fluids 22 hydrostatics, Reynolds number, Pitot airspeed, Poiseuille flow, Darcy-Weisbach and friction factors, Manning/Chezy, Sutherland viscosity, wind-shear power law
heat_transfer 51 conduction, convection correlations (Gnielinski, Churchill-Bernstein, Churchill-Chu), radiation exchange, effectiveness-NTU, dimensionless groups, LMTD
materials 15 true stress and strain, elastic constants, von Mises, fracture, Weibull
mathematics 91 combinatorics, series, triangle and solid geometry, vectors and determinants, 2x2 eigenvalues, probability distributions, gamma, beta and incomplete gamma/beta functions
mechanics 23 kinematics, friction, energy, momentum, vibration, springs and torque
nuclear 3 radioactive decay, half-life, activity
orbital 29 Kepler's third law, vis-viva, conic orbits and anomalies, Hohmann and bi-elliptic transfers, hyperbolic and parabolic orbits, J2 nodal precession, sphere of influence
propulsion 12 rocket thrust, specific impulse, Tsiolkovsky rocket equation, thrust coefficient, nozzle expansion ratio, solid-motor relations
spectroscopy 16 Beer-Lambert law, molecular energies, NMR shift, mass resolution
structures 17 axial deformation, bending stress, torsion, beam deflections, fixed-end moments and reactions, beam and plate stiffness
thermodynamics 39 ideal gas, kinetic theory, entropy, Carnot limits, specific heats, Antoine vapour pressure, reaction energies, NASA polynomials

Only formulas that have been checked against an authoritative source are included. Candidates that could not be verified, or whose sources disagree, are left out rather than added with a weaker guarantee.

How formulas are verified

A formula is checked in two different ways.

References and human review establish that the formula is right.

  • Every formula has at least one authoritative ReferenceSpec: a standards body or government technical organisation (NASA, NIST, NACA reports), an established textbook, a peer-reviewed paper, or official university teaching material. A FormulaSpec without one cannot be constructed.
  • References are stored as structured fields (authors, organisation, title, year, URL, locator, ...). IEEE is the only citation style; format_ieee() renders it.
  • Locators (section, equation, figure) point at where the relationship was checked. Reviewers open the source and confirm the equation, its notation and its assumptions.

Verification cases establish that the code is right.

  • Every formula has at least one VerificationCase: inputs, an expected result determined independently of the evaluator (a published worked example or table, or an independent calculation from the published equation), and a tolerance.
  • verify() checks that the evaluator reproduces every case. It runs when each formula is constructed and again in CI.
  • A passing case shows that the Python code implements the declared equation. It does not show that the equation is scientifically correct or applies to your problem.

Check the whole installed catalog at any time:

python -m sciengformulary.validation

Units

  • Evaluators do no unit conversion. You are responsible for passing every input in one consistent unit system; the result comes out in the matching unit of that system.
  • Each variable's si_unit is its canonical reference SI representation, and dimension gives its base dimensions (M, L, T, Theta, N, I).
  • Empirical formulas whose coefficients only hold in particular units say so in their assumptions.
  • Formulas that need physical constants (Boltzmann, Planck, Stefan-Boltzmann, G, standard gravity) use the CODATA 2022 values in SI units, so their other inputs must be in SI units.

Development

git clone https://github.com/2ssunny/sciengformulary.git
cd sciengformulary
pip install -e .
python -m sciengformulary.validation

Repository structure

src/sciengformulary/
├─ __init__.py          # `formulas` registry instance
├─ validation.py        # whole-catalog checks (python -m sciengformulary.validation)
├─ core/
│  ├─ reference.py      # ReferenceSpec (structured source, IEEE rendering)
│  ├─ verification.py   # VerificationCase (known input/output case)
│  ├─ variable.py       # VariableSpec
│  ├─ spec.py           # FormulaSpec
│  └─ registry.py       # FormulaRegistry: get / list / search
└─ catalog/             # one package per knowledge domain, one file per formula
   ├─ _sources.py       # shared bibliographic records
   ├─ _constants.py     # CODATA constants with their NIST references
   ├─ aerodynamics/
   ├─ ...
   └─ thermodynamics/

Contributing

See CONTRIBUTING.md for the source-quality, anti-fabrication, verification-case and units rules, and RELEASING.md for how releases are published.

License

Licensed under the Apache License 2.0. See LICENSE.

Metadata

Release files for sciengformulary 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sciengformulary 1.2.0
File Size Uploaded
sciengformulary-1.2.0.tar.gz 345.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sciengformulary 1.2.0
File Interpreter ABI Platform
sciengformulary-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / sciengformulary-1.2.0.tar.gz

Download URL sciengformulary-1.2.0.tar.gz
Size 345.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fba876acf11475f3ee43ce812692ed56e1d943f48f14c5f14cc847a033c50dec
BLAKE2b-256 checksum
How to use checksums
fbf1889a70493fa368cf0e4db21bf33721d784f6d0a14db5f34907964615a286
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / sciengformulary-1.2.0-py3-none-any.whl

Download URL sciengformulary-1.2.0-py3-none-any.whl
Size 699.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
738588a9fbd3adafa93e42e903c329b71456892d13c406291c331e65a7ccdc07
BLAKE2b-256 checksum
How to use checksums
e0ec9a3e1c234b479cb3ce534f0d4973e0fee54b5dd59e9b09869ffd0f6193d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page