惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Announcements
Recent Announcements
爱范儿
爱范儿
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
博客园_首页
IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
Jina AI
Jina AI
月光博客
月光博客
小众软件
小众软件
S
SegmentFault 最新的问题
量子位
阮一峰的网络日志
阮一峰的网络日志
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
The rocket equation explained by coding it
I Want To Learn Programming · 2026-06-15 · via DEV Community

I Want To Learn Programming

The Tsiolkovsky rocket equation is the single most important formula in spaceflight, and it explains why getting to orbit is so brutally hard. It is one line, and coding it makes its consequences (including why rockets have stages) impossible to miss.

The equation

The change in velocity a rocket can achieve, its delta-v, is:

import math

def delta_v(exhaust_velocity, mass_initial, mass_final):
    return exhaust_velocity * math.log(mass_initial / mass_final)

In words: delta-v equals the exhaust velocity times the natural log of the mass ratio (the rocket fully fueled, divided by the rocket empty). Two things give you more delta-v: faster exhaust (better engines), or a bigger mass ratio (more fuel relative to structure).

Why the log is the tyranny

That logarithm is the whole story. Because delta-v grows with the log of the mass ratio, getting more delta-v needs exponentially more fuel. Want to double your delta-v? You do not need twice the fuel, you need the mass ratio squared.

ve = 4500   # m/s, a decent chemical engine
# to reach low Earth orbit you need roughly 9,400 m/s of delta-v
# (after losses). Solve for the mass ratio that requires:
required_ratio = math.exp(9400 / ve)   # about 8.1

A mass ratio of 8 means roughly 88% of the rocket at liftoff has to be propellant, leaving only about 12% for the engines, tanks, structure, and payload combined. That is why rockets are giant tanks with a tiny payload on top. This is "the tyranny of the rocket equation."

Why rockets have stages

Staging is the workaround. Once a tank is empty, you are dragging dead weight, which kills your mass ratio. Dropping spent stages lets the remaining rocket have a fresh, favorable mass ratio. The total delta-v is the sum of each stage's:

def staged_delta_v(stages):
    # stages: list of (ve, m_initial, m_final)
    return sum(delta_v(ve, mi, mf) for ve, mi, mf in stages)

Coding it shows why a single-stage rocket to orbit is so hard with chemical fuel, and why nearly every orbital rocket sheds stages on the way up. The equation is not just trivia; it dictates the shape of every rocket ever flown.

Build the rocketry

The aerospace with Python track builds up from physics like this to real rocketry and simulation, all from scratch and graded in your browser. The first project is free.

One line of physics explains the size of every rocket. Code it, and the whole design logic of spaceflight falls out.