Skip to content

Commit

Permalink
janafThermo: Warnings concerning differing Tcommon are now FatalErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry authored and Henry committed Oct 29, 2011
1 parent 3354f73 commit 329e824
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H
Expand Up @@ -206,15 +206,15 @@ inline void Foam::janafThermo<EquationOfState>::operator+=

if (notEqual(Tcommon_, jt.Tcommon_))
{
WarningIn
FatalErrorIn
(
"janafThermo<EquationOfState>::operator+="
"(const janafThermo<EquationOfState>& jt) const"
) << "Tcommon " << Tcommon_ << " != " << jt.Tcommon_
<< ", an average value will be used for the result"
<< endl;

Tcommon_ = molr1*Tcommon_ + molr2*jt.Tcommon_;
) << "Tcommon " << Tcommon_ << " for "
<< (this->name().size() ? this->name() : "others")
<< " != " << jt.Tcommon_ << " for "
<< (jt.name().size() ? jt.name() : "others")
<< exit(FatalError);
}

for
Expand Down Expand Up @@ -253,15 +253,15 @@ inline void Foam::janafThermo<EquationOfState>::operator-=

if (notEqual(Tcommon_, jt.Tcommon_))
{
WarningIn
FatalErrorIn
(
"janafThermo<EquationOfState>::operator-="
"(const janafThermo<EquationOfState>& jt) const"
) << "Tcommon " << Tcommon_ << " != " << jt.Tcommon_
<< ", an average value will be used for the result"
<< endl;

Tcommon_ = (molr1*Tcommon_ + molr2*jt.Tcommon_)/(molr1 + molr2);
) << "Tcommon " << Tcommon_ << " for "
<< (this->name().size() ? this->name() : "others")
<< " != " << jt.Tcommon_ << " for "
<< (jt.name().size() ? jt.name() : "others")
<< exit(FatalError);
}

for
Expand Down Expand Up @@ -316,27 +316,26 @@ inline Foam::janafThermo<EquationOfState> Foam::operator+
+ molr2*jt2.lowCpCoeffs_[coefLabel];
}

scalar Tcommon = jt1.Tcommon_;
if (notEqual(jt1.Tcommon_, jt2.Tcommon_))
{
WarningIn
FatalErrorIn
(
"operator+"
"(const janafThermo<EquationOfState>& jt1,"
" const janafThermo<EquationOfState>& jt2)"
) << "Tcommon " << jt1.Tcommon_ << " != " << jt2.Tcommon_
<< ", an average value will be used for the result"
<< endl;

Tcommon = molr1*jt1.Tcommon_ + molr2*jt2.Tcommon_;
) << "Tcommon " << jt1.Tcommon_ << " for "
<< (jt1.name().size() ? jt1.name() : "others")
<< " != " << jt2.Tcommon_ << " for "
<< (jt2.name().size() ? jt2.name() : "others")
<< exit(FatalError);
}

return janafThermo<EquationOfState>
(
eofs,
max(jt1.Tlow_, jt2.Tlow_),
min(jt1.Thigh_, jt2.Thigh_),
Tcommon,
jt1.Tcommon_,
highCpCoeffs,
lowCpCoeffs
);
Expand Down Expand Up @@ -375,27 +374,26 @@ inline Foam::janafThermo<EquationOfState> Foam::operator-
- molr2*jt2.lowCpCoeffs_[coefLabel];
}

scalar Tcommon = jt1.Tcommon_;
if (notEqual(jt1.Tcommon_, jt2.Tcommon_))
{
WarningIn
FatalErrorIn
(
"operator-"
"(const janafThermo<EquationOfState>& jt1,"
" const janafThermo<EquationOfState>& jt2)"
) << "Tcommon " << jt1.Tcommon_ << " != " << jt2.Tcommon_
<< ", an average value will be used for the result"
<< endl;

Tcommon = (molr1*jt1.Tcommon_ + molr2*jt2.Tcommon_)/(molr1 + molr2);
) << "Tcommon " << jt1.Tcommon_ << " for "
<< (jt1.name().size() ? jt1.name() : "others")
<< " != " << jt2.Tcommon_ << " for "
<< (jt2.name().size() ? jt2.name() : "others")
<< exit(FatalError);
}

return janafThermo<EquationOfState>
(
eofs,
max(jt1.Tlow_, jt2.Tlow_),
min(jt1.Thigh_, jt2.Thigh_),
Tcommon,
jt1.Tcommon_,
highCpCoeffs,
lowCpCoeffs
);
Expand Down

0 comments on commit 329e824

Please sign in to comment.