(self)
| 1751 | assert r.thermo.density * r.area * r.speed == approx(mdot) |
| 1752 | |
| 1753 | def test_component_names(self): |
| 1754 | surf = ct.Interface('methane_pox_on_pt.yaml', 'Pt_surf') |
| 1755 | gas = surf.adjacent['gas'] |
| 1756 | r = ct.FlowReactor(gas) |
| 1757 | r.mass_flow_rate = 0.1 |
| 1758 | rsurf = ct.ReactorSurface(surf, r) |
| 1759 | sim = ct.ReactorNet([r]) |
| 1760 | sim.initialize() |
| 1761 | |
| 1762 | assert r.n_vars == 4 + gas.n_species + surf.n_species |
| 1763 | assert sim.n_vars == r.n_vars |
| 1764 | |
| 1765 | for i in range(r.n_vars): |
| 1766 | name = r.component_name(i) |
| 1767 | assert r.component_index(name) == i |
| 1768 | |
| 1769 | with pytest.raises(IndexError, match="No such component: 'spam'"): |
| 1770 | r.component_index('spam') |
| 1771 | |
| 1772 | with pytest.raises(ct.CanteraError, match='out of bounds'): |
| 1773 | r.component_name(200) |
| 1774 | |
| 1775 | class TestFlowReactor2: |
| 1776 | def import_phases(self): |
nothing calls this directly
no test coverage detected