mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[Kinetics] Simplify input for extensible interface reactions
Fixes #1620
This commit is contained in:
parent
5311183966
commit
1b56a06cbb
@ -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.");
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -1722,6 +1722,9 @@ class TestExtensible2(utilities.CanteraTest):
|
||||
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)
|
||||
|
@ -47,7 +47,7 @@ class FooRateData(ct.ExtensibleRateData):
|
||||
return True
|
||||
|
||||
|
||||
@ct.extension(name="interface-foo-rate", data=FooRateData)
|
||||
@ct.extension(name="foo-rate", data=FooRateData)
|
||||
class FooRate(ct.ExtensibleRate):
|
||||
__slots__ = ("A", "E")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user