MCPcopy Create free account
hub / github.com/Cantera/cantera / test_nonreacting

Method test_nonreacting

test/python/test_reactor.py:1673–1686  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1671 """
1672
1673 def test_nonreacting(self):
1674 g = ct.Solution(yaml=self.gas_def)
1675 g.TPX = 300, 101325, 'O2:1.0'
1676 r = ct.FlowReactor(g)
1677 r.mass_flow_rate = 10
1678
1679 net = ct.ReactorNet([r])
1680
1681 x = 0
1682 v0 = r.speed
1683 assert v0 == approx(10 / r.density)
1684 while x < 10.0:
1685 x = net.step()
1686 assert v0 == approx(r.speed)
1687
1688 def test_reacting(self):
1689 g = ct.Solution(yaml=self.gas_def)

Callers

nothing calls this directly

Calls 3

stepMethod · 0.95
SolutionMethod · 0.80
ReactorNetMethod · 0.45

Tested by

no test coverage detected