mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: avoid ambiguous construct from tmp - finiteVolume, thermophysicalModels, turbulenceModels
- missed on these on the first sweep
This commit is contained in:
@ -34,8 +34,10 @@ scalar meanMeshCoNum = 0.0;
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
scalarField sumPhi =
|
scalarField sumPhi
|
||||||
fvc::surfaceSum(mag(mesh.phi()))().internalField();
|
(
|
||||||
|
fvc::surfaceSum(mag(mesh.phi()))().internalField()
|
||||||
|
);
|
||||||
|
|
||||||
meshCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
meshCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|
||||||
|
|||||||
@ -34,9 +34,11 @@ scalar meanCoNum = 0.0;
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
scalarField sumPhi =
|
scalarField sumPhi
|
||||||
|
(
|
||||||
fvc::surfaceSum(mag(phi))().internalField()
|
fvc::surfaceSum(mag(phi))().internalField()
|
||||||
/rho.internalField();
|
/ rho.internalField()
|
||||||
|
);
|
||||||
|
|
||||||
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|
||||||
|
|||||||
@ -137,7 +137,7 @@ void Foam::SRFVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
db().lookupObject<SRF::SRFModel>("SRFProperties");
|
db().lookupObject<SRF::SRFModel>("SRFProperties");
|
||||||
|
|
||||||
// Determine patch velocity due to SRF
|
// Determine patch velocity due to SRF
|
||||||
const vectorField SRFVelocity = srf.velocity(patch().Cf());
|
const vectorField SRFVelocity(srf.velocity(patch().Cf()));
|
||||||
|
|
||||||
operator==(-SRFVelocity + inletValue_);
|
operator==(-SRFVelocity + inletValue_);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,8 +34,10 @@ scalar meanCoNum = 0.0;
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
scalarField sumPhi =
|
scalarField sumPhi
|
||||||
fvc::surfaceSum(mag(phi))().internalField();
|
(
|
||||||
|
fvc::surfaceSum(mag(phi))().internalField()
|
||||||
|
);
|
||||||
|
|
||||||
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
{
|
{
|
||||||
volScalarField contErr = fvc::div(phi);
|
volScalarField contErr(fvc::div(phi));
|
||||||
|
|
||||||
scalar sumLocalContErr = runTime.deltaTValue()*
|
scalar sumLocalContErr = runTime.deltaTValue()*
|
||||||
mag(contErr)().weightedAverage(mesh.V()).value();
|
mag(contErr)().weightedAverage(mesh.V()).value();
|
||||||
|
|||||||
@ -120,8 +120,10 @@ void Foam::movingWallVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
const vectorField Up((pp.faceCentres() - oldFc)/mesh.time().deltaTValue());
|
const vectorField Up((pp.faceCentres() - oldFc)/mesh.time().deltaTValue());
|
||||||
|
|
||||||
const volVectorField& U = db().lookupObject<volVectorField>(UName_);
|
const volVectorField& U = db().lookupObject<volVectorField>(UName_);
|
||||||
scalarField phip =
|
scalarField phip
|
||||||
p.patchField<surfaceScalarField, scalar>(fvc::meshPhi(U));
|
(
|
||||||
|
p.patchField<surfaceScalarField, scalar>(fvc::meshPhi(U))
|
||||||
|
);
|
||||||
|
|
||||||
const vectorField n(p.nf());
|
const vectorField n(p.nf());
|
||||||
const scalarField& magSf = p.magSf();
|
const scalarField& magSf = p.magSf();
|
||||||
|
|||||||
@ -382,7 +382,7 @@ CoEulerDdtScheme<Type>::fvmDdt
|
|||||||
|
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalarField rDeltaT = CorDeltaT()().internalField();
|
scalarField rDeltaT(CorDeltaT()().internalField());
|
||||||
|
|
||||||
fvm.diag() = rDeltaT*mesh().V();
|
fvm.diag() = rDeltaT*mesh().V();
|
||||||
|
|
||||||
@ -417,7 +417,7 @@ CoEulerDdtScheme<Type>::fvmDdt
|
|||||||
);
|
);
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalarField rDeltaT = CorDeltaT()().internalField();
|
scalarField rDeltaT(CorDeltaT()().internalField());
|
||||||
|
|
||||||
fvm.diag() = rDeltaT*rho.value()*mesh().V();
|
fvm.diag() = rDeltaT*rho.value()*mesh().V();
|
||||||
|
|
||||||
@ -454,7 +454,7 @@ CoEulerDdtScheme<Type>::fvmDdt
|
|||||||
);
|
);
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalarField rDeltaT = CorDeltaT()().internalField();
|
scalarField rDeltaT(CorDeltaT()().internalField());
|
||||||
|
|
||||||
fvm.diag() = rDeltaT*rho.internalField()*mesh().V();
|
fvm.diag() = rDeltaT*rho.internalField()*mesh().V();
|
||||||
|
|
||||||
|
|||||||
@ -385,7 +385,7 @@ SLTSDdtScheme<Type>::fvmDdt
|
|||||||
|
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalarField rDeltaT = SLrDeltaT()().internalField();
|
scalarField rDeltaT(SLrDeltaT()().internalField());
|
||||||
|
|
||||||
Info<< "max/min rDeltaT " << max(rDeltaT) << " " << min(rDeltaT) << endl;
|
Info<< "max/min rDeltaT " << max(rDeltaT) << " " << min(rDeltaT) << endl;
|
||||||
|
|
||||||
@ -422,7 +422,7 @@ SLTSDdtScheme<Type>::fvmDdt
|
|||||||
);
|
);
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalarField rDeltaT = SLrDeltaT()().internalField();
|
scalarField rDeltaT(SLrDeltaT()().internalField());
|
||||||
|
|
||||||
fvm.diag() = rDeltaT*rho.value()*mesh().V();
|
fvm.diag() = rDeltaT*rho.value()*mesh().V();
|
||||||
|
|
||||||
@ -459,7 +459,7 @@ SLTSDdtScheme<Type>::fvmDdt
|
|||||||
);
|
);
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalarField rDeltaT = SLrDeltaT()().internalField();
|
scalarField rDeltaT(SLrDeltaT()().internalField());
|
||||||
|
|
||||||
fvm.diag() = rDeltaT*rho.internalField()*mesh().V();
|
fvm.diag() = rDeltaT*rho.internalField()*mesh().V();
|
||||||
|
|
||||||
|
|||||||
@ -71,9 +71,9 @@ Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type>::solve
|
|||||||
psi.name()
|
psi.name()
|
||||||
);
|
);
|
||||||
|
|
||||||
scalarField saveDiag = diag();
|
scalarField saveDiag(diag());
|
||||||
|
|
||||||
Field<Type> source = source_;
|
Field<Type> source(source_);
|
||||||
|
|
||||||
// At this point include the boundary source from the coupled boundaries.
|
// At this point include the boundary source from the coupled boundaries.
|
||||||
// This is corrected for the implict part by updateMatrixInterfaces within
|
// This is corrected for the implict part by updateMatrixInterfaces within
|
||||||
@ -227,7 +227,7 @@ Foam::tmp<Foam::Field<Type> > Foam::fvMatrix<Type>::residual() const
|
|||||||
// Loop over field components
|
// Loop over field components
|
||||||
for (direction cmpt=0; cmpt<Type::nComponents; cmpt++)
|
for (direction cmpt=0; cmpt<Type::nComponents; cmpt++)
|
||||||
{
|
{
|
||||||
scalarField psiCmpt = psi_.internalField().component(cmpt);
|
scalarField psiCmpt(psi_.internalField().component(cmpt));
|
||||||
|
|
||||||
scalarField boundaryDiagCmpt(psi_.size(), 0.0);
|
scalarField boundaryDiagCmpt(psi_.size(), 0.0);
|
||||||
addBoundaryDiag(boundaryDiagCmpt, cmpt);
|
addBoundaryDiag(boundaryDiagCmpt, cmpt);
|
||||||
|
|||||||
@ -66,7 +66,7 @@ Foam::fvMatrix<Foam::scalar>::solver
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
scalarField saveDiag = diag();
|
scalarField saveDiag(diag());
|
||||||
addBoundaryDiag(diag(), 0);
|
addBoundaryDiag(diag(), 0);
|
||||||
|
|
||||||
autoPtr<fvMatrix<scalar>::fvSolver> solverPtr
|
autoPtr<fvMatrix<scalar>::fvSolver> solverPtr
|
||||||
@ -102,10 +102,10 @@ Foam::lduMatrix::solverPerformance Foam::fvMatrix<Foam::scalar>::fvSolver::solve
|
|||||||
const_cast<GeometricField<scalar, fvPatchField, volMesh>&>
|
const_cast<GeometricField<scalar, fvPatchField, volMesh>&>
|
||||||
(fvMat_.psi());
|
(fvMat_.psi());
|
||||||
|
|
||||||
scalarField saveDiag = fvMat_.diag();
|
scalarField saveDiag(fvMat_.diag());
|
||||||
fvMat_.addBoundaryDiag(fvMat_.diag(), 0);
|
fvMat_.addBoundaryDiag(fvMat_.diag(), 0);
|
||||||
|
|
||||||
scalarField totalSource = fvMat_.source();
|
scalarField totalSource(fvMat_.source());
|
||||||
fvMat_.addBoundarySource(totalSource, false);
|
fvMat_.addBoundarySource(totalSource, false);
|
||||||
|
|
||||||
// assign new solver controls
|
// assign new solver controls
|
||||||
@ -145,10 +145,10 @@ Foam::lduMatrix::solverPerformance Foam::fvMatrix<Foam::scalar>::solve
|
|||||||
GeometricField<scalar, fvPatchField, volMesh>& psi =
|
GeometricField<scalar, fvPatchField, volMesh>& psi =
|
||||||
const_cast<GeometricField<scalar, fvPatchField, volMesh>&>(psi_);
|
const_cast<GeometricField<scalar, fvPatchField, volMesh>&>(psi_);
|
||||||
|
|
||||||
scalarField saveDiag = diag();
|
scalarField saveDiag(diag());
|
||||||
addBoundaryDiag(diag(), 0);
|
addBoundaryDiag(diag(), 0);
|
||||||
|
|
||||||
scalarField totalSource = source_;
|
scalarField totalSource(source_);
|
||||||
addBoundarySource(totalSource, false);
|
addBoundarySource(totalSource, false);
|
||||||
|
|
||||||
// Solver call
|
// Solver call
|
||||||
|
|||||||
@ -169,8 +169,10 @@ updateCoeffs()
|
|||||||
|
|
||||||
ray.Qr().boundaryField()[patchI] += Iw*(n & ray.dAve());
|
ray.Qr().boundaryField()[patchI] += Iw*(n & ray.dAve());
|
||||||
|
|
||||||
const scalarField Eb =
|
const scalarField Eb
|
||||||
dom.blackBody().bLambda(lambdaId).boundaryField()[patchI];
|
(
|
||||||
|
dom.blackBody().bLambda(lambdaId).boundaryField()[patchI]
|
||||||
|
);
|
||||||
|
|
||||||
forAll(Iw, faceI)
|
forAll(Iw, faceI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -75,7 +75,7 @@ Smagorinsky2::Smagorinsky2
|
|||||||
|
|
||||||
tmp<volSymmTensorField> Smagorinsky2::B() const
|
tmp<volSymmTensorField> Smagorinsky2::B() const
|
||||||
{
|
{
|
||||||
volSymmTensorField D = dev(symm(fvc::grad(U())));
|
volSymmTensorField D(dev(symm(fvc::grad(U()))));
|
||||||
|
|
||||||
return (((2.0/3.0)*I)*k() - 2.0*nuSgs_*D - (2.0*cD2_)*delta()*(D&D));
|
return (((2.0/3.0)*I)*k() - 2.0*nuSgs_*D - (2.0*cD2_)*delta()*(D&D));
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ tmp<fvVectorMatrix> Smagorinsky2::divDevBeff
|
|||||||
volVectorField& U
|
volVectorField& U
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
volTensorField gradU = fvc::grad(U);
|
volTensorField gradU(fvc::grad(U));
|
||||||
|
|
||||||
volSymmTensorField aniNuEff
|
volSymmTensorField aniNuEff
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user