Skip to content

Commit

Permalink
[Kinetics] Simplify input for extensible interface reactions
Browse files Browse the repository at this point in the history
Fixes #1620
  • Loading branch information
speth committed Jun 12, 2024
1 parent 5311183 commit 1b56a06
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/kinetics/Reaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Reaction::Reaction(const AnyMap& node, const Kinetics& kin)
if (!ba::starts_with(rate_type, "sticking-")) {
rateNode["type"] = "sticking-" + rate_type;
}
} else {
} else if (rate_type == "Arrhenius") { // no explicitly-specified type
throw InputFileError("Reaction::Reaction", input,
"Unable to infer interface reaction type.");
}
Expand Down
1 change: 0 additions & 1 deletion test/data/extensible-reactions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ reactions:
surface-reactions:
- equation: H(S) + OH(S) <=> H2O(S) + PT(S)
type: foo-rate
rate-constant: {}
A: 1.3e+14
E: 71.3
3 changes: 3 additions & 0 deletions test/python/test_reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,9 @@ def test_interface_rate(self):
T = 432.0
surf.adjacent["gas"].TP = T, ct.one_atm
assert surf.forward_rate_constants[0] == approx(1.3e14 * np.exp(-71.3 / T))
input_data = surf.reaction(0).input_data
assert input_data["type"] == "foo-rate"
assert "rate-constant" not in input_data


@ct.extension(name="user-rate-2", data=UserRate1Data)
Expand Down
2 changes: 1 addition & 1 deletion test/python/user_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def update(self, interface):
return True


@ct.extension(name="interface-foo-rate", data=FooRateData)
@ct.extension(name="foo-rate", data=FooRateData)
class FooRate(ct.ExtensibleRate):
__slots__ = ("A", "E")

Expand Down

0 comments on commit 1b56a06

Please sign in to comment.