I don't remember

This commit is contained in:
2026-03-04 16:28:07 +00:00
parent 585e66ceb4
commit 6885801078
25 changed files with 1278 additions and 1908 deletions

View File

@@ -1,24 +0,0 @@
# RocketTools Project Documentation Approval Log
## Document Approvals
| Document | Version | Approval Status | Date | Approved By |
|----------|---------|-----------------|------|-------------|
| PROJECT_OVERVIEW.md | Final | ✅ Approved | 2025-04-05 | Project Lead |
| PROJECT_STRUCTURE.md | Final | ✅ Approved | 2025-04-05 | Project Lead |
| ROCKETTOOLS_PROJECT_APPROVED.md | 1.0 | ✅ Approved | 2025-04-05 | Project Lead |
## Notes
All project documentation has been reviewed and approved for distribution to relevant team members and stakeholders. The finalized documents provide a comprehensive overview of the RocketTools project including objectives, scope, technical implementation, and project structure.
## Distribution List
- Development Team
- Project Management
- Stakeholders
- Educational Partners
- Beta Testers
---
*Last Updated: 2025-04-05*

View File

@@ -1,87 +0,0 @@
# Clarity Review Summary
## Review Process
The project description documents were reviewed for clarity to ensure all stakeholders can understand the RocketTools project purpose, scope, and implementation.
## Documents Reviewed
1. **PROJECT_OVERVIEW.md** - Main project description
2. **PROJECT_STRUCTURE.md** - Technical architecture and component relationships
## Improvements Made
### PROJECT_OVERVIEW.md
1. **Added Executive Summary**
- Created a concise opening section for quick understanding
- Summarized key value propositions in plain language
2. **Restructured Objectives**
- Renamed objectives for better clarity and consistency
- Added descriptive text explaining each objective
3. **Improved Scope Section**
- Restructured formatting for better readability
- Added explicit "Out of Scope" section to clarify boundaries
- Renamed "Technical Scope" to "Technical Implementation"
4. **Enhanced Target Audience**
- Provided more specific descriptions of each user group
- Clarified institutional use cases
5. **Refined Success Metrics**
- Renamed to "Success Criteria" for consistency
- Added measurable outcomes and timeframes
- Improved specificity of metrics
6. **Expanded Project Constraints**
- Added context around resource limitations
- Clarified technical dependencies
### Additional Documents Created
1. **PROJECT_DESCRIPTION_CLARIFIED.md**
- Combined overview and structure information into a single cohesive document
- Streamlined overlapping content between separate documents
2. **PROJECT_DESCRIPTION_STAKEHOLDER.md**
- Created simplified version for non-technical stakeholders
- Focused on benefits and value rather than technical implementation
- Organized by user personas and use cases
## Clarity Enhancements
1. **Consistent Terminology**
- Standardized terms across documents
- Used plain language where possible
- Defined technical terms in context
2. **Logical Flow**
- Reorganized sections to follow a natural progression
- Grouped related concepts together
- Added clear section headings and subheadings
3. **Visual Structure**
- Improved formatting with consistent bullet points
- Used bolding for key terms and concepts
- Maintained clear hierarchy of information
4. **Audience Awareness**
- Differentiated between technical and non-technical readers
- Provided multiple entry points to the information
- Addressed specific stakeholder concerns
## Stakeholder Understanding
The revised documents now provide:
- **For Project Leads**: Detailed technical and strategic information
- **For Developers**: Clear architecture and implementation guidance
- **For Management**: Business value and success criteria
- **For Users**: Benefit-focused descriptions of features
- **For Investors**: Value proposition and market opportunity
## Next Steps
With these clarity improvements, the documents are ready for distribution to all relevant team members and stakeholders. The different versions ensure that each audience receives information appropriate to their needs and technical background.

View File

@@ -1,123 +0,0 @@
# Comprehensive Project Overview
## I. Project Description
### A. Executive Summary
RocketTools is a web-based application that provides engineering calculators and tools for rocket propulsion. Built with React and Vite, it serves both students learning aerospace engineering concepts and professional engineers performing complex propulsion calculations. The application features an intuitive drag-and-drop interface for manipulating variables and solving equations, along with 3D visualization capabilities for engine design.
### B. Core Purpose
To provide an accessible platform that bridges the gap between educational rocket science content and professional-grade engineering calculation tools, enabling users to learn concepts while performing real engineering work.
### C. Key Value Proposition
1. Combines educational content with professional-grade calculation capabilities
2. Offers intuitive interaction through drag-and-drop interface
3. Provides immediate visual feedback through 3D engine visualization
4. Supports both learning and professional engineering applications
## II. Main Objectives
### A. Educational Excellence
Provide an accessible platform for learning rocket propulsion concepts through interactive calculations and visualizations, making complex aerospace engineering principles understandable to students and newcomers to the field.
### B. Engineering Precision
Offer precise computational tools for rocket engineers to perform complex propulsion calculations with accuracy and reliability, supporting professional engineering work.
### C. Intuitive User Experience
Create an intuitive drag-and-drop interface that allows users to easily manipulate variables and solve equations without requiring deep technical knowledge of the underlying implementation.
### D. Comprehensive Tool Suite
Integrate multiple specialized tools including equation solvers, engine designers, and trajectory plotters to provide a complete rocket design environment.
## III. Project Scope
### A. Core Features
#### 1. Equation Solver
- Drag-and-drop interface for rocketry variables
- Automatic solving of unknowns using constraint propagation
- Support for scientific notation and unit conversions
- Export capabilities (ODT, JSON formats)
#### 2. Engine Designer
- Configuration tools for combustion chambers, nozzles, and feed systems
- Live 3D visualization of engine models using React Three Fiber
- Interactive design parameters
#### 3. Knowledge Base
- Reference materials for fuels and oxidizers
- Educational content for propulsion theory
#### 4. Planned Features
- Trajectory Plotter for flight simulation
- Additional propulsion calculation tools
### B. Technical Implementation
#### Frontend Framework
- React with Vite for fast development and hot module replacement
- React Router for navigation between tools
- TailwindCSS for responsive design
#### Specialized Components
- Custom drag-and-drop functionality using DnD Kit
- 3D visualization with React Three Fiber and Drei
- State management through custom React hooks
### C. Target Audience
1. Aerospace engineering students at universities and colleges
2. Professional rocket engineers in industry
3. Hobbyist rocket enthusiasts with technical interests
4. Educational institutions teaching propulsion and aerospace engineering courses
### D. Out of Scope
1. Desktop application development (web-based only)
2. Multi-user collaboration features
3. Hardware integration or physical simulation
4. Advanced aerodynamics beyond basic propulsion
## IV. Success Criteria
1. Positive feedback from target user groups during beta testing
2. Accuracy of engineering calculations validated against established methods
3. Responsive interface with load times under 2 seconds
4. Complete documentation covering all tools and features
5. Successful deployment with 99% uptime over a 30-day period
## V. Project Constraints
1. Single developer project with limited resources
2. Web-based delivery requiring modern browser support
3. Focus on fundamental rocket propulsion calculations rather than advanced simulations
4. Dependency on third-party libraries that may require updates
## VI. Technology Stack
### A. Core Technologies
- React 19 - UI framework
- Vite 7 - Build tool and development server
- JavaScript (ES6+) - Primary programming language
### B. Specialized Libraries
- React Three Fiber/Drei - 3D rendering for engine visualization
- DnD Kit - Drag-and-drop functionality
- React Router - Client-side routing
### C. Development Tools
- TailwindCSS - Utility-first CSS framework
- ESLint - Code quality enforcement
- npm - Package management
## VII. Future Development Roadmap
### A. Short-term Enhancements
1. Additional propulsion calculation tools
2. Enhanced 3D visualization capabilities
3. Expanded knowledge base content
### B. Long-term Vision
1. Trajectory plotting and flight simulation
2. Multi-user collaboration features
3. Mobile-responsive design improvements
### C. Expansion Opportunities
1. Integration with CAD software
2. API for external tool integration
3. Community-contributed calculation modules

View File

@@ -1,113 +0,0 @@
# Detailed Project Structure Outline
## I. Root Directory Structure
A. Configuration Files
1. package.json - Project dependencies and scripts
2. vite.config.js - Vite build configuration
3. eslint.config.js - ESLint configuration
4. .gitignore - Git ignore patterns
B. Documentation Files
1. README.md - Project introduction and setup
2. PROJECT_OVERVIEW.md - Detailed project description
3. PROJECT_STRUCTURE.md - Technical architecture
4. Various other documentation files (.md)
C. Directories
1. src/ - Main source code
2. public/ - Static assets
3. dist/ - Build output (generated)
4. node_modules/ - Dependencies (generated)
## II. Source Code Directory (src/)
A. Entry Points
1. main.jsx - Application entry point
2. App.jsx - Main application component with routing
3. index.css - Global styles
B. Components Directory (src/components/)
1. General UI Components
a. VariablePalette.jsx - Sidebar with draggable variables
b. Workspace.jsx - Main area for variable manipulation
c. ResultsPanel.jsx - Display area for calculation results
d. VariableCard.jsx - Draggable elements representing variables
e. PropellantModal.jsx - Modal for propellant selection
f. EquationBrowser.jsx - Interface for browsing equations
2. Specialized Component Subdirectories
a. engine/ - Engine-specific 3D visualization components
b. rocket/ - Rocket-specific components (currently minimal)
C. Pages Directory (src/pages/)
1. Home.jsx - Landing page showcasing available tools
2. Solver.jsx - Main equation solving interface
3. EnginePage.jsx - Engine design tool with 3D visualization
4. RocketPage.jsx - Rocket design interface (placeholder)
5. KnowledgebaseFuelsPage.jsx - Reference information about fuels
D. Engine Directory (src/engine/)
1. Core Calculation Modules
a. equations.js - Mathematical formulas for rocket propulsion
b. solver.js - Constraint propagation algorithm implementation
c. engineDesignCalcs.js - Engine design calculations
d. rocketDesignCalcs.js - Rocket design calculations
e. numerics.js - Numerical methods and algorithms
f. units.js - Unit conversion utilities
g. variables.js - Variable definitions and management
h. format.js - Formatting utilities for display
2. Data Handling Modules
a. exportImport.js - General workspace save/load functionality
b. engineExportImport.js - Engine-specific import/export
c. rocketExportImport.js - Rocket-specific import/export
d. exportOdt.js - ODT document generation
e. knowledgebaseData.js - Knowledgebase reference data
3. Field Information
a. engineFieldInfo.js - Metadata about engine parameters
E. Hooks Directory (src/hooks/)
1. useSolver.js - State management for equation solver
2. useEngineDesign.js - State management for engine design
3. useRocketDesign.js - State management for rocket design
F. Assets Directory (src/assets/)
1. Images and icons
2. Other static media
## III. External Dependencies Analysis
A. Core Framework
1. react/react-dom - UI framework
2. vite - Build tool and development server
B. Specialized Libraries
1. @dnd-kit/* - Drag-and-drop functionality
2. @react-three/fiber/@react-three/drei - 3D rendering
3. three.js - 3D graphics library
4. react-router-dom - Client-side routing
C. Utilities
1. jszip - File compression for exports
2. tailwindcss - Styling framework
## IV. Data Flow Architecture
A. Component to Hook Communication
1. Pages utilize custom hooks for state management
2. Hooks interface with engine modules for business logic
B. State Management Patterns
1. Custom hooks encapsulate complex state logic
2. Context API potential for cross-component state (if needed)
C. Data Persistence
1. Export/import functionality for workspace saving
2. ODT generation for report creation
## V. Build and Deployment Structure
A. Development Server
1. Vite HMR for rapid development
2. Hot module replacement configuration
B. Production Build
1. Optimized bundle generation
2. Asset optimization and minification

View File

@@ -1,56 +0,0 @@
# RocketTools Project Documentation Distribution List
## Primary Recipients
### Project Team
- Lead Developer: [To be filled]
- QA Tester: [To be filled]
- UI/UX Designer: [To be filled]
### Management
- Project Manager: [To be filled]
- Technical Lead: [To be filled]
- Product Owner: [To be filled]
### Stakeholders
- Educational Institution Partners: [To be filled]
- Industry Advisors: [To be filled]
- Beta Test Coordinators: [To be filled]
## Secondary Recipients
### Development Community
- Open Source Contributors: [To be filled]
- GitHub Repository Watchers: [To be filled]
### Educational Users
- University Professors: [To be filled]
- Student Groups: [To be filled]
## Documents to Distribute
1. **ROCKETTOOLS_PROJECT_APPROVED.md** - Main consolidated document
2. **PROJECT_OVERVIEW_FINAL.md** - Detailed project overview
3. **PROJECT_STRUCTURE_FINAL.md** - Technical architecture details
4. **PROJECT_DESCRIPTION_STAKEHOLDER.md** - Simplified version for non-technical stakeholders
5. **APPROVAL_LOG.md** - Documentation approval tracking
## Distribution Method
- Email distribution to primary recipients
- Repository access for development team
- Project website for public access
- GitHub releases for community distribution
## Distribution Status
| Recipient Group | Status | Date | Method |
|----------------|--------|------|--------|
| Project Team | <20> scheduled | 2025-04-05 | Email + Repository |
| Management | <20> scheduled | 2025-04-05 | Email |
| Stakeholders | <20> scheduled | 2025-04-06 | Email |
| Development Community | <20> scheduled | 2025-04-07 | Repository + GitHub |
| Educational Users | <20> scheduled | 2025-04-08 | Project Website |
---
*Distribution Schedule: 2025-04-05 - 2025-04-08*

View File

@@ -1,115 +0,0 @@
# RocketTools Project Description and Structure Outline
## I. Project Overview
A. Executive Summary
1. Purpose and mission
2. Key value proposition
3. Target beneficiaries
B. Project Description
1. Core concept and functionality
2. Primary use cases
3. Differentiating features
C. Main Objectives
1. Educational Excellence
2. Engineering Precision
3. Intuitive User Experience
4. Comprehensive Tool Suite
D. Project Scope
1. Core Features
a. Equation Solver
b. Engine Designer
c. Knowledge Base
d. Planned Features
2. Technical Implementation
a. Frontend Framework
b. 3D Visualization
c. UI Components
d. Routing and State Management
3. Target Audience
4. Out of Scope Items
## II. Project Structure
A. High-Level Architecture
1. Directory Structure Overview
2. Component Organization
B. Key Components and Their Relationships
1. Frontend Framework Layer
2. UI Component Layer
a. VariablePalette
b. Workspace
c. ResultsPanel
d. VariableCard
e. PropellantModal
f. EquationBrowser
3. Page Layer
a. Home
b. Solver
c. EnginePage
d. RocketPage
e. KnowledgebaseFuelsPage
4. Business Logic Layer
a. Core Calculation Modules
b. State Management Hooks
c. Data Handling Utilities
5. 3D Visualization Layer
C. Component Interactions and Data Flow
1. User Interaction Flow
2. State Management Approach
3. Data Flow Between Layers
D. External Dependencies
1. Core Libraries
2. Specialized Tools
3. Utility Libraries
E. Integration Points
1. Solver Tool Integration
2. Engine Designer Integration
3. Cross-tool Data Sharing
F. Scalability Considerations
1. Modular Architecture
2. Extensible Logic
3. Plugin System Potential
## III. Technical Implementation Details
A. Technology Stack
1. Core Technologies
2. Framework Choices
3. Build Tools
B. Code Organization
1. src/ Directory Breakdown
a. components/
b. pages/
c. engine/
d. hooks/
e. assets/
2. Module Responsibilities
3. File Dependencies
C. Development Practices
1. Component Design Principles
2. State Management Patterns
3. Data Flow Standards
## IV. Success Criteria and Constraints
A. Success Metrics
1. User Feedback Targets
2. Performance Benchmarks
3. Quality Assurance Measures
B. Project Constraints
1. Resource Limitations
2. Technical Boundaries
3. Scope Limitations
## V. Future Development Roadmap
A. Short-term Enhancements
B. Long-term Vision
C. Expansion Opportunities

View File

@@ -1,97 +0,0 @@
# RocketTools Project Description
## Executive Summary
RocketTools is a web-based application that provides engineering calculators and tools for rocket propulsion. Built with React and Vite, it serves both students learning aerospace engineering concepts and professional engineers performing complex propulsion calculations. The application features an intuitive drag-and-drop interface for manipulating variables and solving equations, along with 3D visualization capabilities for engine design.
## Project Description
RocketTools offers a comprehensive suite of rocket propulsion tools through an accessible web interface. The platform combines educational content with professional-grade calculation capabilities, enabling users to learn concepts while performing real engineering work.
## Main Objectives
1. **Educational Excellence**
Provide an accessible platform for learning rocket propulsion concepts through interactive calculations and visualizations, making complex aerospace engineering principles understandable to students and newcomers to the field.
2. **Engineering Precision**
Offer precise computational tools for rocket engineers to perform complex propulsion calculations with accuracy and reliability, supporting professional engineering work.
3. **Intuitive User Experience**
Create an intuitive drag-and-drop interface that allows users to easily manipulate variables and solve equations without requiring deep technical knowledge of the underlying implementation.
4. **Comprehensive Tool Suite**
Integrate multiple specialized tools including equation solvers, engine designers, and trajectory plotters to provide a complete rocket design environment.
## Project Scope
### Core Features
1. **Equation Solver**
- Drag-and-drop interface for rocketry variables
- Automatic solving of unknowns using constraint propagation
- Support for scientific notation and unit conversions
- Export capabilities (ODT, JSON formats)
2. **Engine Designer**
- Configuration tools for combustion chambers, nozzles, and feed systems
- Live 3D visualization of engine models using React Three Fiber
- Interactive design parameters
3. **Knowledge Base**
- Reference materials for fuels and oxidizers
- Educational content for propulsion theory
4. **Planned Features**
- Trajectory Plotter for flight simulation
- Additional propulsion calculation tools
### Technical Implementation
- **Frontend Framework**: React with Vite for fast development and hot module replacement
- **3D Visualization**: Integration with Three.js via React Three Fiber and Drei
- **UI Components**: Custom drag-and-drop functionality using DnD Kit
- **Routing**: React Router for navigation between tools
- **Styling**: TailwindCSS for responsive design
- **State Management**: Custom hooks for solver logic and state management
### Target Audience
- Aerospace engineering students at universities and colleges
- Professional rocket engineers in industry
- Hobbyist rocket enthusiasts with technical interests
- Educational institutions teaching propulsion and aerospace engineering courses
## Project Structure Overview
The application follows a modular architecture with clear separation of concerns:
```
src/
├── components/ # Reusable UI components
├── pages/ # Page-level components corresponding to routes
├── engine/ # Core engine calculation logic and data
├── hooks/ # Custom React hooks for state management
└── assets/ # Static assets (images, icons, etc.)
```
Key architectural layers include:
1. **Frontend Framework Layer** (React + Vite)
2. **UI Component Layer** (Drag-and-drop interface components)
3. **Page Layer** (Route-specific views)
4. **Business Logic Layer** (Calculation engines and state management)
5. **3D Visualization Layer** (Engine design visualization)
## Success Criteria
- Positive feedback from target user groups during beta testing
- Accuracy of engineering calculations validated against established methods
- Responsive interface with load times under 2 seconds
- Complete documentation covering all tools and features
- Successful deployment with 99% uptime over a 30-day period
## Project Constraints
- Single developer project with limited resources
- Web-based delivery requiring modern browser support
- Focus on fundamental rocket propulsion calculations rather than advanced simulations
- Dependency on third-party libraries that may require updates

View File

@@ -1,268 +0,0 @@
# RocketTools Project Description and Structure
## Executive Summary
RocketTools is a sophisticated web-based application designed to provide engineering calculators and tools specifically for rocket propulsion. Built with modern web technologies including React and Vite, this application serves dual purposes: it acts as an educational platform for students learning aerospace engineering concepts and as a professional-grade calculation tool for rocket engineers performing complex propulsion calculations. The application features an intuitive drag-and-drop interface for manipulating variables and solving equations, complemented by 3D visualization capabilities for engine design.
## Project Description
RocketTools offers a comprehensive suite of rocket propulsion tools through an accessible web interface. The platform seamlessly combines educational content with professional-grade calculation capabilities, enabling users to learn fundamental concepts while performing real engineering work. The application is designed to make complex aerospace engineering principles understandable to newcomers while providing the precision and functionality required by professional engineers.
## Main Objectives
### 1. Educational Excellence
Provide an accessible platform for learning rocket propulsion concepts through interactive calculations and visualizations. The application makes complex aerospace engineering principles approachable for students and newcomers to the field by offering hands-on experience with real-world calculations.
### 2. Engineering Precision
Offer precise computational tools for rocket engineers to perform complex propulsion calculations with accuracy and reliability. The application supports professional engineering work by implementing validated mathematical models and algorithms.
### 3. Intuitive User Experience
Create an intuitive drag-and-drop interface that allows users to easily manipulate variables and solve equations without requiring deep technical knowledge of the underlying implementation. The user-centered design ensures that both novices and experts can efficiently accomplish their tasks.
### 4. Comprehensive Tool Suite
Integrate multiple specialized tools including equation solvers, engine designers, and trajectory plotters to provide a complete rocket design environment. This holistic approach eliminates the need for multiple disconnected tools.
## Project Scope
### Core Features
#### Equation Solver
- Drag-and-drop interface for rocketry variables
- Automatic solving of unknowns using constraint propagation
- Support for scientific notation and unit conversions
- Export capabilities (ODT, JSON formats)
#### Engine Designer
- Configuration tools for combustion chambers, nozzles, and feed systems
- Live 3D visualization of engine models using React Three Fiber
- Interactive design parameters
#### Knowledge Base
- Reference materials for fuels and oxidizers
- Educational content for propulsion theory
#### Planned Features
- Trajectory Plotter for flight simulation
- Additional propulsion calculation tools
### Technical Implementation
- **Frontend Framework**: React with Vite for fast development and hot module replacement
- **3D Visualization**: Integration with Three.js via React Three Fiber and Drei
- **UI Components**: Custom drag-and-drop functionality using DnD Kit
- **Routing**: React Router for navigation between tools
- **Styling**: TailwindCSS for responsive design
- **State Management**: Custom hooks for solver logic and state management
### Target Audience
- Aerospace engineering students at universities and colleges
- Professional rocket engineers in industry
- Hobbyist rocket enthusiasts with technical interests
- Educational institutions teaching propulsion and aerospace engineering courses
### Out of Scope
- Desktop application development (web-based only)
- Multi-user collaboration features
- Hardware integration or physical simulation
- Advanced aerodynamics beyond basic propulsion
## Project Structure
### High-Level Architecture
```
src/
├── components/ # Reusable UI components
│ ├── engine/ # Engine-specific components
│ └── rocket/ # Rocket-specific components
├── pages/ # Page-level components corresponding to routes
├── engine/ # Core engine calculation logic and data
├── hooks/ # Custom React hooks for state management
├── assets/ # Static assets (images, icons, etc.)
├── App.jsx # Main application component with routing
└── main.jsx # Application entry point
```
### Key Components and Their Relationships
#### 1. Frontend Framework Layer
- **React + Vite**: Provides the foundation for the user interface with fast development capabilities
- **React Router**: Manages navigation between different tools (Solver, Engine Designer, etc.)
#### 2. UI Component Layer
Located in `src/components/`, these are reusable building blocks:
Main components:
- **VariablePalette**: Sidebar component containing draggable variable cards
- **Workspace**: Central area where users place and manipulate variables
- **ResultsPanel**: Displays calculation results and provides export functionality
- **VariableCard**: Individual draggable elements representing rocket variables
- **PropellantModal**: Modal dialog for selecting propellant properties
- **EquationBrowser**: Interface for browsing and selecting equations
#### 3. Page Layer
Located in `src/pages/`, these correspond to application routes:
- **Home**: Landing page showcasing available tools
- **Solver**: Main equation solving interface with drag-and-drop functionality
- **EnginePage**: Engine design tool with 3D visualization
- **RocketPage**: Rocket design interface (currently placeholder)
- **KnowledgebaseFuelsPage**: Reference information about fuels and oxidizers
#### 4. Business Logic Layer
Located in `src/engine/` and `src/hooks/`:
Core calculation modules in `src/engine/`:
- **equations.js**: Collection of mathematical formulas for rocket propulsion
- **solver.js**: Implementation of the constraint propagation algorithm
- **engineDesignCalcs.js**: Calculations specific to engine design
- **rocketDesignCalcs.js**: Calculations specific to rocket design
- **units.js**: Unit conversion utilities
- **variables.js**: Variable definitions and management
- **numerics.js**: Numerical methods and algorithms
- **format.js**: Formatting utilities for display
State management in `src/hooks/`:
- **useSolver hook**: Core state management for the equation solver
- **useEngineDesign hook**: State management for engine design
- **useRocketDesign hook**: State management for rocket design
Data handling utilities in `src/engine/`:
- **exportImport.js**: Functions for saving and loading workspaces
- **engineExportImport.js**: Engine-specific import/export functionality
- **rocketExportImport.js**: Rocket-specific import/export functionality
- **exportOdt.js**: Creates formatted documents from calculation results
- **knowledgebaseData.js**: Data for the knowledgebase
#### 5. 3D Visualization Layer
Utilizes React Three Fiber and Drei for 3D rendering:
- Integrated in the Engine Designer page
- Provides real-time visualization of engine configurations
- Located in `src/components/engine/`
### Component Interactions and Data Flow
#### User Interaction Flow
1. **Navigation**: Users access different tools through the navigation in Header component
2. **Tool Usage**: Within each tool, users interact with specialized UI components
3. **Data Entry**: Variables are manipulated through direct input or drag-and-drop
4. **Processing**: Business logic processes inputs and calculates results
5. **Visualization**: Results are displayed in appropriate formats (numerical, 3D, etc.)
6. **Export**: Users can save their work in various formats
#### State Management
- **Solver State**: Managed by useSolver hook, tracking variables, values, and constraints
- **Engine Design State**: Managed by useEngineDesign hook
- **Rocket Design State**: Managed by useRocketDesign hook
- **Component State**: Local state within individual components for UI interactions
#### Data Flow Between Layers
```
[User Interface] ↔ [React Hooks] ↔ [Business Logic] ↔ [Data Persistence]
[3D Visualization] ←→ [Engine Design Data]
```
### External Dependencies
#### Core Libraries
- **React**: UI framework
- **Vite**: Build tool and development server
- **React Router**: Client-side routing
#### Specialized Tools
- **React Three Fiber/Drei**: 3D rendering for engine visualization
- **DnD Kit**: Drag-and-drop functionality
- **TailwindCSS**: Styling framework
#### Utilities
- **JSZip**: File compression for exports
- **Three.js**: 3D graphics library (used via React Three Fiber)
### Component Relationships Diagram
```
App.jsx (routes)
├── Home
├── Solver
│ ├── VariablePalette
│ ├── Workspace
│ │ └── VariableCard
│ ├── ResultsPanel
│ ├── PropellantModal
│ ├── EquationBrowser
│ └── useSolver hook ↔ solver.js
├── EnginePage
│ ├── Engine Components
│ └── 3D Visualization (React Three Fiber) ↔ useEngineDesign hook
├── RocketPage
│ └── useRocketDesign hook
├── KnowledgebaseFuelsPage
└── (Footer/Header for navigation)
Data Flow:
Solver ↔ engine/solver.js ↔ engine/equations.js
EnginePage ↔ engine/engineDesignCalcs.js ↔ useEngineDesign.js
RocketPage ↔ engine/rocketDesignCalcs.js ↔ useRocketDesign.js
All tools ↔ engine/exportImport.js
Knowledgebase ↔ engine/knowledgebaseData.js
```
### File Dependencies
Core dependencies:
- **App.jsx** imports all page components and sets up routing
- **Solver.jsx** integrates multiple components and uses useSolver hook
- **useSolver.js** connects to solver.js for equation solving
- **solver.js** depends on equations.js for mathematical formulas
- **exportImport.js** handles serialization of workspace data
- **exportOdt.js** generates formatted documents
- **units.js** provides unit conversion for all calculation modules
### Integration Points
1. **Solver Tool Integration**:
- Connects to equation engine for calculations via solver.js
- Uses drag-and-drop for variable manipulation via DnD Kit
- Integrates with export utilities for result sharing
2. **Engine Designer Integration**:
- Links 3D visualization with parameter inputs
- Updates visualization in real-time as parameters change
- Uses useEngineDesign hook for state management
3. **Cross-tool Data Sharing**:
- Common data models enable information transfer between tools
- Shared utility functions provide consistent behavior
- Units.js provides consistent unit handling across all tools
### Scalability Considerations
- **Modular Architecture**: New tools can be added as separate pages
- **Reusable Components**: Common UI elements reduce duplication
- **Extensible Logic**: Equation engine designed for adding new formulas
- **Plugin System**: Future support for custom tools and extensions
## Technology Stack
- React 19 with Vite
- React Three Fiber for 3D visualization
- DnD Kit for drag-and-drop functionality
- TailwindCSS for styling
- React Router for navigation
## Success Criteria
- Positive feedback from target user groups during beta testing
- Accuracy of engineering calculations validated against established methods
- Responsive interface with load times under 2 seconds
- Complete documentation covering all tools and features
- Successful deployment with 99% uptime over a 30-day period
## Project Constraints
- Single developer project with limited resources
- Web-based delivery requiring modern browser support
- Focus on fundamental rocket propulsion calculations rather than advanced simulations
- Dependency on third-party libraries that may require updates

View File

@@ -1,63 +0,0 @@
# RocketTools - Stakeholder Overview
## What is RocketTools?
RocketTools is a web-based application that helps people design and analyze rocket engines. Whether you're a student learning about rocket science, a hobbyist building model rockets, or a professional engineer working on space missions, RocketTools provides the calculations and design tools you need.
## Why We're Building It
Rocket propulsion involves complex mathematics that can be difficult to calculate by hand. Current tools are either too simple for professional work or too expensive and complicated for students to use. RocketTools bridges this gap by providing professional-grade tools in an easy-to-use interface.
## What It Does
### For Students & Educators
- Interactive tools to visualize how rocket engines work
- Step-by-step calculations that show how results are derived
- Educational content explaining propulsion concepts
### For Engineers & Professionals
- Precise calculations for engine design parameters
- 3D visualization of engine components
- Professional export capabilities for reports and documentation
### For Hobbyists
- Tools to design and analyze model rocket engines
- Easy-to-understand interface without complex setup
- Free access to professional-grade calculations
## Key Features
1. **Equation Solver**
Drag and drop variables to automatically solve complex rocket equations
2. **Engine Designer**
Visually design rocket engines with real-time 3D visualization
3. **Knowledge Base**
Reference materials for propellants and design principles
4. **Export Capabilities**
Save your work in professional formats for reports or sharing
## Who Benefits
- **Universities**: Affordable teaching tool for aerospace engineering courses
- **Engineering Firms**: Quick calculation tool for preliminary designs
- **Students**: Accessible way to learn rocket propulsion concepts
- **Hobbyists**: Professional tools without the professional price tag
## Project Status
RocketTools is currently in active development with:
- Core equation solver functionality complete
- Engine designer with 3D visualization implemented
- Knowledge base with propellant data available
- Planning for trajectory analysis tools underway
## Success Measures
We'll know RocketTools is successful when:
- Students report better understanding of propulsion concepts
- Engineers find it useful for preliminary design work
- The tool loads quickly and works reliably
- Users can accomplish their goals without extensive training

View File

@@ -1,84 +0,0 @@
# RocketTools Project Overview
## Executive Summary
RocketTools is a web-based application that provides engineering calculators and tools for rocket propulsion. Built with React and Vite, it serves both students learning aerospace engineering concepts and professional engineers performing complex propulsion calculations. The application features an intuitive drag-and-drop interface for manipulating variables and solving equations, along with 3D visualization capabilities for engine design.
## Project Description
RocketTools offers a comprehensive suite of rocket propulsion tools through an accessible web interface. The platform combines educational content with professional-grade calculation capabilities, enabling users to learn concepts while performing real engineering work.
## Main Objectives
1. **Educational Excellence**
Provide an accessible platform for learning rocket propulsion concepts through interactive calculations and visualizations, making complex aerospace engineering principles understandable to students and newcomers to the field.
2. **Engineering Precision**
Offer precise computational tools for rocket engineers to perform complex propulsion calculations with accuracy and reliability, supporting professional engineering work.
3. **Intuitive User Experience**
Create an intuitive drag-and-drop interface that allows users to easily manipulate variables and solve equations without requiring deep technical knowledge of the underlying implementation.
4. **Comprehensive Tool Suite**
Integrate multiple specialized tools including equation solvers, engine designers, and trajectory plotters to provide a complete rocket design environment.
## Project Scope
### Core Features
1. **Equation Solver**
- Drag-and-drop interface for rocketry variables
- Automatic solving of unknowns using constraint propagation
- Support for scientific notation and unit conversions
- Export capabilities (ODT, JSON formats)
2. **Engine Designer**
- Configuration tools for combustion chambers, nozzles, and feed systems
- Live 3D visualization of engine models using React Three Fiber
- Interactive design parameters
3. **Knowledge Base**
- Reference materials for fuels and oxidizers
- Educational content for propulsion theory
4. **Planned Features**
- Trajectory Plotter for flight simulation
- Additional propulsion calculation tools
### Technical Implementation
- **Frontend Framework**: React with Vite for fast development and hot module replacement
- **3D Visualization**: Integration with Three.js via React Three Fiber and Drei
- **UI Components**: Custom drag-and-drop functionality using DnD Kit
- **Routing**: React Router for navigation between tools
- **Styling**: TailwindCSS for responsive design
- **State Management**: Custom hooks for solver logic and state management
### Target Audience
- Aerospace engineering students at universities and colleges
- Professional rocket engineers in industry
- Hobbyist rocket enthusiasts with technical interests
- Educational institutions teaching propulsion and aerospace engineering courses
### Out of Scope
- Desktop application development (web-based only)
- Multi-user collaboration features
- Hardware integration or physical simulation
- Advanced aerodynamics beyond basic propulsion
## Success Criteria
- Positive feedback from target user groups during beta testing
- Accuracy of engineering calculations validated against established methods
- Responsive interface with load times under 2 seconds
- Complete documentation covering all tools and features
- Successful deployment with 99% uptime over a 30-day period
## Project Constraints
- Single developer project with limited resources
- Web-based delivery requiring modern browser support
- Focus on fundamental rocket propulsion calculations rather than advanced simulations
- Dependency on third-party libraries that may require updates

View File

@@ -1,75 +0,0 @@
# RocketTools Project Overview
## Project Description
RocketTools is a web-based application designed to provide engineering calculators and tools for rocket propulsion. Built with React and Vite, it serves as an accessible platform for both students and professionals in aerospace engineering to perform complex propulsion calculations through an intuitive drag-and-drop interface.
## Main Objectives
### 1. Educational Excellence
Provide an accessible platform for learning rocket propulsion concepts through interactive calculations and visualizations, making complex aerospace engineering principles understandable to students and newcomers to the field.
### 2. Engineering Precision
Offer precise computational tools for rocket engineers to perform complex propulsion calculations with accuracy and reliability, supporting professional engineering work.
### 3. Intuitive User Experience
Create an intuitive drag-and-drop interface that allows users to easily manipulate variables and solve equations without requiring deep technical knowledge of the underlying implementation.
### 4. Comprehensive Tool Suite
Integrate multiple specialized tools including equation solvers, engine designers, and trajectory plotters to provide a complete rocket design environment.
## Project Scope
### Functional Scope
#### Core Features
1. **Equation Solver**
- Drag-and-drop interface for rocketry variables
- Automatic solving of unknowns using constraint propagation
- Support for scientific notation and unit conversions
- Export capabilities (ODT, JSON formats)
2. **Engine Designer**
- Configuration tools for combustion chambers, nozzles, and feed systems
- Live 3D visualization of engine models using React Three Fiber
- Interactive design parameters
3. **Knowledge Base**
- Reference materials for fuels and oxidizers
- Educational content for propulsion theory
4. **Planned Features**
- Trajectory Plotter for flight simulation
- Additional propulsion calculation tools
#### Technical Implementation
- **Frontend Framework**: React with Vite for fast development and hot module replacement
- **3D Visualization**: Integration with Three.js via React Three Fiber and Drei
- **UI Components**: Custom drag-and-drop functionality using DnD Kit
- **Routing**: React Router for navigation between tools
- **Styling**: TailwindCSS for responsive design
- **State Management**: Custom hooks for solver logic and state management
### Target Audience
- Aerospace engineering students at universities and colleges
- Professional rocket engineers in industry
- Hobbyist rocket enthusiasts with technical interests
- Educational institutions teaching propulsion and aerospace engineering courses
### Out of Scope
- Desktop application development (web-based only)
- Multi-user collaboration features
- Hardware integration or physical simulation
- Advanced aerodynamics beyond basic propulsion
## Success Criteria
- Positive feedback from target user groups during beta testing
- Accuracy of engineering calculations validated against established methods
- Responsive interface with load times under 2 seconds
- Complete documentation covering all tools and features
- Successful deployment with 99% uptime over a 30-day period
## Project Constraints
- Single developer project with limited resources
- Web-based delivery requiring modern browser support
- Focus on fundamental rocket propulsion calculations rather than advanced simulations
- Dependency on third-party libraries that may require updates

View File

@@ -1,124 +0,0 @@
# RocketTools Project Overview - FINAL APPROVED VERSION
## Executive Summary
RocketTools is a web-based application that provides engineering calculators and tools for rocket propulsion. Built with React and Vite, it serves both students learning aerospace engineering concepts and professional engineers performing complex propulsion calculations. The application features an intuitive drag-and-drop interface for manipulating variables and solving equations, along with 3D visualization capabilities for engine design.
## Project Description
RocketTools offers a comprehensive suite of rocket propulsion tools through an accessible web interface. The platform combines educational content with professional-grade calculation capabilities, enabling users to learn concepts while performing real engineering work.
## Main Objectives
1. **Educational Excellence**
Provide an accessible platform for learning rocket propulsion concepts through interactive calculations and visualizations, making complex aerospace engineering principles understandable to students and newcomers to the field.
2. **Engineering Precision**
Offer precise computational tools for rocket engineers to perform complex propulsion calculations with accuracy and reliability, supporting professional engineering work.
3. **Intuitive User Experience**
Create an intuitive drag-and-drop interface that allows users to easily manipulate variables and solve equations without requiring deep technical knowledge of the underlying implementation.
4. **Comprehensive Tool Suite**
Integrate multiple specialized tools including equation solvers, engine designers, and trajectory plotters to provide a complete rocket design environment.
## Project Scope
### Core Features
1. **Equation Solver**
- Drag-and-drop interface for rocketry variables
- Automatic solving of unknowns using constraint propagation
- Support for scientific notation and unit conversions
- Export capabilities (ODT, JSON formats)
2. **Engine Designer**
- Configuration tools for combustion chambers, nozzles, and feed systems
- Live 3D visualization of engine models using React Three Fiber
- Interactive design parameters
3. **Knowledge Base**
- Reference materials for fuels and oxidizers
- Educational content for propulsion theory
4. **Planned Features**
- Trajectory Plotter for flight simulation
- Additional propulsion calculation tools
### Technical Implementation
- **Frontend Framework**: React with Vite for fast development and hot module replacement
- **3D Visualization**: Integration with Three.js via React Three Fiber and Drei
- **UI Components**: Custom drag-and-drop functionality using DnD Kit
- **Routing**: React Router for navigation between tools
- **Styling**: TailwindCSS for responsive design
- **State Management**: Custom hooks for solver logic and state management
- **Export Functionality**: JSZip for file compression and packaging
### Target Audience
- Aerospace engineering students at universities and colleges
- Professional rocket engineers in industry
- Hobbyist rocket enthusiasts with technical interests
- Educational institutions teaching propulsion and aerospace engineering courses
### Out of Scope
- Desktop application development (web-based only)
- Multi-user collaboration features
- Hardware integration or physical simulation
- Advanced aerodynamics beyond basic propulsion
## Success Criteria
- Positive feedback from target user groups during beta testing
- Accuracy of engineering calculations validated against established methods
- Responsive interface with load times under 2 seconds
- Complete documentation covering all tools and features
- Successful deployment with 99% uptime over a 30-day period
## Project Constraints
- Single developer project with limited resources
- Web-based delivery requiring modern browser support
- Focus on fundamental rocket propulsion calculations rather than advanced simulations
- Dependency on third-party libraries that may require updates
## Current Development Status
The project is actively under development with the following components completed:
- Core equation solver functionality with drag-and-drop interface
- Engine designer with 3D visualization capabilities
- Knowledge base with propellant reference data
- Export functionality for results in ODT and JSON formats
- Responsive UI design using TailwindCSS
Upcoming development priorities include:
- Implementation of trajectory plotting capabilities
- Expansion of the knowledge base with additional educational content
- Performance optimizations for complex calculations
- Enhanced export options
## Technology Stack
### Core Technologies
- **React 19**: Modern UI library for building interactive interfaces
- **Vite 7**: Next-generation frontend tooling for fast development
- **React Router 7**: Declarative routing for React applications
### Specialized Libraries
- **DnD Kit**: Complete drag and drop toolkit for React
- **React Three Fiber**: React renderer for Three.js
- **Drei**: Useful helpers for React Three Fiber
- **Three.js**: JavaScript 3D library
- **JSZip**: JavaScript library for creating, reading and editing .zip files
### Development Tools
- **TailwindCSS**: Utility-first CSS framework
- **ESLint**: JavaScript linting utility
- **Vite Plugins**: For enhanced development experience
---
*This document has been reviewed and approved for distribution to all project stakeholders.*

View File

@@ -1,176 +0,0 @@
# RocketTools Project Structure
## High-Level Architecture
```
src/
├── components/ # Reusable UI components
│ ├── engine/ # Engine-specific components
│ └── rocket/ # Rocket-specific components
├── pages/ # Page-level components corresponding to routes
├── engine/ # Core engine calculation logic and data
├── hooks/ # Custom React hooks for state management
├── assets/ # Static assets (images, icons, etc.)
├── App.jsx # Main application component with routing
└── main.jsx # Application entry point
```
## Key Components and Their Relationships
### 1. Frontend Framework Layer
- **React + Vite**: Provides the foundation for the user interface with fast development capabilities
- **React Router**: Manages navigation between different tools (Solver, Engine Designer, etc.)
### 2. UI Component Layer
Located in `src/components/`, these are reusable building blocks:
Main components:
- **VariablePalette**: Sidebar component containing draggable variable cards
- **Workspace**: Central area where users place and manipulate variables
- **ResultsPanel**: Displays calculation results and provides export functionality
- **VariableCard**: Individual draggable elements representing rocket variables
- **PropellantModal**: Modal dialog for selecting propellant properties
- **EquationBrowser**: Interface for browsing and selecting equations
### 3. Page Layer
Located in `src/pages/`, these correspond to application routes:
- **Home**: Landing page showcasing available tools
- **Solver**: Main equation solving interface with drag-and-drop functionality
- **EnginePage**: Engine design tool with 3D visualization
- **RocketPage**: Rocket design interface (currently placeholder)
- **KnowledgebaseFuelsPage**: Reference information about fuels and oxidizers
### 4. Business Logic Layer
Located in `src/engine/` and `src/hooks/`:
Core calculation modules in `src/engine/`:
- **equations.js**: Collection of mathematical formulas for rocket propulsion
- **solver.js**: Implementation of the constraint propagation algorithm
- **engineDesignCalcs.js**: Calculations specific to engine design
- **rocketDesignCalcs.js**: Calculations specific to rocket design
- **units.js**: Unit conversion utilities
- **variables.js**: Variable definitions and management
- **numerics.js**: Numerical methods and algorithms
- **format.js**: Formatting utilities for display
State management in `src/hooks/`:
- **useSolver hook**: Core state management for the equation solver
- **useEngineDesign hook**: State management for engine design
- **useRocketDesign hook**: State management for rocket design
Data handling utilities in `src/engine/`:
- **exportImport.js**: Functions for saving and loading workspaces
- **engineExportImport.js**: Engine-specific import/export functionality
- **rocketExportImport.js**: Rocket-specific import/export functionality
- **exportOdt.js**: Creates formatted documents from calculation results
- **knowledgebaseData.js**: Data for the knowledgebase
### 5. 3D Visualization Layer
Utilizes React Three Fiber and Drei for 3D rendering:
- Integrated in the Engine Designer page
- Provides real-time visualization of engine configurations
- Located in `src/components/engine/`
## Component Interactions and Data Flow
### User Interaction Flow
1. **Navigation**: Users access different tools through the navigation in Header component
2. **Tool Usage**: Within each tool, users interact with specialized UI components
3. **Data Entry**: Variables are manipulated through direct input or drag-and-drop
4. **Processing**: Business logic processes inputs and calculates results
5. **Visualization**: Results are displayed in appropriate formats (numerical, 3D, etc.)
6. **Export**: Users can save their work in various formats
### State Management
- **Solver State**: Managed by useSolver hook, tracking variables, values, and constraints
- **Engine Design State**: Managed by useEngineDesign hook
- **Rocket Design State**: Managed by useRocketDesign hook
- **Component State**: Local state within individual components for UI interactions
### Data Flow Between Layers
```
[User Interface] ↔ [React Hooks] ↔ [Business Logic] ↔ [Data Persistence]
[3D Visualization] ←→ [Engine Design Data]
```
## External Dependencies
### Core Libraries
- **React**: UI framework
- **Vite**: Build tool and development server
- **React Router**: Client-side routing
### Specialized Tools
- **React Three Fiber/Drei**: 3D rendering for engine visualization
- **DnD Kit**: Drag-and-drop functionality
- **TailwindCSS**: Styling framework
### Utilities
- **JSZip**: File compression for exports
- **Three.js**: 3D graphics library (used via React Three Fiber)
- **Math.js**: Advanced mathematical computations (if used)
## Component Relationships Diagram
```
App.jsx (routes)
├── Home
├── Solver
│ ├── VariablePalette
│ ├── Workspace
│ │ └── VariableCard
│ ├── ResultsPanel
│ ├── PropellantModal
│ ├── EquationBrowser
│ └── useSolver hook ↔ solver.js
├── EnginePage
│ ├── Engine Components
│ └── 3D Visualization (React Three Fiber) ↔ useEngineDesign hook
├── RocketPage
│ └── useRocketDesign hook
├── KnowledgebaseFuelsPage
└── (Footer/Header for navigation)
Data Flow:
Solver ↔ engine/solver.js ↔ engine/equations.js
EnginePage ↔ engine/engineDesignCalcs.js ↔ useEngineDesign.js
RocketPage ↔ engine/rocketDesignCalcs.js ↔ useRocketDesign.js
All tools ↔ engine/exportImport.js
Knowledgebase ↔ engine/knowledgebaseData.js
```
## File Dependencies
Core dependencies:
- **App.jsx** imports all page components and sets up routing
- **Solver.jsx** integrates multiple components and uses useSolver hook
- **useSolver.js** connects to solver.js for equation solving
- **solver.js** depends on equations.js for mathematical formulas
- **exportImport.js** handles serialization of workspace data
- **exportOdt.js** generates formatted documents
- **units.js** provides unit conversion for all calculation modules
## Integration Points
1. **Solver Tool Integration**:
- Connects to equation engine for calculations via solver.js
- Uses drag-and-drop for variable manipulation via DnD Kit
- Integrates with export utilities for result sharing
2. **Engine Designer Integration**:
- Links 3D visualization with parameter inputs
- Updates visualization in real-time as parameters change
- Uses useEngineDesign hook for state management
3. **Cross-tool Data Sharing**:
- Common data models enable information transfer between tools
- Shared utility functions provide consistent behavior
- Units.js provides consistent unit handling across all tools
## Scalability Considerations
- **Modular Architecture**: New tools can be added as separate pages
- **Reusable Components**: Common UI elements reduce duplication
- **Extensible Logic**: Equation engine designed for adding new formulas
- **Plugin System**: Future support for custom tools and extensions

View File

@@ -1,179 +0,0 @@
# RocketTools Project Structure - FINAL APPROVED VERSION
## High-Level Architecture
```
src/
├── components/ # Reusable UI components
│ ├── engine/ # Engine-specific components
│ └── rocket/ # Rocket-specific components
├── pages/ # Page-level components corresponding to routes
├── engine/ # Core engine calculation logic and data
├── hooks/ # Custom React hooks for state management
├── assets/ # Static assets (images, icons, etc.)
├── App.jsx # Main application component with routing
└── main.jsx # Application entry point
```
## Key Components and Their Relationships
### 1. Frontend Framework Layer
- **React + Vite**: Provides the foundation for the user interface with fast development capabilities
- **React Router**: Manages navigation between different tools (Solver, Engine Designer, etc.)
### 2. UI Component Layer
Located in `src/components/`, these are reusable building blocks:
Main components:
- **VariablePalette**: Sidebar component containing draggable variable cards
- **Workspace**: Central area where users place and manipulate variables
- **ResultsPanel**: Displays calculation results and provides export functionality
- **VariableCard**: Individual draggable elements representing rocket variables
- **PropellantModal**: Modal dialog for selecting propellant properties
- **EquationBrowser**: Interface for browsing and selecting equations
### 3. Page Layer
Located in `src/pages/`, these correspond to application routes:
- **Home**: Landing page showcasing available tools
- **Solver**: Main equation solving interface with drag-and-drop functionality
- **EnginePage**: Engine design tool with 3D visualization
- **RocketPage**: Rocket design interface (currently placeholder)
- **KnowledgebaseFuelsPage**: Reference information about fuels and oxidizers
### 4. Business Logic Layer
Located in `src/engine/` and `src/hooks/`:
Core calculation modules in `src/engine/`:
- **equations.js**: Collection of mathematical formulas for rocket propulsion
- **solver.js**: Implementation of the constraint propagation algorithm
- **engineDesignCalcs.js**: Calculations specific to engine design
- **rocketDesignCalcs.js**: Calculations specific to rocket design
- **units.js**: Unit conversion utilities
- **variables.js**: Variable definitions and management
- **numerics.js**: Numerical methods and algorithms
- **format.js**: Formatting utilities for display
State management in `src/hooks/`:
- **useSolver hook**: Core state management for the equation solver
- **useEngineDesign hook**: State management for engine design
- **useRocketDesign hook**: State management for rocket design
Data handling utilities in `src/engine/`:
- **exportImport.js**: Functions for saving and loading workspaces
- **engineExportImport.js**: Engine-specific import/export functionality
- **rocketExportImport.js**: Rocket-specific import/export functionality
- **exportOdt.js**: Creates formatted documents from calculation results
- **knowledgebaseData.js**: Data for the knowledgebase
### 5. 3D Visualization Layer
Utilizes React Three Fiber and Drei for 3D rendering:
- Integrated in the Engine Designer page
- Provides real-time visualization of engine configurations
- Located in `src/components/engine/`
## Component Interactions and Data Flow
### User Interaction Flow
1. **Navigation**: Users access different tools through the navigation in Header component
2. **Tool Usage**: Within each tool, users interact with specialized UI components
3. **Data Entry**: Variables are manipulated through direct input or drag-and-drop
4. **Processing**: Business logic processes inputs and calculates results
5. **Visualization**: Results are displayed in appropriate formats (numerical, 3D, etc.)
6. **Export**: Users can save their work in various formats
### State Management
- **Solver State**: Managed by useSolver hook, tracking variables, values, and constraints
- **Engine Design State**: Managed by useEngineDesign hook
- **Rocket Design State**: Managed by useRocketDesign hook
- **Component State**: Local state within individual components for UI interactions
### Data Flow Between Layers
```
[User Interface] ↔ [React Hooks] ↔ [Business Logic] ↔ [Data Persistence]
[3D Visualization] ←→ [Engine Design Data]
```
## External Dependencies
### Core Libraries
- **React**: UI framework
- **Vite**: Build tool and development server
- **React Router**: Client-side routing
### Specialized Tools
- **React Three Fiber/Drei**: 3D rendering for engine visualization
- **DnD Kit**: Drag-and-drop functionality
- **TailwindCSS**: Styling framework
### Utilities
- **JSZip**: File compression for exports
- **Three.js**: 3D graphics library (used via React Three Fiber)
## Component Relationships Diagram
```
App.jsx (routes)
├── Home
├── Solver
│ ├── VariablePalette
│ ├── Workspace
│ │ └── VariableCard
│ ├── ResultsPanel
│ ├── PropellantModal
│ ├── EquationBrowser
│ └── useSolver hook ↔ solver.js
├── EnginePage
│ ├── Engine Components
│ └── 3D Visualization (React Three Fiber) ↔ useEngineDesign hook
├── RocketPage
│ └── useRocketDesign hook
├── KnowledgebaseFuelsPage
└── (Footer/Header for navigation)
Data Flow:
Solver ↔ engine/solver.js ↔ engine/equations.js
EnginePage ↔ engine/engineDesignCalcs.js ↔ useEngineDesign.js
RocketPage ↔ engine/rocketDesignCalcs.js ↔ useRocketDesign.js
All tools ↔ engine/exportImport.js
Knowledgebase ↔ engine/knowledgebaseData.js
```
## File Dependencies
Core dependencies:
- **App.jsx** imports all page components and sets up routing
- **Solver.jsx** integrates multiple components and uses useSolver hook
- **useSolver.js** connects to solver.js for equation solving
- **solver.js** depends on equations.js for mathematical formulas
- **exportImport.js** handles serialization of workspace data
- **exportOdt.js** generates formatted documents
- **units.js** provides unit conversion for all calculation modules
## Integration Points
1. **Solver Tool Integration**:
- Connects to equation engine for calculations via solver.js
- Uses drag-and-drop for variable manipulation via DnD Kit
- Integrates with export utilities for result sharing
2. **Engine Designer Integration**:
- Links 3D visualization with parameter inputs
- Updates visualization in real-time as parameters change
- Uses useEngineDesign hook for state management
3. **Cross-tool Data Sharing**:
- Common data models enable information transfer between tools
- Shared utility functions provide consistent behavior
- Units.js provides consistent unit handling across all tools
## Scalability Considerations
- **Modular Architecture**: New tools can be added as separate pages
- **Reusable Components**: Common UI elements reduce duplication
- **Extensible Logic**: Equation engine designed for adding new formulas
- **Plugin System**: Future support for custom tools and extensions
---
*This document has been reviewed and approved for distribution to all project stakeholders.*

View File

@@ -1,137 +0,0 @@
# RocketTools - Rocket Propulsion Engineering Calculator
## Project Overview
RocketTools is a sophisticated web-based engineering calculator specifically designed for rocket propulsion applications. Built with modern web technologies including React, Vite, and React Router, this application serves as a comprehensive platform for both students learning aerospace engineering concepts and professional engineers performing complex propulsion calculations.
The application features an intuitive drag-and-drop interface for manipulating variables and solving equations, along with 3D visualization capabilities for engine design. It combines educational content with professional-grade calculation capabilities, enabling users to learn concepts while performing real engineering work.
## Key Features
### Equation Solver
- Drag-and-drop interface for rocketry variables
- Automatic solving of unknowns using constraint propagation
- Support for scientific notation and unit conversions
- Export capabilities (ODT, JSON formats)
### Engine Designer
- Configuration tools for combustion chambers, nozzles, and feed systems
- Live 3D visualization of engine models using React Three Fiber
- Interactive design parameters
### Knowledge Base
- Reference materials for fuels and oxidizers
- Educational content for propulsion theory
### Planned Features
- Trajectory Plotter for flight simulation
- Additional propulsion calculation tools
## Technology Stack
### Core Technologies
- **React 19**: Modern UI library for building interactive interfaces
- **Vite 7**: Next-generation frontend tooling for fast development
- **React Router 7**: Declarative routing for React applications
### Specialized Libraries
- **DnD Kit**: Complete drag and drop toolkit for React
- **React Three Fiber**: React renderer for Three.js
- **Drei**: Useful helpers for React Three Fiber
- **Three.js**: JavaScript 3D library
- **JSZip**: JavaScript library for creating, reading and editing .zip files
### Development Tools
- **TailwindCSS**: Utility-first CSS framework
- **ESLint**: JavaScript linting utility
- **Vite Plugins**: For enhanced development experience
## Project Structure
```
src/
├── components/ # Reusable UI components
│ ├── engine/ # Engine-specific components
│ └── rocket/ # Rocket-specific components
├── pages/ # Page-level components corresponding to routes
├── engine/ # Core engine calculation logic and data
├── hooks/ # Custom React hooks for state management
├── assets/ # Static assets (images, icons, etc.)
├── App.jsx # Main application component with routing
└── main.jsx # Application entry point
```
## Component Architecture
### UI Components
- **VariablePalette**: Sidebar component containing draggable variable cards
- **Workspace**: Central area where users place and manipulate variables
- **ResultsPanel**: Displays calculation results and provides export functionality
- **VariableCard**: Individual draggable elements representing rocket variables
- **PropellantModal**: Modal dialog for selecting propellant properties
- **EquationBrowser**: Interface for browsing and selecting equations
### Pages
- **Home**: Landing page showcasing available tools
- **Solver**: Main equation solving interface with drag-and-drop functionality
- **EnginePage**: Engine design tool with 3D visualization
- **RocketPage**: Rocket design interface (currently placeholder)
- **KnowledgebaseFuelsPage**: Reference information about fuels and oxidizers
### Business Logic
Core modules located in `src/engine/`:
- **equations.js**: Mathematical formulas for rocket propulsion
- **solver.js**: Constraint propagation algorithm implementation
- **engineDesignCalcs.js**: Engine design calculations
- **rocketDesignCalcs.js**: Rocket design calculations
- **units.js**: Unit conversion utilities
- **variables.js**: Variable definitions and management
- **numerics.js**: Numerical methods and algorithms
- **format.js**: Formatting utilities for display
### State Management
Custom React hooks in `src/hooks/`:
- **useSolver**: Core state management for the equation solver
- **useEngineDesign**: State management for engine design
- **useRocketDesign**: State management for rocket design
## Target Audience
- Aerospace engineering students at universities and colleges
- Professional rocket engineers in industry
- Hobbyist rocket enthusiasts with technical interests
- Educational institutions teaching propulsion and aerospace engineering courses
## Development Status
✅ Documentation Finalized and Approved
✅ Core Functionality Implemented
🚧 Additional Features in Development
### Completed Components
- Core equation solver functionality with drag-and-drop interface
- Engine designer with 3D visualization capabilities
- Knowledge base with propellant reference data
- Export functionality for results in ODT and JSON formats
- Responsive UI design using TailwindCSS
### Upcoming Development Priorities
- Implementation of trajectory plotting capabilities
- Expansion of the knowledge base with additional educational content
- Performance optimizations for complex calculations
- Enhanced export options
## Success Criteria
- Positive feedback from target user groups during beta testing
- Accuracy of engineering calculations validated against established methods
- Responsive interface with load times under 2 seconds
- Complete documentation covering all tools and features
- Successful deployment with 99% uptime over a 30-day period
## Project Constraints
- Single developer project with limited resources
- Web-based delivery requiring modern browser support
- Focus on fundamental rocket propulsion calculations rather than advanced simulations
- Dependency on third-party libraries that may require updates

View File

@@ -1,175 +0,0 @@
# RocketTools Project - FINAL APPROVED DOCUMENT
## Executive Summary
RocketTools is a web-based application that provides engineering calculators and tools for rocket propulsion. Built with React and Vite, it serves both students learning aerospace engineering concepts and professional engineers performing complex propulsion calculations. The application features an intuitive drag-and-drop interface for manipulating variables and solving equations, along with 3D visualization capabilities for engine design.
## Project Description
RocketTools offers a comprehensive suite of rocket propulsion tools through an accessible web interface. The platform combines educational content with professional-grade calculation capabilities, enabling users to learn concepts while performing real engineering work.
## Main Objectives
1. **Educational Excellence**
Provide an accessible platform for learning rocket propulsion concepts through interactive calculations and visualizations, making complex aerospace engineering principles understandable to students and newcomers to the field.
2. **Engineering Precision**
Offer precise computational tools for rocket engineers to perform complex propulsion calculations with accuracy and reliability, supporting professional engineering work.
3. **Intuitive User Experience**
Create an intuitive drag-and-drop interface that allows users to easily manipulate variables and solve equations without requiring deep technical knowledge of the underlying implementation.
4. **Comprehensive Tool Suite**
Integrate multiple specialized tools including equation solvers, engine designers, and trajectory plotters to provide a complete rocket design environment.
## Project Scope
### Core Features
1. **Equation Solver**
- Drag-and-drop interface for rocketry variables
- Automatic solving of unknowns using constraint propagation
- Support for scientific notation and unit conversions
- Export capabilities (ODT, JSON formats)
2. **Engine Designer**
- Configuration tools for combustion chambers, nozzles, and feed systems
- Live 3D visualization of engine models using React Three Fiber
- Interactive design parameters
3. **Knowledge Base**
- Reference materials for fuels and oxidizers
- Educational content for propulsion theory
4. **Planned Features**
- Trajectory Plotter for flight simulation
- Additional propulsion calculation tools
### Technical Implementation
- **Frontend Framework**: React with Vite for fast development and hot module replacement
- **3D Visualization**: Integration with Three.js via React Three Fiber and Drei
- **UI Components**: Custom drag-and-drop functionality using DnD Kit
- **Routing**: React Router for navigation between tools
- **Styling**: TailwindCSS for responsive design
- **State Management**: Custom hooks for solver logic and state management
- **Export Functionality**: JSZip for file compression and packaging
### Target Audience
- Aerospace engineering students at universities and colleges
- Professional rocket engineers in industry
- Hobbyist rocket enthusiasts with technical interests
- Educational institutions teaching propulsion and aerospace engineering courses
### Out of Scope
- Desktop application development (web-based only)
- Multi-user collaboration features
- Hardware integration or physical simulation
- Advanced aerodynamics beyond basic propulsion
## Success Criteria
- Positive feedback from target user groups during beta testing
- Accuracy of engineering calculations validated against established methods
- Responsive interface with load times under 2 seconds
- Complete documentation covering all tools and features
- Successful deployment with 99% uptime over a 30-day period
## Project Constraints
- Single developer project with limited resources
- Web-based delivery requiring modern browser support
- Focus on fundamental rocket propulsion calculations rather than advanced simulations
- Dependency on third-party libraries that may require updates
## Current Development Status
The project is actively under development with the following components completed:
- Core equation solver functionality with drag-and-drop interface
- Engine designer with 3D visualization capabilities
- Knowledge base with propellant reference data
- Export functionality for results in ODT and JSON formats
- Responsive UI design using TailwindCSS
Upcoming development priorities include:
- Implementation of trajectory plotting capabilities
- Expansion of the knowledge base with additional educational content
- Performance optimizations for complex calculations
- Enhanced export options
## Technology Stack
### Core Technologies
- **React 19**: Modern UI library for building interactive interfaces
- **Vite 7**: Next-generation frontend tooling for fast development
- **React Router 7**: Declarative routing for React applications
### Specialized Libraries
- **DnD Kit**: Complete drag and drop toolkit for React
- **React Three Fiber**: React renderer for Three.js
- **Drei**: Useful helpers for React Three Fiber
- **Three.js**: JavaScript 3D library
- **JSZip**: JavaScript library for creating, reading and editing .zip files
### Development Tools
- **TailwindCSS**: Utility-first CSS framework
- **ESLint**: JavaScript linting utility
- **Vite Plugins**: For enhanced development experience
## Project Structure
### High-Level Architecture
```
src/
├── components/ # Reusable UI components
│ ├── engine/ # Engine-specific components
│ └── rocket/ # Rocket-specific components
├── pages/ # Page-level components corresponding to routes
├── engine/ # Core engine calculation logic and data
├── hooks/ # Custom React hooks for state management
├── assets/ # Static assets (images, icons, etc.)
├── App.jsx # Main application component with routing
└── main.jsx # Application entry point
```
### Key Architectural Layers
1. **Frontend Framework Layer** (React + Vite)
2. **UI Component Layer** (Drag-and-drop interface components)
3. **Page Layer** (Route-specific views)
4. **Business Logic Layer** (Calculation engines and state management)
5. **3D Visualization Layer** (Engine design visualization)
### Component Relationships
```
App.jsx (routes)
├── Home
├── Solver
│ ├── VariablePalette
│ ├── Workspace
│ │ └── VariableCard
│ ├── ResultsPanel
│ ├── PropellantModal
│ ├── EquationBrowser
│ └── useSolver hook ↔ solver.js
├── EnginePage
│ ├── Engine Components
│ └── 3D Visualization (React Three Fiber) ↔ useEngineDesign hook
├── RocketPage
│ └── useRocketDesign hook
├── KnowledgebaseFuelsPage
└── (Footer/Header for navigation)
```
---
**APPROVAL STATUS**: ✅ Approved by Project Leads
**APPROVAL DATE**: [To be filled]
**NEXT REVIEW DATE**: [To be filled]
*This consolidated document represents the final approved version of the RocketTools project description and structure for distribution to all stakeholders.*

View File

@@ -6,6 +6,7 @@ import RocketPage from './pages/RocketPage.jsx'
import KnowledgebaseFuelsPage from './pages/KnowledgebaseFuelsPage.jsx' import KnowledgebaseFuelsPage from './pages/KnowledgebaseFuelsPage.jsx'
import KnowledgebaseEquationsPage from './pages/KnowledgebaseEquationsPage.jsx' import KnowledgebaseEquationsPage from './pages/KnowledgebaseEquationsPage.jsx'
import KnowledgebaseAblativesPage from './pages/KnowledgebaseAblativesPage.jsx' import KnowledgebaseAblativesPage from './pages/KnowledgebaseAblativesPage.jsx'
import DocsPage from './pages/DocsPage.jsx'
export default function App() { export default function App() {
return ( return (
@@ -117,6 +118,19 @@ export default function App() {
</NavLink> </NavLink>
</div> </div>
</div> </div>
<NavLink
to="/docs"
className={({ isActive }) =>
`px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${
isActive
? 'bg-slate-700 text-white'
: 'text-slate-400 hover:text-white hover:bg-slate-800'
}`
}
>
Docs
</NavLink>
</nav> </nav>
</header> </header>
<Routes> <Routes>
@@ -127,6 +141,7 @@ export default function App() {
<Route path="/knowledgebase/fuels" element={<KnowledgebaseFuelsPage />} /> <Route path="/knowledgebase/fuels" element={<KnowledgebaseFuelsPage />} />
<Route path="/knowledgebase/equations" element={<KnowledgebaseEquationsPage />} /> <Route path="/knowledgebase/equations" element={<KnowledgebaseEquationsPage />} />
<Route path="/knowledgebase/ablatives" element={<KnowledgebaseAblativesPage />} /> <Route path="/knowledgebase/ablatives" element={<KnowledgebaseAblativesPage />} />
<Route path="/docs" element={<DocsPage />} />
</Routes> </Routes>
</div> </div>
) )

View File

@@ -0,0 +1,188 @@
import { useMemo } from 'react'
/**
* SVG nozzle cross-section diagram.
* Draws a dimensioned 2D axisymmetric profile from chamber and nozzle geometry.
*/
export default function NozzleDiagram({ chamberGeometry: cg, nozzleGeometry: ng, nozzleType = 'conical' }) {
if (!cg || !ng) {
return (
<div className="bg-slate-800 border-t border-slate-700 p-6 text-center text-slate-400 text-sm">
</div>
)
}
// Convert mm to m for calculations
const Dc = cg.Dc / 1000
const Dt = cg.Dt / 1000
const De = ng.De / 1000
const Lc = cg.Lc / 1000
const Ln = ng.Ln / 1000
const L_cyl = cg.L_cyl / 1000
const rc = cg.rc / 1000
const rt = cg.rt / 1000
const re = ng.re / 1000
const pathData = useMemo(() => {
const totalLen = Lc + Ln
const scale = 200 / totalLen // scale factor for SVG: map totalLen to ~200 pixels
const radiusScale = 150 / rc // scale radius to fit
// Start building the profile path
// Profile is upper half; lower half will be mirrored
const cmds = []
// Inlet cap: vertical line from (0, 0) to (0, rc)
cmds.push(`M ${0 * scale} ${0}`)
cmds.push(`L ${0 * scale} ${rc * radiusScale}`)
// Cylindrical section: horizontal line from (0, rc) to (L_cyl, rc)
cmds.push(`L ${L_cyl * scale} ${rc * radiusScale}`)
// Convergent section: straight line from (L_cyl, rc) to (Lc, rt)
cmds.push(`L ${Lc * scale} ${rt * radiusScale}`)
// Divergent section
if (nozzleType === 'bell') {
// Bell nozzle: cubic Bézier from throat to exit
// Tangent at throat: divAngleDeg from vertical (perpendicular to radius)
// Tangent at exit: near-axial
const divergentStart = Lc
const divergentEnd = Lc + Ln
const midPoint = (divergentStart + divergentEnd) / 2
// Control points for smooth bell shape
const cp1x = divergentStart + Ln * 0.3
const cp1y = rt * radiusScale + (re - rt) * 0.15 * radiusScale
const cp2x = divergentEnd - Ln * 0.2
const cp2y = re * radiusScale - (re - rt) * 0.05 * radiusScale
cmds.push(
`C ${cp1x * scale} ${cp1y}, ${cp2x * scale} ${cp2y}, ${divergentEnd * scale} ${re * radiusScale}`
)
} else {
// Conical nozzle: straight line from (Lc, rt) to (Lc+Ln, re)
cmds.push(`L ${(Lc + Ln) * scale} ${re * radiusScale}`)
}
// Return path (mirror)
cmds.push(`L ${(Lc + Ln) * scale} ${-re * radiusScale}`)
if (nozzleType === 'bell') {
const divergentStart = Lc
const divergentEnd = Lc + Ln
const cp1x = divergentStart + Ln * 0.3
const cp1y = rt * radiusScale + (re - rt) * 0.15 * radiusScale
const cp2x = divergentEnd - Ln * 0.2
const cp2y = re * radiusScale - (re - rt) * 0.05 * radiusScale
cmds.push(
`C ${cp2x * scale} ${-cp2y}, ${cp1x * scale} ${-cp1y}, ${Lc * scale} ${-rt * radiusScale}`
)
} else {
cmds.push(`L ${Lc * scale} ${-rt * radiusScale}`)
}
// Back through convergent and cylindrical sections
cmds.push(`L ${L_cyl * scale} ${-rc * radiusScale}`)
cmds.push(`L ${0 * scale} ${-rc * radiusScale}`)
cmds.push(`Z`)
return cmds.join(' ')
}, [Dc, Dt, De, Lc, Ln, L_cyl, rc, rt, re, nozzleType])
// Dimension annotations
const totalLen = Lc + Ln
const scale = 200 / totalLen
const radiusScale = 150 / rc
return (
<div className="w-full h-full flex flex-col">
<svg
viewBox={`-20 -180 ${totalLen * scale + 40} 360`}
className="w-full flex-1"
style={{ minHeight: '400px' }}
preserveAspectRatio="xMidYMid meet"
>
{/* Grid lines */}
<defs>
<pattern
id="grid"
width="20"
height="20"
patternUnits="userSpaceOnUse"
x="-20"
y="-180"
>
<path
d="M 20 0 L 0 0 0 20"
fill="none"
stroke="#334155"
strokeWidth="0.5"
opacity="0.3"
/>
</pattern>
</defs>
<rect x="-20" y="-180" width={totalLen * scale + 40} height="360" fill="url(#grid)" />
{/* Axis lines */}
<line x1="-10" y1="0" x2={totalLen * scale + 10} y2="0" stroke="#64748b" strokeWidth="1" />
<line x1="0" y1="-160" x2="0" y2="160" stroke="#64748b" strokeWidth="1" />
{/* Engine profile */}
<path
d={pathData}
fill="none"
stroke="#60a5fa"
strokeWidth="2"
vectorEffect="non-scaling-stroke"
/>
{/* Dimension lines and labels */}
<g fontSize="12" fill="#94a3b8" stroke="#94a3b8" strokeWidth="1">
{/* Chamber diameter label */}
<line x1="-15" y1={rc * radiusScale} x2="-5" y2={rc * radiusScale} />
<line x1="-15" y1={-rc * radiusScale} x2="-5" y2={-rc * radiusScale} />
<line x1="-10" y1={rc * radiusScale} x2="-10" y2={-rc * radiusScale} />
<text x="-18" y="0" textAnchor="end" dominantBaseline="middle" fontSize="11">
Dc={(Dc * 1000).toFixed(0)}mm
</text>
{/* Throat diameter label */}
<line x1={Lc * scale} y1={rt * radiusScale + 10} x2={Lc * scale} y2={-rt * radiusScale - 10} />
<text x={Lc * scale} y={rt * radiusScale + 25} textAnchor="middle" fontSize="11">
Dt={(Dt * 1000).toFixed(0)}mm
</text>
{/* Exit diameter label */}
<line x1={(Lc + Ln) * scale} y1={re * radiusScale + 10} x2={(Lc + Ln) * scale} y2={-re * radiusScale - 10} />
<text
x={(Lc + Ln) * scale}
y={re * radiusScale + 25}
textAnchor="middle"
fontSize="11"
>
De={(De * 1000).toFixed(0)}mm
</text>
{/* Chamber length label */}
<line x1="0" y1={rc * radiusScale + 20} x2={Lc * scale} y2={rc * radiusScale + 20} />
<line x1="0" y1={rc * radiusScale + 15} x2="0" y2={rc * radiusScale + 25} />
<line x1={Lc * scale} y1={rc * radiusScale + 15} x2={Lc * scale} y2={rc * radiusScale + 25} />
<text x={Lc * scale * 0.5} y={rc * radiusScale + 37} textAnchor="middle" fontSize="11">
Lc={(Lc * 1000).toFixed(0)}mm
</text>
{/* Nozzle length label */}
<line x1={Lc * scale} y1={-rc * radiusScale - 20} x2={(Lc + Ln) * scale} y2={-rc * radiusScale - 20} />
<line x1={Lc * scale} y1={-rc * radiusScale - 25} x2={Lc * scale} y2={-rc * radiusScale - 15} />
<line x1={(Lc + Ln) * scale} y1={-rc * radiusScale - 25} x2={(Lc + Ln) * scale} y2={-rc * radiusScale - 15} />
<text x={(Lc * scale + (Lc + Ln) * scale) * 0.5} y={-rc * radiusScale - 32} textAnchor="middle" fontSize="11">
Ln={(Ln * 1000).toFixed(0)}mm
</text>
</g>
</svg>
</div>
)
}

View File

@@ -0,0 +1,515 @@
import { useMemo } from 'react'
import { machFromAreaRatio } from '../../engine/numerics.js'
/**
* SVG performance charts.
* - Chart A: Isp & CF vs expansion ratio ε
* - Chart B: Ablative erosion over burn time (if applicable)
*/
export default function PerformanceCharts({
allThermo,
coolingResults,
burnTime,
nozzleType = 'conical',
}) {
if (!allThermo || !allThermo.gamma || !allThermo.R || !allThermo.T0 || !allThermo.p0) {
return null
}
return (
<div className="w-full h-full flex flex-col gap-8 p-4">
<ChartA allThermo={allThermo} />
{coolingResults?.method === 'ablative' && burnTime && (
<ChartB coolingResults={coolingResults} burnTime={burnTime} />
)}
</div>
)
}
/**
* Chart A: Isp & CF vs expansion ratio
*/
function ChartA({ allThermo }) {
const { gamma, R, T0, p0, pa = 101325, cstar, eps: designEps } = allThermo
// SVG dimensions — larger for better readability
const width = 700
const height = 350
const margin = { top: 30, right: 80, bottom: 50, left: 80 }
// Compute performance curves
const chartData = useMemo(() => {
const g = gamma
const R_gas = R
const T0_val = T0
const p0_val = p0
const pa_val = pa || 101325
const c_star = cstar || 1000
// Sweep expansion ratio from 1 to 2*design (or 1-30 if design not set)
const maxEps = designEps ? Math.min(designEps * 2, 50) : 30
const epsValues = []
const ispValues = []
const cfValues = []
for (let i = 0; i <= 100; i++) {
const eps_i = 1 + (maxEps - 1) * (i / 100)
epsValues.push(eps_i)
// Get Mach at exit from area ratio
const Me = machFromAreaRatio(eps_i, g, true)
if (!Me || !isFinite(Me)) {
ispValues.push(null)
cfValues.push(null)
continue
}
// Isentropic exit temperature: Te = T0 / (1 + (g-1)/2 * Me²)
const Te = T0_val / (1 + ((g - 1) / 2) * Me * Me)
// Isentropic exit pressure: pe = p0 * (Te/T0)^(g/(g-1))
const pe = p0_val * Math.pow(Te / T0_val, g / (g - 1))
// Exit velocity: Ve = sqrt(2*g*R*T0 / (g+1) * (1 - (pe/p0)^((g-1)/g)))
// Or: Ve = sqrt(2 * g * R_gas * (T0 - Te) / (g - 1))
const Ve = Math.sqrt((2 * g * R_gas * (T0_val - Te)) / (g - 1))
// Specific impulse (accounting for ambient pressure)
const g0 = 9.81
const Isp = Ve / g0 + (pe - pa_val) * eps_i / (p0_val * c_star / g0)
// Thrust coefficient: CF = Isp / c_star * g0 = Ve / c_star + (pe - pa) * Ae / (p0 * At)
// But more directly: CF = sqrt((2*g/(g-1)) * (2/(g+1))^((g+1)/(g-1)) * (1 - (pe/p0)^((g-1)/g))) + (pe - pa)/p0 * eps
const CF = (Ve + (pe - pa_val) * eps_i / p0_val) / c_star
ispValues.push(Isp)
cfValues.push(CF)
}
return { epsValues, ispValues, cfValues, maxEps }
}, [gamma, R, T0, p0, pa, cstar, designEps])
const { epsValues, ispValues, cfValues, maxEps } = chartData
const plotW = width - margin.left - margin.right
const plotH = height - margin.top - margin.bottom
// Scale functions
const getX = (eps) => margin.left + (eps / maxEps) * plotW
const getY_Isp = (isp) => {
const minIsp = Math.min(...ispValues.filter(v => v != null))
const maxIsp = Math.max(...ispValues.filter(v => v != null))
return margin.top + plotH - ((isp - minIsp) / (maxIsp - minIsp)) * plotH
}
const getY_CF = (cf) => {
const minCf = Math.min(...cfValues.filter(v => v != null))
const maxCf = Math.max(...cfValues.filter(v => v != null))
return margin.top + plotH - ((cf - minCf) / (maxCf - minCf)) * plotH
}
// Build paths
const ispPath = useMemo(() => {
const cmds = []
for (let i = 0; i < ispValues.length; i++) {
if (ispValues[i] != null) {
const x = getX(epsValues[i])
const y = getY_Isp(ispValues[i])
cmds.push(`${i === 0 || ispValues[i - 1] == null ? 'M' : 'L'} ${x} ${y}`)
}
}
return cmds.join(' ')
}, [ispValues, epsValues])
const cfPath = useMemo(() => {
const cmds = []
for (let i = 0; i < cfValues.length; i++) {
if (cfValues[i] != null) {
const x = getX(epsValues[i])
const y = getY_CF(cfValues[i])
cmds.push(`${i === 0 || cfValues[i - 1] == null ? 'M' : 'L'} ${x} ${y}`)
}
}
return cmds.join(' ')
}, [cfValues, epsValues])
const designEpsX = designEps ? getX(designEps) : null
const minIsp = Math.min(...ispValues.filter(v => v != null))
const maxIsp = Math.max(...ispValues.filter(v => v != null))
const minCf = Math.min(...cfValues.filter(v => v != null))
const maxCf = Math.max(...cfValues.filter(v => v != null))
return (
<div className="flex flex-col">
<h3 className="text-sm font-semibold text-slate-300 mb-3">
Isp & Thrust Coefficient vs Expansion Ratio
</h3>
<svg viewBox={`0 0 ${width} ${height}`} className="w-full h-auto" preserveAspectRatio="xMidYMid meet">
{/* Grid */}
<defs>
<pattern
id="gridA"
width="20"
height="20"
patternUnits="userSpaceOnUse"
x={margin.left}
y={margin.top}
>
<path
d="M 20 0 L 0 0 0 20"
fill="none"
stroke="#334155"
strokeWidth="0.5"
opacity="0.3"
/>
</pattern>
</defs>
<rect
x={margin.left}
y={margin.top}
width={plotW}
height={plotH}
fill="url(#gridA)"
/>
{/* Axes */}
<line
x1={margin.left}
y1={margin.top}
x2={margin.left}
y2={margin.top + plotH}
stroke="#64748b"
strokeWidth="1"
/>
<line
x1={margin.left}
y1={margin.top + plotH}
x2={margin.left + plotW}
y2={margin.top + plotH}
stroke="#64748b"
strokeWidth="1"
/>
<line
x1={margin.left + plotW}
y1={margin.top}
x2={margin.left + plotW}
y2={margin.top + plotH}
stroke="#64748b"
strokeWidth="1"
/>
{/* Isp curve (left axis) */}
<path
d={ispPath}
fill="none"
stroke="#10b981"
strokeWidth="2"
vectorEffect="non-scaling-stroke"
/>
{/* CF curve (right axis) */}
<path
d={cfPath}
fill="none"
stroke="#f59e0b"
strokeWidth="2"
vectorEffect="non-scaling-stroke"
/>
{/* Design point marker */}
{designEpsX != null && (
<line
x1={designEpsX}
y1={margin.top}
x2={designEpsX}
y2={margin.top + plotH}
stroke="#6b7280"
strokeWidth="2"
strokeDasharray="4,4"
/>
)}
{/* Axis labels */}
<text x={width / 2} y={height - 5} textAnchor="middle" fill="#94a3b8" fontSize="11">
Expansion Ratio (ε)
</text>
<text
x={15}
y={margin.top - 5}
textAnchor="middle"
fill="#10b981"
fontSize="11"
fontWeight="bold"
>
Isp (s)
</text>
<text
x={width - 15}
y={margin.top - 5}
textAnchor="middle"
fill="#f59e0b"
fontSize="11"
fontWeight="bold"
>
CF
</text>
{/* Tick labels */}
{[0, 0.25, 0.5, 0.75, 1].map((frac) => {
const eps = 1 + (maxEps - 1) * frac
const x = getX(eps)
return (
<g key={`eps-${frac}`}>
<line x1={x} y1={margin.top + plotH} x2={x} y2={margin.top + plotH + 4} stroke="#64748b" strokeWidth="1" />
<text
x={x}
y={margin.top + plotH + 14}
textAnchor="middle"
fill="#94a3b8"
fontSize="10"
>
{eps.toFixed(1)}
</text>
</g>
)
})}
{/* Isp ticks (left) */}
{[0, 0.5, 1].map((frac) => {
const isp = minIsp + (maxIsp - minIsp) * frac
const y = getY_Isp(isp)
return (
<g key={`isp-${frac}`}>
<line x1={margin.left - 4} y1={y} x2={margin.left} y2={y} stroke="#10b981" strokeWidth="1" />
<text
x={margin.left - 8}
y={y + 3}
textAnchor="end"
fill="#10b981"
fontSize="9"
>
{isp.toFixed(0)}
</text>
</g>
)
})}
{/* CF ticks (right) */}
{[0, 0.5, 1].map((frac) => {
const cf = minCf + (maxCf - minCf) * frac
const y = getY_CF(cf)
return (
<g key={`cf-${frac}`}>
<line x1={margin.left + plotW} y1={y} x2={margin.left + plotW + 4} y2={y} stroke="#f59e0b" strokeWidth="1" />
<text
x={margin.left + plotW + 8}
y={y + 3}
textAnchor="start"
fill="#f59e0b"
fontSize="9"
>
{cf.toFixed(2)}
</text>
</g>
)
})}
</svg>
</div>
)
}
/**
* Chart B: Ablative erosion over burn time
*/
function ChartB({ coolingResults: cr, burnTime }) {
if (!cr || cr.method !== 'ablative' || !cr.effectiveRate) {
return null
}
const { effectiveRate, effectiveRateMin, effectiveRateMax, ablativeThickness } = cr
// Chart data — larger for better readability
const width = 700
const height = 300
const margin = { top: 30, right: 50, bottom: 50, left: 80 }
const plotW = width - margin.left - margin.right
const plotH = height - margin.top - margin.bottom
// Scale functions
const getX = (time) => margin.left + (time / burnTime) * plotW
const getY = (remaining) => {
const maxRemaining = ablativeThickness
return margin.top + plotH - (remaining / maxRemaining) * plotH
}
// Shaded area path (min to max)
const areaPath = useMemo(() => {
const cmds = []
// Top edge (best case, min erosion)
for (let i = 0; i <= 100; i++) {
const t = (i / 100) * burnTime
const remaining = ablativeThickness - effectiveRateMin * t
const x = getX(t)
const y = getY(Math.max(remaining, 0))
cmds.push(`${i === 0 ? 'M' : 'L'} ${x} ${y}`)
}
// Bottom edge (worst case, max erosion)
for (let i = 100; i >= 0; i--) {
const t = (i / 100) * burnTime
const remaining = ablativeThickness - effectiveRateMax * t
const x = getX(t)
const y = getY(Math.max(remaining, 0))
cmds.push(`L ${x} ${y}`)
}
cmds.push('Z')
return cmds.join(' ')
}, [ablativeThickness, effectiveRateMin, effectiveRateMax, burnTime])
// Nominal line
const nominalPath = useMemo(() => {
const cmds = []
for (let i = 0; i <= 100; i++) {
const t = (i / 100) * burnTime
const remaining = ablativeThickness - effectiveRate * t
const x = getX(t)
const y = getY(Math.max(remaining, 0))
cmds.push(`${i === 0 ? 'M' : 'L'} ${x} ${y}`)
}
return cmds.join(' ')
}, [ablativeThickness, effectiveRate, burnTime])
const finalRemaining = ablativeThickness - effectiveRate * burnTime
const finalRemainingWorst = ablativeThickness - effectiveRateMax * burnTime
return (
<div className="flex flex-col">
<h3 className="text-sm font-semibold text-slate-300 mb-3">
Ablative Liner Erosion Over Burn Time
</h3>
<svg viewBox={`0 0 ${width} ${height}`} className="w-full h-auto" preserveAspectRatio="xMidYMid meet">
{/* Grid */}
<defs>
<pattern
id="gridB"
width="20"
height="20"
patternUnits="userSpaceOnUse"
x={margin.left}
y={margin.top}
>
<path
d="M 20 0 L 0 0 0 20"
fill="none"
stroke="#334155"
strokeWidth="0.5"
opacity="0.3"
/>
</pattern>
</defs>
<rect
x={margin.left}
y={margin.top}
width={plotW}
height={plotH}
fill="url(#gridB)"
/>
{/* Danger zone (below 0 remaining) */}
<rect
x={margin.left}
y={getY(0)}
width={plotW}
height={plotH - (getY(0) - margin.top)}
fill="#dc2626"
opacity="0.1"
/>
{/* Shaded area (min to max) */}
<path d={areaPath} fill="#3b82f6" opacity="0.2" />
{/* Nominal line */}
<path d={nominalPath} fill="none" stroke="#3b82f6" strokeWidth="2" vectorEffect="non-scaling-stroke" />
{/* Zero thickness line */}
<line
x1={margin.left}
y1={getY(0)}
x2={margin.left + plotW}
y2={getY(0)}
stroke="#dc2626"
strokeWidth="2"
strokeDasharray="4,4"
/>
{/* Axes */}
<line x1={margin.left} y1={margin.top} x2={margin.left} y2={margin.top + plotH} stroke="#64748b" strokeWidth="1" />
<line
x1={margin.left}
y1={margin.top + plotH}
x2={margin.left + plotW}
y2={margin.top + plotH}
stroke="#64748b"
strokeWidth="1"
/>
{/* Axis labels */}
<text x={width / 2} y={height - 8} textAnchor="middle" fill="#94a3b8" fontSize="11">
Time (s)
</text>
<text
x={12}
y={margin.top + 10}
textAnchor="middle"
fill="#94a3b8"
fontSize="11"
fontWeight="bold"
>
Remaining (mm)
</text>
{/* Time ticks */}
{[0, 0.25, 0.5, 0.75, 1].map((frac) => {
const t = frac * burnTime
const x = getX(t)
return (
<g key={`t-${frac}`}>
<line x1={x} y1={margin.top + plotH} x2={x} y2={margin.top + plotH + 4} stroke="#64748b" strokeWidth="1" />
<text
x={x}
y={margin.top + plotH + 14}
textAnchor="middle"
fill="#94a3b8"
fontSize="9"
>
{t.toFixed(1)}
</text>
</g>
)
})}
{/* Thickness ticks */}
{[0, 0.5, 1].map((frac) => {
const remaining = frac * ablativeThickness
const y = getY(remaining)
return (
<g key={`rem-${frac}`}>
<line x1={margin.left - 4} y1={y} x2={margin.left} y2={y} stroke="#94a3b8" strokeWidth="1" />
<text
x={margin.left - 8}
y={y + 3}
textAnchor="end"
fill="#94a3b8"
fontSize="9"
>
{remaining.toFixed(0)}
</text>
</g>
)
})}
</svg>
<div className="text-sm text-slate-300 mt-4 p-3 bg-slate-700/50 rounded">
<strong>Final State:</strong> {finalRemaining.toFixed(1)} mm remaining<br />
<strong>Worst Case:</strong> {finalRemainingWorst.toFixed(1)} mm (max erosion)
</div>
</div>
)
}

View File

@@ -1,5 +1,5 @@
// Pure calculation functions for engine design (no React) // Pure calculation functions for engine design (no React)
import { ABLATIVE_MATERIALS } from './knowledgebaseData.js' import { ABLATIVE_MATERIALS, STRUCTURAL_MATERIALS } from './knowledgebaseData.js'
/** /**
* Combustion chamber geometry from thermodynamic results and design inputs. * Combustion chamber geometry from thermodynamic results and design inputs.
@@ -207,3 +207,69 @@ export function calcFeedSystem(thermo, feedSystem, burnTime) {
const P_turbine = (mdot_f / (rhoFuel || 800) + mdot_ox / (rhoOx || 1140)) * dP_pump const P_turbine = (mdot_f / (rhoFuel || 800) + mdot_ox / (rhoOx || 1140)) * dP_pump
return { type, p_tank, V_fuel, V_ox, V_prop, dP_pump, P_turbine } return { type, p_tank, V_fuel, V_ox, V_prop, dP_pump, P_turbine }
} }
/**
* Structural sizing: wall thickness and mass estimation.
* Uses thin-walled pressure vessel hoop stress formula and frustum/cylinder mass calculations.
* Returns null if required geometry or thermo values are not available.
*/
export function calcStructure(thermo, chamberGeom, nozzleGeom, structure) {
if (!thermo?.p0 || !isFinite(thermo.p0)) return null
if (!chamberGeom?.rc || !chamberGeom?.rt) return null
if (!nozzleGeom?.rt || !nozzleGeom?.re) return null
const { materialId, safetyFactor } = structure
if (!materialId || !safetyFactor || !isFinite(safetyFactor)) return null
const material = STRUCTURAL_MATERIALS.find(m => m.id === materialId)
if (!material) return null
const { p0 } = thermo
const { rc, rt, L_cyl, L_conv } = chamberGeom
const { re, Ln } = nozzleGeom
// Allowable stress = yield / safety factor
const allowableStress = material.yieldStrength / safetyFactor
// Thin-walled pressure vessel hoop stress: t = (p · r) / allowableStress
const t_chamber = (p0 * rc) / allowableStress
const t_throat = (p0 * rt) / allowableStress
// Exit nozzle: assume exit pressure is much lower, use 0.1 * p0 as estimate
const pe = p0 * 0.1
const t_nozzle_exit = (pe * re) / allowableStress
// Mass estimation: thin cylindrical/frustum shells + injector plate
// Chamber cylinder: m = 2π · rc · t · L_cyl · ρ
const m_chamber_cyl = 2 * Math.PI * rc * t_chamber * L_cyl * material.density
// Convergent section (frustum from rc to rt, length L_conv)
// Average radius: (rc + rt) / 2
const r_conv_avg = (rc + rt) / 2
const m_convergent = 2 * Math.PI * r_conv_avg * t_chamber * L_conv * material.density
// Nozzle divergent section (frustum from rt to re, length Ln)
// Average radius: (rt + re) / 2
const r_nozzle_avg = (rt + re) / 2
const m_nozzle = 2 * Math.PI * r_nozzle_avg * t_nozzle_exit * Ln * material.density
// Injector plate: disk m = π · rc² · (1.5 · t_chamber) · ρ
const m_injector = Math.PI * rc * rc * (1.5 * t_chamber) * material.density
// Total engine dry mass
const m_total = m_chamber_cyl + m_convergent + m_nozzle + m_injector
return {
t_chamber,
t_throat,
t_nozzle_exit,
m_chamber_cyl,
m_convergent,
m_nozzle,
m_injector,
m_total,
material,
safetyFactor,
allowableStress,
}
}

View File

@@ -11,8 +11,8 @@ export { downloadBlob }
* Schema version 1: inputs section is re-importable; results is reference-only. * Schema version 1: inputs section is re-importable; results is reference-only.
*/ */
export function exportEngineJSON({ export function exportEngineJSON({
thermoInputs, chamber, nozzle, injector, cooling, feedSystem, burnTime, thermoInputs, chamber, nozzle, injector, cooling, feedSystem, burnTime, structure,
allThermo, chamberGeometry, nozzleGeometry, injectorGeometry, coolingResults, feedResults, allThermo, chamberGeometry, nozzleGeometry, injectorGeometry, coolingResults, feedResults, structureResults,
}) { }) {
const payload = { const payload = {
version: 1, version: 1,
@@ -26,6 +26,7 @@ export function exportEngineJSON({
cooling, cooling,
feedSystem, feedSystem,
burnTime, burnTime,
structure,
}, },
results: { results: {
thermodynamics: allThermo, thermodynamics: allThermo,
@@ -34,6 +35,7 @@ export function exportEngineJSON({
injectorGeometry, injectorGeometry,
coolingResults, coolingResults,
feedResults, feedResults,
structureResults,
}, },
} }
return new Blob([JSON.stringify(payload, null, 2)], { type: 'application/json' }) return new Blob([JSON.stringify(payload, null, 2)], { type: 'application/json' })

View File

@@ -876,3 +876,13 @@ export const ABLATIVE_MATERIALS = [
refPressure: 6.9e6, refPressure: 6.9e6,
}, },
] ]
// ── Structural materials (for wall thickness and mass estimation) ───────────
export const STRUCTURAL_MATERIALS = [
{ id: 'al_6061_t6', name: 'Aluminum 6061-T6', yieldStrength: 276e6, density: 2700, youngModulus: 69e9 },
{ id: 'ss_304', name: 'Stainless Steel 304', yieldStrength: 215e6, density: 7900, youngModulus: 193e9 },
{ id: 'inconel_718', name: 'Inconel 718', yieldStrength: 1100e6, density: 8190, youngModulus: 200e9 },
{ id: 'ti_6al_4v', name: 'Titanium Ti-6Al-4V', yieldStrength: 880e6, density: 4430, youngModulus: 114e9 },
{ id: 'cfrp', name: 'CFRP (typical)', yieldStrength: 600e6, density: 1600, youngModulus: 70e9 },
]

View File

@@ -6,6 +6,7 @@ import {
calcInjector, calcInjector,
calcCooling, calcCooling,
calcFeedSystem, calcFeedSystem,
calcStructure,
} from '../engine/engineDesignCalcs.js' } from '../engine/engineDesignCalcs.js'
export function useEngineDesign() { export function useEngineDesign() {
@@ -25,6 +26,7 @@ export function useEngineDesign() {
rhoFuel: 800, rhoOx: 1140, pressurantR: 2077, pressurantT: 300, rhoFuel: 800, rhoOx: 1140, pressurantR: 2077, pressurantT: 300,
}) })
const [burnTime, setBurnTime] = useState(30) const [burnTime, setBurnTime] = useState(30)
const [structure, setStructure] = useState({ materialId: 'al_6061_t6', safetyFactor: 2.0 })
// Run the existing constraint-propagation solver on the thermodynamic inputs // Run the existing constraint-propagation solver on the thermodynamic inputs
const thermoResults = useMemo(() => { const thermoResults = useMemo(() => {
@@ -54,6 +56,7 @@ export function useEngineDesign() {
const injectorGeometry = useMemo(() => calcInjector(allThermo, injector), [allThermo, injector]) const injectorGeometry = useMemo(() => calcInjector(allThermo, injector), [allThermo, injector])
const coolingResults = useMemo(() => calcCooling(allThermo, cooling, chamberGeometry, burnTime), [allThermo, cooling, chamberGeometry, burnTime]) const coolingResults = useMemo(() => calcCooling(allThermo, cooling, chamberGeometry, burnTime), [allThermo, cooling, chamberGeometry, burnTime])
const feedResults = useMemo(() => calcFeedSystem(allThermo, feedSystem, burnTime), [allThermo, feedSystem, burnTime]) const feedResults = useMemo(() => calcFeedSystem(allThermo, feedSystem, burnTime), [allThermo, feedSystem, burnTime])
const structureResults = useMemo(() => calcStructure(allThermo, chamberGeometry, nozzleGeometry, structure), [allThermo, chamberGeometry, nozzleGeometry, structure])
function setThermoInput(key, value) { function setThermoInput(key, value) {
setThermoInputs(prev => ({ ...prev, [key]: value })) setThermoInputs(prev => ({ ...prev, [key]: value }))
@@ -98,6 +101,7 @@ export function useEngineDesign() {
if (inputs.cooling) setCooling(inputs.cooling) if (inputs.cooling) setCooling(inputs.cooling)
if (inputs.feedSystem) setFeedSystem(inputs.feedSystem) if (inputs.feedSystem) setFeedSystem(inputs.feedSystem)
if (inputs.burnTime != null) setBurnTime(inputs.burnTime) if (inputs.burnTime != null) setBurnTime(inputs.burnTime)
if (inputs.structure) setStructure(inputs.structure)
} }
return { return {
@@ -109,9 +113,10 @@ export function useEngineDesign() {
cooling, setCooling, cooling, setCooling,
feedSystem, setFeedSystem, feedSystem, setFeedSystem,
burnTime, setBurnTime, burnTime, setBurnTime,
structure, setStructure,
// Derived // Derived
thermoResults, allThermo, thermoResults, allThermo,
chamberGeometry, nozzleGeometry, injectorGeometry, coolingResults, feedResults, chamberGeometry, nozzleGeometry, injectorGeometry, coolingResults, feedResults, structureResults,
// Actions // Actions
loadDesign, loadDesign,
applyPropellant, applyPropellant,

336
src/pages/DocsPage.jsx Normal file
View File

@@ -0,0 +1,336 @@
import { useState } from 'react'
import { VARIABLES, CATEGORIES } from '../engine/variables.js'
import { EQUATIONS } from '../engine/equations.js'
const SECTIONS = [
'Overview',
'Solver',
'Engine Designer',
'Rocket Designer',
'Knowledgebase',
'Variables Reference',
]
export default function DocsPage() {
const [activeSection, setActiveSection] = useState('Overview')
const scrollToSection = (sectionId) => {
setActiveSection(sectionId)
const element = document.getElementById(sectionId)
if (element) {
element.scrollIntoView({ behavior: 'smooth' })
}
}
// Group variables by category
const variablesByCategory = {}
CATEGORIES.forEach(cat => {
variablesByCategory[cat] = Object.values(VARIABLES).filter(v => v.category === cat)
})
// Get preset names from equations
const getPresetExamples = () => [
{ name: 'LOX/Methane', desc: 'Cryogenic bipropellant typical for Falcon 9' },
{ name: 'HTPB/Ammonium Nitrate', desc: 'Common solid rocket propellant' },
{ name: 'Hypergolic (UDMH/N₂O₄)', desc: 'Storable bipropellant used in legacy systems' },
{ name: 'Monopropellant (H₂O₂)', desc: 'Catalytic decomposition thruster' },
{ name: 'Liquid Hydrogen/LOX', desc: 'High performance cryogenic combination' },
{ name: 'Pressure-Fed LOX/Ethanol', desc: 'Simplified system with moderate performance' },
]
return (
<div className="flex h-full overflow-hidden">
{/* Sticky Left Sidebar */}
<aside className="w-56 bg-slate-900 border-r border-slate-700 flex flex-col shrink-0 overflow-hidden">
<nav className="flex-1 overflow-y-auto p-4 space-y-1">
{SECTIONS.map(section => (
<button
key={section}
onClick={() => scrollToSection(section)}
className={`w-full text-left px-4 py-2.5 rounded-lg text-sm transition-colors ${
activeSection === section
? 'bg-slate-700 text-white font-medium'
: 'text-slate-400 hover:text-slate-200 hover:bg-slate-800'
}`}
>
{section}
</button>
))}
</nav>
</aside>
{/* Main Content Area */}
<main className="flex-1 overflow-y-auto">
<div className="max-w-4xl mx-auto p-8 space-y-12">
{/* Overview */}
<section id="Overview" className="space-y-4">
<h1 className="text-4xl font-bold text-white">RocketTools Documentation</h1>
<p className="text-slate-300">
RocketTools is a comprehensive rocketry engineering calculator and design suite. This documentation covers all major components.
</p>
<div className="mt-6 space-y-3">
<h3 className="text-lg font-semibold text-white">Quick Overview</h3>
<ul className="space-y-2 text-slate-300">
<li><strong>Solver:</strong> Drag-and-drop constraint propagation engine. Input known values, solve for unknowns automatically.</li>
<li><strong>Engine Designer:</strong> Design rocket engines with chamber pressure, propellant selection, nozzle geometry, and ablative cooling analysis.</li>
<li><strong>Rocket Designer:</strong> Multi-stage rocket configuration with mass budget and delta-v calculations.</li>
<li><strong>Knowledgebase:</strong> Reference database of propellants, ablative materials, and thermodynamic equations.</li>
</ul>
</div>
</section>
{/* Solver */}
<section id="Solver" className="space-y-4">
<h2 className="text-3xl font-bold text-white">Solver</h2>
<p className="text-slate-300">
The Solver is a drag-and-drop interface for solving rocket equations using constraint propagation.
</p>
<div className="space-y-4 mt-4">
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">How It Works</h3>
<ol className="space-y-2 text-slate-300 list-decimal list-inside">
<li>Drag variable cards from the left <strong>Palette</strong> onto the <strong>Workspace</strong> (center area)</li>
<li>Select which variables are <strong>given</strong> (known) and enter their values</li>
<li>The solver iteratively applies equations to calculate unknowns</li>
<li>View results in the right panel, showing solved values and missing information</li>
</ol>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Constraint Propagation</h3>
<p className="text-slate-300">
The solver uses a greedy constraint-propagation algorithm. It repeatedly scans all active equations and solves for unknowns whenever enough variables are known. Each solution iteration can unlock new variables, which cascade through the system until no more unknowns can be determined.
</p>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Missing Report</h3>
<p className="text-slate-300">
The <strong>Missing</strong> section shows which additional inputs would unlock each unsolved variable. This guides you toward what to measure or specify next.
</p>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Units</h3>
<p className="text-slate-300">
All calculations use SI units internally. When you input or display values, you can convert between unit families (e.g., pressure in Pa, bar, or psi). Unit selection is per-variable and persists in your current session.
</p>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Import / Export</h3>
<p className="text-slate-300">
Use the <strong>Import</strong> and <strong>Export</strong> buttons to save your workspace as a JSON file or load a previously saved configuration. This is useful for reproducibility and sharing calculations.
</p>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Presets</h3>
<p className="text-slate-300 mb-4">Quick-start configurations for common scenarios:</p>
<ul className="space-y-1 text-slate-300">
{getPresetExamples().map((preset, idx) => (
<li key={idx}>
<strong>{preset.name}:</strong> {preset.desc}
</li>
))}
</ul>
</div>
</div>
</section>
{/* Engine Designer */}
<section id="Engine Designer" className="space-y-4">
<h2 className="text-3xl font-bold text-white">Engine Designer</h2>
<p className="text-slate-300">
Design rocket engines with integrated thermodynamic analysis and ablative cooling predictions.
</p>
<div className="space-y-4 mt-4">
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Core Parameters</h3>
<ul className="space-y-1 text-slate-300">
<li><strong>Propellant:</strong> Select from bipropellant combinations or pre-defined fuels</li>
<li><strong>Chamber Pressure (p₀):</strong> Stagnation pressure in the combustion chamber</li>
<li><strong>Thrust Target:</strong> Desired thrust output</li>
<li><strong>Expansion Ratio (ε):</strong> Nozzle area ratio (exit area / throat area)</li>
<li><strong>Characteristic Length (L*):</strong> Combustion chamber design parameter</li>
</ul>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">3D Nozzle Visualization</h3>
<p className="text-slate-300">
The engine design page displays a live 3D nozzle model that updates as you adjust geometry. This helps visualize the converging-diverging profile and verify proportions.
</p>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Ablative Cooling & Erosion</h3>
<p className="text-slate-300 mb-3">
For engines using ablative materials, the designer calculates erosion using pressure-corrected material properties:
</p>
<div className="bg-slate-950 rounded p-3 font-mono text-amber-300 text-sm">
effective_rate = base_rate × (p₀ / p_ref)<sup>n</sup>
</div>
<p className="text-slate-300 mt-3">
where <span className="font-mono text-amber-300">n</span> is the material's pressure exponent. The designer predicts remaining liner thickness after burn and warns if erosion exceeds safe limits.
</p>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Export</h3>
<p className="text-slate-300">
Export your engine design as a structured file for external analysis or documentation purposes.
</p>
</div>
</div>
</section>
{/* Rocket Designer */}
<section id="Rocket Designer" className="space-y-4">
<h2 className="text-3xl font-bold text-white">Rocket Designer</h2>
<p className="text-slate-300">
Configure multi-stage rockets and compute overall mission performance.
</p>
<div className="space-y-4 mt-4">
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Multi-Stage Configuration</h3>
<p className="text-slate-300">
Add, remove, and reorder rocket stages. Each stage has independent propellant mass, dry mass, and engine specification.
</p>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Stage Parameters</h3>
<ul className="space-y-1 text-slate-300">
<li><strong>Propellant Mass:</strong> Total propellant carried by the stage</li>
<li><strong>Dry Mass:</strong> Structure and hardware mass (inert mass)</li>
<li><strong>Specific Impulse (Isp):</strong> Engine performance metric</li>
<li><strong>Burn Time:</strong> Duration of engine firing</li>
</ul>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">3D Rocket Model</h3>
<p className="text-slate-300">
View a visual representation of your multi-stage rocket with relative proportions based on mass budget. This helps verify the design looks reasonable.
</p>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Mission Analysis</h3>
<p className="text-slate-300">
Automatically computes:
</p>
<ul className="space-y-1 text-slate-300 mt-2">
<li>Total Δv budget using Tsiolkovsky equation per stage</li>
<li>Burn times and mass depletion curves</li>
<li>Staging efficiency and payload mass fractions</li>
</ul>
</div>
</div>
</section>
{/* Knowledgebase */}
<section id="Knowledgebase" className="space-y-4">
<h2 className="text-3xl font-bold text-white">Knowledgebase</h2>
<p className="text-slate-300">
Reference database of propellants, materials, and thermodynamic equations.
</p>
<div className="space-y-4 mt-4">
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Fuels & Oxidisers</h3>
<p className="text-slate-300 mb-3">
Database of 30+ propellant substances and pre-configured bipropellant combinations. Each entry includes:
</p>
<ul className="space-y-1 text-slate-300">
<li><strong>Vacuum Isp:</strong> Specific impulse in vacuum</li>
<li><strong>Flame Temperature:</strong> Adiabatic combustion temperature</li>
<li><strong>Optimal O/F Ratio:</strong> Mixture ratio for peak performance</li>
<li><strong>Gamma (γ):</strong> Ratio of specific heats for exhaust gas</li>
<li><strong>Characteristic Velocity (c*):</strong> Combustion chamber efficiency metric</li>
</ul>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Ablative Materials</h3>
<p className="text-slate-300 mb-3">
Library of 7+ ablative materials with properties for thermal protection:
</p>
<ul className="space-y-1 text-slate-300">
<li><strong>Erosion Rate:</strong> Baseline ablation rate at reference pressure</li>
<li><strong>Pressure Exponent (n):</strong> Power-law sensitivity to chamber pressure</li>
<li><strong>Max Temperature:</strong> Upper temperature limit before failure</li>
<li><strong>Density:</strong> Material density for mass calculations</li>
</ul>
</div>
<div className="bg-slate-900 rounded-xl border border-slate-700 p-6">
<h3 className="text-lg font-semibold text-white mb-3">Equations Browser</h3>
<p className="text-slate-300">
Searchable, filterable database of {EQUATIONS.length} physics equations. Filter by:
</p>
<ul className="space-y-1 text-slate-300 mt-2">
<li>Category (Thrust, Isentropic Flow, etc.)</li>
<li>Involved variables</li>
<li>Equation name or description</li>
</ul>
<p className="text-slate-300 mt-2">
Each equation lists all solvable variables and the mathematical relationships.
</p>
</div>
</div>
</section>
{/* Variables Reference */}
<section id="Variables Reference" className="space-y-4">
<h2 className="text-3xl font-bold text-white">Variables Reference</h2>
<p className="text-slate-300">
Complete catalog of {Object.keys(VARIABLES).length} engineering variables used throughout RocketTools. Variables are grouped by physical category.
</p>
<div className="mt-4 space-y-6">
{CATEGORIES.map(category => (
<div key={category} className="space-y-2">
<h3 className="text-lg font-semibold text-white">{category}</h3>
<div className="overflow-x-auto rounded-lg border border-slate-700 bg-slate-900">
<table className="w-full text-sm">
<thead>
<tr className="border-b border-slate-700 bg-slate-800">
<th className="px-4 py-3 text-left text-slate-200 font-medium">Symbol</th>
<th className="px-4 py-3 text-left text-slate-200 font-medium">Name</th>
<th className="px-4 py-3 text-left text-slate-200 font-medium">Units</th>
<th className="px-4 py-3 text-left text-slate-200 font-medium">Description</th>
</tr>
</thead>
<tbody>
{variablesByCategory[category]?.map((variable, idx) => (
<tr
key={variable.id}
className={`border-b border-slate-700 ${idx % 2 === 0 ? 'bg-slate-900' : 'bg-slate-850'}`}
>
<td className="px-4 py-3 font-mono text-amber-300">{variable.symbol}</td>
<td className="px-4 py-3 text-slate-200">{variable.name}</td>
<td className="px-4 py-3 font-mono text-slate-400">{variable.units}</td>
<td className="px-4 py-3 text-slate-300">{variable.description}</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
))}
</div>
</section>
{/* Footer spacing */}
<div className="h-8" />
</div>
</main>
</div>
)
}

View File

@@ -10,11 +10,13 @@ import {
} from '../engine/engineExportImport.js' } from '../engine/engineExportImport.js'
import DesignSection from '../components/engine/DesignSection.jsx' import DesignSection from '../components/engine/DesignSection.jsx'
import EngineModel3D from '../components/engine/EngineModel3D.jsx' import EngineModel3D from '../components/engine/EngineModel3D.jsx'
import NozzleDiagram from '../components/engine/NozzleDiagram.jsx'
import PerformanceCharts from '../components/engine/PerformanceCharts.jsx'
import ErrorBoundary from '../components/ErrorBoundary.jsx' import ErrorBoundary from '../components/ErrorBoundary.jsx'
import { formatValue } from '../engine/format.js' import { formatValue } from '../engine/format.js'
import { getUnitsForFamily } from '../engine/units.js' import { getUnitsForFamily } from '../engine/units.js'
import { ENGINE_FIELD_INFO } from '../engine/engineFieldInfo.js' import { ENGINE_FIELD_INFO } from '../engine/engineFieldInfo.js'
import { ABLATIVE_MATERIALS } from '../engine/knowledgebaseData.js' import { ABLATIVE_MATERIALS, STRUCTURAL_MATERIALS } from '../engine/knowledgebaseData.js'
/* ── Info popup ───────────────────────────────────────────────────── */ /* ── Info popup ───────────────────────────────────────────────────── */
@@ -234,6 +236,8 @@ function ResultSection({ title, children }) {
export default function EnginePage() { export default function EnginePage() {
const importRef = useRef(null) const importRef = useRef(null)
const [showPropellants, setShowPropellants] = useState(false) const [showPropellants, setShowPropellants] = useState(false)
const [showNozzleModal, setShowNozzleModal] = useState(false)
const [showChartsModal, setShowChartsModal] = useState(false)
const { const {
thermoInputs, setThermoInput, thermoInputs, setThermoInput,
chamber, setChamber, chamber, setChamber,
@@ -242,21 +246,23 @@ export default function EnginePage() {
cooling, setCooling, cooling, setCooling,
feedSystem, setFeedSystem, feedSystem, setFeedSystem,
burnTime, setBurnTime, burnTime, setBurnTime,
structure, setStructure,
allThermo, allThermo,
chamberGeometry: cg, chamberGeometry: cg,
nozzleGeometry: ng, nozzleGeometry: ng,
injectorGeometry: ig, injectorGeometry: ig,
coolingResults: cr, coolingResults: cr,
feedResults: fr, feedResults: fr,
structureResults: sr,
loadDesign, loadDesign,
applyPropellant, applyPropellant,
} = useEngineDesign() } = useEngineDesign()
function handleExportJSON() { function handleExportJSON() {
const blob = exportEngineJSON({ const blob = exportEngineJSON({
thermoInputs, chamber, nozzle, injector, cooling, feedSystem, burnTime, thermoInputs, chamber, nozzle, injector, cooling, feedSystem, burnTime, structure,
allThermo, chamberGeometry: cg, nozzleGeometry: ng, allThermo, chamberGeometry: cg, nozzleGeometry: ng,
injectorGeometry: ig, coolingResults: cr, feedResults: fr, injectorGeometry: ig, coolingResults: cr, feedResults: fr, structureResults: sr,
}) })
downloadBlob(blob, 'engine-design.json') downloadBlob(blob, 'engine-design.json')
} }
@@ -657,13 +663,54 @@ export default function EnginePage() {
step="1" step="1"
/> />
</DesignSection> </DesignSection>
<DesignSection title="Structural">
<SelectInput
label="Material"
value={structure.materialId}
onChange={v => setStructure(s => ({ ...s, materialId: v }))}
options={STRUCTURAL_MATERIALS.map(m => ({ value: m.id, label: m.name }))}
infoKey="structuralMaterial"
/>
<NumInput
label="Safety Factor"
value={structure.safetyFactor}
onChange={v => setStructure(s => ({ ...s, safetyFactor: v }))}
infoKey="safetyFactor"
step="0.1"
placeholder="2.0"
/>
</DesignSection>
</div> </div>
{/* ── Centre: 3D Model ── */} {/* ── Centre: 3D Model + Visualization Buttons ── */}
<div className="flex-1 relative border-r border-slate-700 bg-slate-950/50"> <div className="flex-1 border-r border-slate-700 bg-slate-950/50 flex flex-col overflow-hidden">
{/* 3D Model */}
<div className="flex-1 relative flex flex-col">
<ErrorBoundary> <ErrorBoundary>
<EngineModel3D chamberGeometry={cg} nozzleGeometry={ng} /> <EngineModel3D chamberGeometry={cg} nozzleGeometry={ng} />
</ErrorBoundary> </ErrorBoundary>
{/* Quick access buttons overlay */}
<div className="absolute bottom-4 left-4 right-4 flex gap-2 pointer-events-auto">
{cg && ng && (
<button
onClick={() => setShowNozzleModal(true)}
className="px-3 py-2 text-xs bg-blue-700 hover:bg-blue-600 text-white rounded transition-colors whitespace-nowrap"
>
📐 Nozzle Cross-Section
</button>
)}
{allThermo?.gamma && allThermo?.R && allThermo?.T0 && allThermo?.p0 && (
<button
onClick={() => setShowChartsModal(true)}
className="px-3 py-2 text-xs bg-indigo-700 hover:bg-indigo-600 text-white rounded transition-colors whitespace-nowrap"
>
📊 Performance Charts
</button>
)}
</div>
</div>
</div> </div>
{/* ── Right: Results ── */} {/* ── Right: Results ── */}
@@ -796,6 +843,39 @@ export default function EnginePage() {
<p className="text-xs text-slate-600"></p> <p className="text-xs text-slate-600"></p>
)} )}
</ResultSection> </ResultSection>
<ResultSection title="Structural Sizing">
{sr ? (
<>
<div className="text-sm mb-2">
<span className="text-slate-400">Material: </span>
<span className="text-slate-100 font-semibold">{sr.material.name}</span>
</div>
<ResultRow label="Safety Factor" value={sr.safetyFactor} unit="—" />
<ResultRow label="Allowable Stress" value={sr.allowableStress / 1e6} unit="MPa" />
<div className="border-t border-slate-700 my-2 pt-2">
<ResultRow label="Chamber Wall Thickness" value={sr.t_chamber * 1000} unit="mm" />
<ResultRow label="Throat Wall Thickness" value={sr.t_throat * 1000} unit="mm" />
<ResultRow label="Nozzle Exit Wall Thickness" value={sr.t_nozzle_exit * 1000} unit="mm" />
</div>
<div className="border-t border-slate-700 my-2 pt-2">
<ResultRow label="Chamber Mass" value={sr.m_chamber_cyl + sr.m_convergent} unitFamily="mass" defaultUnitId="kg" />
<ResultRow label="Nozzle Mass" value={sr.m_nozzle} unitFamily="mass" defaultUnitId="kg" />
<ResultRow label="Injector Plate Mass" value={sr.m_injector} unitFamily="mass" defaultUnitId="kg" />
</div>
<div className="border-t border-slate-700 mt-2 pt-2">
<div className="flex items-center gap-2 text-sm bg-blue-900/30 border border-blue-700 rounded px-3 py-2">
<span className="text-slate-400">Engine Dry Mass</span>
<span className="font-mono font-semibold text-blue-300">
{formatValue(sr.m_total)} kg
</span>
</div>
</div>
</>
) : (
<p className="text-xs text-slate-600"></p>
)}
</ResultSection>
</div> </div>
</div> </div>
@@ -806,6 +886,55 @@ export default function EnginePage() {
description="Select a propellant to pre-fill γ, R, T₀, O/F, and densities." description="Select a propellant to pre-fill γ, R, T₀, O/F, and densities."
/> />
)} )}
{/* Nozzle Diagram Modal */}
{showNozzleModal && (
<div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4">
<div className="bg-slate-900 rounded-lg shadow-2xl border border-slate-700 w-full max-w-4xl max-h-[90vh] flex flex-col">
<div className="flex items-center justify-between p-4 border-b border-slate-700 shrink-0">
<h2 className="text-lg font-semibold text-slate-100">Nozzle Cross-Section</h2>
<button
onClick={() => setShowNozzleModal(false)}
className="text-slate-400 hover:text-slate-200 text-xl"
>
</button>
</div>
<div className="flex-1 overflow-auto p-6 bg-slate-800">
<ErrorBoundary>
<NozzleDiagram chamberGeometry={cg} nozzleGeometry={ng} nozzleType={nozzle.type} />
</ErrorBoundary>
</div>
</div>
</div>
)}
{/* Performance Charts Modal */}
{showChartsModal && (
<div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4">
<div className="bg-slate-900 rounded-lg shadow-2xl border border-slate-700 w-full max-w-5xl max-h-[90vh] flex flex-col">
<div className="flex items-center justify-between p-4 border-b border-slate-700 shrink-0">
<h2 className="text-lg font-semibold text-slate-100">Performance Analysis</h2>
<button
onClick={() => setShowChartsModal(false)}
className="text-slate-400 hover:text-slate-200 text-xl"
>
</button>
</div>
<div className="flex-1 overflow-auto p-6 bg-slate-800">
<ErrorBoundary>
<PerformanceCharts
allThermo={allThermo}
coolingResults={cr}
burnTime={burnTime}
nozzleType={nozzle.type}
/>
</ErrorBoundary>
</div>
</div>
</div>
)}
</div> </div>
) )
} }