sst-core
v0.8.36
Published
SSTcore - Swirl String Theory Canonical Core. High-performance C++ library for knot dynamics, vortex systems, and fluid mechanics (Node native addon + optional WASM). Same project as pip install SSTcore.
Downloads
172
Maintainers
Readme
⚙️ SSTcore: Hybrid Benchmark Engine for the Swirl-String Theory
Welcome to SSTcore, the computational backbone for the Swirl-String Theory (SST).
This hybrid C++/Python engine is designed to benchmark field-based gravity, time dilation, and EM swirl-field dynamics using modern numerical methods and a large helping of theoretical audacity. This repository contains the core engine, simulation scripts, and visualizations to explore the swirling depths of æther dynamics.
We build the C++ SST-Bindings first, and then we can import it into benchmark Python code. When using the C++ SST-bindings to do hard calculations we can run / render Python simulations 10-100x faster.
💾 Features
🚀 High-Performance Core (C++)
Handles numerically stiff vortex dynamics, EM field evolution, and topological energy exchanges.🐍 Python Frontend
For visualization, parameter sweeps, and interactive experiments usingmatplotlib,numpy, andPyBind11integration.📦 npm Package
Available for Node.js and browser (WebAssembly) vianpm install sstcore. Perfect for Angular and other JavaScript/TypeScript applications.🧲 EM Field Simulations
Supports generation and animation of rotating 3-phase bivort electric and magnetic field structures.⌛ Time Dilation & Gravity Models
Fast comparison of GR vs SST predictions in strong field limits.
Installation Options
Python Package
pip install SSTcoreResources na pip install (via import)
Na pip install kun je het resources-pad (o.a. Knots_FourierSeries, ideal.txt, knotplot) zo aanroepen:
from SSTcore import (
get_ideal_txt_path,
get_knots_fourier_series_dir,
get_resources_dir,
get_knotplot_ab_path,
list_knotplot_ids,
)
# Basis resources-map (ideal/, Knots_FourierSeries/, knotplot/, …)
resources_dir = get_resources_dir()
# Alleen Knots_FourierSeries-map
kfs_dir = get_knots_fourier_series_dir()
# Pad naar ideal.txt (resolves resources/ideal/ first, flat legacy second)
ideal_path = get_ideal_txt_path()
# Knotplot AB-XML (INDEX-backed; prefer over deprecated get_knotplot_ideal_path / knotplot)
ab_path = get_knotplot_ab_path("knot_3.1")
kp_ids = list_knotplot_ids()Optioneel: stel SSTCORE_RESOURCES in om een vaste map te forceren. Gilbert ideal data lives under resources/ideal/. Repo-only ridgerunner tooling is under tools/knotplot/ (not packaged).
SSTCORE Installation Guide (Windows)
This precompiled sstcore.cp311-win_amd64.pyd file is a pybind11 module
compiled for Python 3.11 on 64-bit Windows.
✅ Installation Steps
Determine your Python version:
python --versionCopy the matching
.pydfile into your Python project directory. Example:your_project/ ├── sstcore.cp311-win_amd64.pyd └── your_script.pyIn your script:
import sstcoreUse the exposed functions/classes such as:
vortex = sstcore.VortexKnotSystem() vortex.initialize_trefoil_knot()
If you encounter an ImportError:
- Make sure the
.pydfile matches your Python version and architecture (64-bit) - Recompile using CMake and pybind11 if necessary for other OS
📦 Build & Run
I advise to make use of IDE like CLion, PyCharm or Visual Studio for building and running the project. When using CLion, you can follow these steps: You must install Visual Studio 2022 with C++ support, and then you can use CLion to build the project.
⚙️ Repair MSVC with the Visual Studio Installer
Open the Visual Studio Installer and do the following:
- Find Visual Studio 2022 Community
- Click Modify
Make sure the following are selected:
✔ Individual components: ✅ MSVC v14.3x - x64/x86 build tools ✅ Windows 10 SDK (or 11) ✅ C++ CMake tools for Windows ✅ C++ ATL/MFC support (optional) ✅ C++ Standard Library (STL) After this, reboot CLion and retry the build.
🔧 Use Clang Toolchain (if MSVC is broken)
You can switch CLion to use Clang (LLVM):
Install LLVM from: https://github.com/llvm/llvm-project/releases
Point CLion to clang++.exe in your toolchain settings
You can still use pybind11 + C++23 this way and avoid MSVC issues altogether.
🐍 Install Python Dependencies
Make sure you have Python 3.11+ installed, then create a virtual environment and install the required packages. This might be the time to take a look at Conda, which is a package manager that can help you manage Python environments and dependencies more easily.
conda create -n SSTcore12 python=3.12
conda activate SSTcore12 We now have to at least pip install pybind11 and pip install numpy to run the Python bindings.
I recommend to use a requirements.txt file to manage the dependencies of the project, it will reflect my environment.
pip install -r requirements.txtTo keep file up to date: pip freeze > requirements.txt
🛠️ Get pyBind11 inside the project
mkdir -p extern
mkdir -p extern/pybind11
git clone https://github.com/pybind/pybind11.git extern/pybind11🔨 Build C++ Core
Before building, ensure you have CMake installed and your environment is set up correctly. Download and install CMake https://cmake.org/download/
First initialize the CMake project, this results in a new directory cmake-build-debug-mingw or similar in the project.
You can now use the following commands (from project root) to build the C++ core and generate the Python bindings:
mkdir -p build
cd build
cmake ..
cmake --build . --config Release
This command compiles the C++ core and generates the Python bindings using pybind11.
pip install PyQtWebEngine PyQt5 pyinstaller numpy
npm Package (Node.js / Browser)
npm install sstcoreSee README_NPM.md for detailed usage instructions.
📦 Test if python receives SST Bindings
python -c "import sstcore; print(sstcore)"This should return a path to sstcore.*.pyd or the SSTcore package.
This indicates that the Python bindings for SSTcore have been successfully built and installed.
If this command fails, ensure that sstcore.cp311-win_amd64.pyd is found in the same directory where you run python.
When it does not work, you can delete the cmake-build and build folder and try to recompile the C++ bindings from within ./build/ with cmake .. followed by cmake --build . --config Debug again.
🐍 Import the SST Bindings in Python
from SSTcore import VortexKnotSystem, biot_savart_velocity, compute_kinetic_energy🔨 Load the C++ module dynamically from the compiled path, because the SST Bindings are not installed in the Python site-packages.
import os
module_path = os.path.abspath("C:\\workspace\\projects\\sstcore\\build\\Debug\\sstcore.cp312-win_amd64.pyd")
module_name = "sstcore"📊 Run Benchmarks
python tests/test_potential_timefield.py📂 Project Structure
project-root/
├── build/
│ └── ...
├── examples/
│ ├── example_fluid_rotation.py
│ ├── example_potential_flow.py
│ ├── example_vortex_ring.py
│ └── ...
├── src/
│ ├── fluid_dynamics.cpp
│ ├── thermo_dynamics.cpp
│ ├── vorticity_dynamics.cpp
│ └── ...
├── src_bindings/
│ ├── module_sst.cpp
│ ├── py_fluid_dynamics.cpp
│ ├── py_thermo_dynamics.cpp
│ ├── py_vorticity_dynamics.cpp
│ └── ...
├── extern/pybind11/ # <-- Git submodule or manually cloned -- git clone https://github.com/pybind/pybind11.git extern/pybind11
├── CMakeLists.txt🧠 Author
ORCID: 0009-0006-1686-3961
Conceived, written, and fearlessly pushed into the void by a person undeterred by the collapse of academic consensus.
📖 Documentation
- Theory Overview
- Swirl Core Model
- Benchmarked Results
🧃 Warning
This software may cause:
- Vortex-based worldview shifts
- Sudden rejection of spacetime curvature
- Hallucinations of swirling field lines in your breakfast cereal
