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

Method check_ptcombust

test/python/test_composite.py:1237–1248  ·  view source on GitHub ↗
(self, gas, surf)

Source from the content-addressed store, hash-verified

1235 assert gas.mix_diff_coeffs == approx(gas2.mix_diff_coeffs)
1236
1237 def check_ptcombust(self, gas, surf):
1238 generated = load_yaml(self.test_work_path / "ptcombust-generated.yaml")
1239 for key in ("phases", "species", "gas-reactions", "Pt_surf-reactions"):
1240 assert key in generated
1241 assert len(generated["gas-reactions"]) == gas.n_reactions
1242 assert len(generated["Pt_surf-reactions"]) == surf.n_reactions
1243 assert len(generated["species"]) == surf.n_total_species
1244
1245 surf2 = ct.Solution(self.test_work_path / "ptcombust-generated.yaml", "Pt_surf")
1246 assert surf.concentrations == approx(surf2.concentrations)
1247 assert surf.partial_molar_enthalpies == approx(surf2.partial_molar_enthalpies)
1248 assert surf.forward_rate_constants == approx(surf2.forward_rate_constants)
1249
1250 def test_yaml_surface_explicit(self):
1251 gas = ct.Solution("ptcombust.yaml", "gas")

Callers 2

Calls 3

load_yamlFunction · 0.85
lenFunction · 0.85
SolutionMethod · 0.80

Tested by

no test coverage detected