How sardakius/solar-thermodynamics works
Solar Thermodynamics simulates solar structure with Eddington Euler/RK4 methods and a standard solar model, exports shell profiles, and provides profile plots plus an interactive, property-colored solar cross-section. The main program owns simulation dispatch and CSV export; the Sun model owns numerical updates and calls the physics equations. The reader loads the exported datasets, uses shared utilities for plotting and argument selection, and renders the cross-section. The README documents the visualization options; unsampled profile assets are represented by their existing directory.
Main entry points: data_reader.py Data reader · main.cpp Simulation entry · sun.cpp Sun models · data_reader_util.py Reader utilities
Components 13
Solar simulation
- Simulation entry
src/main.cpp - Sun models
src/sun.cpp - Physics equations
src/physics.c - Shell state
include/simulation/shell.h - Model constants
include/constants.h
Profile data
- Euler dataset
data/data_euler.csv - RK4 dataset
data/data_rk4.csv - SSM dataset
data/data_ssm.csv
Visualization
- Data reader
data/data_reader.py - Reader utilities
data/data_reader_util.py - Profile plots
data/profiles - Solar cross-section
data/data_reader.py
Other components
- User
Connections 14
- Simulation entry → Sun models: runs models
src/main.cpp - Sun models → Physics equations: calls equations
src/sun.cpp - Sun models → Shell state: updates shells
src/sun.cpp - Sun models → Model constants: uses parameters
src/sun.cpp - Simulation entry → Euler dataset: writes CSV
src/main.cpp - Simulation entry → RK4 dataset: writes CSV
src/main.cpp - Simulation entry → SSM dataset: writes CSV
src/main.cpp - Data reader → Euler dataset: reads CSV
data/data_reader.py - Data reader → RK4 dataset: reads CSV
data/data_reader.py - Data reader → SSM dataset: reads CSV
data/data_reader.py - Data reader → Reader utilities: uses helpers
data/data_reader.py - Data reader → Profile plots: saves profiles
data/data_reader.py - Data reader → Solar cross-section: renders view
data/data_reader.py - Reader utilities → Profile plots: saves plots
data/data_reader_util.py