---
title: "复算 TOV，再与 NICER 和 GW170817 对照"
description: "用独立程序积分一颗中子星，重画公开后验切片，并找出超光速拟合为什么必须停算。"
canonical_url: "https://sandboxphysics.com/zh/stories/neutron-star-interior/repeat-the-tov-calculation/"
language: "zh-CN"
page_type: "story"
alternate_languages:
  en: "https://sandboxphysics.com/stories/neutron-star-interior/repeat-the-tov-calculation/"
last_modified: "2026-11-22"
---

[走进中子星内部](https://sandboxphysics.com/zh/stories/neutron-star-interior/)

# 复算 TOV，再与 NICER 和 GW170817 对照

先算一颗有参照答案的星。下载包里的 Python 程序沿半径积分，Lab 则沿焓积分。焓是从压强换来的坐标，降到零的地方就是星面。

## 在同一个质量上对照两套积分

把复算包解压到空目录，安装里面列出的 Python 依赖。输入 JSON 抄录了 Read 表 III 的三行拟合，再接上同一套近似 SLy 星壳。拟合输入用克每立方厘米和达因每平方厘米。进积分器之前，压强和总能量密度都换成平方公里的倒数。

在解压目录运行第一条命令。Python 程序沿半径用自适应步长推进，每跨一个压强接缝就重新起步，同时积分度规扰动和它的导数。Lab 换成焓坐标，直接积分导数与扰动之比。两套程序都从中心的正则解起步。

打开结果里的 at1p4，找到 SLy。约 1.4 个太阳质量的星，半径 11.7061 公里，Love 数 0.07617，无量纲潮汐形变率 295.63。Python 在压强只剩每平方公里十的负二十二次方时停步。Lab 算到焓为零。另有一个均匀密度球，内部钟速有解析式，可单独检验内外度规的接法。

$$
h(P)=\int_0^P\frac{\mathrm{d}P'}{\varepsilon(P')+P'},\qquad
\alpha(r)=\sqrt{1-2M/R}\,e^{-h(P(r))}
$$

星内静止的钟相对远处的钟走得多快，由焓和星面处的钟速一起决定。

```
python -B scripts/astronomy/ac54/replay_reference.py --eos src/scripts/physics-lab/experiments/neutron-star-interior/model/read-eos.json --output rerun.json
```

Read et al. (2009), Phys. Rev. D 79, 124032 · Hinderer (2008), with the 2009 erratum · Typel et al. (2022), CompOSE reference manual

## 重画两幅观测对照图

NICER 选用 Riley 对 PSR J0030+0451 的热斑加月牙模型，等权表共 12,242 行。第二栏是引力质量，第三栏是赤道半径。半径的第 16、50、84 百分位约为 11.52、12.71、13.84 公里。这三个数字只看了半径一维，画二维图时要把每一行的质量和半径留在一起。

GW170817 使用 GWTC-1 v5 文件里选定的低自旋表。从两颗星在探测器参考系的质量和各自的潮汐形变率，可算出质量比和组合形变率。两个质量共同乘上的红移因子会约掉。8,078 个样本里有 60 个落在图窗之外，但都参加了百分位计算。这套发布的组合形变率，第 5 与第 95 百分位是 144.6 和 892.2。

曲线固定源参考系的啁啾质量为 1.186 个太阳质量，沿质量比依次计算。曲线上的两颗星共用一套状态方程。观测样本则保留已发布表格的低自旋后验。图中可以比较二者重叠在哪里，后验的联合更新需要另建似然和先验。

```
python -B scripts/astronomy/ac54/extract_posteriors.py --nicer-range --members-output nicer-members --gw-hdf5 GW170817_GWTC-1.hdf5 --output posterior-rerun.json
```

Riley et al., Zenodo 3386449 v1.0.0 · LIGO–Virgo GWTC-1, P1800370 v5

## 找一个质量合理、声速却过快的解

看中心密度为 $1.80\times10^{15}\,\mathrm{g\,cm^{-3}}$ 的 APR4 试算。方程给出的质量是太阳的 2.183 倍，乍看很像一颗中子星。它的中心声速平方却达到光速平方的 1.300 倍。这个点必须从可接受序列剔除。要继续往高密度算，得换一套明确的物质假设。

再看一条细一点的检验。多方指数取一，紧致度取 0.20，积分得到 Love 数 0.045886，Hinderer 勘误表给 0.0459。紧致度取 0.15 时，两者分别给 0.078371 和 0.0776。复算保留了两处差值。另用弱引力解析解检查潮汐匹配。

Read et al. (2009), Phys. Rev. D 79, 124032 · Hinderer (2008), with the 2009 erratum

## 本地复算文件

- [复算包，内含代码、输入和固定输出](https://sandboxphysics.com/stories/neutron-star-interior/materials/neutron-star-reproduction.zip)
- [独立积分的结果与基准](https://sandboxphysics.com/stories/neutron-star-interior/materials/reference-results.json)
- [固定版 NICER 与 GW170817 后验分箱](https://sandboxphysics.com/stories/neutron-star-interior/materials/posterior-occupancy.json)
- [GW170817\_GWTC-1.hdf5](https://dcc.ligo.org/public/0157/P1800370/005/GW170817_GWTC-1.hdf5)

## [到 Lab 对照三颗星](https://sandboxphysics.com/zh/labs/neutron-star-interior/)

选 APR4，把中心密度拉到最右边。对照离线失败算例和页面的声速提示，再导出这颗星，比较请求密度和实际积分密度。

[读懂混合星相图和联合状态方程推断](https://sandboxphysics.com/zh/stories/neutron-star-interior/read-hybrid-star-branches/) [回看质量上限是怎么来的](https://sandboxphysics.com/zh/stories/neutron-star-interior/why-a-star-has-a-mass-limit/)

## 来源

- [Read et al. (2009), Phys. Rev. D 79, 124032](https://harvest.aps.org/v2/journals/articles/10.1103/PhysRevD.79.124032/fulltext)

  式 1 至 5、式 23 和表 II、III。原始核物质表与分段拟合分开看。

- [Typel et al. (2022), CompOSE reference manual](https://doi.org/10.1140/epja/s10050-022-00847-y)

  第 3.4 节讲质量、半径和微扰潮汐响应。

- [Hinderer (2008), with the 2009 erratum](https://arxiv.org/pdf/0711.2420v4)

  在流体里解四极度规扰动，再用修订后的式 23 匹配星外解。

- [Riley et al., Zenodo 3386449 v1.0.0](https://zenodo.org/records/3386449)

  ST+PST 第一次运行的等权样本表。配套源码给出各栏顺序，采用 CC BY 4.0。

- [LIGO–Virgo GWTC-1, P1800370 v5](https://dcc.ligo.org/LIGO-P1800370-v5/public)

  GW170817 的 IMRPhenomPv2NRT 低自旋后验样本。星表论文的表 III 给出源参考系啁啾质量。

## 继续阅读

走进中子星内部 · 阅读路径

### 走进中子星内部

1. [文章 **中子星为什么有最大质量**](https://sandboxphysics.com/zh/stories/neutron-star-interior/why-a-star-has-a-mass-limit/)
2. [文章 **简并压强和冷核物质的状态方程**](https://sandboxphysics.com/zh/stories/neutron-star-interior/cold-matter-pressure/)
3. [文章 **用 TOV 方程算一颗静止的中子星**](https://sandboxphysics.com/zh/stories/neutron-star-interior/relativistic-hydrostatic-equilibrium/)
4. [文章 **从 Love 数算到并合前的双星潮汐**](https://sandboxphysics.com/zh/stories/neutron-star-interior/measure-a-static-tide/)
5. [当前页面 **复算 TOV，再与 NICER 和 GW170817 对照**](https://sandboxphysics.com/zh/stories/neutron-star-interior/repeat-the-tov-calculation/)
6. [文章 **读懂混合星相图和联合状态方程推断**](https://sandboxphysics.com/zh/stories/neutron-star-interior/read-hybrid-star-branches/)
