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 Debug  # or Release

This command compiles the C++ core and generates the Python bindings using pybind11.

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.

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.1.3.tar.gz (465.8 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.1.3-cp313-cp313-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.13Windows x86-64

swirl_string_core-0.1.3-cp313-cp313-manylinux_2_39_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

swirl_string_core-0.1.3-cp312-cp312-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.12Windows x86-64

swirl_string_core-0.1.3-cp312-cp312-manylinux_2_39_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

swirl_string_core-0.1.3-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

swirl_string_core-0.1.3-cp311-cp311-manylinux_2_39_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

swirl_string_core-0.1.3-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

swirl_string_core-0.1.3-cp310-cp310-manylinux_2_39_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

swirl_string_core-0.1.3-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9Windows x86-64

swirl_string_core-0.1.3-cp39-cp39-manylinux_2_39_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.39+ x86-64

File details

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

File metadata

  • Download URL: swirl_string_core-0.1.3.tar.gz
  • Upload date:
  • Size: 465.8 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.1.3.tar.gz
Algorithm Hash digest
SHA256 ba67fea3049f9eca7c3fd0a54ac46c31f3afeba0570654a95bb6cd0c7ee412a0
MD5 ba8a69d0860e336a6d19188550eb0fbc
BLAKE2b-256 827630ce12d788c9dfa3163e63d642bb6089f8cc1eeef7f8b1ae3c0b9a132fbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swirl_string_core-0.1.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4183ed474d6b0d6b00d7d7ccfdce0fb67adbad3ec941a218439ec80f20bdea6f
MD5 cf5d7ade606bd1cdd87c25419f19555e
BLAKE2b-256 8218e77904a32407a425fc8d24083aaac81eca9262345e6e0361ee037a834148

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swirl_string_core-0.1.3-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 cc39ad008521462b029e282d6dc4b758a358b11e5fd85a38aac6cb53b631940a
MD5 d6ea36957667d8ce3afeb5206d16e6f6
BLAKE2b-256 40a52f2c0b5947cb840337a148ca811980c78dada994a271a7ffa13ebd129b15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swirl_string_core-0.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7cb4a387e789c6db1780579dc084e126cc4d2cf11b96e024542462040b53bcf4
MD5 4069f519e5083388c388d7671af15147
BLAKE2b-256 df765a212cf03b9c33c30c4e20d82e6e4b43add67790f49edd004296ad7c4e81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swirl_string_core-0.1.3-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 2125b3de57d96067b253d553a2a6334ca28a534187ad8d0988d6783720a1f878
MD5 57cf131a81616d55379a38d134f1e150
BLAKE2b-256 c03340ecaa77b51ac548139c1f638bf4390c8563779dfe62155fdef676889cfe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swirl_string_core-0.1.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a65699c663d23032c8bcd6f92fbeceb151495a20071ebba1e3cae00a5c1552e7
MD5 853358dfea36d139d9614271406391fb
BLAKE2b-256 0d4ab7f448c9a2bc7eb0414d24ddd9ef770a607dea9fb66ccc3df48bbfd809b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swirl_string_core-0.1.3-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 089f1f357cc4d9086f9e6a6313fe0748a8ac394de4495ea1c41ce23096023586
MD5 5f513730c2f657930dd4e876b3e86831
BLAKE2b-256 1a1a68c744604be25835fb81625a44b94ecc8a2fa0ae181c16098aa3f3ab1111

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swirl_string_core-0.1.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 362001348930cef7a26c46772a769434c3e4fb02ce621880d4dba9350f717697
MD5 c3043cb410bf97f8ed89ecbc4c6a88bd
BLAKE2b-256 d29678db3a35fa47ca2cd4cc89e45f775ebcd6ee2482bba1af52df56d8ca5873

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swirl_string_core-0.1.3-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 90b4d9a7ba7fa0b06ebed8610f81f57d221ac8a23523ddb9b0ab441a0058cedc
MD5 a3e9a05a66922703af5a292c32137aa1
BLAKE2b-256 79230f0590f860c2b3ac3012dab5abf4e11793e5af20e3ec99c5c85acac53769

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swirl_string_core-0.1.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 31b7a2ad5b82001fa879d159f0c68613386307a668fa2fb7c41a3cb27e93edca
MD5 175886e4d08c068709ed88f6107bacd7
BLAKE2b-256 e8942a36aafb65cf555441eb7f291c2c25200f2127c99f51db68ae4ecb1ad441

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swirl_string_core-0.1.3-cp39-cp39-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 49be45d92a6920f1739a78115d8c3674a9ac9ce0a3e007ddcc2b124d0026b5e8
MD5 77f10e20857a5626fe69b3edbd4387da
BLAKE2b-256 6b9bc21e91e0519b60b9fac26a3fde2e0550b91c7d0ecbd3bf76192fe165e922

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