diff --git a/applications/solvers/DNS/dnsFoam/dnsFoam.C b/applications/solvers/DNS/dnsFoam/dnsFoam.C index 08073398a7..d5a804841f 100644 --- a/applications/solvers/DNS/dnsFoam/dnsFoam.C +++ b/applications/solvers/DNS/dnsFoam/dnsFoam.C @@ -85,7 +85,8 @@ int main(int argc, char *argv[]) for (int corr=1; corr<=1; corr++) { - volScalarField rAU("Dp", 1.0/UEqn.A()); + volScalarField rAU(1.0/UEqn.A()); + surfaceScalarField Dp("Dp", fvc::interpolate(rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -93,12 +94,12 @@ int main(int argc, char *argv[]) ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, U, phi) + + Dp*fvc::ddtCorr(U, phi) ); fvScalarMatrix pEqn ( - fvm::laplacian(rAU, p) == fvc::div(phiHbyA) + fvm::laplacian(Dp, p) == fvc::div(phiHbyA) ); pEqn.solve(); diff --git a/applications/solvers/combustion/PDRFoam/pEqn.H b/applications/solvers/combustion/PDRFoam/pEqn.H index e1c4274f33..3053d4c68c 100644 --- a/applications/solvers/combustion/PDRFoam/pEqn.H +++ b/applications/solvers/combustion/PDRFoam/pEqn.H @@ -1,6 +1,7 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); + volVectorField HbyA("HbyA", U); HbyA = invA & UEqn.H(); @@ -11,9 +12,9 @@ if (pimple.transonic()) "phid", fvc::interpolate(psi) *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) - ) + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) ); while (pimple.correctNonOrthogonal()) @@ -38,10 +39,9 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho)* ( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi) ) ); diff --git a/applications/solvers/combustion/XiFoam/pEqn.H b/applications/solvers/combustion/XiFoam/pEqn.H index c1effcd60d..83a44ab7c2 100644 --- a/applications/solvers/combustion/XiFoam/pEqn.H +++ b/applications/solvers/combustion/XiFoam/pEqn.H @@ -1,6 +1,8 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -11,9 +13,9 @@ if (pimple.transonic()) "phid", fvc::interpolate(psi) *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) - ) + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) ); fvOptions.makeRelative(fvc::interpolate(psi), phid); @@ -24,7 +26,7 @@ if (pimple.transonic()) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(Dp, p) == fvOptions(psi, p, rho.name()) ); @@ -44,10 +46,9 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) ) ); @@ -59,7 +60,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phiHbyA) - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(Dp, p) == fvOptions(psi, p, rho.name()) ); diff --git a/applications/solvers/combustion/engineFoam/pEqn.H b/applications/solvers/combustion/engineFoam/pEqn.H index 39939333c2..a92e7285ab 100644 --- a/applications/solvers/combustion/engineFoam/pEqn.H +++ b/applications/solvers/combustion/engineFoam/pEqn.H @@ -1,6 +1,8 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -10,7 +12,13 @@ if (pimple.transonic()) ( "phid", fvc::interpolate(psi) - *((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U)) + *( + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + //***HGW + Dp*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) + - fvc::meshPhi(rho, U) + ) ); fvOptions.makeRelative(fvc::interpolate(psi), phid); @@ -41,8 +49,11 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U)) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + //***HGW + Dp*fvc::ddtCorr(rho, U, phi) + ) + - fvc::interpolate(rho)*fvc::meshPhi(rho, U) ); fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA); diff --git a/applications/solvers/combustion/fireFoam/pEqn.H b/applications/solvers/combustion/fireFoam/pEqn.H index 9953e83007..c98ac61f3b 100644 --- a/applications/solvers/combustion/fireFoam/pEqn.H +++ b/applications/solvers/combustion/fireFoam/pEqn.H @@ -1,22 +1,22 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); -surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU)); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); phi.boundaryField() = fvc::interpolate(rho.boundaryField()*U.boundaryField()) & mesh.Sf().boundaryField(); -surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); +surfaceScalarField phig(-Dp*ghf*fvc::snGrad(rho)*mesh.magSf()); surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) ) + phig ); @@ -30,7 +30,7 @@ while (pimple.correctNonOrthogonal()) fvc::ddt(psi, rho)*gh + fvc::div(phiHbyA) + fvm::ddt(psi, p_rgh) - - fvm::laplacian(rhorAUf, p_rgh) + - fvm::laplacian(Dp, p_rgh) == parcels.Srho() + surfaceFilm.Srho() @@ -44,7 +44,7 @@ while (pimple.correctNonOrthogonal()) if (pimple.finalNonOrthogonalIter()) { phi = phiHbyA + p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/rhorAUf); + U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/Dp); U.correctBoundaryConditions(); fvOptions.correct(U); } diff --git a/applications/solvers/combustion/reactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/pEqn.H index 0a8a6ce9d0..0dc5d422db 100644 --- a/applications/solvers/combustion/reactingFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/pEqn.H @@ -1,6 +1,8 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -11,9 +13,9 @@ if (pimple.transonic()) "phid", fvc::interpolate(psi) *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) - ) + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) ); fvOptions.makeRelative(fvc::interpolate(psi), phid); @@ -44,10 +46,9 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) ) ); diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H index 7f312e5030..8602725bdb 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H @@ -6,20 +6,19 @@ thermo.rho() -= psi*p; volScalarField rAU(1.0/UEqn.A()); - surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); - surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); + surfaceScalarField phig(-Dp*ghf*fvc::snGrad(rho)*mesh.magSf()); surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) ) + phig ); @@ -39,7 +38,7 @@ fvScalarMatrix p_rghEqn ( p_rghDDtEqn - - fvm::laplacian(rhorAUf, p_rgh) + - fvm::laplacian(Dp, p_rgh) ); fvOptions.constrain(p_rghEqn); @@ -56,7 +55,7 @@ // Correct the momentum source with the pressure gradient flux // calculated from the relaxed pressure - U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf); + U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/Dp); U.correctBoundaryConditions(); fvOptions.correct(U); K = 0.5*magSqr(U); diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H index 461e1ca8fb..3c92ce8119 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H @@ -6,6 +6,8 @@ thermo.rho() -= psi*p; volScalarField rAU(1.0/UEqn.A()); + surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -14,8 +16,10 @@ surfaceScalarField phiHbyA ( "phiHbyA", - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) ); fvOptions.makeRelative(phiHbyA); @@ -35,7 +39,7 @@ fvScalarMatrix pEqn ( pDDtEqn - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(Dp, p) == fvOptions(psi, p, rho.name()) ); @@ -55,10 +59,9 @@ surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) ) ); @@ -77,7 +80,7 @@ fvScalarMatrix pEqn ( pDDtEqn - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(Dp, p) ); fvOptions.constrain(pEqn); diff --git a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H index fcc40881a1..373bafcd3b 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H @@ -4,6 +4,8 @@ rho = min(rho, rhoMax); rho.relax(); volScalarField rAU(1.0/UEqn().A()); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn().H(); @@ -19,15 +21,13 @@ if (pimple.transonic()) "phid", fvc::interpolate(psi) *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) - ) + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) ); fvOptions.makeRelative(fvc::interpolate(psi), phid); - volScalarField Dp("Dp", rho*rAU); - while (pimple.correctNonOrthogonal()) { fvScalarMatrix pEqn @@ -54,10 +54,9 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) ) ); diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H index c1ceb88c17..d2681663e6 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H @@ -4,6 +4,8 @@ rho = min(rho, rhoMax); rho.relax(); volScalarField rAU(1.0/UEqn().A()); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn().H(); @@ -19,15 +21,13 @@ if (pimple.transonic()) "phid", fvc::interpolate(psi) *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phiAbs) - ) + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phiAbs) + )/fvc::interpolate(rho) ); fvOptions.makeRelative(fvc::interpolate(psi), phid); - volScalarField Dp("Dp", rho*rAU); - while (pimple.correctNonOrthogonal()) { fvScalarMatrix pEqn @@ -54,18 +54,12 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - - fvc::meshPhi(rho, U) - + fvc::ddtPhiCorr(rAU, rho, U, phiAbs) - ) + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phiAbs) ); fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA); - volScalarField Dp("Dp", rho*rAU); - while (pimple.correctNonOrthogonal()) { // Pressure corrector diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C index fb74f2b39a..dac6980917 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" - // Create old-time absolute flux for ddtPhiCorr + // Create old-time absolute flux for ddtCorr surfaceScalarField phiAbs("phiAbs", phi); @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) // Make the fluxes absolute before mesh-motion fvc::makeAbsolute(phi, rho, U); - // Update absolute flux for ddtPhiCorr + // Update absolute flux for ddtCorr phiAbs = phi; #include "setDeltaT.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H index de09cb53e2..f8837f0aa4 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H @@ -20,9 +20,9 @@ if (pimple.transonic()) "phid", fvc::interpolate(psi) *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) - ) + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) ); fvOptions.makeRelative(fvc::interpolate(psi), phid); @@ -64,10 +64,9 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi) ) ); diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H index 364d26a50b..444f5e996a 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H @@ -12,7 +12,9 @@ surfaceScalarField phid ( "phid", - fvc::interpolate(psi)*(fvc::interpolate(HbyA) & mesh.Sf()) + fvc::interpolate(psi) + *(fvc::interpolate(rho*HbyA) & mesh.Sf()) + /fvc::interpolate(rho) ); fvOptions.makeRelative(fvc::interpolate(psi), phid); @@ -47,7 +49,7 @@ surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf()) + fvc::interpolate(rho*HbyA) & mesh.Sf() ); fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA); diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/pEqn.H index 353593b7f4..d61a80ffa8 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/pEqn.H @@ -13,7 +13,9 @@ if (simple.transonic()) surfaceScalarField phid ( "phid", - fvc::interpolate(psi)*(fvc::interpolate(HbyA) & mesh.Sf()) + fvc::interpolate(psi) + *(fvc::interpolate(rho*HbyA) & mesh.Sf()) + /fvc::interpolate(rho) ); surfaceScalarField phic @@ -57,7 +59,7 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf()) + fvc::interpolate(rho*HbyA) & mesh.Sf() ); closedVolume = adjustPhi(phiHbyA, U, p); diff --git a/applications/solvers/compressible/sonicFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/pEqn.H index 4d700b3a41..2832bf421a 100644 --- a/applications/solvers/compressible/sonicFoam/pEqn.H +++ b/applications/solvers/compressible/sonicFoam/pEqn.H @@ -1,22 +1,21 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); surfaceScalarField phid ( "phid", - fvc::interpolate(psi) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) - ) + fvc::interpolate(psi)* + ( + (mesh.Sf() & fvc::interpolate(rho*HbyA)) + + Dp*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) ); - -volScalarField Dp("Dp", rho*rAU); - // Non-orthogonal pressure corrector loop while (pimple.correctNonOrthogonal()) { diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/createRhoUf.H b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/createRhoUf.H new file mode 100644 index 0000000000..bb05d10f66 --- /dev/null +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/createRhoUf.H @@ -0,0 +1,56 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Global + createUf + +Description + Creates and initialises the velocity velocity field Uf. + +\*---------------------------------------------------------------------------*/ + +#ifndef createUf_H +#define createUf_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Info<< "Reading/calculating face velocity rhoUf\n" << endl; + +surfaceVectorField rhoUf +( + IOobject + ( + "rhoUf", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + linearInterpolate(rho*U) +); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H index 21dc48614e..91becd8aa1 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H @@ -1,6 +1,8 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -9,13 +11,14 @@ surfaceScalarField phid "phid", fvc::interpolate(psi) *( - (fvc::interpolate(HbyA) & mesh.Sf()) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + //***HGW + Dp*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) - fvc::meshPhi(rho, U) ) ); -volScalarField Dp("Dp", rho*rAU); - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix pEqn diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C index 2f7ac9962a..2504f19766 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C @@ -44,6 +44,7 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" + #include "createRhoUf.H" #include "initContinuityErrs.H" pimpleControl pimple(mesh); @@ -63,6 +64,12 @@ int main(int argc, char *argv[]) mesh.movePoints(motionPtr->newPoints()); + // Calculate absolute flux from the mapped surface velocity + phi = mesh.Sf() & rhoUf; + + // Make the flux relative to the mesh motion + fvc::makeRelative(phi, rho, U); + #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C index 1ac1ae4ae3..cc7f734afc 100644 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C @@ -76,6 +76,8 @@ int main(int argc, char *argv[]) while (pimple.correct()) { volScalarField rAU(1.0/UEqn.A()); + surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + U = rAU*UEqn.H(); surfaceScalarField phid @@ -83,13 +85,12 @@ int main(int argc, char *argv[]) "phid", psi *( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) - ) + (fvc::interpolate(rho*U) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) ); phi = (rhoO/psi)*phid; - volScalarField Dp("Dp", rho*rAU); fvScalarMatrix pEqn ( diff --git a/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C b/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C index 51f04820eb..d920e41000 100644 --- a/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C +++ b/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C @@ -93,6 +93,8 @@ int main(int argc, char *argv[]) for (int corr=0; corr turbulence - ( - incompressible::turbulenceModel::New(U, phi, laminarTransport) - ); diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createUf.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createUf.H new file mode 100644 index 0000000000..aab92ce0e2 --- /dev/null +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createUf.H @@ -0,0 +1,56 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Global + createUf + +Description + Creates and initialises the velocity velocity field Uf. + +\*---------------------------------------------------------------------------*/ + +#ifndef createUf_H +#define createUf_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Info<< "Reading/calculating face velocity Uf\n" << endl; + +surfaceVectorField Uf +( + IOobject + ( + "Uf", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + linearInterpolate(U) +); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H index c9c0ce3c58..827daa4ce8 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H @@ -1,3 +1,5 @@ +surfaceScalarField Dp("Dp", fvc::interpolate(rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn().H(); @@ -10,7 +12,7 @@ surfaceScalarField phiHbyA ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, U, phiAbs) + + Dp*fvc::ddtCorr(U, Uf) ); if (p.needReference()) @@ -24,7 +26,7 @@ while (pimple.correctNonOrthogonal()) { fvScalarMatrix pEqn ( - fvm::laplacian(rAU, p) == fvc::div(phiHbyA) + fvm::laplacian(Dp, p) == fvc::div(phiHbyA) ); pEqn.setReference(pRefCell, pRefValue); @@ -42,9 +44,15 @@ while (pimple.correctNonOrthogonal()) // Explicitly relax pressure for momentum corrector p.relax(); -// Make the fluxes relative to the mesh motion -fvc::makeRelative(phi, U); - U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); fvOptions.correct(U); + +{ + Uf = fvc::interpolate(U); + surfaceVectorField n(mesh.Sf()/mesh.magSf()); + Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf()); +} + +// Make the fluxes relative to the mesh motion +fvc::makeRelative(phi, U); diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C index 883a20f6cf..12b0b438a3 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C @@ -51,15 +51,13 @@ int main(int argc, char *argv[]) pimpleControl pimple(mesh); #include "createFields.H" + #include "createUf.H" #include "createFvOptions.H" #include "readTimeControls.H" #include "createPcorrTypes.H" #include "CourantNo.H" #include "setInitialDeltaT.H" - // Create old-time absolute flux for ddtPhiCorr - surfaceScalarField phiAbs("phiAbs", phi); - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -69,12 +67,6 @@ int main(int argc, char *argv[]) #include "readControls.H" #include "CourantNo.H" - // Make the fluxes absolute - fvc::makeAbsolute(phi, U); - - // Update absolute flux for ddtPhiCorr - phiAbs = phi; - #include "setDeltaT.H" runTime++; @@ -83,12 +75,15 @@ int main(int argc, char *argv[]) mesh.update(); + // Calculate absolute flux from the mapped surface velocity + phi = mesh.Sf() & Uf; + if (mesh.changing() && correctPhi) { #include "correctPhi.H" } - // Make the fluxes relative to the mesh motion + // Make the flux relative to the mesh motion fvc::makeRelative(phi, U); if (mesh.changing() && checkMeshCourantNo) diff --git a/applications/solvers/incompressible/pisoFoam/pisoFoam.C b/applications/solvers/incompressible/pisoFoam/pisoFoam.C index 1e45897e75..ecbb02ff20 100644 --- a/applications/solvers/incompressible/pisoFoam/pisoFoam.C +++ b/applications/solvers/incompressible/pisoFoam/pisoFoam.C @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, U, phi) + + fvc::interpolate(rAU)*fvc::ddtCorr(U, phi) ); adjustPhi(phiHbyA, U, p); diff --git a/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C b/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C index f279f91eec..2107e789af 100644 --- a/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C +++ b/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C @@ -111,7 +111,7 @@ int main(int argc, char *argv[]) ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, h, hU, phi) + + fvc::interpolate(rAU)*fvc::ddtCorr(h, hU, phi) - phih0 ); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H index 82f1e9ff63..200ea289d8 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H @@ -1,6 +1,8 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -11,9 +13,9 @@ if (pimple.transonic()) "phid", fvc::interpolate(psi) *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) - ) + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) ); fvOptions.makeRelative(fvc::interpolate(psi), phid); @@ -24,7 +26,7 @@ if (pimple.transonic()) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(Dp, p) == coalParcels.Srho() + fvOptions(psi, p, rho.name()) @@ -45,10 +47,9 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) ) ); @@ -60,7 +61,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phiHbyA) - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(Dp, p) == coalParcels.Srho() + fvOptions(psi, p, rho.name()) diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H index 7df99b9b94..1e504462b6 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H @@ -1,19 +1,19 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); -surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU)); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); -surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); +surfaceScalarField phig(-Dp*ghf*fvc::snGrad(rho)*mesh.magSf()); surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) ) + phig ); @@ -27,7 +27,7 @@ while (pimple.correctNonOrthogonal()) fvc::ddt(psi, rho)*gh + fvc::div(phiHbyA) + fvm::ddt(psi, p_rgh) - - fvm::laplacian(rhorAUf, p_rgh) + - fvm::laplacian(Dp, p_rgh) == parcels.Srho() + surfaceFilm.Srho() @@ -41,7 +41,7 @@ while (pimple.correctNonOrthogonal()) if (pimple.finalNonOrthogonalIter()) { phi = phiHbyA + p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/rhorAUf); + U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/Dp); U.correctBoundaryConditions(); fvOptions.correct(U); } diff --git a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C index 34aecb65b4..7481ae79cd 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C @@ -30,9 +30,6 @@ Description parcels and porous media, including run-time selectable finitite volume options, e.g. sources, constraints - Note: ddtPhiCorr not used here when porous zones are active - - not well defined for porous calculations - \*---------------------------------------------------------------------------*/ #include "fvCFD.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H index 6dd16f0bdb..420bc1ef0c 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H @@ -6,16 +6,17 @@ thermo.rho() -= psi*p; volScalarField rAU(1.0/UEqn.A()); + surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) ) ); @@ -35,7 +36,7 @@ fvScalarMatrix pEqn ( pDDtEqn - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(Dp, p) ); fvOptions.constrain(pEqn); diff --git a/applications/solvers/lagrangian/sprayFoam/pEqn.H b/applications/solvers/lagrangian/sprayFoam/pEqn.H index af65d3016b..f62a17286c 100644 --- a/applications/solvers/lagrangian/sprayFoam/pEqn.H +++ b/applications/solvers/lagrangian/sprayFoam/pEqn.H @@ -1,6 +1,8 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -11,9 +13,9 @@ if (pimple.transonic()) "phid", fvc::interpolate(psi) *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) - ) + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) ); fvOptions.makeRelative(fvc::interpolate(psi), phid); @@ -24,7 +26,7 @@ if (pimple.transonic()) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(Dp, p) == parcels.Srho() + fvOptions(psi, p, rho.name()) @@ -45,10 +47,9 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) ) ); @@ -60,7 +61,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phiHbyA) - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(Dp, p) == parcels.Srho() + fvOptions(psi, p, rho.name()) diff --git a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/pEqn.H b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/pEqn.H index cf7acbd602..b7de7e2f79 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/pEqn.H +++ b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/pEqn.H @@ -1,6 +1,8 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); +surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -11,8 +13,11 @@ if (pimple.transonic()) "phid", fvc::interpolate(psi) *( - ((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U)) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + //***HGW + Dp*fvc::ddtCorr(rho, U, phi) + )/fvc::interpolate(rho) + - fvc::meshPhi(rho, U) ) ); @@ -24,7 +29,7 @@ if (pimple.transonic()) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(Dp, p) == parcels.Srho() + fvOptions(psi, p, rho.name()) @@ -45,11 +50,11 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - ((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U)) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(HbyA) & mesh.Sf()) + //***HGW + Dp*fvc::ddtCorr(rho, U, phi) ) + - fvc::interpolate(rho)*fvc::meshPhi(rho, U) ); fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA); @@ -60,7 +65,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phiHbyA) - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(Dp, p) == parcels.Srho() + fvOptions(psi, p, rho.name()) diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H index 5ad7fdeb66..f869961a3c 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H @@ -12,16 +12,16 @@ surfaceScalarField rhof("rhof", fvc::interpolate(rho)); volScalarField rAU(1.0/UEqn.A()); - surfaceScalarField rAUf("Dp", rhof*fvc::interpolate(rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); phiv = (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phivAbs); + + Dp*fvc::ddtCorr(U, phivAbs); fvc::makeRelative(phiv, U); - surfaceScalarField phiGradp(rAUf*mesh.magSf()*fvc::snGrad(p)); + surfaceScalarField phiGradp(Dp*mesh.magSf()*fvc::snGrad(p)); phiv -= phiGradp/rhof; @@ -35,7 +35,7 @@ + psi*correction(fvm::ddt(p)) + fvc::div(phiv, rho) + fvc::div(phiGradp) - - fvm::laplacian(rAUf, p) + - fvm::laplacian(Dp, p) ); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); diff --git a/applications/solvers/multiphase/cavitatingFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/pEqn.H index da43e67ce7..e9d059aadb 100644 --- a/applications/solvers/multiphase/cavitatingFoam/pEqn.H +++ b/applications/solvers/multiphase/cavitatingFoam/pEqn.H @@ -12,15 +12,15 @@ surfaceScalarField rhof("rhof", fvc::interpolate(rho)); volScalarField rAU(1.0/UEqn.A()); - surfaceScalarField rAUf("Dp", rhof*fvc::interpolate(rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); phiv = (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phiv); + + Dp*fvc::ddtCorr(U, phiv); - surfaceScalarField phiGradp(rAUf*mesh.magSf()*fvc::snGrad(p)); + surfaceScalarField phiGradp(Dp*mesh.magSf()*fvc::snGrad(p)); phiv -= phiGradp/rhof; @@ -32,7 +32,7 @@ - (rhol0 + (psil - psiv)*pSat)*fvc::ddt(alphav) - pSat*fvc::ddt(psi) + fvc::div(phiv, rho) + fvc::div(phiGradp) - - fvm::laplacian(rAUf, p) + - fvm::laplacian(Dp, p) ); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index 1319378821..adc380978c 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -1,6 +1,6 @@ { volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -9,7 +9,7 @@ ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) ); phi = phiHbyA; @@ -18,7 +18,7 @@ ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf() + )*Dp*mesh.magSf() ); phiHbyA += phig; @@ -70,7 +70,7 @@ fvScalarMatrix p_rghEqnIncomp ( fvc::div(phiHbyA) - - fvm::laplacian(rAUf, p_rgh) + - fvm::laplacian(Dp, p_rgh) ); solve @@ -97,7 +97,7 @@ phi = phiHbyA + p_rghEqnIncomp.flux(); U = HbyA - + rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf); + + rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/Dp); U.correctBoundaryConditions(); } } diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H b/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H index 5d2acc8b68..be0e723493 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H @@ -1,6 +1,6 @@ { volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -9,7 +9,7 @@ ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) ); adjustPhi(phiHbyA, U, p_rgh); mrfZones.makeRelative(phiHbyA); @@ -20,7 +20,7 @@ ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf() + )*Dp*mesh.magSf() ); phiHbyA += phig; @@ -29,7 +29,7 @@ { fvScalarMatrix p_rghEqn ( - fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA) + fvm::laplacian(Dp, p_rgh) == fvc::div(phiHbyA) ); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); @@ -40,7 +40,7 @@ { phi = phiHbyA - p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); + U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/Dp); U.correctBoundaryConditions(); fvOptions.correct(U); } diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/correctPhi.H b/applications/solvers/multiphase/interFoam/interDyMFoam/correctPhi.H index 75560b6337..deb4edc388 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/correctPhi.H +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/correctPhi.H @@ -1,20 +1,27 @@ +if (mesh.changing()) { - #include "continuityErrs.H" - - wordList pcorrTypes - ( - p_rgh.boundaryField().size(), - zeroGradientFvPatchScalarField::typeName - ); - - forAll (p_rgh.boundaryField(), i) + forAll(U.boundaryField(), patchI) { - if (p_rgh.boundaryField()[i].fixesValue()) + if (U.boundaryField()[patchI].fixesValue()) { - pcorrTypes[i] = fixedValueFvPatchScalarField::typeName; + U.boundaryField()[patchI].initEvaluate(); } } + forAll(U.boundaryField(), patchI) + { + if (U.boundaryField()[patchI].fixesValue()) + { + U.boundaryField()[patchI].evaluate(); + + phi.boundaryField()[patchI] = + U.boundaryField()[patchI] + & mesh.Sf().boundaryField()[patchI]; + } + } +} + +{ volScalarField pcorr ( IOobject @@ -30,17 +37,13 @@ pcorrTypes ); - dimensionedScalar rAUf("(1|A(U))", dimTime/rho.dimensions(), 1.0); - - adjustPhi(phi, U, pcorr); - - fvc::makeAbsolute(phi, U); + dimensionedScalar Dp("Dp", dimTime/rho.dimensions(), 1.0); while (pimple.correctNonOrthogonal()) { fvScalarMatrix pcorrEqn ( - fvm::laplacian(rAUf, pcorr) == fvc::div(phi) + fvm::laplacian(Dp, pcorr) == fvc::div(phi) ); pcorrEqn.setReference(pRefCell, pRefValue); @@ -49,9 +52,6 @@ if (pimple.finalNonOrthogonalIter()) { phi -= pcorrEqn.flux(); - phiAbs = phi; - phiAbs.oldTime() = phi; - fvc::makeRelative(phi, U); } } } diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/createPcorrTypes.H b/applications/solvers/multiphase/interFoam/interDyMFoam/createPcorrTypes.H new file mode 100644 index 0000000000..dfd4afb49b --- /dev/null +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/createPcorrTypes.H @@ -0,0 +1,13 @@ + wordList pcorrTypes + ( + p_rgh.boundaryField().size(), + zeroGradientFvPatchScalarField::typeName + ); + + for (label i=0; i. + +Global + createUf + +Description + Creates and initialises the velocity velocity field Uf. + +\*---------------------------------------------------------------------------*/ + +#ifndef createUf_H +#define createUf_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Info<< "Reading/calculating face velocity Uf\n" << endl; + +surfaceVectorField Uf +( + IOobject + ( + "Uf", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + linearInterpolate(U) +); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C index 0c22dd01b7..75e4c2f8d4 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C @@ -50,15 +50,13 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createDynamicFvMesh.H" #include "initContinuityErrs.H" - #include "createFields.H" pimpleControl pimple(mesh); + #include "createFields.H" + #include "createUf.H" #include "readTimeControls.H" - - surfaceScalarField phiAbs("phiAbs", phi); - fvc::makeAbsolute(phiAbs, U); - + #include "createPcorrTypes.H" #include "correctPhi.H" #include "CourantNo.H" #include "setInitialDeltaT.H" @@ -80,21 +78,7 @@ int main(int argc, char *argv[]) scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); - { - // Ensure old-time U exists for mapping - U.oldTime(); - - // Calculate the relative velocity used to map the relative flux phi - volVectorField Urel("Urel", U); - - if (mesh.moving()) - { - Urel -= fvc::reconstruct(fvc::meshPhi(U)); - } - - // Do any mesh changes - mesh.update(); - } + mesh.update(); if (mesh.changing()) { @@ -108,7 +92,13 @@ int main(int argc, char *argv[]) if (mesh.changing() && correctPhi) { + // Calculate absolute flux from the mapped surface velocity + phi = mesh.Sf() & Uf; + #include "correctPhi.H" + + // Make the flux relative to the mesh motion + fvc::makeRelative(phi, U); } if (mesh.changing() && checkMeshCourantNo) diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H index 6fa4330997..51190711c6 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H @@ -1,6 +1,6 @@ { volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -9,7 +9,7 @@ ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phiAbs) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf) ); if (p_rgh.needReference()) @@ -19,14 +19,14 @@ fvc::makeAbsolute(phiHbyA, U); } - phiAbs = phiHbyA; + surfaceScalarField phiAbs("phiAbs", phiHbyA); surfaceScalarField phig ( ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf() + )*Dp*mesh.magSf() ); phiHbyA += phig; @@ -35,7 +35,7 @@ { fvScalarMatrix p_rghEqn ( - fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA) + fvm::laplacian(Dp, p_rgh) == fvc::div(phiHbyA) ); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); @@ -46,7 +46,7 @@ { phi = phiHbyA - p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); + U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/Dp); U.correctBoundaryConditions(); fvOptions.correct(U); } @@ -54,7 +54,11 @@ #include "continuityErrs.H" - phiAbs = phi; + { + Uf = fvc::interpolate(U); + surfaceVectorField n(mesh.Sf()/mesh.magSf()); + Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf()); + } // Make the fluxes relative to the mesh motion fvc::makeRelative(phi, U); diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H index 0ec531f0dd..d8651bfa81 100644 --- a/applications/solvers/multiphase/interFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/pEqn.H @@ -1,6 +1,6 @@ { volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -9,7 +9,7 @@ ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) ); adjustPhi(phiHbyA, U, p_rgh); @@ -20,7 +20,7 @@ ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf() + )*Dp*mesh.magSf() ); phiHbyA += phig; @@ -29,7 +29,7 @@ { fvScalarMatrix p_rghEqn ( - fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA) + fvm::laplacian(Dp, p_rgh) == fvc::div(phiHbyA) ); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); @@ -40,7 +40,7 @@ { phi = phiHbyA - p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); + U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/Dp); U.correctBoundaryConditions(); fvOptions.correct(U); } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C index da11697426..1246ee203d 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C @@ -60,14 +60,13 @@ int main(int argc, char *argv[]) #include "createDynamicFvMesh.H" #include "readGravitationalAcceleration.H" #include "initContinuityErrs.H" - #include "createFields.H" - #include "readTimeControls.H" pimpleControl pimple(mesh); - surfaceScalarField phiAbs("phiAbs", phi); - fvc::makeAbsolute(phiAbs, U); - + #include "createFields.H" + #include "../interFoam/interDyMFoam/createUf.H" + #include "readTimeControls.H" + #include "../interFoam/interDyMFoam/createPcorrTypes.H" #include "../interFoam/interDyMFoam/correctPhi.H" #include "CourantNo.H" #include "setInitialDeltaT.H" @@ -88,21 +87,7 @@ int main(int argc, char *argv[]) scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); - { - // Ensure old-time U exists for mapping - U.oldTime(); - - // Calculate the relative velocity used to map the relative flux phi - volVectorField Urel("Urel", U); - - if (mesh.moving()) - { - Urel -= fvc::reconstruct(fvc::meshPhi(U)); - } - - // Do any mesh changes - mesh.update(); - } + mesh.update(); if (mesh.changing()) { @@ -116,7 +101,13 @@ int main(int argc, char *argv[]) if (mesh.changing() && correctPhi) { + // Calculate absolute flux from the mapped surface velocity + phi = mesh.Sf() & Uf; + #include "../interFoam/interDyMFoam/correctPhi.H" + + // Make the flux relative to the mesh motion + fvc::makeRelative(phi, U); } if (mesh.changing() && checkMeshCourantNo) diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H index afb6478b9d..1169de5c54 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H @@ -1,6 +1,6 @@ { volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -9,7 +9,7 @@ ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phiAbs) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf) ); if (p_rgh.needReference()) @@ -19,14 +19,14 @@ fvc::makeAbsolute(phiHbyA, U); } - phiAbs = phiHbyA; + surfaceScalarField phiAbs("phiAbs", phiHbyA); surfaceScalarField phig ( ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf() + )*Dp*mesh.magSf() ); phiHbyA += phig; @@ -39,7 +39,7 @@ { fvScalarMatrix p_rghEqn ( - fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh) + fvc::div(phiHbyA) - fvm::laplacian(Dp, p_rgh) - (vDotvP - vDotcP)*(pSat - rho*gh) + fvm::Sp(vDotvP - vDotcP, p_rgh) ); @@ -51,13 +51,17 @@ { phi = phiHbyA + p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf); + U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/Dp); U.correctBoundaryConditions(); fvOptions.correct(U); } } - phiAbs = phi; + { + Uf = fvc::interpolate(U); + surfaceVectorField n(mesh.Sf()/mesh.magSf()); + Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf()); + } // Make the fluxes relative to the mesh motion fvc::makeRelative(phi, U); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H index 7d9b71669a..75f06420ee 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H @@ -1,6 +1,6 @@ { volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -9,7 +9,7 @@ ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) ); adjustPhi(phiHbyA, U, p_rgh); phi = phiHbyA; @@ -19,7 +19,7 @@ ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf() + )*Dp*mesh.magSf() ); phiHbyA += phig; @@ -32,7 +32,7 @@ { fvScalarMatrix p_rghEqn ( - fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh) + fvc::div(phiHbyA) - fvm::laplacian(Dp, p_rgh) - (vDotvP - vDotcP)*(pSat - rho*gh) + fvm::Sp(vDotvP - vDotcP, p_rgh) ); @@ -44,7 +44,7 @@ { phi = phiHbyA + p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf); + U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/Dp); U.correctBoundaryConditions(); fvOptions.correct(U); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H index 8677157de4..00d41d3bb4 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H @@ -94,7 +94,7 @@ phiHbyAs[phasei] = ( (fvc::interpolate(HbyAs[phasei]) & mesh.Sf()) - + fvc::ddtPhiCorr(rAUs[phasei], alpha, phase.U(), phase.phi()) + + rAlphaAUfs[phasei]*fvc::ddtCorr(phase.U(), phase.phi()) ); mrfZones.makeRelative(phiHbyAs[phasei]); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/pEqn.H index e7f4c3ac8e..afa9d6058e 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/pEqn.H @@ -1,6 +1,6 @@ { volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -9,7 +9,7 @@ ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) ); adjustPhi(phiHbyA, U, p_rgh); mrfZones.makeRelative(phiHbyA); @@ -17,7 +17,7 @@ surfaceScalarField phig ( - - ghf*fvc::snGrad(rho)*rAUf*mesh.magSf() + - ghf*fvc::snGrad(rho)*Dp*mesh.magSf() ); phiHbyA += phig; @@ -26,7 +26,7 @@ { fvScalarMatrix p_rghEqn ( - fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA) + fvm::laplacian(Dp, p_rgh) == fvc::div(phiHbyA) ); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); @@ -37,7 +37,7 @@ { phi = phiHbyA - p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); + U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/Dp); U.correctBoundaryConditions(); } } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H index 82bf3dbd59..d092aab3e2 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H @@ -1,6 +1,6 @@ { volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -9,7 +9,7 @@ ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) ); adjustPhi(phiHbyA, U, p_rgh); phi = phiHbyA; @@ -19,7 +19,7 @@ ( mixture.surfaceTensionForce() - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf() + )*Dp*mesh.magSf() ); phiHbyA += phig; @@ -28,7 +28,7 @@ { fvScalarMatrix p_rghEqn ( - fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA) + fvm::laplacian(Dp, p_rgh) == fvc::div(phiHbyA) ); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); @@ -39,7 +39,7 @@ { phi = phiHbyA - p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); + U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/Dp); U.correctBoundaryConditions(); } } diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H index 024598673f..9d5f21a94d 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H @@ -13,7 +13,7 @@ surfaceScalarField phiHbyA ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, U, phi) + + rAUf*fvc::ddtCorr(U, phi) ); adjustPhi(phiHbyA, U, p_gh); diff --git a/applications/solvers/multiphase/settlingFoam/pEqn.H b/applications/solvers/multiphase/settlingFoam/pEqn.H index 6d61ec8730..6bc6e9a6c1 100644 --- a/applications/solvers/multiphase/settlingFoam/pEqn.H +++ b/applications/solvers/multiphase/settlingFoam/pEqn.H @@ -1,7 +1,6 @@ { volScalarField rAU("rAU", 1.0/UEqn.A()); - - surfaceScalarField rAUf("Dp", fvc::interpolate(rho*rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rho*rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -9,17 +8,16 @@ surfaceScalarField phiHbyA ( "phiHbyA", - fvc::interpolate(rho) - *( - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + Dp*fvc::ddtCorr(rho, U, phi) ) ); phi = phiHbyA; surfaceScalarField phig ( - - ghf*fvc::snGrad(rho)*rAUf*mesh.magSf() + - ghf*fvc::snGrad(rho)*Dp*mesh.magSf() ); phiHbyA += phig; @@ -28,7 +26,7 @@ { fvScalarMatrix p_rghEqn ( - fvm::laplacian(rAUf, p_rgh) == fvc::ddt(rho) + fvc::div(phiHbyA) + fvm::laplacian(Dp, p_rgh) == fvc::ddt(rho) + fvc::div(phiHbyA) ); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); @@ -39,7 +37,7 @@ { phi = phiHbyA - p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); + U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/Dp); U.correctBoundaryConditions(); } } diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H index e090522de6..94495f4f30 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H @@ -1,6 +1,6 @@ { volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); + surfaceScalarField Dp("Dp", fvc::interpolate(rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); @@ -9,14 +9,14 @@ ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) ); adjustPhi(phiHbyA, U, p_rgh); phi = phiHbyA; surfaceScalarField phig ( - - ghf*fvc::snGrad(rho)*rAUf*mesh.magSf() + - ghf*fvc::snGrad(rho)*Dp*mesh.magSf() ); phiHbyA += phig; @@ -25,7 +25,7 @@ { fvScalarMatrix p_rghEqn ( - fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA) + fvm::laplacian(Dp, p_rgh) == fvc::div(phiHbyA) ); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); @@ -36,7 +36,7 @@ { phi = phiHbyA - p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); + U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/Dp); U.correctBoundaryConditions(); } } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H index 21a38ea5a6..6485ee0323 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H @@ -47,14 +47,14 @@ ( IOobject::groupName("phiHbyA", phase1.name()), (fvc::interpolate(HbyA1) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU1, alpha1, U1, phi1) + + rAlphaAU1f*fvc::ddtCorr(U1, phi1) ); surfaceScalarField phiHbyA2 ( IOobject::groupName("phiHbyA", phase2.name()), (fvc::interpolate(HbyA2) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU2, alpha2, U2, phi2) + + rAlphaAU2f*fvc::ddtCorr(U2, phi2) ); phiHbyA1 += diff --git a/applications/test/LduMatrix/LduMatrixTest3.C b/applications/test/LduMatrix/LduMatrixTest3.C index 596559e6a7..e9cce12310 100644 --- a/applications/test/LduMatrix/LduMatrixTest3.C +++ b/applications/test/LduMatrix/LduMatrixTest3.C @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) U = rAU*UEqn.H(); phi = (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, U, phi); + + fvc::ddtCorr(rAU, U, phi); adjustPhi(phi, U, p); diff --git a/applications/test/PisoFoam/PisoFoam.C b/applications/test/PisoFoam/PisoFoam.C index bbd28e6f88..ecf0df2f50 100644 --- a/applications/test/PisoFoam/PisoFoam.C +++ b/applications/test/PisoFoam/PisoFoam.C @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, U, phi) + + fvc::ddtCorr(rAU, U, phi) ); adjustPhi(phiHbyA, U, p); diff --git a/applications/test/RhoPimpleFoam/pEqn.H b/applications/test/RhoPimpleFoam/pEqn.H index fcc40881a1..465e81d0e9 100644 --- a/applications/test/RhoPimpleFoam/pEqn.H +++ b/applications/test/RhoPimpleFoam/pEqn.H @@ -20,7 +20,7 @@ if (pimple.transonic()) fvc::interpolate(psi) *( (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + + fvc::ddtCorr(rAU, rho, U, phi) ) ); @@ -57,7 +57,7 @@ else fvc::interpolate(rho) *( (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) + + fvc::ddtCorr(rAU, rho, U, phi) ) ); diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C index d6ef3989cd..fab1e295d3 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C @@ -478,55 +478,163 @@ CoEulerDdtScheme::fvmDdt } +template +tmp::fluxFieldType> +CoEulerDdtScheme::fvcDdtUfCorr +( + const GeometricField& U, + const GeometricField& Uf +) +{ + IOobject ddtIOobject + ( + "ddtCorr(" + U.name() + ',' + Uf.name() + ')', + mesh().time().timeName(), + mesh() + ); + + const surfaceScalarField rDeltaT(fvc::interpolate(CorDeltaT())); + + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff + ( + U.oldTime(), + (mesh().Sf() & Uf.oldTime()), + phiCorr + ) + *rDeltaT*phiCorr + ) + ); +} + + template tmp::fluxFieldType> CoEulerDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const GeometricField& U, const fluxFieldType& phi ) { IOobject ddtIOobject ( - "ddtPhiCorr(" + rA.name() + ',' + U.name() + ',' + phi.name() + ')', + "ddtCorr(" + U.name() + ',' + phi.name() + ')', mesh().time().timeName(), mesh() ); - if (mesh().moving()) + const surfaceScalarField rDeltaT(fvc::interpolate(CorDeltaT())); + + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime(), phiCorr) + *rDeltaT*phiCorr + ) + ); +} + + +template +tmp::fluxFieldType> +CoEulerDdtScheme::fvcDdtUfCorr +( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf +) +{ + IOobject ddtIOobject + ( + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + Uf.name() + ')', + mesh().time().timeName(), + mesh() + ); + + const surfaceScalarField rDeltaT(fvc::interpolate(CorDeltaT())); + + if + ( + U.dimensions() == dimVelocity + && Uf.dimensions() == dimDensity*dimVelocity + ) { + GeometricField rhoU0 + ( + rho.oldTime()*U.oldTime() + ); + + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0)) + ); + return tmp ( new fluxFieldType ( ddtIOobject, - mesh(), - dimensioned::type> + this->fvcDdtPhiCoeff ( - "0", - rA.dimensions()*phi.dimensions()/dimTime, - pTraits::type>::zero + rhoU0, + mesh().Sf() & Uf.oldTime(), + phiCorr ) + *rDeltaT*phiCorr + ) + ); + } + else if + ( + U.dimensions() == dimDensity*dimVelocity + && Uf.dimensions() == dimDensity*dimVelocity + ) + { + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff + ( + U.oldTime(), + mesh().Sf() & Uf.oldTime(), + phiCorr + ) + *rDeltaT*phiCorr ) ); } else { - const volScalarField rDeltaT(CorDeltaT()); - - return tmp + FatalErrorIn ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime())* - ( - fvc::interpolate(rDeltaT*rA)*phi.oldTime() - - (fvc::interpolate(rDeltaT*rA*U.oldTime()) & mesh().Sf()) - ) - ) - ); + "CoEulerDdtScheme::fvcDdtPhiCorr" + ) << "dimensions of Uf are not correct" + << abort(FatalError); + + return fluxFieldType::null(); } } @@ -535,122 +643,76 @@ template tmp::fluxFieldType> CoEulerDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi ) { + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + IOobject ddtIOobject ( - "ddtPhiCorr(" - + rA.name() + ',' + rho.name() + ',' + U.name() + ',' + phi.name() + ')', + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + phi.name() + ')', mesh().time().timeName(), mesh() ); - if (mesh().moving()) + if + ( + U.dimensions() == dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) { + GeometricField rhoU0 + ( + rho.oldTime()*U.oldTime() + ); + + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0)) + ); + return tmp ( new fluxFieldType ( ddtIOobject, - mesh(), - dimensioned::type> - ( - "0", - rA.dimensions()*rho.dimensions()*phi.dimensions()/dimTime, - pTraits::type>::zero - ) + this->fvcDdtPhiCoeff(rhoU0, phi.oldTime(), phiCorr) + *rDeltaT*phiCorr + ) + ); + } + else if + ( + U.dimensions() == rho.dimensions()*dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) + { + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime(), phiCorr) + *rDeltaT*phiCorr ) ); } else { - const volScalarField rDeltaT(CorDeltaT()); + FatalErrorIn + ( + "CoEulerDdtScheme::fvcDdtPhiCorr" + ) << "dimensions of phi are not correct" + << abort(FatalError); - if - ( - U.dimensions() == dimVelocity - && phi.dimensions() == dimVelocity*dimArea - ) - { - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime()) - *( - fvc::interpolate(rDeltaT*rA*rho.oldTime())*phi.oldTime() - - (fvc::interpolate(rDeltaT*rA*rho.oldTime()*U.oldTime()) - & mesh().Sf()) - ) - ) - ); - } - else if - ( - U.dimensions() == dimVelocity - && phi.dimensions() == dimDensity*dimVelocity*dimArea - ) - { - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff - ( - U.oldTime(), - phi.oldTime()/fvc::interpolate(rho.oldTime()) - ) - *( - fvc::interpolate(rDeltaT*rA*rho.oldTime()) - *phi.oldTime()/fvc::interpolate(rho.oldTime()) - - ( - fvc::interpolate - ( - rDeltaT*rA*rho.oldTime()*U.oldTime() - ) & mesh().Sf() - ) - ) - ) - ); - } - else if - ( - U.dimensions() == dimDensity*dimVelocity - && phi.dimensions() == dimDensity*dimVelocity*dimArea - ) - { - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff - (rho.oldTime(), U.oldTime(), phi.oldTime()) - * ( - fvc::interpolate(rDeltaT*rA)*phi.oldTime() - - ( - fvc::interpolate(rDeltaT*rA*U.oldTime())&mesh().Sf() - ) - ) - ) - ); - } - else - { - FatalErrorIn - ( - "CoEulerDdtScheme::fvcDdtPhiCorr" - ) << "dimensions of phi are not correct" - << abort(FatalError); - - return fluxFieldType::null(); - } + return fluxFieldType::null(); } } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.H index 52401609fa..a59a780967 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.H @@ -158,16 +158,27 @@ public: typedef typename ddtScheme::fluxFieldType fluxFieldType; - tmp fvcDdtPhiCorr + tmp fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf + ); + + tmp fvcDdtPhiCorr + ( + const GeometricField& U, + const fluxFieldType& phi + ); + + tmp fvcDdtUfCorr + ( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf ); tmp fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi @@ -180,10 +191,17 @@ public: }; +template<> +tmp CoEulerDdtScheme::fvcDdtUfCorr +( + const GeometricField& U, + const GeometricField& Uf +); + + template<> tmp CoEulerDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& U, const surfaceScalarField& phi ); @@ -192,7 +210,6 @@ tmp CoEulerDdtScheme::fvcDdtPhiCorr template<> tmp CoEulerDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const volScalarField& U, const surfaceScalarField& phi diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C index 53d106a75d..c0622c4635 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C @@ -646,7 +646,6 @@ CrankNicolsonDdtScheme::fvmDdt fvMatrix& fvm = tfvm(); scalar rDtCoef = rDtCoef_(ddt0).value(); - fvm.diag() = rDtCoef*mesh().V(); vf.oldTime().oldTime(); @@ -875,90 +874,197 @@ CrankNicolsonDdtScheme::fvmDdt } - template tmp::fluxFieldType> -CrankNicolsonDdtScheme::fvcDdtPhiCorr +CrankNicolsonDdtScheme::fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf ) { - DDt0Field >& dUdt0 = + DDt0Field >& ddt0 = ddt0_ > ( "ddt0(" + U.name() + ')', U.dimensions() ); - DDt0Field& dphidt0 = - ddt0_ - ( - "ddt0(" + phi.name() + ')', - phi.dimensions() - ); + dimensionedScalar rDeltaT = rDtCoef_(ddt0); IOobject ddtIOobject ( - "ddtPhiCorr(" + rA.name() + ',' + U.name() + ',' + phi.name() + ')', + "ddtCorr(" + U.name() + ',' + Uf.name() + ')', mesh().time().timeName(), mesh() ); - dimensionedScalar rDtCoef = rDtCoef_(dUdt0); + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime())) + ); - if (mesh().moving()) + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff + ( + U.oldTime(), + mesh().Sf() & Uf.oldTime(), + phiCorr + ) + *rDeltaT*phiCorr + ) + ); +} + + +template +tmp::fluxFieldType> +CrankNicolsonDdtScheme::fvcDdtPhiCorr +( + const GeometricField& U, + const fluxFieldType& phi +) +{ + DDt0Field >& ddt0 = + ddt0_ > + ( + "ddt0(" + U.name() + ')', + U.dimensions() + ); + + dimensionedScalar rDeltaT = rDtCoef_(ddt0); + + IOobject ddtIOobject + ( + "ddtCorr(" + U.name() + ',' + phi.name() + ')', + mesh().time().timeName(), + mesh() + ); + + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime(), phiCorr) + *rDeltaT*phiCorr + ) + ); +} + + +template +tmp::fluxFieldType> +CrankNicolsonDdtScheme::fvcDdtUfCorr +( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf +) +{ + IOobject ddtIOobject + ( + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + Uf.name() + ')', + mesh().time().timeName(), + mesh() + ); + + if + ( + U.dimensions() == dimVelocity + && Uf.dimensions() == rho.dimensions()*dimVelocity + ) { - return tmp + DDt0Field >& ddt0 = + ddt0_ > + ( + "ddt0(" + rho.name() + ',' + U.name() + ')', + U.dimensions() + ); + + dimensionedScalar rDeltaT = rDtCoef_(ddt0); + + GeometricField rhoU0 + ( + rho.oldTime()*U.oldTime() + ); + + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0)) + ); + + tmp ddtCorr ( new fluxFieldType ( ddtIOobject, - mesh(), - dimensioned::type> + this->fvcDdtPhiCoeff ( - "0", - rDtCoef.dimensions()*rA.dimensions()*phi.dimensions(), - pTraits::type>::zero + rhoU0, + mesh().Sf() & Uf.oldTime(), + phiCorr ) + *rDeltaT*phiCorr ) ); + + return ddtCorr; + } + else if + ( + U.dimensions() == rho.dimensions()*dimVelocity + && Uf.dimensions() == rho.dimensions()*dimVelocity + ) + { + DDt0Field >& ddt0 = + ddt0_ > + ( + "ddt0(" + U.name() + ')', + U.dimensions() + ); + + dimensionedScalar rDeltaT = rDtCoef_(ddt0); + + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime())) + ); + + tmp ddtCorr + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff + ( + U.oldTime(), + mesh().Sf() & Uf.oldTime(), + phiCorr + ) + *rDeltaT*phiCorr + ) + ); + + return ddtCorr; } else { - if (evaluate(dUdt0)) - { - dUdt0 = - rDtCoef0_(dUdt0)*(U.oldTime() - U.oldTime().oldTime()) - - offCentre_(dUdt0()); - } - - if (evaluate(dphidt0)) - { - dphidt0 = - rDtCoef0_(dphidt0)*(phi.oldTime() - phi.oldTime().oldTime()) - - offCentre_(dphidt0()); - } - - return tmp + FatalErrorIn ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime()) - *fvc::interpolate(rA) - *( - (rDtCoef*phi.oldTime() + offCentre_(dphidt0())) - - ( - fvc::interpolate - ( - (rDtCoef*U.oldTime() + offCentre_(dUdt0())) - ) & mesh().Sf() - ) - ) - ) - ); + "CrankNicolsonDdtScheme::fvcDdtPhiCorr" + ) << "dimensions of Uf are not correct" + << abort(FatalError); + + return fluxFieldType::null(); } } @@ -967,203 +1073,96 @@ template tmp::fluxFieldType> CrankNicolsonDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi ) { - DDt0Field >& dUdt0 = - ddt0_ > - ( - "ddt0(" + U.name() + ')', - U.dimensions() - ); - - DDt0Field& dphidt0 = - ddt0_ - ( - "ddt0(" + phi.name() + ')', - U.dimensions()*dimArea - ); - IOobject ddtIOobject ( - "ddtPhiCorr(" - + rA.name() + ',' + rho.name() + ',' + U.name() + ',' + phi.name() + ')', + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + phi.name() + ')', mesh().time().timeName(), mesh() ); - dimensionedScalar rDtCoef = rDtCoef_(dUdt0); - - if (mesh().moving()) + if + ( + U.dimensions() == dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) { - return tmp + DDt0Field >& ddt0 = + ddt0_ > + ( + "ddt0(" + rho.name() + ',' + U.name() + ')', + U.dimensions() + ); + + dimensionedScalar rDeltaT = rDtCoef_(ddt0); + + GeometricField rhoU0 + ( + rho.oldTime()*U.oldTime() + ); + + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0)) + ); + + tmp ddtCorr ( new fluxFieldType ( ddtIOobject, - mesh(), - dimensioned::type> - ( - "0", - rA.dimensions()*rho.dimensions()*phi.dimensions()/dimTime, - pTraits::type>::zero - ) + this->fvcDdtPhiCoeff(rhoU0, phi.oldTime(), phiCorr) + *rDeltaT*phiCorr ) ); + + return ddtCorr; + } + else if + ( + U.dimensions() == rho.dimensions()*dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) + { + DDt0Field >& ddt0 = + ddt0_ > + ( + "ddt0(" + U.name() + ')', + U.dimensions() + ); + + dimensionedScalar rDeltaT = rDtCoef_(ddt0); + + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime())) + ); + + tmp ddtCorr + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime(), phiCorr) + *rDeltaT*phiCorr + ) + ); + + return ddtCorr; } else { - if + FatalErrorIn ( - U.dimensions() == dimVelocity - && phi.dimensions() == dimVelocity*dimArea - ) - { - if (evaluate(dUdt0)) - { - dUdt0 = rDtCoef0_(dUdt0)* - ( - U.oldTime() - U.oldTime().oldTime() - ) - offCentre_(dUdt0()); - } + "CrankNicolsonDdtScheme::fvcDdtPhiCorr" + ) << "dimensions of phi are not correct" + << abort(FatalError); - if (evaluate(dphidt0)) - { - dphidt0 = rDtCoef0_(dphidt0)* - ( - phi.oldTime() - - fvc::interpolate(rho.oldTime().oldTime()/rho.oldTime()) - *phi.oldTime().oldTime() - ) - offCentre_(dphidt0()); - } - - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime())* - ( - fvc::interpolate(rA*rho.oldTime()) - *(rDtCoef*phi.oldTime() + offCentre_(dphidt0())) - - ( - fvc::interpolate - ( - rA*rho.oldTime() - *(rDtCoef*U.oldTime() + offCentre_(dUdt0())) - ) & mesh().Sf() - ) - ) - ) - ); - } - else if - ( - U.dimensions() == dimVelocity - && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea - ) - { - if (evaluate(dUdt0)) - { - dUdt0 = rDtCoef0_(dUdt0)* - ( - U.oldTime() - U.oldTime().oldTime() - ) - offCentre_(dUdt0()); - } - - if (evaluate(dphidt0)) - { - dphidt0 = rDtCoef0_(dphidt0)* - ( - phi.oldTime() - /fvc::interpolate(rho.oldTime()) - - phi.oldTime().oldTime() - /fvc::interpolate(rho.oldTime().oldTime()) - ) - offCentre_(dphidt0()); - } - - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff - ( - U.oldTime(), - phi.oldTime()/fvc::interpolate(rho.oldTime()) - ) - *( - fvc::interpolate(rA*rho.oldTime()) - *( - rDtCoef*phi.oldTime()/fvc::interpolate(rho.oldTime()) - + offCentre_(dphidt0()) - ) - - ( - fvc::interpolate - ( - rA*rho.oldTime() - *(rDtCoef*U.oldTime() + offCentre_(dUdt0())) - ) & mesh().Sf() - ) - ) - ) - ); - } - else if - ( - U.dimensions() == rho.dimensions()*dimVelocity - && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea - ) - { - if (evaluate(dUdt0)) - { - dUdt0 = rDtCoef0_(dUdt0)* - ( - U.oldTime() - U.oldTime().oldTime() - ) - offCentre_(dUdt0()); - } - - if (evaluate(dphidt0)) - { - dphidt0 = rDtCoef0_(dphidt0)* - ( - phi.oldTime() - phi.oldTime().oldTime() - ) - offCentre_(dphidt0()); - } - - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff - (rho.oldTime(), U.oldTime(), phi.oldTime()) - * ( - fvc::interpolate(rA) - *(rDtCoef*phi.oldTime() + offCentre_(dphidt0())) - - ( - fvc::interpolate - ( - rA*(rDtCoef*U.oldTime() + offCentre_(dUdt0())) - ) & mesh().Sf() - ) - ) - ) - ); - } - else - { - FatalErrorIn - ( - "CrankNicolsonDdtScheme::fvcDdtPhiCorr" - ) << "dimensions of phi are not correct" - << abort(FatalError); - - return fluxFieldType::null(); - } + return fluxFieldType::null(); } } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H index 315072306c..cee3d96fbd 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H @@ -229,16 +229,27 @@ public: typedef typename ddtScheme::fluxFieldType fluxFieldType; - tmp fvcDdtPhiCorr + tmp fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf + ); + + tmp fvcDdtPhiCorr + ( + const GeometricField& U, + const fluxFieldType& phi + ); + + tmp fvcDdtUfCorr + ( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf ); tmp fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi @@ -252,10 +263,17 @@ public: }; +template<> +tmp CrankNicolsonDdtScheme::fvcDdtUfCorr +( + const GeometricField& U, + const GeometricField& Uf +); + + template<> tmp CrankNicolsonDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& U, const surfaceScalarField& phi ); @@ -264,7 +282,6 @@ tmp CrankNicolsonDdtScheme::fvcDdtPhiCorr template<> tmp CrankNicolsonDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const volScalarField& U, const surfaceScalarField& phi diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C index d48a634491..ba137df9e6 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C @@ -370,34 +370,38 @@ EulerDdtScheme::fvmDdt template tmp::fluxFieldType> -EulerDdtScheme::fvcDdtPhiCorr +EulerDdtScheme::fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phiAbs + const GeometricField& Uf ) { dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); IOobject ddtIOobject ( - "ddtPhiCorr(" + rA.name() + ',' + U.name() + ',' + phiAbs.name() + ')', + "ddtCorr(" + U.name() + ',' + Uf.name() + ')', mesh().time().timeName(), mesh() ); - tmp phiCorr = - phiAbs.oldTime() - (fvc::interpolate(U.oldTime()) & mesh().Sf()); - - phiCorr().boundaryField() = pTraits::type>::zero; + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime())) + ); return tmp ( new fluxFieldType ( ddtIOobject, - this->fvcDdtPhiCoeff(U.oldTime(), phiAbs.oldTime(), phiCorr()) - * fvc::interpolate(rDeltaT*rA)*phiCorr + this->fvcDdtPhiCoeff + ( + U.oldTime(), + mesh().Sf() & Uf.oldTime(), + phiCorr + ) + *rDeltaT*phiCorr ) ); } @@ -407,21 +411,50 @@ template tmp::fluxFieldType> EulerDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, - const volScalarField& rho, const GeometricField& U, - const fluxFieldType& phiAbs + const fluxFieldType& phi ) { dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); IOobject ddtIOobject ( - "ddtPhiCorr(" - + rA.name() + ',' - + rho.name() + ',' - + U.name() + ',' - + phiAbs.name() + ')', + "ddtCorr(" + U.name() + ',' + phi.name() + ')', + mesh().time().timeName(), + mesh() + ); + + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime(), phiCorr) + *rDeltaT*phiCorr + ) + ); +} + + +template +tmp::fluxFieldType> +EulerDdtScheme::fvcDdtUfCorr +( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + Uf.name() + ')', mesh().time().timeName(), mesh() ); @@ -429,95 +462,144 @@ EulerDdtScheme::fvcDdtPhiCorr if ( U.dimensions() == dimVelocity - && phiAbs.dimensions() == dimVelocity*dimArea + && Uf.dimensions() == rho.dimensions()*dimVelocity ) { - tmp ddtPhiCorr + GeometricField rhoU0 ( - new fluxFieldType - ( - ddtIOobject, - rDeltaT - * this->fvcDdtPhiCoeff(U.oldTime(), phiAbs.oldTime()) - * ( - fvc::interpolate(rA*rho.oldTime())*phiAbs.oldTime() - - ( - fvc::interpolate(rA*rho.oldTime()*U.oldTime()) - & mesh().Sf() - ) - ) - ) + rho.oldTime()*U.oldTime() ); - ddtPhiCorr().boundaryField() = pTraits::type>::zero; + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0)) + ); - return ddtPhiCorr; - } - else if - ( - U.dimensions() == dimVelocity - && phiAbs.dimensions() == rho.dimensions()*dimVelocity*dimArea - ) - { - tmp ddtPhiCorr + return tmp ( new fluxFieldType ( ddtIOobject, - rDeltaT - * this->fvcDdtPhiCoeff + this->fvcDdtPhiCoeff ( - U.oldTime(), - phiAbs.oldTime()/fvc::interpolate(rho.oldTime()) - ) - * ( - fvc::interpolate(rA*rho.oldTime()) - * phiAbs.oldTime()/fvc::interpolate(rho.oldTime()) - - ( - fvc::interpolate - ( - rA*rho.oldTime()*U.oldTime() - ) & mesh().Sf() - ) + rhoU0, + mesh().Sf() & Uf.oldTime(), + phiCorr ) + *rDeltaT*phiCorr ) ); - - ddtPhiCorr().boundaryField() = pTraits::type>::zero; - - return ddtPhiCorr; } else if ( U.dimensions() == rho.dimensions()*dimVelocity - && phiAbs.dimensions() == rho.dimensions()*dimVelocity*dimArea + && Uf.dimensions() == rho.dimensions()*dimVelocity ) { - tmp ddtPhiCorr + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime())) + ); + + return tmp ( new fluxFieldType ( ddtIOobject, - rDeltaT - * this->fvcDdtPhiCoeff - (rho.oldTime(), U.oldTime(), phiAbs.oldTime()) - * ( - fvc::interpolate(rA)*phiAbs.oldTime() - - (fvc::interpolate(rA*U.oldTime()) & mesh().Sf()) + this->fvcDdtPhiCoeff + ( + U.oldTime(), + mesh().Sf() & Uf.oldTime(), + phiCorr ) + *rDeltaT*phiCorr ) ); - - ddtPhiCorr().boundaryField() = pTraits::type>::zero; - - return ddtPhiCorr; } else { FatalErrorIn ( "EulerDdtScheme::fvcDdtPhiCorr" - ) << "dimensions of phiAbs are not correct" + ) << "dimensions of Uf are not correct" + << abort(FatalError); + + return fluxFieldType::null(); + } +} + + +template +tmp::fluxFieldType> +EulerDdtScheme::fvcDdtPhiCorr +( + const volScalarField& rho, + const GeometricField& U, + const fluxFieldType& phi +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + phi.name() + ')', + mesh().time().timeName(), + mesh() + ); + + if + ( + U.dimensions() == dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) + { + GeometricField rhoU0 + ( + rho.oldTime()*U.oldTime() + ); + + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0)) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(rhoU0, phi.oldTime(), phiCorr) + *rDeltaT*phiCorr + ) + ); + } + else if + ( + U.dimensions() == rho.dimensions()*dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) + { + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime(), phiCorr) + *rDeltaT*phiCorr + ) + ); + } + else + { + FatalErrorIn + ( + "EulerDdtScheme::fvcDdtPhiCorr" + ) << "dimensions of phi are not correct" << abort(FatalError); return fluxFieldType::null(); diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.H index 27085e7dbf..1e6f0fec13 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.H @@ -136,16 +136,27 @@ public: typedef typename ddtScheme::fluxFieldType fluxFieldType; - tmp fvcDdtPhiCorr + tmp fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf + ); + + tmp fvcDdtPhiCorr + ( + const GeometricField& U, + const fluxFieldType& phi + ); + + tmp fvcDdtUfCorr + ( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf ); tmp fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi @@ -158,10 +169,17 @@ public: }; +template<> +tmp EulerDdtScheme::fvcDdtUfCorr +( + const GeometricField& U, + const GeometricField& Uf +); + + template<> tmp EulerDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& U, const surfaceScalarField& phi ); @@ -170,7 +188,6 @@ tmp EulerDdtScheme::fvcDdtPhiCorr template<> tmp EulerDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const volScalarField& U, const surfaceScalarField& phi diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C index dd531848e6..95a786c5ac 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C @@ -481,55 +481,163 @@ SLTSDdtScheme::fvmDdt } +template +tmp::fluxFieldType> +SLTSDdtScheme::fvcDdtUfCorr +( + const GeometricField& U, + const GeometricField& Uf +) +{ + IOobject ddtIOobject + ( + "ddtCorr(" + U.name() + ',' + Uf.name() + ')', + mesh().time().timeName(), + mesh() + ); + + const surfaceScalarField rDeltaT(fvc::interpolate(SLrDeltaT())); + + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff + ( + U.oldTime(), + (mesh().Sf() & Uf.oldTime()), + phiCorr + ) + *rDeltaT*phiCorr + ) + ); +} + + template tmp::fluxFieldType> SLTSDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const GeometricField& U, const fluxFieldType& phi ) { IOobject ddtIOobject ( - "ddtPhiCorr(" + rA.name() + ',' + U.name() + ',' + phi.name() + ')', + "ddtCorr(" + U.name() + ',' + phi.name() + ')', mesh().time().timeName(), mesh() ); - if (mesh().moving()) + const surfaceScalarField rDeltaT(fvc::interpolate(SLrDeltaT())); + + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime(), phiCorr) + *rDeltaT*phiCorr + ) + ); +} + + +template +tmp::fluxFieldType> +SLTSDdtScheme::fvcDdtUfCorr +( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf +) +{ + IOobject ddtIOobject + ( + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + Uf.name() + ')', + mesh().time().timeName(), + mesh() + ); + + const surfaceScalarField rDeltaT(fvc::interpolate(SLrDeltaT())); + + if + ( + U.dimensions() == dimVelocity + && Uf.dimensions() == dimDensity*dimVelocity + ) { + GeometricField rhoU0 + ( + rho.oldTime()*U.oldTime() + ); + + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0)) + ); + return tmp ( new fluxFieldType ( ddtIOobject, - mesh(), - dimensioned::type> + this->fvcDdtPhiCoeff ( - "0", - rA.dimensions()*phi.dimensions()/dimTime, - pTraits::type>::zero + rhoU0, + mesh().Sf() & Uf.oldTime(), + phiCorr ) + *rDeltaT*phiCorr + ) + ); + } + else if + ( + U.dimensions() == dimDensity*dimVelocity + && Uf.dimensions() == dimDensity*dimVelocity + ) + { + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff + ( + U.oldTime(), + mesh().Sf() & Uf.oldTime(), + phiCorr + ) + *rDeltaT*phiCorr ) ); } else { - const volScalarField rDeltaT(SLrDeltaT()); - - return tmp + FatalErrorIn ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime())* - ( - fvc::interpolate(rDeltaT*rA)*phi.oldTime() - - (fvc::interpolate(rDeltaT*rA*U.oldTime()) & mesh().Sf()) - ) - ) - ); + "SLTSDdtScheme::fvcDdtPhiCorr" + ) << "dimensions of Uf are not correct" + << abort(FatalError); + + return fluxFieldType::null(); } } @@ -538,122 +646,76 @@ template tmp::fluxFieldType> SLTSDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi ) { + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + IOobject ddtIOobject ( - "ddtPhiCorr(" - + rA.name() + ',' + rho.name() + ',' + U.name() + ',' + phi.name() + ')', + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + phi.name() + ')', mesh().time().timeName(), mesh() ); - if (mesh().moving()) + if + ( + U.dimensions() == dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) { + GeometricField rhoU0 + ( + rho.oldTime()*U.oldTime() + ); + + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0)) + ); + return tmp ( new fluxFieldType ( ddtIOobject, - mesh(), - dimensioned::type> - ( - "0", - rA.dimensions()*rho.dimensions()*phi.dimensions()/dimTime, - pTraits::type>::zero - ) + this->fvcDdtPhiCoeff(rhoU0, phi.oldTime(), phiCorr) + *rDeltaT*phiCorr + ) + ); + } + else if + ( + U.dimensions() == rho.dimensions()*dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) + { + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime(), phiCorr) + *rDeltaT*phiCorr ) ); } else { - const volScalarField rDeltaT(SLrDeltaT()); + FatalErrorIn + ( + "SLTSDdtScheme::fvcDdtPhiCorr" + ) << "dimensions of phi are not correct" + << abort(FatalError); - if - ( - U.dimensions() == dimVelocity - && phi.dimensions() == dimVelocity*dimArea - ) - { - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime()) - *( - fvc::interpolate(rDeltaT*rA*rho.oldTime())*phi.oldTime() - - (fvc::interpolate(rDeltaT*rA*rho.oldTime()*U.oldTime()) - & mesh().Sf()) - ) - ) - ); - } - else if - ( - U.dimensions() == dimVelocity - && phi.dimensions() == dimDensity*dimVelocity*dimArea - ) - { - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff - ( - U.oldTime(), - phi.oldTime()/fvc::interpolate(rho.oldTime()) - ) - *( - fvc::interpolate(rDeltaT*rA*rho.oldTime()) - *phi.oldTime()/fvc::interpolate(rho.oldTime()) - - ( - fvc::interpolate - ( - rDeltaT*rA*rho.oldTime()*U.oldTime() - ) & mesh().Sf() - ) - ) - ) - ); - } - else if - ( - U.dimensions() == dimDensity*dimVelocity - && phi.dimensions() == dimDensity*dimVelocity*dimArea - ) - { - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff - (rho.oldTime(), U.oldTime(), phi.oldTime()) - * ( - fvc::interpolate(rDeltaT*rA)*phi.oldTime() - - ( - fvc::interpolate(rDeltaT*rA*U.oldTime())&mesh().Sf() - ) - ) - ) - ); - } - else - { - FatalErrorIn - ( - "SLTSDdtScheme::fvcDdtPhiCorr" - ) << "dimensions of phi are not correct" - << abort(FatalError); - - return fluxFieldType::null(); - } + return fluxFieldType::null(); } } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.H index 7e1793a75e..dad42a1553 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.H @@ -159,16 +159,27 @@ public: typedef typename ddtScheme::fluxFieldType fluxFieldType; - tmp fvcDdtPhiCorr + tmp fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf + ); + + tmp fvcDdtPhiCorr + ( + const GeometricField& U, + const fluxFieldType& phi + ); + + tmp fvcDdtUfCorr + ( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf ); tmp fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi @@ -181,10 +192,17 @@ public: }; +template<> +tmp SLTSDdtScheme::fvcDdtUfCorr +( + const GeometricField& U, + const GeometricField& Uf +); + + template<> tmp SLTSDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& U, const surfaceScalarField& phi ); @@ -193,7 +211,6 @@ tmp SLTSDdtScheme::fvcDdtPhiCorr template<> tmp SLTSDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const volScalarField& U, const surfaceScalarField& phi diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C index a4e13844cc..138d9b4ebb 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C @@ -514,18 +514,17 @@ backwardDdtScheme::fvmDdt template tmp::fluxFieldType> -backwardDdtScheme::fvcDdtPhiCorr +backwardDdtScheme::fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf ) { dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); IOobject ddtIOobject ( - "ddtPhiCorr(" + rA.name() + ',' + U.name() + ',' + phi.name() + ')', + "ddtCorr(" + U.name() + ',' + Uf.name() + ')', mesh().time().timeName(), mesh() ); @@ -542,22 +541,16 @@ backwardDdtScheme::fvcDdtPhiCorr new fluxFieldType ( ddtIOobject, - rDeltaT*this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime()) + this->fvcDdtPhiCoeff(U.oldTime(), (mesh().Sf() & Uf.oldTime())) + *rDeltaT *( - fvc::interpolate(rA) - *( - coefft0*phi.oldTime() - - coefft00*phi.oldTime().oldTime() - ) - - ( - fvc::interpolate + mesh().Sf() + & ( + (coefft0*Uf.oldTime() - coefft00*Uf.oldTime().oldTime()) + - fvc::interpolate ( - rA* - ( - coefft0*U.oldTime() - - coefft00*U.oldTime().oldTime() - ) - ) & mesh().Sf() + coefft0*U.oldTime() - coefft00*U.oldTime().oldTime() + ) ) ) ) @@ -569,21 +562,62 @@ template tmp::fluxFieldType> backwardDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, - const volScalarField& rho, const GeometricField& U, - const fluxFieldType& phiAbs + const fluxFieldType& phi ) { dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); IOobject ddtIOobject ( - "ddtPhiCorr(" - + rA.name() + ',' - + rho.name() + ',' - + U.name() + ',' - + phiAbs.name() + ')', + "ddtCorr(" + U.name() + ',' + phi.name() + ')', + mesh().time().timeName(), + mesh() + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(U); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime()) + *rDeltaT + *( + (coefft0*phi.oldTime() - coefft00*phi.oldTime().oldTime()) + - ( + mesh().Sf() + & fvc::interpolate + ( + coefft0*U.oldTime() - coefft00*U.oldTime().oldTime() + ) + ) + ) + ) + ); +} + + +template +tmp::fluxFieldType> +backwardDdtScheme::fvcDdtUfCorr +( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + Uf.name() + ')', mesh().time().timeName(), mesh() ); @@ -598,68 +632,31 @@ backwardDdtScheme::fvcDdtPhiCorr if ( U.dimensions() == dimVelocity - && phiAbs.dimensions() == dimVelocity*dimArea + && Uf.dimensions() == rho.dimensions()*dimVelocity ) { - return tmp + GeometricField rhoU0 ( - new fluxFieldType - ( - ddtIOobject, - rDeltaT*this->fvcDdtPhiCoeff(U.oldTime(), phiAbs.oldTime()) - *( - coefft0*fvc::interpolate(rA*rho.oldTime()) - *phiAbs.oldTime() - - coefft00*fvc::interpolate(rA*rho.oldTime().oldTime()) - *phiAbs.oldTime().oldTime() - - ( - fvc::interpolate - ( - rA* - ( - coefft0*rho.oldTime()*U.oldTime() - - coefft00*rho.oldTime().oldTime() - *U.oldTime().oldTime() - ) - ) & mesh().Sf() - ) - ) - ) + rho.oldTime()*U.oldTime() ); - } - else if - ( - U.dimensions() == dimVelocity - && phiAbs.dimensions() == rho.dimensions()*dimVelocity*dimArea - ) - { + + GeometricField rhoU00 + ( + rho.oldTime().oldTime()*U.oldTime().oldTime() + ); + return tmp ( new fluxFieldType ( ddtIOobject, - rDeltaT - *this->fvcDdtPhiCoeff - ( - U.oldTime(), - phiAbs.oldTime()/fvc::interpolate(rho.oldTime()) - ) + this->fvcDdtPhiCoeff(rhoU0, mesh().Sf() & Uf.oldTime()) + *rDeltaT *( - fvc::interpolate(rA) - *( - coefft0*phiAbs.oldTime() - - coefft00*phiAbs.oldTime().oldTime() - ) - - ( - fvc::interpolate - ( - rA* - ( - coefft0*rho.oldTime()*U.oldTime() - - coefft00*rho.oldTime().oldTime() - *U.oldTime().oldTime() - ) - ) & mesh().Sf() + mesh().Sf() + & ( + (coefft0*Uf.oldTime() - coefft00*Uf.oldTime().oldTime()) + - fvc::interpolate(coefft0*rhoU0 - coefft00*rhoU00) ) ) ) @@ -668,32 +665,25 @@ backwardDdtScheme::fvcDdtPhiCorr else if ( U.dimensions() == rho.dimensions()*dimVelocity - && phiAbs.dimensions() == rho.dimensions()*dimVelocity*dimArea + && Uf.dimensions() == rho.dimensions()*dimVelocity ) { + return tmp ( new fluxFieldType ( ddtIOobject, - rDeltaT - * this->fvcDdtPhiCoeff - (rho.oldTime(), U.oldTime(), phiAbs.oldTime()) - * ( - fvc::interpolate(rA) - * ( - coefft0*phiAbs.oldTime() - - coefft00*phiAbs.oldTime().oldTime() - ) - - ( - fvc::interpolate + this->fvcDdtPhiCoeff(U.oldTime(), mesh().Sf() & Uf.oldTime()) + *rDeltaT + *( + mesh().Sf() + & ( + (coefft0*Uf.oldTime() - coefft00*Uf.oldTime().oldTime()) + - fvc::interpolate ( - rA* - ( - coefft0*U.oldTime() - - coefft00*U.oldTime().oldTime() - ) - ) & mesh().Sf() + coefft0*U.oldTime() - coefft00*U.oldTime().oldTime() + ) ) ) ) @@ -704,7 +694,105 @@ backwardDdtScheme::fvcDdtPhiCorr FatalErrorIn ( "backwardDdtScheme::fvcDdtPhiCorr" - ) << "dimensions of phiAbs are not correct" + ) << "dimensions of phi are not correct" + << abort(FatalError); + + return fluxFieldType::null(); + } +} + + +template +tmp::fluxFieldType> +backwardDdtScheme::fvcDdtPhiCorr +( + const volScalarField& rho, + const GeometricField& U, + const fluxFieldType& phi +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + phi.name() + ')', + mesh().time().timeName(), + mesh() + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(U); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + if + ( + U.dimensions() == dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) + { + GeometricField rhoU0 + ( + rho.oldTime()*U.oldTime() + ); + + GeometricField rhoU00 + ( + rho.oldTime().oldTime()*U.oldTime().oldTime() + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(rhoU0, phi.oldTime()) + *rDeltaT + *( + (coefft0*phi.oldTime() - coefft00*phi.oldTime().oldTime()) + - ( + mesh().Sf() + & fvc::interpolate(coefft0*rhoU0 - coefft00*rhoU00) + ) + ) + ) + ); + } + else if + ( + U.dimensions() == rho.dimensions()*dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) + { + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime()) + *rDeltaT + *( + (coefft0*phi.oldTime() - coefft00*phi.oldTime().oldTime()) + - ( + mesh().Sf() + & fvc::interpolate + ( + coefft0*U.oldTime() - coefft00*U.oldTime().oldTime() + ) + ) + ) + ) + ); + } + else + { + FatalErrorIn + ( + "backwardDdtScheme::fvcDdtPhiCorr" + ) << "dimensions of phi are not correct" << abort(FatalError); return fluxFieldType::null(); diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H index 858c6b4698..5d2fb33acb 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H @@ -147,22 +147,32 @@ public: typedef typename ddtScheme::fluxFieldType fluxFieldType; - tmp fvcDdtPhiCorr + tmp fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf + ); + + tmp fvcDdtPhiCorr + ( + const GeometricField& U, + const fluxFieldType& phi + ); + + tmp fvcDdtUfCorr + ( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf ); tmp fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi ); - tmp meshPhi ( const GeometricField& @@ -170,10 +180,17 @@ public: }; +template<> +tmp backwardDdtScheme::fvcDdtUfCorr +( + const GeometricField& U, + const GeometricField& Uf +); + + template<> tmp backwardDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& U, const surfaceScalarField& phi ); @@ -182,7 +199,6 @@ tmp backwardDdtScheme::fvcDdtPhiCorr template<> tmp backwardDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const volScalarField& U, const surfaceScalarField& phi diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.C index a89629f6db..177b387aae 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.C @@ -124,14 +124,38 @@ boundedDdtScheme::fvmDdt template tmp::fluxFieldType> -boundedDdtScheme::fvcDdtPhiCorr +boundedDdtScheme::fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf ) { - return scheme_().fvcDdtPhiCorr(rA, U, phi); + return scheme_().fvcDdtUfCorr(U, Uf); +} + + +template +tmp::fluxFieldType> +boundedDdtScheme::fvcDdtPhiCorr +( + const GeometricField& U, + const fluxFieldType& phi +) +{ + return scheme_().fvcDdtPhiCorr(U, phi); +} + + +template +tmp::fluxFieldType> +boundedDdtScheme::fvcDdtUfCorr +( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf +) +{ + return scheme_().fvcDdtUfCorr(rho, U, Uf); } @@ -139,13 +163,12 @@ template tmp::fluxFieldType> boundedDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi ) { - return scheme_().fvcDdtPhiCorr(rA, rho, U, phi); + return scheme_().fvcDdtPhiCorr(rho, U, phi); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.H index 0e5e0831f9..0b447097da 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.H @@ -145,16 +145,27 @@ public: typedef typename ddtScheme::fluxFieldType fluxFieldType; - tmp fvcDdtPhiCorr + tmp fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf + ); + + tmp fvcDdtPhiCorr + ( + const GeometricField& U, + const fluxFieldType& phi + ); + + tmp fvcDdtUfCorr + ( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf ); tmp fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi @@ -167,10 +178,17 @@ public: }; +template<> +tmp boundedDdtScheme::fvcDdtUfCorr +( + const GeometricField& U, + const GeometricField& Uf +); + + template<> tmp boundedDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& U, const surfaceScalarField& phi ); @@ -179,7 +197,6 @@ tmp boundedDdtScheme::fvcDdtPhiCorr template<> tmp boundedDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const volScalarField& U, const surfaceScalarField& phi diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C index fd6103d5b2..b7dae80904 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C @@ -141,82 +141,7 @@ tmp ddtScheme::fvcDdtPhiCoeff const fluxFieldType& phi ) { - dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); - - tmp tddtCouplingCoeff = scalar(1) - - min - ( - mag(phi - (mesh().Sf() & fvc::interpolate(U))) - /(mag(phi) + dimensionedScalar("small", phi.dimensions(), VSMALL)), - //(rDeltaT*mesh().magSf()/mesh().deltaCoeffs()), - scalar(1) - ); - - surfaceScalarField& ddtCouplingCoeff = tddtCouplingCoeff(); - - forAll(U.boundaryField(), patchi) - { - if (U.boundaryField()[patchi].fixesValue()) - { - ddtCouplingCoeff.boundaryField()[patchi] = 0.0; - } - } - - if (debug > 1) - { - Info<< "ddtCouplingCoeff mean max min = " - << gAverage(ddtCouplingCoeff.internalField()) - << " " << gMax(ddtCouplingCoeff.internalField()) - << " " << gMin(ddtCouplingCoeff.internalField()) - << endl; - } - - return tddtCouplingCoeff; -} - - -template -tmp ddtScheme::fvcDdtPhiCoeff -( - const volScalarField& rho, - const GeometricField& rhoU, - const fluxFieldType& phi -) -{ - dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); - - tmp tddtCouplingCoeff = scalar(1) - - min - ( - mag(phi - (mesh().Sf() & fvc::interpolate(rhoU))) - /( - mag(phi) + dimensionedScalar("small", phi.dimensions(), VSMALL) - //fvc::interpolate(rho)*rDeltaT - //*mesh().magSf()/mesh().deltaCoeffs() - ), - scalar(1) - ); - - surfaceScalarField& ddtCouplingCoeff = tddtCouplingCoeff(); - - forAll(rhoU.boundaryField(), patchi) - { - if (rhoU.boundaryField()[patchi].fixesValue()) - { - ddtCouplingCoeff.boundaryField()[patchi] = 0.0; - } - } - - if (debug > 1) - { - Info<< "ddtCouplingCoeff mean max min = " - << gAverage(ddtCouplingCoeff.internalField()) - << " " << gMax(ddtCouplingCoeff.internalField()) - << " " << gMin(ddtCouplingCoeff.internalField()) - << endl; - } - - return tddtCouplingCoeff; + return fvcDdtPhiCoeff(U, phi, phi - (mesh().Sf() & fvc::interpolate(U))); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H index 5496105e10..265329f715 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H @@ -198,29 +198,32 @@ public: const fluxFieldType& phi ); + virtual tmp fvcDdtUfCorr + ( + const GeometricField& U, + const GeometricField& Uf + ) = 0; + virtual tmp fvcDdtPhiCorr ( - const volScalarField& rA, const GeometricField& U, const fluxFieldType& phi ) = 0; - tmp fvcDdtPhiCoeff + virtual tmp fvcDdtUfCorr ( const volScalarField& rho, - const GeometricField& rhoU, - const fluxFieldType& phi - ); + const GeometricField& U, + const GeometricField& Uf + ) = 0; virtual tmp fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi ) = 0; - virtual tmp meshPhi ( const GeometricField& @@ -257,9 +260,19 @@ makeFvDdtTypeScheme(SS, symmTensor) \ makeFvDdtTypeScheme(SS, tensor) \ \ template<> \ +tmp SS::fvcDdtUfCorr \ +( \ + const volScalarField& U, \ + const surfaceScalarField& Uf \ +) \ +{ \ + notImplemented(#SS"::fvcDdtUfCorr"); \ + return surfaceScalarField::null(); \ +} \ + \ +template<> \ tmp SS::fvcDdtPhiCorr \ ( \ - const volScalarField& rA, \ const volScalarField& U, \ const surfaceScalarField& phi \ ) \ @@ -269,9 +282,20 @@ tmp SS::fvcDdtPhiCorr \ } \ \ template<> \ +tmp SS::fvcDdtUfCorr \ +( \ + const volScalarField& rho, \ + const volScalarField& U, \ + const surfaceScalarField& Uf \ +) \ +{ \ + notImplemented(#SS"::fvcDdtUfCorr"); \ + return surfaceScalarField::null(); \ +} \ + \ +template<> \ tmp SS::fvcDdtPhiCorr \ ( \ - const volScalarField& rA, \ const volScalarField& rho, \ const volScalarField& U, \ const surfaceScalarField& phi \ diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C index 0a5dba394f..58405477f2 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C @@ -375,55 +375,163 @@ localEulerDdtScheme::fvmDdt } +template +tmp::fluxFieldType> +localEulerDdtScheme::fvcDdtUfCorr +( + const GeometricField& U, + const GeometricField& Uf +) +{ + IOobject ddtIOobject + ( + "ddtCorr(" + U.name() + ',' + Uf.name() + ')', + mesh().time().timeName(), + mesh() + ); + + const surfaceScalarField rDeltaT(fvc::interpolate(localRDeltaT())); + + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff + ( + U.oldTime(), + (mesh().Sf() & Uf.oldTime()), + phiCorr + ) + *rDeltaT*phiCorr + ) + ); +} + + template tmp::fluxFieldType> localEulerDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const GeometricField& U, const fluxFieldType& phi ) { IOobject ddtIOobject ( - "ddtPhiCorr(" + rA.name() + ',' + U.name() + ',' + phi.name() + ')', + "ddtCorr(" + U.name() + ',' + phi.name() + ')', mesh().time().timeName(), mesh() ); - if (mesh().moving()) + const surfaceScalarField rDeltaT(fvc::interpolate(localRDeltaT())); + + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime(), phiCorr) + *rDeltaT*phiCorr + ) + ); +} + + +template +tmp::fluxFieldType> +localEulerDdtScheme::fvcDdtUfCorr +( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf +) +{ + IOobject ddtIOobject + ( + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + Uf.name() + ')', + mesh().time().timeName(), + mesh() + ); + + const surfaceScalarField rDeltaT(fvc::interpolate(localRDeltaT())); + + if + ( + U.dimensions() == dimVelocity + && Uf.dimensions() == dimDensity*dimVelocity + ) { + GeometricField rhoU0 + ( + rho.oldTime()*U.oldTime() + ); + + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0)) + ); + return tmp ( new fluxFieldType ( ddtIOobject, - mesh(), - dimensioned::type> + this->fvcDdtPhiCoeff ( - "0", - rA.dimensions()*phi.dimensions()/dimTime, - pTraits::type>::zero + rhoU0, + mesh().Sf() & Uf.oldTime(), + phiCorr ) + *rDeltaT*phiCorr + ) + ); + } + else if + ( + U.dimensions() == dimDensity*dimVelocity + && Uf.dimensions() == dimDensity*dimVelocity + ) + { + fluxFieldType phiCorr + ( + mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff + ( + U.oldTime(), + mesh().Sf() & Uf.oldTime(), + phiCorr + ) + *rDeltaT*phiCorr ) ); } else { - const volScalarField& rDeltaT = localRDeltaT(); - - return tmp + FatalErrorIn ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime())* - ( - fvc::interpolate(rDeltaT*rA)*phi.oldTime() - - (fvc::interpolate(rDeltaT*rA*U.oldTime()) & mesh().Sf()) - ) - ) - ); + "localEulerDdtScheme::fvcDdtPhiCorr" + ) << "dimensions of Uf are not correct" + << abort(FatalError); + + return fluxFieldType::null(); } } @@ -432,122 +540,76 @@ template tmp::fluxFieldType> localEulerDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi ) { + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + IOobject ddtIOobject ( - "ddtPhiCorr(" - + rA.name() + ',' + rho.name() + ',' + U.name() + ',' + phi.name() + ')', + "ddtCorr(" + rho.name() + ',' + U.name() + ',' + phi.name() + ')', mesh().time().timeName(), mesh() ); - if (mesh().moving()) + if + ( + U.dimensions() == dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) { + GeometricField rhoU0 + ( + rho.oldTime()*U.oldTime() + ); + + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0)) + ); + return tmp ( new fluxFieldType ( ddtIOobject, - mesh(), - dimensioned::type> - ( - "0", - rA.dimensions()*rho.dimensions()*phi.dimensions()/dimTime, - pTraits::type>::zero - ) + this->fvcDdtPhiCoeff(rhoU0, phi.oldTime(), phiCorr) + *rDeltaT*phiCorr + ) + ); + } + else if + ( + U.dimensions() == rho.dimensions()*dimVelocity + && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea + ) + { + fluxFieldType phiCorr + ( + phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime())) + ); + + return tmp + ( + new fluxFieldType + ( + ddtIOobject, + this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime(), phiCorr) + *rDeltaT*phiCorr ) ); } else { - const volScalarField& rDeltaT = localRDeltaT(); + FatalErrorIn + ( + "localEulerDdtScheme::fvcDdtPhiCorr" + ) << "dimensions of phi are not correct" + << abort(FatalError); - if - ( - U.dimensions() == dimVelocity - && phi.dimensions() == dimVelocity*dimArea - ) - { - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime()) - *( - fvc::interpolate(rDeltaT*rA*rho.oldTime())*phi.oldTime() - - (fvc::interpolate(rDeltaT*rA*rho.oldTime()*U.oldTime()) - & mesh().Sf()) - ) - ) - ); - } - else if - ( - U.dimensions() == dimVelocity - && phi.dimensions() == dimDensity*dimVelocity*dimArea - ) - { - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff - ( - U.oldTime(), - phi.oldTime()/fvc::interpolate(rho.oldTime()) - ) - *( - fvc::interpolate(rDeltaT*rA*rho.oldTime()) - *phi.oldTime()/fvc::interpolate(rho.oldTime()) - - ( - fvc::interpolate - ( - rDeltaT*rA*rho.oldTime()*U.oldTime() - ) & mesh().Sf() - ) - ) - ) - ); - } - else if - ( - U.dimensions() == dimDensity*dimVelocity - && phi.dimensions() == dimDensity*dimVelocity*dimArea - ) - { - return tmp - ( - new fluxFieldType - ( - ddtIOobject, - this->fvcDdtPhiCoeff - (rho.oldTime(), U.oldTime(), phi.oldTime()) - * ( - fvc::interpolate(rDeltaT*rA)*phi.oldTime() - - ( - fvc::interpolate(rDeltaT*rA*U.oldTime())&mesh().Sf() - ) - ) - ) - ); - } - else - { - FatalErrorIn - ( - "localEulerDdtScheme::fvcDdtPhiCorr" - ) << "dimensions of phi are not correct" - << abort(FatalError); - - return fluxFieldType::null(); - } + return fluxFieldType::null(); } } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.H index e48fb3c190..1c7992fc71 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.H @@ -148,16 +148,27 @@ public: typedef typename ddtScheme::fluxFieldType fluxFieldType; - tmp fvcDdtPhiCorr + tmp fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf + ); + + tmp fvcDdtPhiCorr + ( + const GeometricField& U, + const fluxFieldType& phi + ); + + tmp fvcDdtUfCorr + ( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf ); tmp fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi @@ -170,10 +181,17 @@ public: }; +template<> +tmp localEulerDdtScheme::fvcDdtUfCorr +( + const GeometricField& U, + const GeometricField& Uf +); + + template<> tmp localEulerDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& U, const surfaceScalarField& phi ); @@ -182,7 +200,6 @@ tmp localEulerDdtScheme::fvcDdtPhiCorr template<> tmp localEulerDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const volScalarField& U, const surfaceScalarField& phi diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C index dacae6a10c..838b951642 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C @@ -221,11 +221,10 @@ steadyStateDdtScheme::fvmDdt template tmp::fluxFieldType> -steadyStateDdtScheme::fvcDdtPhiCorr +steadyStateDdtScheme::fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf ) { return tmp @@ -234,8 +233,7 @@ steadyStateDdtScheme::fvcDdtPhiCorr ( IOobject ( - "ddtPhiCorr(" - + rA.name() + ',' + U.name() + ',' + phi.name() + ')', + "ddtCorr(" + U.name() + ',' + Uf.name() + ')', mesh().time().timeName(), mesh() ), @@ -243,7 +241,70 @@ steadyStateDdtScheme::fvcDdtPhiCorr dimensioned::type> ( "0", - rA.dimensions()*phi.dimensions()/dimTime, + mesh().Sf().dimensions()*Uf.dimensions()*dimArea/dimTime, + pTraits::type>::zero + ) + ) + ); +} + + +template +tmp::fluxFieldType> +steadyStateDdtScheme::fvcDdtPhiCorr +( + const GeometricField& U, + const fluxFieldType& phi +) +{ + return tmp + ( + new fluxFieldType + ( + IOobject + ( + "ddtCorr(" + U.name() + ',' + phi.name() + ')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned::type> + ( + "0", + phi.dimensions()/dimTime, + pTraits::type>::zero + ) + ) + ); +} + + +template +tmp::fluxFieldType> +steadyStateDdtScheme::fvcDdtUfCorr +( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf +) +{ + return tmp + ( + new fluxFieldType + ( + IOobject + ( + "ddtCorr(" + + rho.name() + + ',' + U.name() + ',' + Uf.name() + ')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned::type> + ( + "0", + rho.dimensions()*Uf.dimensions()*dimArea/dimTime, pTraits::type>::zero ) ) @@ -255,7 +316,6 @@ template tmp::fluxFieldType> steadyStateDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi @@ -267,8 +327,8 @@ steadyStateDdtScheme::fvcDdtPhiCorr ( IOobject ( - "ddtPhiCorr(" - + rA.name() + ',' + rho.name() + "ddtCorr(" + + rho.name() + ',' + U.name() + ',' + phi.name() + ')', mesh().time().timeName(), mesh() @@ -277,7 +337,7 @@ steadyStateDdtScheme::fvcDdtPhiCorr dimensioned::type> ( "0", - rA.dimensions()*rho.dimensions()*phi.dimensions()/dimTime, + rho.dimensions()*phi.dimensions()/dimTime, pTraits::type>::zero ) ) diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.H index ca2eebaefb..d5c3ba5959 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.H @@ -135,16 +135,27 @@ public: typedef typename ddtScheme::fluxFieldType fluxFieldType; - tmp fvcDdtPhiCorr + tmp fvcDdtUfCorr ( - const volScalarField& rA, const GeometricField& U, - const fluxFieldType& phi + const GeometricField& Uf + ); + + tmp fvcDdtPhiCorr + ( + const GeometricField& U, + const fluxFieldType& phi + ); + + tmp fvcDdtUfCorr + ( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf ); tmp fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const fluxFieldType& phi @@ -157,10 +168,17 @@ public: }; +template<> +tmp steadyStateDdtScheme::fvcDdtUfCorr +( + const GeometricField& U, + const GeometricField& Uf +); + + template<> tmp steadyStateDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& U, const surfaceScalarField& phi ); @@ -169,7 +187,6 @@ tmp steadyStateDdtScheme::fvcDdtPhiCorr template<> tmp steadyStateDdtScheme::fvcDdtPhiCorr ( - const volScalarField& rA, const volScalarField& rho, const volScalarField& U, const surfaceScalarField& phi diff --git a/src/finiteVolume/finiteVolume/fvc/fvcDdt.C b/src/finiteVolume/finiteVolume/fvc/fvcDdt.C index 8f36396a47..ecad662a21 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcDdt.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcDdt.C @@ -128,9 +128,24 @@ ddt template tmp::type, fvsPatchField, surfaceMesh> > -ddtPhiCorr +ddtCorr +( + const GeometricField& U, + const GeometricField& Uf +) +{ + return fv::ddtScheme::New + ( + U.mesh(), + U.mesh().ddtScheme("ddt(" + U.name() + ')') + )().fvcDdtUfCorr(U, Uf); +} + + +template +tmp::type, fvsPatchField, surfaceMesh> > +ddtCorr ( - const volScalarField& rA, const GeometricField& U, const GeometricField < @@ -144,15 +159,32 @@ ddtPhiCorr ( U.mesh(), U.mesh().ddtScheme("ddt(" + U.name() + ')') - )().fvcDdtPhiCorr(rA, U, phi); + )().fvcDdtPhiCorr(U, phi); } template tmp::type, fvsPatchField, surfaceMesh> > -ddtPhiCorr +ddtCorr +( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf +) +{ + return fv::ddtScheme::New + ( + U.mesh(), + U.mesh().ddtScheme("ddt(" + U.name() + ')') + )().fvcDdtPhiCorr(rho, U, U.mesh().Sf() & Uf); + //***HGW fvcDdtUfCorr(rho, U, Uf); +} + + +template +tmp::type, fvsPatchField, surfaceMesh> > +ddtCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const GeometricField @@ -167,7 +199,7 @@ ddtPhiCorr ( U.mesh(), U.mesh().ddtScheme("ddt(" + rho.name() + ',' + U.name() + ')') - )().fvcDdtPhiCorr(rA, rho, U, phi); + )().fvcDdtPhiCorr(rho, U, phi); } diff --git a/src/finiteVolume/finiteVolume/fvc/fvcDdt.H b/src/finiteVolume/finiteVolume/fvc/fvcDdt.H index 405b4cd655..5aca472469 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcDdt.H +++ b/src/finiteVolume/finiteVolume/fvc/fvcDdt.H @@ -113,9 +113,24 @@ namespace fvc surfaceMesh > > - ddtPhiCorr + ddtCorr + ( + const GeometricField& U, + const GeometricField& Uf + ); + + template + tmp + < + GeometricField + < + typename Foam::flux::type, + fvsPatchField, + surfaceMesh + > + > + ddtCorr ( - const volScalarField& rA, const GeometricField& U, const GeometricField < @@ -135,9 +150,25 @@ namespace fvc surfaceMesh > > - ddtPhiCorr + ddtCorr + ( + const volScalarField& rho, + const GeometricField& U, + const GeometricField& Uf + ); + + template + tmp + < + GeometricField + < + typename Foam::flux::type, + fvsPatchField, + surfaceMesh + > + > + ddtCorr ( - const volScalarField& rA, const volScalarField& rho, const GeometricField& U, const GeometricField diff --git a/tutorials/DNS/dnsFoam/boxTurb16/system/fvSchemes b/tutorials/DNS/dnsFoam/boxTurb16/system/fvSchemes index 21be868783..a1802e439b 100644 --- a/tutorials/DNS/dnsFoam/boxTurb16/system/fvSchemes +++ b/tutorials/DNS/dnsFoam/boxTurb16/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -35,15 +33,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nu,U) Gauss linear corrected; - laplacian(Dp,p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/basic/potentialFoam/cylinder/system/fvSchemes b/tutorials/basic/potentialFoam/cylinder/system/fvSchemes index d91aeb9342..ed633c033c 100644 --- a/tutorials/basic/potentialFoam/cylinder/system/fvSchemes +++ b/tutorials/basic/potentialFoam/cylinder/system/fvSchemes @@ -32,8 +32,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(1,p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/basic/potentialFoam/pitzDaily/system/fvSchemes b/tutorials/basic/potentialFoam/pitzDaily/system/fvSchemes index 63393b718a..076bce55b7 100644 --- a/tutorials/basic/potentialFoam/pitzDaily/system/fvSchemes +++ b/tutorials/basic/potentialFoam/pitzDaily/system/fvSchemes @@ -32,8 +32,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(1,p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes index a3dcbfcc2e..b8943aa44f 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes @@ -56,15 +56,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear limited corrected 0.333; - laplacian(DkEff,k) Gauss linear limited corrected 0.333; - laplacian(DepsilonEff,epsilon) Gauss linear limited corrected 0.333; - laplacian((rho*inv((((1)*A(U))+tDragDcu))),p) Gauss linear limited corrected 0.333; - laplacian(Db,b) Gauss linear limited corrected 0.333; - laplacian(Db,ft) Gauss linear limited corrected 0.333; - laplacian(Db,ha) Gauss linear limited corrected 0.333; - laplacian(Db,hau) Gauss linear limited corrected 0.333; + default Gauss linear limited corrected 0.333; } interpolationSchemes diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes index 07e007d275..c23bdd6acf 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes @@ -54,16 +54,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian((rho*(1|A(U))),p) Gauss linear corrected; - laplacian(alphaEff,b) Gauss linear corrected; - laplacian(alphaEff,ft) Gauss linear corrected; - laplacian(alphaEff,ha) Gauss linear corrected; - laplacian(alphaEff,hau) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes index ce5f53c2cf..2752126264 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes @@ -46,14 +46,7 @@ divSchemes laplacianSchemes { - //default none; default Gauss linear corrected; - laplacian(muEff,U) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(thermo:alpha,h) Gauss linear corrected; - laplacian((((rho*(1|A(U)))*rho)*gh)) Gauss linear corrected; - laplacian(interpolate((rho*(1|A(U)))),p) Gauss linear corrected; - laplacian(gammaRad,G) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSchemes b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSchemes index 62fadfb8ca..cec14e1fb5 100644 --- a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSchemes +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSchemes @@ -23,7 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes @@ -45,15 +44,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(mut,U) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DomegaEff,omega) Gauss linear corrected; - laplacian(Dp,p) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/polyMesh/boundary b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/polyMesh/boundary index 0cd72ae7a4..2d2096ddc3 100644 --- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/polyMesh/boundary +++ b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/polyMesh/boundary @@ -22,77 +22,77 @@ FoamFile type patch; inGroups 1(inlet); nFaces 544; - startFace 244948; + startFace 245836; } outerInlet { type patch; inGroups 1(inlet); - nFaces 1396; - startFace 245492; + nFaces 1404; + startFace 246380; } innerOutlet { type patch; inGroups 1(outlet); nFaces 544; - startFace 246888; + startFace 247784; } outerOutlet { type patch; inGroups 1(outlet); - nFaces 1396; - startFace 247432; + nFaces 1404; + startFace 248328; } rotorBlades { type wall; inGroups 1(movingWalls); nFaces 540; - startFace 248828; + startFace 249732; } rotorBlades_slave { type wall; inGroups 1(movingWalls); nFaces 540; - startFace 249368; + startFace 250272; } shaft { type wall; inGroups 1(movingWalls); - nFaces 1052; - startFace 249908; + nFaces 1044; + startFace 250812; } statorBlades { type wall; inGroups 1(staticWalls); nFaces 2128; - startFace 250960; + startFace 251856; } statorBlades_slave { type wall; inGroups 1(staticWalls); nFaces 2128; - startFace 253088; + startFace 253984; } wall { type wall; inGroups 1(staticWalls); - nFaces 5808; - startFace 255216; + nFaces 6165; + startFace 256112; } AMI1 { type cyclicAMI; inGroups 1(cyclicAMI); nFaces 10944; - startFace 261024; + startFace 262277; matchTolerance 0.0001; transform noOrdering; neighbourPatch AMI2; @@ -102,7 +102,7 @@ FoamFile type cyclicAMI; inGroups 1(cyclicAMI); nFaces 10944; - startFace 271968; + startFace 273221; matchTolerance 0.0001; transform noOrdering; neighbourPatch AMI1; diff --git a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary index 313dcceba1..43b78ef411 100644 --- a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary @@ -44,6 +44,7 @@ FoamFile frontAndBack { type empty; + inGroups 1(empty); nFaces 24450; startFace 24730; } diff --git a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes index de66185079..1b84b2505e 100644 --- a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes @@ -40,13 +40,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(Dp,p) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DBEff,B) Gauss linear corrected; - laplacian(DmuTildaEff,muTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes index 391c95e6dc..5d15eae6c0 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes @@ -23,7 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes @@ -45,15 +44,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(mut,U) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DomegaEff,omega) Gauss linear corrected; - laplacian(Dp,p) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes index 0fa6ebaf33..d0a93e860b 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes @@ -23,7 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes @@ -45,15 +44,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear orthogonal; - laplacian(mut,U) Gauss linear orthogonal; - laplacian(DkEff,k) Gauss linear orthogonal; - laplacian(DepsilonEff,epsilon) Gauss linear orthogonal; - laplacian(DREff,R) Gauss linear orthogonal; - laplacian(DomegaEff,omega) Gauss linear orthogonal; - laplacian(Dp,p) Gauss linear orthogonal; - laplacian(alphaEff,h) Gauss linear orthogonal; + default Gauss linear orthogonal; } interpolationSchemes diff --git a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/system/fvSchemes index d49880685b..db6494d806 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/system/fvSchemes @@ -38,18 +38,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(Dp,p) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSchemes b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSchemes index 391c95e6dc..5d15eae6c0 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSchemes +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSchemes @@ -23,7 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes @@ -45,15 +44,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(mut,U) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DomegaEff,omega) Gauss linear corrected; - laplacian(Dp,p) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes index e106336cb2..f83203612e 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes @@ -37,12 +37,7 @@ divSchemes laplacianSchemes { - laplacian(muEff,U) Gauss linear corrected; - laplacian(alphaEff,e) Gauss linear corrected; - laplacian((rho*rAU),p) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(1,p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes index e106336cb2..f83203612e 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes @@ -37,12 +37,7 @@ divSchemes laplacianSchemes { - laplacian(muEff,U) Gauss linear corrected; - laplacian(alphaEff,e) Gauss linear corrected; - laplacian((rho*rAU),p) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(1,p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSchemes b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSchemes index 576b46fe86..b4ca79e3c8 100644 --- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSchemes +++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSchemes @@ -27,6 +27,8 @@ gradSchemes divSchemes { + default none; + div(phi,U) bounded Gauss upwind; div((muEff*dev2(T(grad(U))))) Gauss linear; div(phi,e) bounded Gauss upwind; @@ -37,11 +39,7 @@ divSchemes laplacianSchemes { - laplacian(muEff,U) Gauss linear corrected; - laplacian(alphaEff,e) Gauss linear corrected; - laplacian((rho*(1|A(U))),p) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSchemes b/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSchemes index d58e73d6fc..4d56bbf40f 100644 --- a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSchemes +++ b/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSchemes @@ -44,6 +44,7 @@ laplacianSchemes interpolationSchemes { default linear; + hmm limitedLinear phi 1; } snGradSchemes diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSchemes b/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSchemes index d1a9bb7aa1..0e2f9b22f7 100644 --- a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSchemes +++ b/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSchemes @@ -23,7 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes @@ -35,9 +34,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(mu,U) Gauss linear corrected; - laplacian(Dp,p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSchemes b/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSchemes index 34fc9a543d..26477dec7e 100644 --- a/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSchemes +++ b/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad((DBU*magSqr(B))) Gauss linear; } divSchemes @@ -38,18 +36,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nu,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DB,B) Gauss linear corrected; - laplacian((1|A(B)),pB) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(HbyA) linear; - interpolate(B) linear; } snGradSchemes diff --git a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes index 4a18c080d1..2ea94995ae 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes @@ -28,6 +28,7 @@ gradSchemes divSchemes { default none; + div(phi,U) Gauss upwind; div(phi,T) Gauss upwind; div(phi,k) Gauss upwind; @@ -39,13 +40,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear uncorrected; - laplacian(Dp,p_rgh) Gauss linear uncorrected; - laplacian(alphaEff,T) Gauss linear uncorrected; - laplacian(DkEff,k) Gauss linear uncorrected; - laplacian(DepsilonEff,epsilon) Gauss linear uncorrected; - laplacian(DREff,R) Gauss linear uncorrected; + default Gauss linear uncorrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes index 44dc6e2a70..7f51468ad7 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes @@ -28,6 +28,7 @@ gradSchemes divSchemes { default none; + div(phi,U) bounded Gauss upwind; div(phi,T) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; @@ -37,13 +38,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian(Dp,p_rgh) Gauss linear corrected; - laplacian(alphaEff,T) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSchemes b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSchemes index 3d626150a0..bba4ac8e0c 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSchemes @@ -28,6 +28,7 @@ gradSchemes divSchemes { default none; + div(phi,U) bounded Gauss upwind; div(phi,T) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; @@ -39,13 +40,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear limited corrected 0.333; - laplacian(Dp,p_rgh) Gauss linear limited corrected 0.333; - laplacian(alphaEff,T) Gauss linear limited corrected 0.333; - laplacian(DkEff,k) Gauss linear limited corrected 0.333; - laplacian(DepsilonEff,epsilon) Gauss linear limited corrected 0.333; - laplacian(DREff,R) Gauss linear limited corrected 0.333; + default Gauss linear limited corrected 0.333; } interpolationSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes index c52c053c84..ef0a3305cf 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) bounded Gauss limitedLinear 0.2; div(phi,K) bounded Gauss limitedLinear 0.2; div(phi,h) bounded Gauss limitedLinear 0.2; @@ -38,13 +39,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear orthogonal; - laplacian(Dp,p_rgh) Gauss linear orthogonal; - laplacian(alphaEff,h) Gauss linear orthogonal; - laplacian(DkEff,k) Gauss linear orthogonal; - laplacian(DepsilonEff,epsilon) Gauss linear orthogonal; - laplacian(DomegaEff,omega) Gauss linear orthogonal; + default Gauss linear orthogonal; } interpolationSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes index 573f34703a..2346e19d47 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) bounded Gauss limitedLinear 0.2; div(phi,K) bounded Gauss limitedLinear 0.2; div(phi,h) bounded Gauss limitedLinear 0.2; @@ -38,13 +39,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear uncorrected; - laplacian(Dp,p_rgh) Gauss linear uncorrected; - laplacian(alphaEff,h) Gauss linear uncorrected; - laplacian(DkEff,k) Gauss linear uncorrected; - laplacian(DepsilonEff,epsilon) Gauss linear uncorrected; - laplacian(DomegaEff,omega) Gauss linear uncorrected; + default Gauss linear uncorrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/system/fvSchemes index c52c053c84..ef0a3305cf 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/system/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) bounded Gauss limitedLinear 0.2; div(phi,K) bounded Gauss limitedLinear 0.2; div(phi,h) bounded Gauss limitedLinear 0.2; @@ -38,13 +39,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear orthogonal; - laplacian(Dp,p_rgh) Gauss linear orthogonal; - laplacian(alphaEff,h) Gauss linear orthogonal; - laplacian(DkEff,k) Gauss linear orthogonal; - laplacian(DepsilonEff,epsilon) Gauss linear orthogonal; - laplacian(DomegaEff,omega) Gauss linear orthogonal; + default Gauss linear orthogonal; } interpolationSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes index 74a1cb4a71..61edc1623f 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes @@ -26,7 +26,8 @@ gradSchemes divSchemes { - default none; + default none; + div(phi,U) Gauss upwind; div(phi,K) Gauss linear; div(phi,h) Gauss upwind; @@ -39,13 +40,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear limited corrected 0.333; - laplacian(Dp,p_rgh) Gauss linear limited corrected 0.333; - laplacian(alphaEff,h) Gauss linear limited corrected 0.333; - laplacian(DkEff,k) Gauss linear limited corrected 0.333; - laplacian(DepsilonEff,epsilon) Gauss linear limited corrected 0.333; - laplacian(DREff,R) Gauss linear limited corrected 0.333; + default Gauss linear limited corrected 0.333; } interpolationSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSchemes index 8dce282ff2..74d5623cb3 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) Gauss upwind; div(phi,K) Gauss linear; div(phi,h) Gauss upwind; @@ -39,13 +40,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear limited corrected 0.333; - laplacian(Dp,p_rgh) Gauss linear limited corrected 0.333; - laplacian(alphaEff,h) Gauss linear limited corrected 0.333; - laplacian(DkEff,k) Gauss linear limited corrected 0.333; - laplacian(DepsilonEff,epsilon) Gauss linear limited corrected 0.333; - laplacian(DREff,R) Gauss linear limited corrected 0.333; + default Gauss linear limited corrected 0.333; } interpolationSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/fvSchemes index 8dce282ff2..e08f93840a 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) Gauss upwind; div(phi,K) Gauss linear; div(phi,h) Gauss upwind; @@ -39,13 +40,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear limited corrected 0.333; - laplacian(Dp,p_rgh) Gauss linear limited corrected 0.333; - laplacian(alphaEff,h) Gauss linear limited corrected 0.333; - laplacian(DkEff,k) Gauss linear limited corrected 0.333; - laplacian(DepsilonEff,epsilon) Gauss linear limited corrected 0.333; - laplacian(DREff,R) Gauss linear limited corrected 0.333; + default Gauss linear limited corrected 0.333; } interpolationSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topAir/fvSchemes index 8dce282ff2..74d5623cb3 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topAir/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) Gauss upwind; div(phi,K) Gauss linear; div(phi,h) Gauss upwind; @@ -39,13 +40,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear limited corrected 0.333; - laplacian(Dp,p_rgh) Gauss linear limited corrected 0.333; - laplacian(alphaEff,h) Gauss linear limited corrected 0.333; - laplacian(DkEff,k) Gauss linear limited corrected 0.333; - laplacian(DepsilonEff,epsilon) Gauss linear limited corrected 0.333; - laplacian(DREff,R) Gauss linear limited corrected 0.333; + default Gauss linear limited corrected 0.333; } interpolationSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSchemes index 8dce282ff2..74d5623cb3 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) Gauss upwind; div(phi,K) Gauss linear; div(phi,h) Gauss upwind; @@ -39,13 +40,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear limited corrected 0.333; - laplacian(Dp,p_rgh) Gauss linear limited corrected 0.333; - laplacian(alphaEff,h) Gauss linear limited corrected 0.333; - laplacian(DkEff,k) Gauss linear limited corrected 0.333; - laplacian(DepsilonEff,epsilon) Gauss linear limited corrected 0.333; - laplacian(DREff,R) Gauss linear limited corrected 0.333; + default Gauss linear limited corrected 0.333; } interpolationSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSchemes index 8dce282ff2..74d5623cb3 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) Gauss upwind; div(phi,K) Gauss linear; div(phi,h) Gauss upwind; @@ -39,13 +40,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear limited corrected 0.333; - laplacian(Dp,p_rgh) Gauss linear limited corrected 0.333; - laplacian(alphaEff,h) Gauss linear limited corrected 0.333; - laplacian(DkEff,k) Gauss linear limited corrected 0.333; - laplacian(DepsilonEff,epsilon) Gauss linear limited corrected 0.333; - laplacian(DREff,R) Gauss linear limited corrected 0.333; + default Gauss linear limited corrected 0.333; } interpolationSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/fvSchemes index 2a65c2d5f0..c5c1935f60 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) bounded Gauss upwind; div(phi,K) bounded Gauss upwind; div(phi,h) bounded Gauss upwind; @@ -40,13 +41,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear uncorrected; - laplacian(Dp,p_rgh) Gauss linear uncorrected; - laplacian(alphaEff,h) Gauss linear uncorrected; - laplacian(DkEff,k) Gauss linear uncorrected; - laplacian(DepsilonEff,epsilon) Gauss linear uncorrected; - laplacian(DREff,R) Gauss linear uncorrected; + default Gauss linear uncorrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/fvSchemes index 1f8388eeb2..8acd8191b2 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) bounded Gauss upwind; div(phi,K) bounded Gauss upwind; div(phi,h) bounded Gauss upwind; @@ -40,13 +41,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear uncorrected; - laplacian(Dp,p_rgh) Gauss linear uncorrected; - laplacian(alphaEff,h) Gauss linear uncorrected; - laplacian(DkEff,k) Gauss linear uncorrected; - laplacian(DepsilonEff,epsilon) Gauss linear uncorrected; - laplacian(DREff,R) Gauss linear uncorrected; + default Gauss linear uncorrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes index 02d978723c..127c9c965f 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) bounded Gauss upwind; div(phi,K) bounded Gauss upwind; div(phi,h) bounded Gauss upwind; @@ -41,14 +42,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear uncorrected; - laplacian(Dp,p_rgh) Gauss linear uncorrected; - laplacian(alphaEff,h) Gauss linear uncorrected; - laplacian(DkEff,k) Gauss linear uncorrected; - laplacian(DepsilonEff,epsilon) Gauss linear uncorrected; - laplacian(DREff,R) Gauss linear uncorrected; - laplacian(gammaRad,G) Gauss linear uncorrected; + default Gauss linear uncorrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSchemes index 02d978723c..127c9c965f 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSchemes @@ -27,6 +27,7 @@ gradSchemes divSchemes { default none; + div(phi,U) bounded Gauss upwind; div(phi,K) bounded Gauss upwind; div(phi,h) bounded Gauss upwind; @@ -41,14 +42,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear uncorrected; - laplacian(Dp,p_rgh) Gauss linear uncorrected; - laplacian(alphaEff,h) Gauss linear uncorrected; - laplacian(DkEff,k) Gauss linear uncorrected; - laplacian(DepsilonEff,epsilon) Gauss linear uncorrected; - laplacian(DREff,R) Gauss linear uncorrected; - laplacian(gammaRad,G) Gauss linear uncorrected; + default Gauss linear uncorrected; } interpolationSchemes diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes b/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes index 5553c2789f..d930009138 100644 --- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes +++ b/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes @@ -36,11 +36,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,Urel) Gauss linear corrected; - laplacian((1|A(Urel)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes b/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes index db947bf4a6..bc9d3bc597 100644 --- a/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes +++ b/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(Urel) Gauss linear; } divSchemes @@ -42,14 +40,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,Urel) Gauss linear corrected; - laplacian((1|A(Urel)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DomegaEff,omega) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes index d06e77f4d5..de12e1d3a8 100644 --- a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes @@ -23,9 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -44,21 +41,11 @@ divSchemes laplacianSchemes { default Gauss linear corrected; - - laplacian(nuEff,U) Gauss linear corrected; - laplacian(1,p) Gauss linear corrected; - laplacian(1|A(U),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - - laplacian(nuEff,Ua) Gauss linear corrected; - laplacian(1|A(Ua),pa) Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/icoFoam/cavity/system/fvSchemes b/tutorials/incompressible/icoFoam/cavity/system/fvSchemes index c311eb8961..dede0a6cba 100644 --- a/tutorials/incompressible/icoFoam/cavity/system/fvSchemes +++ b/tutorials/incompressible/icoFoam/cavity/system/fvSchemes @@ -34,15 +34,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nu,U) Gauss linear orthogonal; - laplacian((1|A(U)),p) Gauss linear orthogonal; + default Gauss linear orthogonal; } interpolationSchemes { default linear; - interpolate(HbyA) linear; } snGradSchemes diff --git a/tutorials/incompressible/icoFoam/cavityClipped/system/fvSchemes b/tutorials/incompressible/icoFoam/cavityClipped/system/fvSchemes index c311eb8961..dd463415d9 100644 --- a/tutorials/incompressible/icoFoam/cavityClipped/system/fvSchemes +++ b/tutorials/incompressible/icoFoam/cavityClipped/system/fvSchemes @@ -23,7 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes @@ -34,15 +33,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nu,U) Gauss linear orthogonal; - laplacian((1|A(U)),p) Gauss linear orthogonal; + default Gauss linear orthogonal; } interpolationSchemes { default linear; - interpolate(HbyA) linear; } snGradSchemes diff --git a/tutorials/incompressible/icoFoam/cavityGrade/system/fvSchemes b/tutorials/incompressible/icoFoam/cavityGrade/system/fvSchemes index b9f9c65223..ec51402ce5 100644 --- a/tutorials/incompressible/icoFoam/cavityGrade/system/fvSchemes +++ b/tutorials/incompressible/icoFoam/cavityGrade/system/fvSchemes @@ -23,7 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes @@ -34,15 +33,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nu,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(HbyA) linear; } snGradSchemes diff --git a/tutorials/incompressible/icoFoam/elbow/system/fvSchemes b/tutorials/incompressible/icoFoam/elbow/system/fvSchemes index a2b3dd2dcd..2c4dcb7a1e 100644 --- a/tutorials/incompressible/icoFoam/elbow/system/fvSchemes +++ b/tutorials/incompressible/icoFoam/elbow/system/fvSchemes @@ -23,7 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes @@ -34,15 +33,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nu,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(HbyA) linear; } snGradSchemes diff --git a/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSchemes b/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSchemes index e0b9b89cd8..302740c304 100644 --- a/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSchemes +++ b/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSchemes @@ -34,15 +34,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nu,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes index bfd86f807a..14f066ebe9 100644 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes @@ -41,13 +41,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear limited corrected 0.5; - laplacian(DkEff,k) Gauss linear limited corrected 0.5; - laplacian(DREff,R) Gauss linear limited corrected 0.5; - laplacian(DepsilonEff,epsilon) Gauss linear limited corrected 0.5; - laplacian((rho*(1|A(U))),p) Gauss linear limited corrected 0.5; - laplacian(alphaEff,e) Gauss linear limited corrected 0.5; + default Gauss linear limited corrected 0.5; } interpolationSchemes diff --git a/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes b/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes index 6a9eea83dd..a59b75bee9 100644 --- a/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -41,19 +39,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes index 6a9eea83dd..a59b75bee9 100644 --- a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -41,19 +39,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes b/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes index 3a969f9066..6d5ef5ab97 100644 --- a/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -40,18 +38,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DBEff,B) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes index 5bfe52ccae..898761e5e6 100644 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes @@ -42,15 +42,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(alphaTEff,omega) Gauss linear corrected; - laplacian(alphaTEff,kt) Gauss linear corrected; - laplacian(nu,kl) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes b/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes index ed36d4184f..45cce4ef17 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -40,18 +38,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DBEff,B) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes b/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes index c354900be1..51df032f74 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -40,18 +38,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DBEff,B) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes b/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes index 6a9eea83dd..a59b75bee9 100644 --- a/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -41,19 +39,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes b/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes index 6a9eea83dd..a59b75bee9 100644 --- a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -41,19 +39,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes b/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes index fbd760de1f..5db0abc188 100644 --- a/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes +++ b/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes @@ -23,12 +23,12 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(U) Gauss linear; - grad(p) Gauss linear; } divSchemes { + default none; + div(phi,U) bounded Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; div(phi,epsilon) bounded Gauss upwind; @@ -37,11 +37,7 @@ divSchemes laplacianSchemes { - laplacian(nuEff,U) Gauss linear corrected; - laplacian(rAU,p) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(1,p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes index fbd760de1f..9376d23004 100644 --- a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes +++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes @@ -23,12 +23,12 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(U) Gauss linear; - grad(p) Gauss linear; } divSchemes { + default none; + div(phi,U) bounded Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; div(phi,epsilon) bounded Gauss upwind; @@ -37,11 +37,7 @@ divSchemes laplacianSchemes { - laplacian(nuEff,U) Gauss linear corrected; - laplacian(rAU,p) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(1,p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes index 036a75cf3c..82039ee1fc 100644 --- a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes +++ b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { default none; - div(phiv,hU) Gauss linear; + div(phiv,hU) Gauss LUST un; } laplacianSchemes diff --git a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution index 0dac22874f..76309729fe 100644 --- a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution +++ b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution @@ -20,14 +20,14 @@ solvers { solver PCG; preconditioner DIC; - tolerance 1e-6; + tolerance 1e-10; relTol 0.01; } hFinal { $h; - tolerance 1e-8; + tolerance 1e-10; relTol 0; } @@ -35,14 +35,14 @@ solvers { solver PBiCG; preconditioner DILU; - tolerance 1e-6; + tolerance 1e-10; relTol 0.1; } hUFinal { $hU; - tolerance 1e-6; + tolerance 1e-10; relTol 0; } } diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes b/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes index bd2f1c8952..e0aad005a3 100644 --- a/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -37,17 +35,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; - laplacian(1,p) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes b/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes index d4699567a4..dddcf6c24b 100644 --- a/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -38,17 +36,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes b/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes index 51aa595fac..eb56b2a74b 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -41,19 +39,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes b/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes index 540ac90b64..821adc7eb9 100644 --- a/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -41,19 +39,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes index 540ac90b64..821adc7eb9 100644 --- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes @@ -23,8 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -41,19 +39,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nuEff,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(U) linear; } snGradSchemes diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes index 1dcd78d42c..3bcfc65ff8 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes @@ -23,12 +23,12 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes { default none; + div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; @@ -43,13 +43,6 @@ divSchemes laplacianSchemes { default Gauss linear orthogonal; - laplacian(muEff,U) Gauss linear orthogonal; - laplacian(mut,U) Gauss linear orthogonal; - laplacian(DkEff,k) Gauss linear orthogonal; - laplacian(DepsilonEff,epsilon) Gauss linear orthogonal; - laplacian(DREff,R) Gauss linear orthogonal; - laplacian((rho*(1|A(U))),p) Gauss linear orthogonal; - laplacian(alphaEff,h) Gauss linear orthogonal; } interpolationSchemes diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/system/fvSchemes b/tutorials/lagrangian/reactingParcelFoam/filter/system/fvSchemes index dc13503bc6..cbdf8c0b4a 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFoam/filter/system/fvSchemes @@ -23,12 +23,12 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes { default none; + div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; @@ -43,13 +43,6 @@ divSchemes laplacianSchemes { default Gauss linear corrected; - laplacian(muEff,U) Gauss linear corrected; - laplacian(mut,U) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian((rho*(1|A(U))),p) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes index 03bad88200..c4a6d627c3 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes @@ -23,12 +23,12 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes { default none; + div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; @@ -42,13 +42,6 @@ divSchemes laplacianSchemes { default Gauss linear orthogonal; - laplacian(muEff,U) Gauss linear orthogonal; - laplacian(mut,U) Gauss linear orthogonal; - laplacian(DkEff,k) Gauss linear orthogonal; - laplacian(DepsilonEff,epsilon) Gauss linear orthogonal; - laplacian(DREff,R) Gauss linear orthogonal; - laplacian((rho*(1|A(U))),p) Gauss linear orthogonal; - laplacian(alphaEff,h) Gauss linear orthogonal; } interpolationSchemes diff --git a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSchemes b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSchemes index efebfd5914..633d26bfba 100644 --- a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSchemes +++ b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSchemes @@ -23,7 +23,6 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes @@ -34,17 +33,12 @@ divSchemes laplacianSchemes { - default none; - laplacian(nu,U) Gauss linear corrected; - laplacian((1|A(U)),p) Gauss linear corrected; - laplacian(diffusivity,cellDisplacement) Gauss linear corrected; - laplacian(diffusivity,cellMotionU) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(HbyA) linear; } snGradSchemes diff --git a/tutorials/multiphase/MRFInterFoam/mixerVessel2D/constant/polyMesh/boundary b/tutorials/multiphase/MRFInterFoam/mixerVessel2D/constant/polyMesh/boundary index 292f25b806..188a0f0c58 100644 --- a/tutorials/multiphase/MRFInterFoam/mixerVessel2D/constant/polyMesh/boundary +++ b/tutorials/multiphase/MRFInterFoam/mixerVessel2D/constant/polyMesh/boundary @@ -32,12 +32,14 @@ FoamFile front { type empty; + inGroups 1(empty); nFaces 3072; startFace 6336; } back { type empty; + inGroups 1(empty); nFaces 3072; startFace 9408; } diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes index 08a4e20e6b..6b7b46498b 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes @@ -41,18 +41,12 @@ gradSchemes laplacianSchemes { - default none; - laplacian(nuf,rhoU) Gauss linear corrected; - laplacian(muEff,U) Gauss linear corrected; - laplacian(Dp,p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(1,p) Gauss linear corrected; + default Gauss linear corrected; } snGradSchemes { - default none; - snGrad(p) corrected; + default corrected; } fluxRequired diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes index 08a4e20e6b..f7e2958bf6 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes @@ -28,6 +28,7 @@ interpolationSchemes divSchemes { default none; + div(phiv,rho) Gauss vanLeer; div(phi,U) Gauss LUST grad(U); div(phiv,k) Gauss LUST grad(k); @@ -41,18 +42,12 @@ gradSchemes laplacianSchemes { - default none; - laplacian(nuf,rhoU) Gauss linear corrected; - laplacian(muEff,U) Gauss linear corrected; - laplacian(Dp,p) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(1,p) Gauss linear corrected; + default Gauss linear corrected; } snGradSchemes { - default none; - snGrad(p) corrected; + default corrected; } fluxRequired diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes index 32379fb2c2..6f20de56af 100644 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes @@ -42,13 +42,7 @@ gradSchemes laplacianSchemes { - default none; - laplacian(nuf,rhoU) Gauss linear corrected; - laplacian(muEff,U) Gauss linear corrected; - laplacian(Dp,p) Gauss linear corrected; - laplacian(DomegaEff,omega) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(1,p) Gauss linear corrected; + default Gauss linear corrected; } snGradSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict index f9baf8b3e1..6c2f78df72 100644 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict +++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict @@ -39,9 +39,7 @@ dynamicRefineFvMeshCoeffs // on surfaceScalarFields that do not need to be reinterpolated. correctFluxes ( - (phi Urel) - (phiAbs U) - (phiAbs_0 U_0) + (phi none) (nHatf none) (rho*phi none) (ghf none) diff --git a/tutorials/multiphase/interFoam/laminar/capillaryRise/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/laminar/capillaryRise/constant/polyMesh/boundary index 0e7b589d2c..cf4e8be38f 100644 --- a/tutorials/multiphase/interFoam/laminar/capillaryRise/constant/polyMesh/boundary +++ b/tutorials/multiphase/interFoam/laminar/capillaryRise/constant/polyMesh/boundary @@ -38,6 +38,7 @@ FoamFile frontAndBack { type empty; + inGroups 1(empty); nFaces 16000; startFace 16420; } diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/laminar/damBreak/constant/polyMesh/boundary index 41c06d5f3f..1b4dbb60aa 100644 --- a/tutorials/multiphase/interFoam/laminar/damBreak/constant/polyMesh/boundary +++ b/tutorials/multiphase/interFoam/laminar/damBreak/constant/polyMesh/boundary @@ -44,6 +44,7 @@ FoamFile defaultFaces { type empty; + inGroups 1(empty); nFaces 4536; startFace 4640; } diff --git a/tutorials/multiphase/interFoam/ras/damBreak/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/ras/damBreak/constant/polyMesh/boundary index 41c06d5f3f..1b4dbb60aa 100644 --- a/tutorials/multiphase/interFoam/ras/damBreak/constant/polyMesh/boundary +++ b/tutorials/multiphase/interFoam/ras/damBreak/constant/polyMesh/boundary @@ -44,6 +44,7 @@ FoamFile defaultFaces { type empty; + inGroups 1(empty); nFaces 4536; startFace 4640; } diff --git a/tutorials/multiphase/interFoam/ras/weirOverflow/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/ras/weirOverflow/constant/polyMesh/boundary index e7fe171353..4b7a214d35 100644 --- a/tutorials/multiphase/interFoam/ras/weirOverflow/constant/polyMesh/boundary +++ b/tutorials/multiphase/interFoam/ras/weirOverflow/constant/polyMesh/boundary @@ -44,6 +44,7 @@ FoamFile defaultFaces { type empty; + inGroups 1(empty); nFaces 10160; startFace 10339; } diff --git a/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allclean b/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allclean index 781018201d..d6094819b8 100755 --- a/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allclean +++ b/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allclean @@ -2,6 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory foamCleanTutorials cases -rm -rf 0/alpha[1-3] 0/alpha[1-3].gz +rm -rf alpha.air alpha.other alpha.water \ + alpha.air.gz alpha.other.gz alpha.water.gz # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary index b393a341aa..8b9ef8e645 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary @@ -32,13 +32,14 @@ FoamFile walls { type symmetryPlane; + inGroups 1(symmetryPlane); nFaces 3000; startFace 1130431; } bullet { type wall; - nFaces 37743; + nFaces 37752; startFace 1133431; } ) diff --git a/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSchemes b/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSchemes index 026c549f6c..49ebc8609b 100644 --- a/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSchemes +++ b/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSchemes @@ -28,6 +28,7 @@ gradSchemes divSchemes { default none; + div(phi,U) Gauss linearUpwind grad(U); div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; @@ -37,12 +38,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(Dp,p_rgh) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(mut,Alpha) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSchemes b/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSchemes index ffdb15771e..4bd3ba1812 100644 --- a/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSchemes +++ b/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSchemes @@ -28,6 +28,7 @@ gradSchemes divSchemes { default none; + div(phi,U) Gauss limitedLinearV 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; @@ -37,12 +38,7 @@ divSchemes laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(Dp,p_rgh) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(mut,Alpha) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes