interFoam family of solvers: Improved Crank-Nicolson implementation

Fewer limiter iterations are now required to obtain sufficient boundedness and
restart is more consistent.
This commit is contained in:
Henry Weller
2017-03-06 17:34:10 +00:00
parent 5546fe444d
commit 13aacde1c7
9 changed files with 70 additions and 76 deletions

View File

@ -198,7 +198,7 @@ scalar CrankNicolsonDdtScheme<Type>::coef_
const DDt0Field<GeoField>& ddt0
) const
{
if (mesh().time().timeIndex() - ddt0.startTimeIndex() > 0)
if (mesh().time().timeIndex() > ddt0.startTimeIndex())
{
return 1 + ocCoeff_;
}
@ -216,7 +216,7 @@ scalar CrankNicolsonDdtScheme<Type>::coef0_
const DDt0Field<GeoField>& ddt0
) const
{
if (mesh().time().timeIndex() - ddt0.startTimeIndex() > 1)
if (mesh().time().timeIndex() > ddt0.startTimeIndex() + 1)
{
return 1 + ocCoeff_;
}