Updates on behaviour of limiters. Oliver Borm.

This commit is contained in:
Hrvoje Jasak 2011-01-20 00:48:55 +00:00
parent f68dee507a
commit b59b86bd1e
5 changed files with 21 additions and 7 deletions

View file

@ -113,9 +113,14 @@ public:
} }
// Stabilise for division // Stabilise for division
gradf = stabilise(gradf, VSMALL); // Changed to SMALL to prevent FPE. OB, 14/Jan/2011
gradf = stabilise(gradf, SMALL);
return 2*(gradcf/gradf) - 1; // New formulation. Oliver Borm and Aleks Jemcov
// HJ, 13/Jan/2011
return max(2*(gradcf/gradf) - 1, 0);
// return 2*(gradcf/gradf) - 1;
} }
}; };

View file

@ -114,9 +114,14 @@ public:
} }
// Stabilise for division // Stabilise for division
gradf = stabilise(gradf, VSMALL); //Changed to SMALL to prevent FPE. OB, 14/Jan/2011
gradf = stabilise(gradf, SMALL);
return 2*(gradcf/gradf) - 1; // New formulation. Oliver Borm and Aleks Jemcov
// HJ, 13/Jan/2011
return max(2*(gradcf/gradf) - 1, 0);
// return 2*(gradcf/gradf) - 1;
} }
}; };

View file

@ -121,7 +121,7 @@ public:
this->mesh() this->mesh()
), ),
this->mesh(), this->mesh(),
dimensionedScalar("upwindLimiter", dimless, 0.0) dimless
) )
); );
} }

View file

@ -78,7 +78,11 @@ public:
faceFlux, phiP, phiN, gradcP, gradcN, d faceFlux, phiP, phiN, gradcP, gradcN, d
); );
return r*(r + 1)/(sqr(r) + 1); // New formulation. Oliver Borm and Aleks Jemcov
// HJ, 13/Jan/2011
return (r + 1)/(r + 1/stabilise(r, VSMALL));
// return r*(r + 1)/(sqr(r) + 1);
} }
}; };

View file

@ -120,7 +120,7 @@ template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
linearInterpolate(const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf) linearInterpolate(const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf)
{ {
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tinterp = tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tinterp =
linearInterpolate(tvf()); linearInterpolate(tvf());
tvf.clear(); tvf.clear();
return tinterp; return tinterp;