对齐AMESim管阻孔口与储气耦合

This commit is contained in:
huojiarong committed 2026-08-10 13:07:03 +00:00
1 parent 7671418582
commit 6abcc220de
14 files changed
+817 -65

No files matched your search

+5 -1
View File
@@ -3,6 +3,8 @@ from __future__ import annotations
from dataclasses import dataclass
from typing import Protocol
from app.simulation.core.errors import RecoverableTrialStateError
@dataclass(frozen=True)
class ThermodynamicProperties:
@@ -195,7 +197,9 @@ class IdealGasMedium:
def temperature_from_mass_internal_energy(self, m: float, U: float) -> float:
if m <= 0.0:
raise ValueError("Mass must stay positive when recovering temperature.")
raise RecoverableTrialStateError(
"Mass must stay positive when recovering temperature."
)
return self.temperature_from_internal_energy(U / m)
def pressure(self, m: float, T: float, V: float) -> float: