SMART (Sharp and Monotonic Algorithm for Realistic Transport) algorithm is the bounded version of QUICK (Quadratic Upstream Interpolation for Convective Kinematics) algorithm proposed by Gaskell and Lau (1988)[1].
In this article, I used the modified version of SMART algorithm[2].
Modified SMART algorithm compared with QUICK algorithm in NVD diagram:
Source codes:
SMART.H
#ifndef SMART_H
#define SMART_H
#include "vector.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class SMARTLimiter Declaration
\*---------------------------------------------------------------------------*/
template<class LimiterFunc>
class SMARTLimiter
:
public LimiterFunc
{
public:
SMARTLimiter(Istream&)
{}
scalar limiter
(
const scalar cdWeight,
const scalar faceFlux,
const typename LimiterFunc::phiType& phiP,
const typename LimiterFunc::phiType& phiN,
const typename LimiterFunc::gradPhiType& gradcP,
const typename LimiterFunc::gradPhiType& gradcN,
const vector& d
) const
{
scalar r = LimiterFunc::r
(
faceFlux, phiP, phiN, gradcP, gradcN, d
);
return max(min(min(4.0*r, (3.0 + r)/4.0), 4.0/3.0), 0);
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
References:
1. P.H. Gaskell, A.K.C. Lau, Curvature-compensated convective transport; SMART, A new boundedness-preserving transport algorithm, International Journal for Numerical Methods in Fluids, Vol. 8, Iss. 6, pp. 617-641, 1988.
2. F. Moukalled, L. Mangani, M. Darwish, The Finite Volume Method in Computational Fluid Dynamics, Springer, pp. 440-443, 2015.
In this article, I used the modified version of SMART algorithm[2].
Modified SMART algorithm compared with QUICK algorithm in NVD diagram:
Ψ-r relationship of modified SMART algorithm is as follows:
Modified SMART algorithm compared with SuperBee, Minmod algorithms in Sweby's diagram:
I developed this modified SMART scheme based on SuperBee scheme in foam-extend-3.2.
SMART.H
#ifndef SMART_H
#define SMART_H
#include "vector.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class SMARTLimiter Declaration
\*---------------------------------------------------------------------------*/
template<class LimiterFunc>
class SMARTLimiter
:
public LimiterFunc
{
public:
SMARTLimiter(Istream&)
{}
scalar limiter
(
const scalar cdWeight,
const scalar faceFlux,
const typename LimiterFunc::phiType& phiP,
const typename LimiterFunc::phiType& phiN,
const typename LimiterFunc::gradPhiType& gradcP,
const typename LimiterFunc::gradPhiType& gradcN,
const vector& d
) const
{
scalar r = LimiterFunc::r
(
faceFlux, phiP, phiN, gradcP, gradcN, d
);
return max(min(min(4.0*r, (3.0 + r)/4.0), 4.0/3.0), 0);
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
SMART.C
#include "LimitedScheme.H"
#include "Limited01.H"
#include "SMART.H"
#include "DeferredCorrectionLimitedScheme.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
makeLimitedSurfaceInterpolationScheme(SMART, SMARTLimiter)
makeLimitedVSurfaceInterpolationScheme(SMARTV, SMARTLimiter)
makeLLimitedSurfaceInterpolationTypeScheme
(
SMART01,
Limited01Limiter,
SMARTLimiter,
NVDTVD,
magSqr,
scalar
)
// Deferred correction schemes
makeDeferredSurfaceInterpolationScheme(SMARTDC, SMARTLimiter)
makeDeferredVSurfaceInterpolationScheme(SMARTVDC, SMARTLimiter)
makeLDeferredSurfaceInterpolationTypeScheme
(
SMART01DC,
Limited01Limiter,
SMARTLimiter,
NVDTVD,
magSqr,
scalar
)
}
// ************************************************************************* //
1. P.H. Gaskell, A.K.C. Lau, Curvature-compensated convective transport; SMART, A new boundedness-preserving transport algorithm, International Journal for Numerical Methods in Fluids, Vol. 8, Iss. 6, pp. 617-641, 1988.
2. F. Moukalled, L. Mangani, M. Darwish, The Finite Volume Method in Computational Fluid Dynamics, Springer, pp. 440-443, 2015.
Comments
Post a Comment