Get started
Run a small model, then change it and see the difference. You need two files and
a Python environment. The scalar tolerance shorthand in the run script is newer
than the published 0.1.5 package and requires the development build.
No mesh generator or editor extension is needed.
Install with uv
Section titled “Install with uv”Prebuilt wheels support Linux x86-64 and ordinary-GIL CPython 3.11–3.14. These commands select CPython 3.13. Install uv if you do not have it, then create a project:
uv init --python 3.13 first-eqiora-modelcd first-eqiora-modeluv add eqioraIn an existing uv project, just run uv add eqiora. This installs the published
package from PyPI and records the dependency in pyproject.toml and uv.lock.
Use uv add eqiora==0.1.5 to select the current published release explicitly.
These commands install the published release, which does not yet accept
the scalar tolerance shorthand below. Follow Development build
before running this walkthrough. Keep the lockfile with your project to reproduce its environment.
Save the following files in the project folder, beside pyproject.toml.
No shell activation is needed: uv run uses the project’s environment.
Lessons that run repository scripts use the optional example files.
Downloading those files does not require rebuilding Eqiora.
Predict the result
Section titled “Predict the result”Let a dimensionless quantity start at 1 and decay at rate :
The solution is . After one second, predict —about 37% of the initial value.
Save the model
Section titled “Save the model”Download decay.eqi, or copy
this complete source into a file named decay.eqi:
// A minimal implicit ODE: x decays at the rate supplied by the user.model decay() { // `x` is dimensionless and starts at 1. `rate` has inverse-time units. state x: 1; initial { x = 1; } parameter rate: 1 / s = 1;
// Eqiora writes the evolution law as a residual equal to zero. relation flow { derivative(x) + rate * x = 0; }}The .eqi file describes the model. state x declares the evolving unknown and initial { x = 1; } sets its initial condition,
parameter rate has inverse-second units, and relation states the equation.
The numerical method is chosen in the run script, not here.
Save the run script
Section titled “Save the run script”Download run.py, or copy this
complete script into run.py in the same folder:
"""Run the decay model shared by Get started and the ODE lesson."""
from __future__ import annotations
import argparsefrom pathlib import Path
import eqiora
OUTPUT_TIMES_S = (0.25, 0.5, 1.0)
def solve(source_path: Path) -> tuple[tuple[float, float], ...]: """Return the requested (time in seconds, dimensionless value) samples."""
model = eqiora.compile(path=source_path) field = model.field("x") plan = eqiora.resolve( model, temporal=eqiora.time.Tsitouras45( initial_step_s=0.01, relative_tolerance=1.0e-9, absolute_tolerance=1.0e-11, ), ) result = eqiora.run( plan, state=eqiora.State.initial(plan), until_s=OUTPUT_TIMES_S[-1], output_times_s=OUTPUT_TIMES_S, ) series = result.series(field) times = series.time.numpy() values = series.values.numpy() return tuple( (float(time_s), float(value)) for time_s, value in zip(times, values, strict=True) )
def main() -> None: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("model", nargs="?", type=Path, default=Path("decay.eqi")) args = parser.parse_args() for time_s, value in solve(args.model): print(f"t={time_s:.2f}, x={value:.10f}")
if __name__ == "__main__": main()The script compiles decay.eqi, chooses an adaptive time method, starts from the
model’s initial state and requests three observations. The returned Result
contains a time series selected by the source name x. A single
absolute_tolerance sets the one scalar state’s SI error scale; Models with
multiple, shaped, complex or higher-order state coordinates require the explicit
absolute_tolerances mapping. The two NumPy arrays
hold times in seconds and the corresponding dimensionless values.
Run and inspect
Section titled “Run and inspect”uv run python run.pyYou should see values close to:
t=0.25, x=0.7788007829t=0.50, x=0.6065306597t=1.00, x=0.3678794412The last line agrees with the hand prediction. The result is printed in the terminal; this small script does not create a plot or save a result file.
Change the model
Section titled “Change the model”In decay.eqi, change just the rate declaration to:
parameter rate: 1 / s = 2;Before rerunning, predict : doubling the rate makes
the quantity decay faster. Run the same command and script again. Its last
line should now be close to t=1.00, x=0.1353352833.
You changed the model, not the time method. Restore rate to 1 when following
the ODE lesson.
Example files
Section titled “Example files”Some lessons run scripts or model packages from the repository. Downloading those examples is separate from installing Eqiora. Use the published package for release-compatible examples; this decay walkthrough and the current continuum examples require the development build. With Git installed, run these commands from the project folder to get the files linked by this site:
git init eqiora-sourcegit -C eqiora-source remote add origin https://github.com/eqiora/eqiora.gitgit -C eqiora-source fetch --depth 1 origin 52d3002006103c962358bbd3809b97d8981bb295git -C eqiora-source checkout --detach FETCH_HEADKeep eqiora-source beside .venv for the lessons that use repository paths.
The voltage-divider example runs with the published 0.1.5 package. The
heated-body, current decay and continuum examples require the development build
described below. Add optional dependencies to the package you installed
as needed, for example uv add 'eqiora[matplotlib]'. Gmsh examples also need
uv add 'eqiora[gmsh,matplotlib]' and the system GLU library; on Ubuntu, install
it with sudo apt-get install libglu1-mesa.
Development build
Section titled “Development build”You only need a development build for features or results marked as newer than
the published release. The current decay walkthrough,
Kármán wake, exact-cylinder Stokes,
mixed-boundary elasticity and heated-body examples require this build. Their
API and authoring features are not in the unchanged 0.1.5 wheel.
After downloading the example files, install
Rust stable with Cargo, a C/C++ compiler/linker, CMake and
libclang. On Ubuntu, build-essential, cmake and libclang-dev supply the
native build prerequisites. Then replace the project’s
published dependency with the checkout:
uv add ./eqiora-sourceThe checked-out revision
now supplies the installed package. uv records this local source in the project,
so later uv run commands keep using it. For this development build, add extras
to the same source, for example uv add './eqiora-source[gmsh,matplotlib]'.
Building takes longer than installing a prebuilt wheel.
If something goes wrong
Section titled “If something goes wrong”uv: command not found: install uv using its linked instructions, reopen the terminal and checkuv --version.- Source build fails: check
cargo --versionandcc --version, then repeat the development-build command. Use CPython 3.13 and the checked-out source revision. - macOS import fails with
mis-aligned LINKEDIT string pool: see the source-build workaround below. - Wrong Python or missing
eqiora: runuv run python -c "import eqiora; print(eqiora.__version__)"from the project folder. For the optional source build, also comparegit -C eqiora-source rev-parse HEADwith the revision in the example-download command; the version alone does not identify it. - Model file not found: keep
decay.eqibesiderun.pyand run from their project folder, or pass its path:uv run python run.py path/to/decay.eqi. - A source diagnostic: misspelling
rateasmissing_ratein the relation producesEQ0603: unresolved expression symbol. Correct the name to match the declaration. Changing the rate’s unit tominstead produces an addition/subtraction dimension mismatch: the two terms must both have inverse-time units.
macOS source-build LINKEDIT error
Section titled “macOS source-build LINKEDIT error”A source build can succeed on macOS 27 while import eqiora fails with
mis-aligned LINKEDIT string pool when loading _eqiora. This matches a
Rust/LLVM stripping defect;
Rust has merged an upstream fix.
For an affected source build, add the following to the consuming project’s
pyproject.toml, beside run.py. If the table already exists, add only the
eqiora entry. This passes both stripping overrides to Eqiora’s build backend:
[tool.uv.config-settings-package]eqiora = { build-args = "--strip=false --config profile.release.strip=false" }Rebuild the existing source dependency, then check the import and rerun the model:
uv sync --reinstall-package eqiorauv run python -c "import eqiora; print(eqiora.__version__)"uv run python run.pyThe reported workaround restored
import and the decay example on macOS 27.0 arm64 with CPython 3.13.11, uv 0.12.15,
Rust 1.96.0 and Apple clang 21.0.0, using Eqiora 0.1.0a7. Both overrides were
applied together; neither has been tested alone. Prebuilt wheels are still
Linux x86-64 only. Once your toolchain includes the upstream fix, remove the
override, rebuild, and repeat the checks.
Where next?
Section titled “Where next?”- Learn: choose a subject, from heat and fluid flow to circuits and inverse problems, or derive this ODE.
- Guides: run a model and inspect its result with the same project environment.
- Gallery: explore complete simulation investigations.
- Standard library: reuse physical components, laws and boundary conditions.
- Reference: look up the public interfaces.