Skip to content
Get started

Standard library

Eqiora’s standard library is the Eqiora.* collection of reusable physical components, laws, and boundary conditions. They are ordinary .eqi files in crates/eqiora-api/packages/, so you can import a component, bind its physical inputs, and open its source to read the equations.

Build Start with Learn the physics
Resistor networks and voltage sources Electrical components Circuits and dynamics
Small-strain solid deformation Solid components Structural mechanics
Viscous incompressible flow Fluid components Fluid mechanics
Delays and discrete integration Sampled controls Decay and storage
Heat conduction and material properties Local thermal examples Heat transfer

After installing Eqiora, create a package directory with eqiora.toml and src/main.eqi. For example:

eqiora.toml
[package]
name = "org.example.Divider"
version = "0.1.0"
entry = "main"

The source imports the desired module:

eqi
import Eqiora.Electrical.Basic.basic as electrical;

Register the bundled dependency, then compile your model by its declaration name:

python
from pathlib import Path
import eqiora
project = Path("divider")
store = Path("package-store")
store.mkdir(exist_ok=True)
resolution = eqiora.add_bundled_dependency(
project, store, "Eqiora.Electrical.Basic", version="0.1.0"
)
model = eqiora.compile_package(store, resolution, entry="VoltageDivider")

The electrical example has the complete VoltageDivider model and solver setup. add_bundled_dependency adds the dependency to the project, writes the lock, and installs the source into the local store; there is no need to copy library equations into your model.

To bundle a project with its dependencies:

python
vendor = project / "vendor"
vendor.mkdir(exist_ok=True)
eqiora.vendor_project(project, store, vendor)
resolution = eqiora.open_project(project, vendor)
model = eqiora.compile_package(vendor, resolution, entry="VoltageDivider")

To build your own package, follow Create and share a library from directory layout to local imports, GitHub dependencies, and offline use. See project packages for the detailed resolution and update rules.

The bundled names are Eqiora.Electrical.Basic, Eqiora.Controls.Sampled, Eqiora.Mechanics.Interfaces, Eqiora.Solid.LinearElasticity, and Eqiora.Fluid.Incompressible.

The repository contains more packages than are bundled. Only the bundled names above work with add_bundled_dependency; the others are here for reading.

Module Purpose
Electrical.Basic Pin, ideal voltage source, resistor, ground
Electrical.Circuits Parallel DC circuit composed from Basic
Electromechanical.DcDrive Controlled source, permanent-magnet motor, inertial load, speed sensor
Controls.Sampled Unit delay and discrete integrator on a supplied clock
Solid Plane-strain and plane-stress elasticity, material properties, solid boundary conditions
Fluid Steady Stokes flow and velocity, traction, and pressure boundary conditions
Solid.LinearElasticity Quasistatic and dynamic elastic balances and interfaces
Fluid.Incompressible Steady 2D and conservative transient 3D Newtonian volume laws and interfaces
Fluid.InertialStokes Inertial Stokes volume law without velocity advection
Mechanics.Interfaces Velocity/traction connectors and zero boundary terminals
Mechanics.BoundaryLoads Normal-pressure traction terminal

Each source file shows the full signatures and equations.

Thermal components and material properties

Section titled “Thermal components and material properties”

These examples are local projects you can reuse and adapt:

  • Heated body contains steady conduction and constant-capacity transient components, complete boundary and initial data, and a Python runner. Follow the thermal walkthrough.
  • Property composition contains a temperature-dependent conductivity table, its attribution, and Fourier-flux and slab-conductance components that share the property. Read the property syntax.

There is no bundled thermal package; resolve these examples as local eqiora.toml projects.