mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
janafThermo: Warnings concerning differing Tcommon are now FatalErrors
This commit is contained in:
@ -206,15 +206,15 @@ inline void Foam::janafThermo<EquationOfState>::operator+=
|
|||||||
|
|
||||||
if (notEqual(Tcommon_, jt.Tcommon_))
|
if (notEqual(Tcommon_, jt.Tcommon_))
|
||||||
{
|
{
|
||||||
WarningIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"janafThermo<EquationOfState>::operator+="
|
"janafThermo<EquationOfState>::operator+="
|
||||||
"(const janafThermo<EquationOfState>& jt) const"
|
"(const janafThermo<EquationOfState>& jt) const"
|
||||||
) << "Tcommon " << Tcommon_ << " != " << jt.Tcommon_
|
) << "Tcommon " << Tcommon_ << " for "
|
||||||
<< ", an average value will be used for the result"
|
<< (this->name().size() ? this->name() : "others")
|
||||||
<< endl;
|
<< " != " << jt.Tcommon_ << " for "
|
||||||
|
<< (jt.name().size() ? jt.name() : "others")
|
||||||
Tcommon_ = molr1*Tcommon_ + molr2*jt.Tcommon_;
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
for
|
for
|
||||||
@ -253,15 +253,15 @@ inline void Foam::janafThermo<EquationOfState>::operator-=
|
|||||||
|
|
||||||
if (notEqual(Tcommon_, jt.Tcommon_))
|
if (notEqual(Tcommon_, jt.Tcommon_))
|
||||||
{
|
{
|
||||||
WarningIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"janafThermo<EquationOfState>::operator-="
|
"janafThermo<EquationOfState>::operator-="
|
||||||
"(const janafThermo<EquationOfState>& jt) const"
|
"(const janafThermo<EquationOfState>& jt) const"
|
||||||
) << "Tcommon " << Tcommon_ << " != " << jt.Tcommon_
|
) << "Tcommon " << Tcommon_ << " for "
|
||||||
<< ", an average value will be used for the result"
|
<< (this->name().size() ? this->name() : "others")
|
||||||
<< endl;
|
<< " != " << jt.Tcommon_ << " for "
|
||||||
|
<< (jt.name().size() ? jt.name() : "others")
|
||||||
Tcommon_ = (molr1*Tcommon_ + molr2*jt.Tcommon_)/(molr1 + molr2);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
for
|
for
|
||||||
@ -316,19 +316,18 @@ inline Foam::janafThermo<EquationOfState> Foam::operator+
|
|||||||
+ molr2*jt2.lowCpCoeffs_[coefLabel];
|
+ molr2*jt2.lowCpCoeffs_[coefLabel];
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar Tcommon = jt1.Tcommon_;
|
|
||||||
if (notEqual(jt1.Tcommon_, jt2.Tcommon_))
|
if (notEqual(jt1.Tcommon_, jt2.Tcommon_))
|
||||||
{
|
{
|
||||||
WarningIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"operator+"
|
"operator+"
|
||||||
"(const janafThermo<EquationOfState>& jt1,"
|
"(const janafThermo<EquationOfState>& jt1,"
|
||||||
" const janafThermo<EquationOfState>& jt2)"
|
" const janafThermo<EquationOfState>& jt2)"
|
||||||
) << "Tcommon " << jt1.Tcommon_ << " != " << jt2.Tcommon_
|
) << "Tcommon " << jt1.Tcommon_ << " for "
|
||||||
<< ", an average value will be used for the result"
|
<< (jt1.name().size() ? jt1.name() : "others")
|
||||||
<< endl;
|
<< " != " << jt2.Tcommon_ << " for "
|
||||||
|
<< (jt2.name().size() ? jt2.name() : "others")
|
||||||
Tcommon = molr1*jt1.Tcommon_ + molr2*jt2.Tcommon_;
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return janafThermo<EquationOfState>
|
return janafThermo<EquationOfState>
|
||||||
@ -336,7 +335,7 @@ inline Foam::janafThermo<EquationOfState> Foam::operator+
|
|||||||
eofs,
|
eofs,
|
||||||
max(jt1.Tlow_, jt2.Tlow_),
|
max(jt1.Tlow_, jt2.Tlow_),
|
||||||
min(jt1.Thigh_, jt2.Thigh_),
|
min(jt1.Thigh_, jt2.Thigh_),
|
||||||
Tcommon,
|
jt1.Tcommon_,
|
||||||
highCpCoeffs,
|
highCpCoeffs,
|
||||||
lowCpCoeffs
|
lowCpCoeffs
|
||||||
);
|
);
|
||||||
@ -375,19 +374,18 @@ inline Foam::janafThermo<EquationOfState> Foam::operator-
|
|||||||
- molr2*jt2.lowCpCoeffs_[coefLabel];
|
- molr2*jt2.lowCpCoeffs_[coefLabel];
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar Tcommon = jt1.Tcommon_;
|
|
||||||
if (notEqual(jt1.Tcommon_, jt2.Tcommon_))
|
if (notEqual(jt1.Tcommon_, jt2.Tcommon_))
|
||||||
{
|
{
|
||||||
WarningIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"operator-"
|
"operator-"
|
||||||
"(const janafThermo<EquationOfState>& jt1,"
|
"(const janafThermo<EquationOfState>& jt1,"
|
||||||
" const janafThermo<EquationOfState>& jt2)"
|
" const janafThermo<EquationOfState>& jt2)"
|
||||||
) << "Tcommon " << jt1.Tcommon_ << " != " << jt2.Tcommon_
|
) << "Tcommon " << jt1.Tcommon_ << " for "
|
||||||
<< ", an average value will be used for the result"
|
<< (jt1.name().size() ? jt1.name() : "others")
|
||||||
<< endl;
|
<< " != " << jt2.Tcommon_ << " for "
|
||||||
|
<< (jt2.name().size() ? jt2.name() : "others")
|
||||||
Tcommon = (molr1*jt1.Tcommon_ + molr2*jt2.Tcommon_)/(molr1 + molr2);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return janafThermo<EquationOfState>
|
return janafThermo<EquationOfState>
|
||||||
@ -395,7 +393,7 @@ inline Foam::janafThermo<EquationOfState> Foam::operator-
|
|||||||
eofs,
|
eofs,
|
||||||
max(jt1.Tlow_, jt2.Tlow_),
|
max(jt1.Tlow_, jt2.Tlow_),
|
||||||
min(jt1.Thigh_, jt2.Thigh_),
|
min(jt1.Thigh_, jt2.Thigh_),
|
||||||
Tcommon,
|
jt1.Tcommon_,
|
||||||
highCpCoeffs,
|
highCpCoeffs,
|
||||||
lowCpCoeffs
|
lowCpCoeffs
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user