Skip to content
Snippets Groups Projects
Commit 21cea554 authored by andy's avatar andy
Browse files

BUG: Corrected I/O for reactions

parent ecd1dd81
No related merge requests found
...@@ -68,8 +68,8 @@ NonEquilibriumReversibleReaction ...@@ -68,8 +68,8 @@ NonEquilibriumReversibleReaction
) )
: :
Reaction<ReactionThermo>(species, thermoDatabase, dict), Reaction<ReactionThermo>(species, thermoDatabase, dict),
fk_(species, dict), fk_(species, dict.subDict("forward")),
rk_(species, dict) rk_(species, dict.subDict("reverse"))
{} {}
...@@ -136,8 +136,20 @@ void Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::write ...@@ -136,8 +136,20 @@ void Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::write
) const ) const
{ {
Reaction<ReactionThermo>::write(os); Reaction<ReactionThermo>::write(os);
os << indent << "forward" << nl;
os << indent << token::BEGIN_BLOCK << nl;
os << incrIndent;
fk_.write(os); fk_.write(os);
os << decrIndent;
os << indent << token::END_BLOCK << nl;
os << indent << "reverse" << nl;
os << indent << token::BEGIN_BLOCK << nl;
os << incrIndent;
rk_.write(os); rk_.write(os);
os << decrIndent;
os << indent << token::END_BLOCK << nl;
} }
......
...@@ -67,10 +67,10 @@ FallOffReactionRate ...@@ -67,10 +67,10 @@ FallOffReactionRate
const dictionary& dict const dictionary& dict
) )
: :
k0_(species, dict), k0_(species, dict.subDict("k0")),
kInf_(species, dict), kInf_(species, dict.subDict("kInf")),
F_(dict), F_(dict.subDict("F")),
thirdBodyEfficiencies_(species, dict) thirdBodyEfficiencies_(species, dict.subDict("thirdBodyEfficiencies"))
{} {}
...@@ -100,10 +100,33 @@ inline void Foam::FallOffReactionRate<ReactionRate, FallOffFunction>::write ...@@ -100,10 +100,33 @@ inline void Foam::FallOffReactionRate<ReactionRate, FallOffFunction>::write
Ostream& os Ostream& os
) const ) const
{ {
os << indent << "k0" << nl;
os << indent << token::BEGIN_BLOCK << nl;
os << incrIndent;
k0_.write(os); k0_.write(os);
os << decrIndent;
os << indent << token::END_BLOCK << nl;
os << indent << "kInf" << nl;
os << indent << token::BEGIN_BLOCK << nl;
os << incrIndent;
kInf_.write(os); kInf_.write(os);
os << decrIndent;
os << indent << token::END_BLOCK << nl;
os << indent << "F" << nl;
os << indent << token::BEGIN_BLOCK << nl;
os << incrIndent;
F_.write(os); F_.write(os);
os << decrIndent;
os << indent << token::END_BLOCK << nl;
os << indent << "thirdBodyEfficiencies" << nl;
os << indent << token::BEGIN_BLOCK << nl;
os << incrIndent;
thirdBodyEfficiencies_.write(os); thirdBodyEfficiencies_.write(os);
os << decrIndent;
os << indent << token::END_BLOCK << nl;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment