Skip to main content
Glama

estimate_rocket_sizing

Calculate rocket sizing estimates for target altitude and payload mass using propellant type and design margin parameters.

Instructions

Estimate rocket sizing requirements for target altitude and payload.

Args: target_altitude_m: Target altitude in meters payload_mass_kg: Payload mass in kg propellant_type: Propellant type ('solid' or 'liquid') design_margin: Design margin factor

Returns: JSON string with sizing estimates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_altitude_mYes
payload_mass_kgYes
propellant_typeNosolid
design_marginNo

Implementation Reference

  • Registers the estimate_rocket_sizing tool with the FastMCP server.
    mcp.tool(estimate_rocket_sizing)
  • The MCP tool handler function for 'estimate_rocket_sizing'. It wraps the core logic from integrations, serializes to JSON, and handles import/errors.
    def estimate_rocket_sizing(
        target_altitude_m: float,
        payload_mass_kg: float,
        propellant_type: Literal["solid", "liquid"] = "solid",
        design_margin: float = 1.2,
    ) -> str:
        """Estimate rocket sizing requirements for target altitude and payload.
    
        Args:
            target_altitude_m: Target altitude in meters
            payload_mass_kg: Payload mass in kg
            propellant_type: Propellant type ('solid' or 'liquid')
            design_margin: Design margin factor
    
        Returns:
            JSON string with sizing estimates
        """
        try:
            from ..integrations.rockets import estimate_rocket_sizing as _sizing
    
            result = _sizing(
                target_altitude_m, payload_mass_kg, propellant_type, design_margin
            )
    
            return json.dumps(result, indent=2)
    
        except ImportError:
            return "Rocket sizing not available - install rocketry packages"
        except Exception as e:
            logger.error(f"Rocket sizing error: {str(e)}", exc_info=True)
            return f"Rocket sizing error: {str(e)}"
  • Core helper function implementing the rocket sizing estimation logic using simplified rocket equation, rule-of-thumb ratios for propellants, and geometric estimates.
    def estimate_rocket_sizing(
        target_altitude_m: float, payload_mass_kg: float, propellant_type: str = "solid"
    ) -> dict[str, Any]:
        """
        Estimate rocket sizing for target altitude and payload.
    
        Args:
            target_altitude_m: Target apogee altitude
            payload_mass_kg: Payload mass
            propellant_type: "solid" or "liquid"
    
        Returns:
            Dictionary with sizing estimates
        """
        # Rule-of-thumb ratios for different propellant types
        if propellant_type == "solid":
            isp_s = 250.0  # Specific impulse
            structural_ratio = 0.15  # Structure mass / propellant mass
            thrust_to_weight = 5.0  # Initial T/W ratio
        elif propellant_type == "liquid":
            isp_s = 300.0
            structural_ratio = 0.12
            thrust_to_weight = 4.0
        else:
            isp_s = 250.0
            structural_ratio = 0.15
            thrust_to_weight = 5.0
    
        # Estimate delta-V requirement (simplified)
        # For vertical flight with gravity and drag losses
        # Basic energy approach: need kinetic + potential energy
        potential_energy_per_kg = 9.80665 * target_altitude_m
        # Add gravity losses (roughly 1.5x theoretical for vertical flight)
        # Add drag losses (roughly 10-20% additional)
        delta_v_req = (
            math.sqrt(2 * potential_energy_per_kg) * 1.8
        )  # Factor accounts for losses
    
        # Rocket equation: delta_v = isp * g0 * ln(m_initial / m_final)
        g0 = 9.80665
        mass_ratio = math.exp(delta_v_req / (isp_s * g0))
    
        # Mass breakdown
        # m_initial = payload + structure + propellant
        # m_final = payload + structure
        # mass_ratio = m_initial / m_final = (payload + structure + propellant) / (payload + structure)
    
        # structure = structural_ratio * propellant
        # Let x = propellant mass
        # mass_ratio = (payload + structural_ratio * x + x) / (payload + structural_ratio * x)
        # mass_ratio * (payload + structural_ratio * x) = payload + structural_ratio * x + x
        # mass_ratio * payload + mass_ratio * structural_ratio * x = payload + structural_ratio * x + x
        # mass_ratio * payload - payload = x * (1 + structural_ratio - mass_ratio * structural_ratio)
        # x = (mass_ratio - 1) * payload / (1 + structural_ratio - mass_ratio * structural_ratio)
    
        denominator = 1 + structural_ratio - mass_ratio * structural_ratio
        if denominator <= 0:
            # Impossible mission - need staging
            propellant_mass = float("inf")
        else:
            propellant_mass = (mass_ratio - 1) * payload_mass_kg / denominator
    
        structure_mass = structural_ratio * propellant_mass
        total_mass = payload_mass_kg + structure_mass + propellant_mass
    
        # Thrust requirement
        thrust_n = thrust_to_weight * total_mass * g0
    
        # Rough geometry estimates
        # Assume cylindrical rocket with L/D = 8-12
        density_propellant = 1600.0  # kg/m³ typical solid propellant
        propellant_volume = propellant_mass / density_propellant
    
        # Assume propellant takes 70% of rocket volume
        total_volume = propellant_volume / 0.7
    
        # L/D ratio of 10
        ld_ratio = 10.0
        # V = π * r² * L = π * (D/2)² * L = π * D² * L / 4
        # L = ld_ratio * D
        # V = π * D² * (ld_ratio * D) / 4 = π * ld_ratio * D³ / 4
        # D³ = 4 * V / (π * ld_ratio)
        diameter = (4 * total_volume / (math.pi * ld_ratio)) ** (1 / 3)
        length = ld_ratio * diameter
    
        return {
            "total_mass_kg": total_mass,
            "propellant_mass_kg": propellant_mass,
            "structure_mass_kg": structure_mass,
            "payload_mass_kg": payload_mass_kg,
            "thrust_n": thrust_n,
            "specific_impulse_s": isp_s,
            "mass_ratio": mass_ratio,
            "delta_v_ms": delta_v_req,
            "diameter_m": diameter,
            "length_m": length,
            "thrust_to_weight": thrust_to_weight,
            "feasible": propellant_mass < float("inf"),
        }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cheesejaguar/aerospace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server