RocketPy has three interface options, all now available to you:
What we built:
simulate_simplified.py- Run from terminal- Python scripts that output results
How to use:
source .venv/bin/activate
python rocketpy_migration/src/simulate_simplified.pyPros:
- ✅ Fast
- ✅ Scriptable/automatable
- ✅ Good for batch processing
- ✅ Easy to integrate into pipelines
Cons:
- ❌ Requires coding knowledge
- ❌ Not user-friendly for non-programmers
- ❌ Hard to explore parameters
- ❌ No visual feedback during run
Best for:
- Automated simulations
- Monte Carlo (1000s of runs)
- CI/CD pipelines
- Power users
What we built:
streamlit_app.py- Interactive web app- Beautiful, engineer-friendly interface
- No coding required!
How to use:
source .venv/bin/activate
streamlit run rocketpy_migration/src/streamlit_app.pyThen open your browser to: http://localhost:8502
Features:
- 🎚️ Sliders & inputs for all parameters
- 📊 Interactive plots (altitude, velocity, ground track)
- 💾 Export results to CSV
- 🔄 Real-time simulation
- 📝 No coding required
- 🌐 Team collaboration (can deploy to server)
Pros:
- ✅ User-friendly (anyone can use)
- ✅ Visual parameter exploration
- ✅ Beautiful plots
- ✅ Easy to share
- ✅ Professional looking
- ✅ Engineers LOVE it
Cons:
- ❌ Slower for batch runs
- ❌ Needs browser
- ❌ One simulation at a time (by default)
Best for:
- Engineering teams
- Parameter exploration
- What-if scenarios
- Presentations
- Client demos
- Training
What you can create:
# interactive_sim.ipynb
from rocketpy import Environment, Motor, Rocket, Flight
import ipywidgets as widgets
# Interactive sliders in notebook
# Live plots
# Documentation + code + results in one placePros:
- ✅ Interactive like Streamlit
- ✅ Code + results + docs together
- ✅ Great for research
- ✅ Easy to share (.ipynb files)
Cons:
- ❌ Requires Jupyter
- ❌ Not as polished as Streamlit
- ❌ Needs some coding knowledge
Best for:
- Research & development
- Documentation
- Teaching
- Reproducible analysis
| Feature | CLI | Streamlit | Jupyter |
|---|---|---|---|
| Ease of Use | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ |
| Visual Feedback | ❌ | ✅ | ✅ |
| Team Friendly | ❌ | ✅ | ~50% |
| Performance | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ |
| Batch Processing | ✅ | ❌ | ~50% |
| Coding Required | Yes | No | Some |
| Setup Time | 1 min | 2 min | 5 min |
| Best For | Automation | Engineers | Research |
Why?
- Zero coding required - anyone can use it
- Beautiful interface - looks professional
- Interactive exploration - sliders make it easy to try things
- Easy to share - just send them a URL
- Built-in plots - no need to export/plot separately
- Comments system - can add notes about each run
Monte Carlo, optimization, CI/CD → Use the Python scripts
Documentation, teaching, reproducible research → Use notebooks
1. Start the app:
cd /Users/anban/opt/share/engineering-projects/pyrops-v0.1
source .venv/bin/activate
streamlit run rocketpy_migration/src/streamlit_app.py2. Open your browser:
http://localhost:8502
3. Use the app:
- Left sidebar: Adjust parameters
- Click "Run Simulation" button
- View results and plots
- Download CSV if needed
4. Share with team: If on same network:
streamlit run rocketpy_migration/src/streamlit_app.py --server.address 0.0.0.0Then share: http://YOUR_IP:8502
Want engineers to leave comments? Add this to the Streamlit app:
# Add at the bottom of streamlit_app.py
st.header("💬 Comments & Notes")
# Text area for comments
comment = st.text_area(
"Add notes about this simulation:",
placeholder="E.g., 'Good configuration for high-altitude launch'"
)
if st.button("💾 Save Comment"):
# Save to file
with open('comments.txt', 'a') as f:
f.write(f"\n{datetime.now()}: {comment}\n")
f.write(f"Config: Apogee={flight.apogee:.0f}m, "
f"Wind={wind_speed:.0f}m/s\n")
st.success("Comment saved!")
# Show previous comments
if Path('comments.txt').exists():
with open('comments.txt', 'r') as f:
st.text_area("Previous Comments:", f.read(), height=200)Or use a database for multi-user:
import sqlite3
# Store comments with simulation parameters
# Tag simulations
# Search commentsstreamlit run src/streamlit_app.py- Access: http://localhost:8502
- Users: Just you
- Cost: $0
streamlit run src/streamlit_app.py --server.address 0.0.0.0 --server.port 8502- Access: http://YOUR_IP:8502 (from any office computer)
- Users: Anyone on your network
- Cost: $0
# 1. Push to GitHub
# 2. Go to https://streamlit.io/cloud
# 3. Connect your repo
# 4. Deploy! (automatic)- Access: https://yourapp.streamlit.app
- Users: Anyone with link
- Cost: Free for public repos
# Install on Linux server
# Use systemd to run as service
# Add nginx reverse proxy
# Add SSL certificate- Access: https://rocketpy.yourcompany.com
- Users: Controlled access
- Cost: Server costs (~$5-50/month)
Yes! Streamlit apps work on mobile browsers:
- Responsive design (adapts to screen size)
- Touch-friendly controls
- Can run simulations from tablet/phone
Create .streamlit/config.toml:
[theme]
primaryColor = "#F63366"
backgroundColor = "#FFFFFF"
secondaryBackgroundColor = "#F0F2F6"
textColor = "#262730"
font = "sans serif"st.logo("your_logo.png")
st.sidebar.image("your_logo.png")st.markdown("""
<style>
.stApp {
background-color: your_color;
}
</style>
""", unsafe_allow_html=True)import streamlit_authenticator as stauth
# Simple password
password = st.text_input("Password:", type="password")
if password != "your_password":
st.stop()
# Or use streamlit-authenticator library
# Supports usernames, hashed passwords, cookies# Different permissions for different users
if user_role == "engineer":
# Show full interface
elif user_role == "viewer":
# Show results only, no run buttoncol1, col2 = st.columns(2)
with col1:
st.header("Configuration A")
# Run simulation A
with col2:
st.header("Configuration B")
# Run simulation B
# Plot both on same graph# Save button
if st.button("Save Configuration"):
config = {
"rail_length": rail_length,
"wind_speed": wind_speed,
# ... all parameters
}
json.dump(config, open('config.json', 'w'))
# Load button
uploaded = st.file_uploader("Load Configuration")
if uploaded:
config = json.load(uploaded)
# Set all parametersimport smtplib
from email.mime.text import MIMEText
if st.button("📧 Email Results"):
email = st.text_input("Email address:")
# Send simulation results
send_email(email, results)import logging
# Log every simulation
logging.info(f"User ran simulation: apogee={apogee}, "
f"wind={wind_speed}")
# Analytics dashboard
st.sidebar.metric("Simulations Today", count_today)
st.sidebar.metric("Total Simulations", total_count)# Save all runs to database
# Generate reports
# Track parameter trends→ You have 3 options: CLI (command line), Streamlit (web), or Jupyter (notebooks)
→ YES! Already done! ✅ See streamlit_app.py
→ NO! Use Streamlit for beautiful web interface (no coding required!)
→ Simplified setup, NOT physics! See SIMPLIFICATIONS_AND_SCALING.md
→ Good for 90% of use cases. Physics is full-fidelity.
→ YES! Can do multi-stage, Monte Carlo, custom aero, etc. → RocketPy is production-grade, used by real rocket companies
Try the Streamlit app RIGHT NOW:
source .venv/bin/activate
streamlit run rocketpy_migration/src/streamlit_app.pyYour engineers will love it! 🎉
Questions? Let me know if you want:
- Custom features added to Streamlit app
- Deploy it to a server
- Add authentication
- Create the "enhanced" version with full PyROPS data integration
- Add Monte Carlo mode
- Anything else!