ddtScheme::fvcDdtPhiCoeff: Reverted to previous flux-normalised scheme
The current Courant number limited formulation is preferable for cases running with VERY small Courant numbers but there are stability issues with it on some cases for which the previous flux-normalised scheme worked well. Overall the previous scheme has proved more reliable and fvcDdtPhiCoeff has been reverted to it pending further research and development in this area which will require funding: https://openfoam.org/news/funding-2019/ https://openfoam.org/maintenance/
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -156,6 +156,8 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
|
||||
const fluxFieldType& phiCorr
|
||||
)
|
||||
{
|
||||
// Courant number limited formulation
|
||||
/*
|
||||
tmp<surfaceScalarField> tddtCouplingCoeff = scalar(1)
|
||||
- min
|
||||
(
|
||||
@ -163,6 +165,16 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
|
||||
*mesh().time().deltaT()*mesh().deltaCoeffs()/mesh().magSf(),
|
||||
scalar(1)
|
||||
);
|
||||
*/
|
||||
|
||||
// Flux normalised formulation
|
||||
tmp<surfaceScalarField> tddtCouplingCoeff = scalar(1)
|
||||
- min
|
||||
(
|
||||
mag(phiCorr)
|
||||
/(mag(phi) + dimensionedScalar("small", phi.dimensions(), SMALL)),
|
||||
scalar(1)
|
||||
);
|
||||
|
||||
surfaceScalarField& ddtCouplingCoeff = tddtCouplingCoeff.ref();
|
||||
|
||||
@ -203,7 +215,7 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
|
||||
const volScalarField& rho
|
||||
)
|
||||
{
|
||||
return fvcDdtPhiCoeff(U, phi, phiCorr/fvc::interpolate(rho));
|
||||
return fvcDdtPhiCoeff(U, phi, phiCorr);
|
||||
}
|
||||
|
||||
|
||||
@ -230,7 +242,7 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
|
||||
(
|
||||
U,
|
||||
phi,
|
||||
(phi - fvc::dotInterpolate(mesh().Sf(), U))/fvc::interpolate(rho)
|
||||
(phi - fvc::dotInterpolate(mesh().Sf(), U))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -347,6 +347,8 @@ localEulerDdtScheme<Type>::fvmDdt
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// Courant number limited formulation
|
||||
template<class Type>
|
||||
tmp<surfaceScalarField> localEulerDdtScheme<Type>::fvcDdtPhiCoeff
|
||||
(
|
||||
@ -355,6 +357,7 @@ tmp<surfaceScalarField> localEulerDdtScheme<Type>::fvcDdtPhiCoeff
|
||||
const fluxFieldType& phiCorr
|
||||
)
|
||||
{
|
||||
// Courant number limited formulation
|
||||
tmp<surfaceScalarField> tddtCouplingCoeff = scalar(1)
|
||||
- min
|
||||
(
|
||||
@ -391,6 +394,7 @@ tmp<surfaceScalarField> localEulerDdtScheme<Type>::fvcDdtPhiCoeff
|
||||
|
||||
return tddtCouplingCoeff;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -215,14 +215,14 @@ public:
|
||||
|
||||
typedef typename ddtScheme<Type>::fluxFieldType fluxFieldType;
|
||||
|
||||
using ddtScheme<Type>::fvcDdtPhiCoeff;
|
||||
// using ddtScheme<Type>::fvcDdtPhiCoeff;
|
||||
|
||||
virtual tmp<surfaceScalarField> fvcDdtPhiCoeff
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& U,
|
||||
const fluxFieldType& phi,
|
||||
const fluxFieldType& phiCorr
|
||||
);
|
||||
// virtual tmp<surfaceScalarField> fvcDdtPhiCoeff
|
||||
// (
|
||||
// const GeometricField<Type, fvPatchField, volMesh>& U,
|
||||
// const fluxFieldType& phi,
|
||||
// const fluxFieldType& phiCorr
|
||||
// );
|
||||
|
||||
virtual tmp<fluxFieldType> fvcDdtUfCorr
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user