添加气瓶计算过程文档

This commit is contained in:
lujingze committed 2026-06-15 09:00:02 +00:00
1 parent f0310b6b40
commit 67b855d7ec
3 files changed
+357 -34

No files matched your search

+17 -3
View File
@@ -1,4 +1,3 @@
import numpy as np
import pytest
from cylinder.gas_cylinder import (
@@ -19,8 +18,6 @@ def test_default_high_pressure_cylinder_state_matches_inputs():
assert abs(cylinder.T - DEFAULT_T_INIT) < 1e-8
assert cylinder.mass > 0
assert cylinder.U > 0
assert cylinder.gamma > 1.0
assert cylinder.compressibility_factor > 0.0
def test_cylinder_accepts_configurable_fluid_pressure_volume_temperature():
@@ -38,6 +35,23 @@ def test_cylinder_accepts_configurable_fluid_pressure_volume_temperature():
assert cylinder.mass > 0
def test_cylinder_state_summary_omits_unused_thermodynamic_helpers():
cylinder = HighPressureGasCylinder()
summary = cylinder.state_summary()
assert set(summary) == {
"fluid",
"V",
"mass",
"rho",
"P",
"T",
"U",
"u",
"h",
}
def test_cylinder_ghost_state_is_stagnant_conservative_vector():
cylinder = HighPressureGasCylinder()
ghost = cylinder.ghost_state()