Skip to main content

Swirl String Theory Canonical Core - High-performance C++ library for knot dynamics, vortex systems, and fluid mechanics

Project description

โš™๏ธ Swirl_String_core: Hybrid Benchmark Engine for the Swirl-String Theory

Welcome to Swirl_String_core, 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 using matplotlib, numpy, and PyBind11 integration.

  • ๐Ÿ“ฆ npm Package
    Available for Node.js and browser (WebAssembly) via npm install swirl-string-core. 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 swirl-string-core

SSTCORE Installation Guide (Windows)

This precompiled sstbindings.cp311-win_amd64.pyd file is a pybind11 module compiled for Python 3.11 on 64-bit Windows.

โœ… Installation Steps

  1. Determine your Python version:

    python --version
    
  2. Copy the matching .pyd file into your Python project directory. Example:

    your_project/
    โ”œโ”€โ”€ sstbindings.cp311-win_amd64.pyd
    โ””โ”€โ”€ your_script.py
    
  3. In your script:

    import sstbindings
    
  4. Use the exposed functions/classes such as:

    vortex = sstbindings.VortexKnotSystem()
    vortex.initialize_trefoil_knot()
    

If you encounter an ImportError:

  • Make sure the .pyd file 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.txt

To keep file up to date: pip freeze > requirements.txt

๐Ÿ› ๏ธ Get pyBind11 inside the project

mkdir extern
mkdir 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 build
cd build
cmake ..
cmake --build . --config Release # or Debug

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 swirl-string-core

See README_NPM.md for detailed usage instructions.

๐Ÿ“ฆ Test if python receives SST Bindings `

python -c "import sstbindings; print(sstcore)"

This should return <module 'sstcore' from 'C:\\workspace\\projects\\sstcore\\build\\Debug\\sstbindings.cp312-win_amd64.pyd'> This indicates that the Python bindings for SSTcore have been successfully built and installed. If this command fails, ensure that sstbindings.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 sstbindings 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\\sstbindings.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

๐Ÿ’ฌ Contact

Open an issue or whisper into the รฆther. This code is listening. Always.

1. Installeer PyTorch en de specifieke Intel Extension for PyTorch (IPEX) voor Windows XPU

conda create -n SSTcore11 intelpython3_full python=3.11 -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels
conda activate SSTcore11
conda config --add channels conda-forge
conda config --set channel_priority flexible
conda install scikit-learn-intelex xgboost numpy scipy numexpr -c https://software.repos.intel.com/python/conda/ -c conda-forge

2. Installeer de Coqui TTS bibliotheek (die XTTSv2 bevat) & Zorg ervoor dat de nieuwste versie van torchaudio's backend (soundfile) beschikbaar is. Toevoeging voor de GPU-acceleratie van Neurale Netwerken (XTTS)

python -m pip install torch==2.1.0.post3 torchvision==0.16.0.post3 torchaudio==2.1.0.post3 intel-extension-for-pytorch==2.1.10+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
python -m pip install TTS soundfile

3. Other setup steps for Python dependencies (if needed)

conda create -n SSTcore11 intelpython3_full python=3.11 -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels
conda activate SSTcore11

conda install conda -c https://software.repos.intel.com/python/conda/
conda install conda -c conda-forge
conda install conda -c main
conda config --add channels conda-forge
conda config --set channel_priority flexible

conda install scikit-learn -c https://software.repos.intel.com/python/conda/
conda install scikit-learn-intelex -c https://software.repos.intel.com/python/conda/
conda install xgboost -c https://software.repos.intel.com/python/conda/
conda install numpy -c https://software.repos.intel.com/python/conda/ -c conda-forge
conda install scipy -c https://software.repos.intel.com/python/conda/ -c conda-forge
conda install numexpr -c https://software.repos.intel.com/python/conda/ -c conda-forge
# 1. Verwijder de gecorrumpeerde en verouderde installatie
pip uninstall -y torch torchvision torchaudio intel-extension-for-pytorch

# 2. Installeer de vereiste C-bibliotheek voor asynchrone I/O
conda install libuv -c conda-forge -y

# 3. Installeer de nieuwe PyTorch 2.5.1 XPU stack, geoptimaliseerd voor Intel Arc
python -m pip install torch==2.5.1+cxx11.abi torchvision==0.20.1+cxx11.abi torchaudio==2.5.1+cxx11.abi intel-extension-for-pytorch==2.5.10+xpu --index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
  1. Isoleer de Intel GPU hardwarematig voor de SYCL/UR runtime
  2. Installeer de Intel-geoptimaliseerde PyTorch stack voor Python 3.12
  3. Activeer Level Zero optimalisaties voor PyTorch XPU
  4. Isoleer de Intel Arc A770 van de NVIDIA GTX 1060 voor de SYCL runtime
  5. Activeer Level Zero optimalisaties voor asynchrone executie
python -m pip install torch==2.5.1+cxx11.abi torchvision==0.20.1+cxx11.abi torchaudio==2.5.1+cxx11.abi intel-extension-for-pytorch==2.5.10+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
conda install libuv -c conda-forge -y

set ONEAPI_DEVICE_SELECTOR=level_zero:gpu
set SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
set ZES_ENABLE_SYSMAN=1
set ONEAPI_DEVICE_SELECTOR=level_zero:gpu
set SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
set ZES_ENABLE_SYSMAN=1

python verify_sst_hardware.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swirl_string_core-0.2.0.tar.gz (541.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

swirl_string_core-0.2.0-cp313-cp313-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.13Windows x86-64

swirl_string_core-0.2.0-cp313-cp313-manylinux_2_39_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

swirl_string_core-0.2.0-cp312-cp312-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.12Windows x86-64

swirl_string_core-0.2.0-cp312-cp312-manylinux_2_39_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

swirl_string_core-0.2.0-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

swirl_string_core-0.2.0-cp311-cp311-manylinux_2_39_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

swirl_string_core-0.2.0-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

swirl_string_core-0.2.0-cp310-cp310-manylinux_2_39_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

swirl_string_core-0.2.0-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9Windows x86-64

swirl_string_core-0.2.0-cp39-cp39-manylinux_2_39_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.39+ x86-64

File details

Details for the file swirl_string_core-0.2.0.tar.gz.

File metadata

  • Download URL: swirl_string_core-0.2.0.tar.gz
  • Upload date:
  • Size: 541.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for swirl_string_core-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1c09ef40a3cc2d279a6dffadf47542d11c1dd28abd1d66bb7cec9d0e7b123ddc
MD5 f3866c80fe3847e33169169ffac33b0e
BLAKE2b-256 8fb315c40dddd767939c1c5a67c0eb2ee4eb5dbcc215f67a1cec5003aa725970

See more details on using hashes here.

File details

Details for the file swirl_string_core-0.2.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for swirl_string_core-0.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9406a7a4e8e7316adbec915615425e0cd66794a67520398d28d84aad73fbd62f
MD5 ae3d790acc1a0a2bc5eb17be9e3b005c
BLAKE2b-256 894b7cb453729bc18a31f5c496e73467b62506d0c44fb8f95b662c4c0e1c5368

See more details on using hashes here.

File details

Details for the file swirl_string_core-0.2.0-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for swirl_string_core-0.2.0-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 7d320754bf0cb7309840813f59ebfdc71a1937605b739af69f8fe981923c54e4
MD5 247da5eb18b3fe6640e059fa5e40c51d
BLAKE2b-256 c9655692082ef8667a9f599018663167939ff9f44de00b6c35653b0abb433595

See more details on using hashes here.

File details

Details for the file swirl_string_core-0.2.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for swirl_string_core-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3d7767d916c1e20b3fae4f9a9e7d25b1f4201d1cf279d9ffdd5ed6e69e9d46a1
MD5 376b0807d36c19ddde03538eb3d95e05
BLAKE2b-256 01085dafc99264321eb8592c3693057b6a1c0590ec6a7f4e1008e58eb30d5b28

See more details on using hashes here.

File details

Details for the file swirl_string_core-0.2.0-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for swirl_string_core-0.2.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 9a7f180d202ae0f60086052f85684fd94dc01f9d2a08757929e9ee4886e4343d
MD5 42a4eed7a2e017e5a54aa99061cdc89c
BLAKE2b-256 54a6732ebeda48bcd72c526e7c2b44cef41aa62183cd66e514ca67ac8e248b31

See more details on using hashes here.

File details

Details for the file swirl_string_core-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for swirl_string_core-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f113d7d67f58cb365d4dd6f4d60af215be875307d57801a30866078448415340
MD5 94f4c0e822141e84bdb2a621375c7e33
BLAKE2b-256 3d2ef430ed301a46499ecd3de0e6b7d7ac5e565f0dd0bf8ffc016e68355ad13a

See more details on using hashes here.

File details

Details for the file swirl_string_core-0.2.0-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for swirl_string_core-0.2.0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 d3f6913c8977e7608eec0ba60bbd95ef519e0dec174c235bac35b87f279df373
MD5 f0e44c2813c318143e0ea8bc07a62e6c
BLAKE2b-256 1ac44dbf8bf40b8701722ab54595055572b9f7a658aa6c3d70a11dcbe556f576

See more details on using hashes here.

File details

Details for the file swirl_string_core-0.2.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for swirl_string_core-0.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9e430f44be009faf11f7872dbb817810b1e822fb577823b9b4e860d2a1e653ae
MD5 ce6e37eab04d6c42314ea4d870a51fcd
BLAKE2b-256 6ad25047952cbf7b77f0effd10dbe6b5387b9b070ae2132db31f56655536bda1

See more details on using hashes here.

File details

Details for the file swirl_string_core-0.2.0-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for swirl_string_core-0.2.0-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 a8b13ea75bc2421646926052401ef3e4a771c72c0f1c3f630b66938eafe50ad8
MD5 79f31ea7739a42d58f421073f6d67e00
BLAKE2b-256 a52f7843d72243dee07ca082234485770df21501ae963ad44c6203dba724c2a6

See more details on using hashes here.

File details

Details for the file swirl_string_core-0.2.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for swirl_string_core-0.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0bc802dc9f35eb1d97cb656943b6e4ddcd719edb14309333e1896d53a654bded
MD5 336708f3d7b7aeb3e966ba96c55c1d78
BLAKE2b-256 50beeb57732a497b82209e875ad99650541397856f67a874ab54352635aec956

See more details on using hashes here.

File details

Details for the file swirl_string_core-0.2.0-cp39-cp39-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for swirl_string_core-0.2.0-cp39-cp39-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 047e7a37affe97a5ac27f238ca38d5f2f7fb24d1fad826a930251659a1fa5c07
MD5 61b540b29ada3fe17a551ee00f766073
BLAKE2b-256 e6165967ab7f6c6258c0ed4279aa07d34ead2ef82f2ff28e074f6568482f5ecd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page