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