Get started with the Vispootanam Rocket Simulator in 5 minutes!
- Python 3.10 or higher
- pip package manager
# Clone the repository
git clone https://github.com/chandu1234678/rocket-simulator.git
cd rocket-simulator
# Install dependencies
pip install -r requirements.txt
# Install the package
pip install -e .
# Verify installation
python verify_installation.pypip install numbaThis provides 10-100x speedup for physics calculations.
Run the complete workflow with all features:
python run/run_complete_analysis.pyThis will:
- Check feasibility (can your rocket reach the target?)
- Optimize the design (find best diameter and drag coefficient)
- Show detailed results
Output:
Target: 500m
Optimized Design:
Diameter: 0.1234m
Nose Length: 0.3702m
Body Length: 1.234m
Drag Coefficient: 0.366
Achieved: 498.5m (99.7% accuracy)
Max Mach: 0.85 (subsonic ✓)
For quick estimates (0.02 seconds):
python run/run_fast_optimization.pyFor production designs (0.5 seconds):
python run/run_accurate_optimization.pyEdit the configuration in any run script:
# Load default configuration
from data.default_rocket_config import get_config
ROCKET_CONFIG = get_config('default')
# Override specific parameters
ROCKET_CONFIG['thrust'] = 100.0 # Increase thrust
ROCKET_CONFIG['mass_initial'] = 3.0 # Heavier rocket
TARGET_APOGEE = 1000.0 # Target altitude in metersget_config('default') # Standard model rocket
get_config('high_altitude') # More propellant, higher thrust
get_config('low_altitude') # Safer, lower performance
get_config('competition') # Optimized for accuracyDiameter: Body tube diameter (meters)
- Larger = more drag = lower altitude
- Typical: 0.05m to 0.5m
Drag Coefficient (Cd): Aerodynamic efficiency
- Lower = less drag = higher altitude
- Typical: 0.3 to 0.8
Max Mach: Maximum speed relative to sound
- Must stay below 1.2 (supersonic limit)
- Typical: 0.5 to 1.1
Error: Difference from target altitude
- < 10%: Excellent
- < 20%: Good
-
50%: Failed
✅ Subsonic: Max Mach < 1.2 (safe)
❌ Supersonic: Max Mach ≥ 1.2 (UNSAFE - rejected)
# Run all tests
pytest tests/ -v
# Run specific test
pytest tests/test_aerodynamics.py -v
# Run with coverage
pytest tests/ --cov=src --cov-report=htmlfrom data.default_rocket_config import get_config
from src.optimization.hybrid_optimizer import HybridOptimizer
# Load configuration
config = get_config('default')
# Create optimizer
optimizer = HybridOptimizer(
base_config=config,
target_apogee=500.0,
tolerance=50.0
)
# Optimize
result = optimizer.optimize_hybrid()
print(f"Diameter: {result['diameter']:.4f}m")
print(f"Apogee: {result['apogee']:.1f}m")
print(f"Error: {result['error']:.1f}m")from src.optimization.feasibility_checker import FeasibilityChecker
checker = FeasibilityChecker()
result = checker.check_feasibility(
thrust=80.0,
burn_time=1.8,
specific_impulse=180,
mass_initial=2.2,
mass_dry=2.0,
target_apogee=5000.0
)
if result.can_proceed:
print("✓ Design is feasible!")
else:
print(f"✗ Problem: {result.reason}")
print("Suggestions:")
for option in result.suggestions['options'].values():
print(f" - {option['message']}")from data.default_rocket_config import get_config
# Start with default
config = get_config('default')
# Customize for high altitude
config['thrust'] = 150.0 # More thrust
config['burn_time'] = 2.5 # Longer burn
config['specific_impulse'] = 200 # Better propellant
config['mass_initial'] = 3.5 # More propellant
config['mass_dry'] = 2.5 # Heavier structure
# Now use this config with any optimizer- Run
run_complete_analysis.pywith default settings - Modify
TARGET_APOGEEand observe changes - Try different presets:
get_config('high_altitude')
- Customize rocket parameters (thrust, mass, ISP)
- Run
run_feasibility_check.pyto understand limits - Compare fast vs accurate optimizers
- Write custom optimization scripts
- Modify physics models in
src/models/ - Add new optimization algorithms
- Contribute to the project!
# Make sure you're in the project root
cd rocket-simulator
# Install in editable mode
pip install -e .This is normal! The code works without numba, just slower.
To install numba for better performance:
pip install numba# Reinstall dependencies
pip install -r requirements.txt --force-reinstall
# Reinstall package
pip install -e . --no-deps
# Run tests
pytest tests/ -vRun scripts from the project root:
# Good
python run/run_complete_analysis.py
# Bad (don't cd into run/)
cd run
python run_complete_analysis.py # Will fail- Read USER_GUIDE.md for detailed usage
- Check API_REFERENCE.md for API docs
- See TECHNICAL_SPECIFICATION.md for physics
- Review examples/ for more code samples
- Issues: https://github.com/chandu1234678/rocket-simulator/issues
- Discussions: https://github.com/chandu1234678/rocket-simulator/discussions
- Email: bbodapat2@gitam.in
- Use Hybrid Optimizer for best balance (0.5s, 90% accuracy)
- Install Numba for 10-100x speedup
- Start with feasibility check to avoid wasted optimization
- Use Fast Optimizer for initial exploration
- Use Parallel Optimizer only for final production designs
Happy Rocketing! 🚀