Eqiora language
An .eqi file describes a mathematical model: its quantities, equations, initial
and boundary data, and measurements. Python chooses how to compute with that model.
Use this reference to look up syntax; start with
Mathematical modeling for the reasoning behind it.
| Write or look up | Reference |
|---|---|
model, parameter, variable, state, domain, observable |
Declarations |
| Dimensions, SI units, scaled literals, vectors | Quantities and units |
relation, derivative, initial, law, form, clocks |
Equations and state |
component, instance, connect, import, material properties |
Composition |
| Electrical, solid, fluid, and sampled-control components | Standard library |
Compile a first model
Section titled “Compile a first model”Save this complete model as current.eqi:
model Current() { parameter voltage: V = 12; parameter resistance: Ohm = 4; variable current: A; relation ohm { voltage = resistance * current; } observable measured_current: A = current;}After installation, compile it:
import eqiora
model = eqiora.compile(path="current.eqi")measurement = model.observable("measured_current")The equation determines a current of 3 A. Compilation checks its types and mathematical structure; execution selects a solver and produces a Result from which you can read the measurement.
For a time-dependent example, continue with ordinary differential equations. For exact API signatures, use the Python reference.