---
title: "独立复算一份基准声波谱"
description: "下载一个只用标准库的 Python 脚本和三组固定参数，复算声波寿命、今天的谱和 LISA 信噪比，再看四个被拒绝的情形。"
canonical_url: "https://sandboxphysics.com/zh/stories/phase-transition-gravitational-waves/recompute-a-benchmark-sound-wave-spectrum/"
language: "zh-CN"
page_type: "story"
alternate_languages:
  en: "https://sandboxphysics.com/stories/phase-transition-gravitational-waves/recompute-a-benchmark-sound-wave-spectrum/"
last_modified: "2026-11-12"
---

[宇宙相变引力波](https://sandboxphysics.com/zh/stories/phase-transition-gravitational-waves/)

# 独立复算一份基准声波谱

Sandbox Physics · 2026-11-12

读完这篇，你会在自己的电脑上复算三组固定相变参数的声波引力波谱，并把每一个中间量和已发表的数值或一项独立计算对上。把 arXiv:2403.03723v2 翻到 2.2.1 节放在旁边。脚本只需要 Python 3.9 或更新版本，不联网。

## 开始前需要什么

先读“从声波寿命算到今天的引力波谱”。需要会在终端里运行 Python 脚本、会看 JSON。

## 资料包里有什么

ZIP 里有四个文件。inputs/benchmarks.json 存着三组基准参数、四个故意越界的情形，以及我们自己袋模型求解器给出的七行表：每个泡壁速度下仍有爆燃解的最大强度。recompute\_benchmark.py 只用 Python 标准库完成计算。expected.json 是我们用 Python 3.9.6 得到的输出。README.md 写明单位、约定和已知局限。

单位：$\beta/H_*$无量纲，泡壁速度以$c$为单位，温度用 GeV，频率用 Hz，能量密度都是无量纲的$h^2\Omega_{\rm GW}$。相对论性自由度固定为$g_*=100$，并假设它等于熵自由度。

输出是在固定输入下求值的参数化模板。资料包里没有任何部分在时间上求解爱因斯坦方程或流体方程。

对应阅读：Original benchmark tutorial materials (standard-library Python) · Caprini et al., Gravitational waves from first-order phase transitions in LISA: reconstruction pipeline and physics interpretation, arXiv:2403.03723v2 / JCAP 10 (2024) 020

## 运行并比对

第一条命令写出你的结果。第二条把每个数和 expected.json 比较，全部在相对容差$10^{-9}$内一致时打印 MATCH。不一致时会列出每个不同字段的路径，告诉你环境或改动在哪一步改变了计算。

```
python3 recompute_benchmark.py inputs/benchmarks.json > my-output.json
python3 recompute_benchmark.py inputs/benchmarks.json --compare expected.json
```

对应阅读：Original benchmark tutorial materials (standard-library Python) · Caprini et al., Gravitational waves from first-order phase transitions in LISA: reconstruction pipeline and physics interpretation, arXiv:2403.03723v2 / JCAP 10 (2024) 020

## 跟着一组参数走完每一步

打开 detonation-lisa-band 这一项：$\alpha=0.2$，$\beta/H_*=50$，$\xi_w=0.9$，$T_*=200\,\mathrm{GeV}$。脚本先判断类型：Jouguet 速度是$0.828$，所以这是爆轰。效率拟合给出$\kappa=0.2742$，于是$K=0.02742$。

接着是泡泡尺寸$H_*R_*=0.05273$、流速$\bar v_f=0.1434$和激波时间$H_*\tau_{\rm sh}=0.3676$，字段 lifetimeLimitedBy 写的是 shock formation。声壳厚度$\Delta_w=0.3585$和$H_{*,0}=3.30\times10^{-5}\,\mathrm{Hz}$给出$f_1=0.1252\,\mathrm{mHz}$、$f_2=0.8729\,\mathrm{mHz}$。

然后是振幅：$h^2\Omega_{\rm int}=2.630\times10^{-11}$，$h^2\Omega_2=1.419\times10^{-11}$，数值求得的谱峰为$1.595\times10^{-11}$，位于$0.677\,\mathrm{mHz}$。峰落在两个拐点之间，因为中间那段仍按$f$上升。最后，A、E 两通道四年的信噪比是 634。

最常见的错误：在$R_*$里直接用泡壁速度，而不是$\max(\xi_w,c_s)$。爆轰时两者相同，错误只在慢爆燃算例里显出来：$H_*R_*$会从$0.0169$变成$0.0117$。

对应阅读：Caprini et al., Gravitational waves from first-order phase transitions in LISA: reconstruction pipeline and physics interpretation, arXiv:2403.03723v2 / JCAP 10 (2024) 020 · Espinosa, Konstandin, No & Servant, Energy budget of cosmological first-order phase transitions, arXiv:1004.4187v1 / JCAP 1006:028 (2010)

## 不依赖模板本身的核对

每个结果都带一个 redshiftCheck。它从熵守恒、弗里德曼方程、微波背景温度$2.7255\,\mathrm{K}$和今天的熵自由度$3.909$重新算出$H_{*,0}$，再和模板常数比较。200 GeV 时得$3.2934\times10^{-5}\,\mathrm{Hz}$，模板是$3.3\times10^{-5}$；稀释因子得$1.6404\times10^{-5}$，模板是$1.64\times10^{-5}$。

字段 expansionSuppressionUpsilon 给出 Guo 等人的因子$\Upsilon$。在我们的测试里，用四阶龙格–库塔法对辐射主导膨胀下的源权重$(a_s/a)^3$积分，重现了他们的解析式；这样检验，不必先相信印出来的公式。基准算例$\Upsilon=0.241$，按他们的规则，振幅比取最小值的规则低三分之一。

仓库里的测试还把效率拟合和我们自己的剖面解比较（离 Jouguet 速度不太近时，最大相对偏差 7.4%），并确认我们的噪声曲线和 Robson、Cornish、Liu 的独立灵敏度曲线在低频之比趋于$20/9$。

对应阅读：Caprini et al., Gravitational waves from first-order phase transitions in LISA: reconstruction pipeline and physics interpretation, arXiv:2403.03723v2 / JCAP 10 (2024) 020 · Guo, Sinha, Vagie & White, Phase transitions in an expanding universe: stochastic gravitational waves in standard and non-standard histories, arXiv:2007.08537v3 / JCAP 01 (2021) 001

## 脚本拒绝的四种情形

failureCases 也是检验的一部分。$\alpha=0.2$、$\xi_w=0.7$的混合型泡壁被拒绝，因为声壳规则$|\xi_w-c_s|$只对亚声速爆燃和爆轰成立；泡壁速度正好等于声速的情形，理由相同。2020 年的 LISA 综述提醒过：接近 Chapman–Jouguet 速度时声壳很薄，谱形公式失效。

$\alpha=0.5$、$\xi_w=0.25$的强慢爆燃被拒绝，因为不存在爆燃剖面，我们算出那里的界是$\alpha=0.429$。$\beta/H_*=2.5$的相变被拒绝，因为泡泡会大到哈勃半径，平直时空里的模板不再适用。改过的脚本如果对其中任何一个给出了谱，说明改动删掉了一条物理检查。

对应阅读：Caprini et al., Detecting gravitational waves from cosmological phase transitions with LISA: an update, arXiv:1910.13125v2 / JCAP (2020), doi:10.1088/1475-7516/2020/03/024 · Original benchmark tutorial materials (standard-library Python)

## 数字背后该带着的误差

效率拟合标称误差小于 15%，经$K^2$进入振幅时还要再放大。振幅常数$A_{\rm sw}=0.11$是不同$\alpha$和$\xi_w$模拟的平均，我们读的那一节没有给出离散程度。对这个算例，三种已发表的激波时间定义相差可达 50%。

arXiv:2403.03723v2 里光学测量噪声的拐角频率印的是$2\times10^{-3}\,\mathrm{mHz}$。我们用 2 mHz，这是 Robson、Cornish 和 Liu 早先 LISA 噪声模型里的值。照字面取印出的数，基准算例信噪比会从 634 变成 716，差 13%。信噪比只考虑了仪器噪声；2024 年的论文认为，天体物理前景很可能显著削弱 LISA 的探测能力。

读下一篇模板论文时可以照着核对：写下单位和$g_*$；查清声壳规则覆盖哪些泡壁类型；自己重算红移常数；找到寿命规则和它对流速的定义；列出公式本该拒绝的情形。

对应阅读：Espinosa, Konstandin, No & Servant, Energy budget of cosmological first-order phase transitions, arXiv:1004.4187v1 / JCAP 1006:028 (2010) · Caprini et al., Gravitational waves from first-order phase transitions in LISA: reconstruction pipeline and physics interpretation, arXiv:2403.03723v2 / JCAP 10 (2024) 020

## 练习与解释性答案

1. 把 detonation-lisa-band 的温度改成 1000 GeV 再跑一次。哪些字段变了，变了多少倍？

   展开解释

   只有频率变：$H_{*,0}$、$f_1$、$f_2$和峰值频率都升高 5 倍。$g_*$不变时振幅不变。信噪比会变，因为谱沿着噪声曲线平移了，所以不是一个简单的倍数。

2. 把慢爆燃算例的泡壁速度改成 0.55，会发生什么？为什么？

   展开解释

   脚本抛出 OutsideTemplateDomain：0.55 离声速 0.577 不到 0.05，那里声壳变薄，模板没有标定。0.05 这个余量是我们定的；论文只说明了规则覆盖哪些类型。

## 动手检验预测

### [用实验室读数核对你的输出](https://sandboxphysics.com/zh/labs/phase-transition-gravitational-waves/)

1. 选“在 LISA 频段响起”这个预设，它用的正是这四个参数；把四个读数和你的输出文件对一对。
2. 把泡壁速度调到 0.7，确认实验室和脚本一样拒绝混合型情形。

## 基准复算教程资料

[下载离线教程 ZIP](https://sandboxphysics.com/stories/phase-transition-gravitational-waves/materials/phase-transition-benchmark-v1.zip) · [阅读单位、版本与适用范围](https://sandboxphysics.com/stories/phase-transition-gravitational-waves/materials/README.md)

只用 Python 标准库，为三个固定基准复算声源寿命、两个拐点频率、今天的模板谱和 LISA 信噪比，并演示四个失败案例怎样被拒绝。它计算的是已发表的参数化模板，不求解爱因斯坦方程或流体方程。

文件、字节与 SHA-256

- [README.md](https://sandboxphysics.com/stories/phase-transition-gravitational-waves/materials/README.md) (6252 B)
  `296087f7e0c72f7c9cb613563064b85abfbaf3318d4b66feef069f35bb7685e6`
- [recompute\_benchmark.py](https://sandboxphysics.com/stories/phase-transition-gravitational-waves/materials/recompute_benchmark.py) (12375 B)
  `f2c7c8359bff16583431c8457e4c1f1cf1c995a1c5fc65b597ca2729a4ddf098`
- [benchmarks.json](https://sandboxphysics.com/stories/phase-transition-gravitational-waves/materials/benchmarks.json) (2329 B)
  `daf8124eedb3f23491f9964205f7d32bcd632fd12a762f63b89f832fb4258dde`
- [expected.json](https://sandboxphysics.com/stories/phase-transition-gravitational-waves/materials/expected.json) (3733 B)
  `1cf760ff6941739c0a13a77e9d2946d05d85c8e229c367a955130d2a934115d8`
- [phase-transition-benchmark-v1.zip](https://sandboxphysics.com/stories/phase-transition-gravitational-waves/materials/phase-transition-benchmark-v1.zip) (9851 B)
  `541d13d3b1b14734d368dd74d8bfe360c935c893c74dd5d2c10206f64fce4bbf`

[上一篇：从声波寿命算到今天的引力波谱](https://sandboxphysics.com/zh/stories/phase-transition-gravitational-waves/from-sound-lifetime-to-the-spectrum-today/) [下一篇：读懂 LISA 声波模板和它的边界](https://sandboxphysics.com/zh/stories/phase-transition-gravitational-waves/read-the-lisa-sound-wave-template-and-its-limits/)

## 来源与计算范围

1. [Caprini et al., Gravitational waves from first-order phase transitions in LISA: reconstruction pipeline and physics interpretation, arXiv:2403.03723v2 / JCAP 10 (2024) 020](https://arxiv.org/abs/2403.03723v2)

   读的是 arXiv v2 的 LaTeX 源文件：摘要与引言、第 2.2.1 节（声波双折幂律、振幅、平均泡间距与红移因子）、第 3 节和附录 A（双参数 LISA 噪声与响应），以及第 5 节开头关于参数重建的部分。噪声公式把光学测量拐点印成 2e-3 mHz；我们的资料用 2 mHz，并同时给出两种结果。图 2 只读了图注。

2. [Caprini et al., Detecting gravitational waves from cosmological phase transitions with LISA: an update, arXiv:1910.13125v2 / JCAP (2020), doi:10.1088/1475-7516/2020/03/024](https://arxiv.org/abs/1910.13125v2)

   只读了 LaTeX 源的两处：声波信号一节（signal.tex 约第 180 至 260 行），以及均方根流体速度和动能占比的定义（prelim.tex 第 171 至 182 行）。只用来对比早期的激波形成时间定义。

3. [Espinosa, Konstandin, No & Servant, Energy budget of cosmological first-order phase transitions, arXiv:1004.4187v1 / JCAP 1006:028 (2010)](https://arxiv.org/abs/1004.4187v1)

   读了单个自相似泡泡的流体方程、爆燃、混合与爆轰三类剖面，以及附录 B 的效率拟合和其“优于 15%”的精度说明。我们在袋模型里自己解出的剖面独立检验这些拟合。

4. [Guo, Sinha, Vagie & White, Phase transitions in an expanding universe: stochastic gravitational waves in standard and non-standard histories, arXiv:2007.08537v3 / JCAP 01 (2021) 001](https://arxiv.org/abs/2007.08537v3)

   读了主 LaTeX 文件里辐射主导宇宙的膨胀压低因子。它和模板的寿命因子并排给出作比较，模板本身没有用它。

5. [Original benchmark tutorial materials (standard-library Python)](https://sandboxphysics.com/stories/phase-transition-gravitational-waves/materials/README.md)

   我们的脚本、三个固定基准、四个失败案例和预期输出。它计算已发表的参数化模板、效率拟合和噪声模型；不求解爱因斯坦方程或流体方程，也不含浏览器引擎代码、论文原文或 LISA 数据。

## 继续阅读

宇宙相变引力波 · 阅读路径

### 从泡泡成核到 LISA 可能看到的谱

1. [文章 **宇宙早期若冒过泡泡，会留下怎样的引力波**](https://sandboxphysics.com/zh/stories/phase-transition-gravitational-waves/what-a-bubbling-early-universe-leaves-in-gravitational-waves/)
2. [文章 **泡泡怎样冒出来，又怎样填满空间**](https://sandboxphysics.com/zh/stories/phase-transition-gravitational-waves/how-bubbles-appear-and-fill-space/)
3. [文章 **泡壁怎样推动等离子体**](https://sandboxphysics.com/zh/stories/phase-transition-gravitational-waves/how-bubble-walls-push-the-plasma/)
4. [文章 **从声波寿命算到今天的引力波谱**](https://sandboxphysics.com/zh/stories/phase-transition-gravitational-waves/from-sound-lifetime-to-the-spectrum-today/)
5. [当前页面 **独立复算一份基准声波谱**](https://sandboxphysics.com/zh/stories/phase-transition-gravitational-waves/recompute-a-benchmark-sound-wave-spectrum/)
6. [文章 **读懂 LISA 声波模板和它的边界**](https://sandboxphysics.com/zh/stories/phase-transition-gravitational-waves/read-the-lisa-sound-wave-template-and-its-limits/)
