mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: avoid ambiguous construct from tmp - solvers/ incompressible
This commit is contained in:
@ -121,7 +121,7 @@ void Foam::adjointOutletPressureFvPatchScalarField::write(Ostream& os) const
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
makeNonTemplatedPatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
adjointOutletPressureFvPatchScalarField
|
||||
|
||||
@ -96,10 +96,10 @@ void Foam::adjointOutletVelocityFvPatchVectorField::updateCoeffs()
|
||||
const fvPatchField<vector>& Up =
|
||||
patch().lookupPatchField<volVectorField, vector>("U");
|
||||
|
||||
scalarField Un = mag(patch().nf() & Up);
|
||||
vectorField UtHat = (Up - patch().nf()*Un)/(Un + SMALL);
|
||||
scalarField Un(mag(patch().nf() & Up));
|
||||
vectorField UtHat((Up - patch().nf()*Un)/(Un + SMALL));
|
||||
|
||||
vectorField Uan = patch().nf()*(patch().nf() & patchInternalField());
|
||||
vectorField Uan(patch().nf()*(patch().nf() & patchInternalField()));
|
||||
|
||||
vectorField::operator=(phiap*patch().Sf()/sqr(patch().magSf()) + UtHat);
|
||||
//vectorField::operator=(Uan + UtHat);
|
||||
@ -119,7 +119,7 @@ void Foam::adjointOutletVelocityFvPatchVectorField::write(Ostream& os) const
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
makeNonTemplatedPatchTypeField
|
||||
(
|
||||
fvPatchVectorField,
|
||||
adjointOutletVelocityFvPatchVectorField
|
||||
|
||||
@ -114,7 +114,7 @@ int main(int argc, char *argv[])
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
p.boundaryField().updateCoeffs();
|
||||
volScalarField rAU = 1.0/UEqn().A();
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
U = rAU*UEqn().H();
|
||||
UEqn.clear();
|
||||
phi = fvc::interpolate(U) & mesh.Sf();
|
||||
@ -153,10 +153,13 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
// Adjoint Momentum predictor
|
||||
|
||||
volVectorField adjointTransposeConvection = (fvc::grad(Ua) & U);
|
||||
//volVectorField adjointTransposeConvection = fvc::reconstruct
|
||||
volVectorField adjointTransposeConvection((fvc::grad(Ua) & U));
|
||||
//volVectorField adjointTransposeConvection
|
||||
//(
|
||||
// fvc::reconstruct
|
||||
// (
|
||||
// mesh.magSf()*(fvc::snGrad(Ua) & fvc::interpolate(U))
|
||||
// )
|
||||
//);
|
||||
|
||||
zeroCells(adjointTransposeConvection, inletCells);
|
||||
@ -174,7 +177,7 @@ int main(int argc, char *argv[])
|
||||
solve(UaEqn() == -fvc::grad(pa));
|
||||
|
||||
pa.boundaryField().updateCoeffs();
|
||||
volScalarField rAUa = 1.0/UaEqn().A();
|
||||
volScalarField rAUa(1.0/UaEqn().A());
|
||||
Ua = rAUa*UaEqn().H();
|
||||
UaEqn.clear();
|
||||
phia = fvc::interpolate(Ua) & mesh.Sf();
|
||||
|
||||
@ -60,7 +60,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
fvVectorMatrix divR = turbulence->divDevReff(U);
|
||||
fvVectorMatrix divR(turbulence->divDevReff(U));
|
||||
divR.source() = flowMask & divR.source();
|
||||
|
||||
fvVectorMatrix UEqn
|
||||
|
||||
@ -13,7 +13,7 @@ forAll(patches, patchi)
|
||||
|
||||
if (isA<wallFvPatch>(currPatch))
|
||||
{
|
||||
const vectorField nf = currPatch.nf();
|
||||
const vectorField nf(currPatch.nf());
|
||||
|
||||
forAll(nf, facei)
|
||||
{
|
||||
@ -67,8 +67,10 @@ else
|
||||
label cellId = patches[patchId].faceCells()[faceId];
|
||||
|
||||
// create position array for graph generation
|
||||
scalarField y =
|
||||
scalarField y
|
||||
(
|
||||
wallNormal
|
||||
& (mesh.C().internalField() - mesh.C().boundaryField()[patchId][faceId]);
|
||||
& (mesh.C().internalField() - mesh.C().boundaryField()[patchId][faceId])
|
||||
);
|
||||
|
||||
Info<< " Height to first cell centre y0 = " << y[cellId] << endl;
|
||||
|
||||
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// --- PISO loop
|
||||
|
||||
volScalarField rAU = 1.0/UEqn.A();
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
|
||||
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
volScalarField rAU = 1.0/UEqn.A();
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
|
||||
U = rAU*UEqn.H();
|
||||
phi = (fvc::interpolate(U) & mesh.Sf())
|
||||
|
||||
@ -69,7 +69,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
volScalarField rAU = 1.0/UEqn.A();
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
|
||||
U = rAU*UEqn.H();
|
||||
phi = (fvc::interpolate(U) & mesh.Sf())
|
||||
|
||||
@ -9,7 +9,7 @@ tmp<fvVectorMatrix> UEqn
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
volScalarField rAU = 1.0/UEqn().A();
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
|
||||
if (momentumPredictor)
|
||||
{
|
||||
|
||||
@ -79,7 +79,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
volScalarField rAU = 1.0/UEqn.A();
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
|
||||
U = rAU*UEqn.H();
|
||||
phi = (fvc::interpolate(U) & mesh.Sf())
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
trTU = inv(tTU());
|
||||
trTU().rename("rAU");
|
||||
|
||||
volVectorField gradp = fvc::grad(p);
|
||||
volVectorField gradp(fvc::grad(p));
|
||||
|
||||
for (int UCorr=0; UCorr<nUCorr; UCorr++)
|
||||
{
|
||||
|
||||
@ -36,9 +36,11 @@ scalar waveCoNum = 0.0;
|
||||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
scalarField sumPhi =
|
||||
scalarField sumPhi
|
||||
(
|
||||
fvc::surfaceSum(mag(phi))().internalField()
|
||||
/h.internalField();
|
||||
/ h.internalField()
|
||||
);
|
||||
|
||||
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||
|
||||
|
||||
@ -89,10 +89,10 @@ int main(int argc, char *argv[])
|
||||
// --- PISO loop
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
volScalarField rAU = 1.0/hUEqn.A();
|
||||
surfaceScalarField ghrAUf = magg*fvc::interpolate(h*rAU);
|
||||
volScalarField rAU(1.0/hUEqn.A());
|
||||
surfaceScalarField ghrAUf(magg*fvc::interpolate(h*rAU));
|
||||
|
||||
surfaceScalarField phih0 = ghrAUf*mesh.magSf()*fvc::snGrad(h0);
|
||||
surfaceScalarField phih0(ghrAUf*mesh.magSf()*fvc::snGrad(h0));
|
||||
|
||||
if (rotating)
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
p.boundaryField().updateCoeffs();
|
||||
|
||||
volScalarField AU = UEqn().A();
|
||||
volScalarField AU(UEqn().A());
|
||||
U = UEqn().H()/AU;
|
||||
UEqn.clear();
|
||||
phi = fvc::interpolate(U) & mesh.Sf();
|
||||
|
||||
@ -73,7 +73,7 @@ int main(int argc, char *argv[])
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
p.boundaryField().updateCoeffs();
|
||||
volScalarField rAU = 1.0/UEqn().A();
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
U = rAU*UEqn().H();
|
||||
UEqn.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user