Skip to content
dracllopPublic

About

An open-source symbolic and physics engine.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Ki-One

Status: embryonic. This repository is in a very early construction phase — closer to a sketch than to a library. APIs will change. There is no public release yet.

Ki-One is an open-source project toward a high-precision physics simulation engine (and, later, an open metaverse). Its kernel is a Computer Algebra System (CAS) written in Modern C++, with a separate units/physics layer.

The universe is described in the language of mathematics, of which Modern C++ is a natural extension.

Español: documentación principal en inglés. Versión en castellano: README.es.md.

Architecture

Two independent layers; the CAS never depends on a unit system.

                    Ki-One kernel (embryonic)
                 physics engine · open metaverse
                              │
              ┌───────────────┴───────────────┐
              ▼                               ▼
        Arrayla (CAS)                   Units / physics
     generic mathematics              natural units (c = 1)
      arrayla::Vector<T>              kione::Quantity<Tag>
              │                               │
              └───────────────┬───────────────┘
                              ▼
                    intended applications
         · physical / CAS simulation engine
         · thermohydraulic models for
           Ubuntu Hydro Protection Services Ltd.
Module Namespace Role
include/arrayla/ arrayla CAS kernel. Dense Vector<T> over a Numeric concept (std::valarray, Rule of Zero).
include/kione/ kione Physics/units. Quantity<Tag> with phantom types so energy, mass, work, and momentum are distinct. ElectronVolt is an alias of Energy.

Arrayla is algebra. Quantity encodes a physical convention (eV, (c = 1)). Explicit bridges (as_mass, as_energy, …) make that convention a physicist's decision, not an implicit conversion.

Ubuntu Hydro Protection Services Ltd. is a target application domain. The first in-tree sketch is ubuntu-water-kernel/: a four-stage Kayelekera (Malawi) water-remediation train. It does not yet call Arrayla or Quantity.

Prototype ADTs follow Peter Gottschling's Discovering Modern C++. Template bodies in src/ are #included from the headers; they are not translation units.

Layout

include/arrayla/     CAS public headers
include/kione/       units / Quantity public headers
src/arrayla/         Vector template implementations
src/kione/           Quantity template implementations
tests/               CTest executables (concepts, <=>, Vector, Quantity)
ubuntu-water-kernel/ UHPS Kayelekera water-remediation sketch (`water_sim`)
docs/                manifesto, declaration, engineering log
CMakeLists.txt       C++20, GCC / Clang

Languages

Surface Language
Source comments, #error, exception messages English only
This README, engineering log, docs/*.txt English (primary)
README.es.md, engineering log (es) Spanish (secondary)

Build

C++20 is required (concepts, defaulted <=>, user-defined literals). GCC 15, current Clang, and other C++20 compilers are supported. You may pass -DCMAKE_CXX_STANDARD=23 if you prefer.

cmake -S . -B build
cmake --build build
ctest --test-dir build --output-on-failure
#include "arrayla/Vector.hpp"
#include "kione/Quantity.hpp"

using arrayla::Vector;
using namespace kione::physics_literals;

Vector<double> p{1.0, 2.0, 3.0};
constexpr auto E = 511.0_keV;

Do not compile src/**/*.cpp as standalone translation units.

Documentation

License

MIT. Copyright (c) 2025 José Antonio.

About

An open-source symbolic and physics engine.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages