Commit dad09c5e authored by Andrew Heather's avatar Andrew Heather
Browse files

BUG: Correction to commit 8540e6fb

- corrected the mass based correction and updated the misleading function
  arguments

- moved the option to the optimisation switches, e.g.:

    OptimisationSwitches
    {
        experimentalDdtCorr 1;
    }

- default remains off/no (0)
parent 601ebaa9
......@@ -129,6 +129,11 @@ OptimisationSwitches
//- Choose STL ASCII parser: 0=Flex, 1=Ragel, 2=Manual
fileFormats::stl 0;
//- Use the updated ddt correction formulation introduced by openfoam org
// in commit da787200. Default is to use the formulation from v1712
// see ddtScheme.C
experimentalDdtCorr 0;
}
......
......@@ -353,7 +353,7 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
template<class Type>
tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
(
const GeometricField<Type, fvPatchField, volMesh>& U,
const GeometricField<Type, fvPatchField, volMesh>& rhoU,
const fluxFieldType& phi,
const volScalarField& rho
)
......@@ -362,9 +362,9 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
{
return fvcDdtPhiCoeffExperimental
(
U,
rhoU,
phi,
(phi - fvc::dotInterpolate(mesh().Sf(), rho*U))
(phi - fvc::dotInterpolate(mesh().Sf(), rhoU))
/fvc::interpolate(rho)
);
}
......@@ -372,9 +372,9 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
{
return fvcDdtPhiCoeff
(
U,
rhoU,
phi,
(phi - fvc::dotInterpolate(mesh().Sf(), rho*U))
(phi - fvc::dotInterpolate(mesh().Sf(), rhoU))
);
}
}
......
......@@ -257,7 +257,7 @@ public:
tmp<surfaceScalarField> fvcDdtPhiCoeff
(
const GeometricField<Type, fvPatchField, volMesh>& U,
const GeometricField<Type, fvPatchField, volMesh>& rhoU,
const fluxFieldType& phi,
const volScalarField& rho
);
......
......@@ -31,10 +31,10 @@ License
bool Foam::fv::ddtSchemeBase::experimentalDdtCorr
(
Foam::debug::infoSwitch("experimentalDdtCorr", 0)
Foam::debug::optimisationSwitch("experimentalDdtCorr", 0)
);
registerInfoSwitch
registerOptSwitch
(
"experimentalDdtCorr",
bool,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment