2.3 KiB
Informational Tests
This directory contains tests that are not part of the standard test suite. These tests are provided for informational purposes only and should be run separately.
Purpose
Informational tests are designed to:
- Explore simulation boundaries and limits
- Provide diagnostic information about the simulation
- Test extreme or edge cases that don't fit into normal test suites
- Help understand system behavior under various conditions
Running Informational Tests
Informational tests are not run by make test. To build and run them:
cd tests/informational
make
./time_step_test
Current Tests
test_time_step_stability.cpp
Determines the maximum stable time step for the RK4 integration across different orbital regimes.
Test Bodies:
- Mercury Orbiter (MESSENGER-like): 200 km altitude, ~12 hour period
- Io (Jupiter's moon): 421,700 km orbit, ~1.77 day period
- Moon (Earth's moon): 384,400 km orbit, ~27.3 day period
Stability Criteria:
- Energy drift < 1% over 100 orbits
- Distance drift < 5%
- No SOI transitions (body doesn't change parent)
Configuration: Uses test_time_step_stability.toml
Usage:
# From project root directory:
./tests/informational/test_time_step_stability
# Or using the Makefile:
cd tests/informational
make run-timestep
# Run specific test case
./tests/informational/test_time_step_stability '[timestep][stability]'
# Run with verbose output to see binary search progress
./tests/informational/test_time_step_stability -s "[timestep][stability]"
Note: Tests must be run from the project root directory because config file paths are relative to the root.
Expected Output: The test performs a binary search to find the maximum stable time step, printing progress for each dt value tested. Results show the minimum stable dt across all tested bodies with recommendations.
Adding New Informational Tests
- Create a new
.cppfile in this directory - Add corresponding
.tomlconfig file if needed - Add a target in the
Makefile:your_test_name: your_test_name.o g++ $(BUILD_DIR)/*.o -o $@ -lCatch2Main -lCatch2 -lm - Update this README with test description
- Follow the naming convention:
test_<purpose>.cppandtest_<purpose>.toml