diff --git a/applications/solvers/DNS/dnsFoam/dnsFoam.C b/applications/solvers/DNS/dnsFoam/dnsFoam.C index eb1e69c41b..34f212bc4d 100644 --- a/applications/solvers/DNS/dnsFoam/dnsFoam.C +++ b/applications/solvers/DNS/dnsFoam/dnsFoam.C @@ -85,15 +85,15 @@ int main(int argc, char *argv[]) for (int corr=1; corr<=1; corr++) { - volScalarField rUA = 1.0/UEqn.A(); + volScalarField rAU = 1.0/UEqn.A(); - U = rUA*UEqn.H(); + U = rAU*UEqn.H(); phi = (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, U, phi); + + fvc::ddtPhiCorr(rAU, U, phi); fvScalarMatrix pEqn ( - fvm::laplacian(rUA, p) == fvc::div(phi) + fvm::laplacian(rAU, p) == fvc::div(phi) ); pEqn.solve(); @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) #include "continuityErrs.H" - U -= rUA*fvc::grad(p); + U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); } diff --git a/applications/solvers/combustion/PDRFoam/pEqn.H b/applications/solvers/combustion/PDRFoam/pEqn.H index 524c8eac74..9042837f54 100644 --- a/applications/solvers/combustion/PDRFoam/pEqn.H +++ b/applications/solvers/combustion/PDRFoam/pEqn.H @@ -1,6 +1,6 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); +volScalarField rAU = 1.0/UEqn.A(); U = invA & UEqn.H(); if (transonic) @@ -11,7 +11,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -38,7 +38,7 @@ else fvc::interpolate(rho)* ( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) diff --git a/applications/solvers/combustion/XiFoam/pEqn.H b/applications/solvers/combustion/XiFoam/pEqn.H index 9443f909a3..3d414f4af6 100644 --- a/applications/solvers/combustion/XiFoam/pEqn.H +++ b/applications/solvers/combustion/XiFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +U = rAU*UEqn.H(); if (transonic) { @@ -11,7 +11,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -21,7 +21,7 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -38,7 +38,7 @@ else fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -47,7 +47,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -62,7 +62,7 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/dieselFoam/pEqn.H b/applications/solvers/combustion/dieselFoam/pEqn.H index d74947fe53..f1b66877a0 100644 --- a/applications/solvers/combustion/dieselFoam/pEqn.H +++ b/applications/solvers/combustion/dieselFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +U = rAU*UEqn.H(); if (transonic) { @@ -11,7 +11,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -21,7 +21,7 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) == Sevap ); @@ -40,7 +40,7 @@ else fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -49,7 +49,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) == Sevap ); @@ -66,7 +66,7 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/engineFoam/pEqn.H b/applications/solvers/combustion/engineFoam/pEqn.H index 39b4967312..913180f794 100644 --- a/applications/solvers/combustion/engineFoam/pEqn.H +++ b/applications/solvers/combustion/engineFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +U = rAU*UEqn.H(); if (transonic) { @@ -18,7 +18,7 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p, "div(phid,p)") - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -40,7 +40,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -55,7 +55,7 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/fireFoam/pEqn.H b/applications/solvers/combustion/fireFoam/pEqn.H index b31a7c6636..135b55d879 100644 --- a/applications/solvers/combustion/fireFoam/pEqn.H +++ b/applications/solvers/combustion/fireFoam/pEqn.H @@ -1,29 +1,29 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA)); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU)); +U = rAU*UEqn.H(); surfaceScalarField phiU ( fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); -phi = phiU - rhorUAf*ghf*fvc::snGrad(rho)*mesh.magSf(); +phi = phiU - rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf(); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - surfaceScalarField rhorUAf = fvc::interpolate(rho*rUA); + surfaceScalarField rhorAUf = fvc::interpolate(rho*rAU); fvScalarMatrix p_rghEqn ( fvm::ddt(psi, p_rgh) + fvc::ddt(psi, rho)*gh + fvc::div(phi) - - fvm::laplacian(rhorUAf, p_rgh) + - fvm::laplacian(rhorAUf, p_rgh) ); p_rghEqn.solve @@ -52,7 +52,7 @@ p = p_rgh + rho*gh; #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf); +U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/reactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/pEqn.H index 9443f909a3..3d414f4af6 100644 --- a/applications/solvers/combustion/reactingFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +U = rAU*UEqn.H(); if (transonic) { @@ -11,7 +11,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -21,7 +21,7 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -38,7 +38,7 @@ else fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -47,7 +47,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -62,7 +62,7 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/rhoReactingFoam/pEqn.H index c76ab5110b..45ae3c1e5f 100644 --- a/applications/solvers/combustion/rhoReactingFoam/pEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/pEqn.H @@ -5,14 +5,14 @@ // pressure solution - done in 2 parts. Part 1: thermo.rho() -= psi*p; - volScalarField rUA = 1.0/UEqn.A(); - U = rUA*UEqn.H(); + volScalarField rAU = 1.0/UEqn.A(); + U = rAU*UEqn.H(); if (transonic) { surfaceScalarField phiv = (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi); + + fvc::ddtPhiCorr(rAU, rho, U, phi); phi = fvc::interpolate(rho)*phiv; @@ -28,7 +28,7 @@ ( fvc::ddt(rho) + fvc::div(phi) + correction(fvm::ddt(psi, p) + fvm::div(phid, p)) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve @@ -58,7 +58,7 @@ fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -67,7 +67,7 @@ ( fvc::ddt(rho) + psi*correction(fvm::ddt(p)) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve @@ -98,7 +98,7 @@ #include "rhoEqn.H" #include "compressibleContinuityErrs.H" - U -= rUA*fvc::grad(p); + U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H index 954907d203..45aa8f7790 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H @@ -9,7 +9,7 @@ tmp UEqn UEqn().relax(); -volScalarField rUA = 1.0/UEqn().A(); +volScalarField rAU = 1.0/UEqn().A(); if (momentumPredictor) { @@ -17,6 +17,6 @@ if (momentumPredictor) } else { - U = rUA*(UEqn().H() - fvc::grad(p)); + U = rAU*(UEqn().H() - fvc::grad(p)); U.correctBoundaryConditions(); } diff --git a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H index c0dba194e7..84e6451890 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H @@ -1,6 +1,6 @@ rho = thermo.rho(); -U = rUA*UEqn().H(); +U = rAU*UEqn().H(); if (nCorr <= 1) { @@ -15,7 +15,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -25,7 +25,7 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve @@ -55,7 +55,7 @@ else fvc::interpolate(rho)* ( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -65,7 +65,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve @@ -101,7 +101,7 @@ rho = thermo.rho(); Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H index a331d7dbb8..0b0364b706 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H @@ -12,7 +12,7 @@ UEqn().relax(); mrfZones.addCoriolis(rho, UEqn()); pZones.addResistance(UEqn()); -volScalarField rUA = 1.0/UEqn().A(); +volScalarField rAU = 1.0/UEqn().A(); if (momentumPredictor) { @@ -20,6 +20,6 @@ if (momentumPredictor) } else { - U = rUA*(UEqn().H() - fvc::grad(p)); + U = rAU*(UEqn().H() - fvc::grad(p)); U.correctBoundaryConditions(); } diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H index 6be6584202..590a3c1950 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn().A(); -U = rUA*UEqn().H(); +volScalarField rAU = 1.0/UEqn().A(); +U = rAU*UEqn().H(); if (nCorr <= 1) { @@ -16,7 +16,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); mrfZones.relativeFlux(fvc::interpolate(psi), phid); @@ -27,7 +27,7 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve @@ -57,7 +57,7 @@ else fvc::interpolate(rho)* ( (fvc::interpolate(U) & mesh.Sf()) - //+ fvc::ddtPhiCorr(rUA, rho, U, phi) + //+ fvc::ddtPhiCorr(rAU, rho, U, phi) ); mrfZones.relativeFlux(fvc::interpolate(rho), phi); @@ -68,7 +68,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve @@ -109,7 +109,7 @@ else << " " << min(rho).value() << endl; } -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H index 96d8280559..a082cac880 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H @@ -3,8 +3,8 @@ rho = max(rho, rhoMin); rho = min(rho, rhoMax); rho.relax(); -volScalarField rUA = 1.0/UEqn().A(); -U = rUA*UEqn().H(); +volScalarField rAU = 1.0/UEqn().A(); +U = rAU*UEqn().H(); UEqn.clear(); bool closedVolume = false; @@ -22,7 +22,7 @@ if (transonic) fvScalarMatrix pEqn ( fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); // Relax the pressure equation to ensure diagonal-dominance @@ -47,7 +47,7 @@ else { fvScalarMatrix pEqn ( - fvm::laplacian(rho*rUA, p) == fvc::div(phi) + fvm::laplacian(rho*rAU, p) == fvc::div(phi) ); pEqn.setReference(pRefCell, pRefValue); @@ -67,7 +67,7 @@ else // Explicitly relax pressure for momentum corrector p.relax(); -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); // For closed-volume cases adjust the pressure and density levels diff --git a/applications/solvers/compressible/sonicFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/pEqn.H index 96a500d4c2..8d6040b530 100644 --- a/applications/solvers/compressible/sonicFoam/pEqn.H +++ b/applications/solvers/compressible/sonicFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +U = rAU*UEqn.H(); surfaceScalarField phid ( @@ -9,7 +9,7 @@ surfaceScalarField phid fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -19,7 +19,7 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -33,5 +33,5 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); diff --git a/applications/solvers/compressible/sonicLiquidFoam/sonicLiquidFoam.C b/applications/solvers/compressible/sonicLiquidFoam/sonicLiquidFoam.C index c785343af7..c92f3d82f9 100644 --- a/applications/solvers/compressible/sonicLiquidFoam/sonicLiquidFoam.C +++ b/applications/solvers/compressible/sonicLiquidFoam/sonicLiquidFoam.C @@ -71,8 +71,8 @@ int main(int argc, char *argv[]) for (int corr=0; corr UEqn +( + fvm::ddt(U) + + fvm::div(phi, U) + + turbulence->divDevReff(U) +); + +UEqn().relax(); + +rAU = 1.0/UEqn().A(); + +if (momentumPredictor) +{ + solve(UEqn() == -fvc::grad(p)); +} +else +{ + U = rAU*(UEqn().H() - fvc::grad(p)); + U.correctBoundaryConditions(); +} diff --git a/applications/solvers/incompressible/pisoFoam/pisoFoam.C b/applications/solvers/incompressible/pisoFoam/pisoFoam.C index 5f7e6dd8e0..47414bf173 100644 --- a/applications/solvers/incompressible/pisoFoam/pisoFoam.C +++ b/applications/solvers/incompressible/pisoFoam/pisoFoam.C @@ -79,11 +79,11 @@ int main(int argc, char *argv[]) for (int corr=0; corr p_rghEqnComp; @@ -24,27 +24,27 @@ } - U = rUA*UEqn.H(); + U = rAU*UEqn.H(); surfaceScalarField phiU ( "phiU", (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); phi = phiU + ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - )*rUAf*mesh.magSf(); + )*rAUf*mesh.magSf(); for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix p_rghEqnIncomp ( fvc::div(phi) - - fvm::laplacian(rUAf, p_rgh) + - fvm::laplacian(rAUf, p_rgh) ); solve @@ -75,7 +75,7 @@ } } - U += rUA*fvc::reconstruct((phi - phiU)/rUAf); + U += rAU*fvc::reconstruct((phi - phiU)/rAUf); U.correctBoundaryConditions(); p = max diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index eefe6bec08..7054fe1d44 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -1,6 +1,6 @@ { - volScalarField rUA = 1.0/UEqn.A(); - surfaceScalarField rUAf = fvc::interpolate(rUA); + volScalarField rAU = 1.0/UEqn.A(); + surfaceScalarField rAUf = fvc::interpolate(rAU); tmp p_rghEqnComp; @@ -24,27 +24,27 @@ } - U = rUA*UEqn.H(); + U = rAU*UEqn.H(); surfaceScalarField phiU ( "phiU", (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); phi = phiU + ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - )*rUAf*mesh.magSf(); + )*rAUf*mesh.magSf(); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix p_rghEqnIncomp ( fvc::div(phi) - - fvm::laplacian(rUAf, p_rgh) + - fvm::laplacian(rAUf, p_rgh) ); solve @@ -75,7 +75,7 @@ } } - U += rUA*fvc::reconstruct((phi - phiU)/rUAf); + U += rAU*fvc::reconstruct((phi - phiU)/rAUf); U.correctBoundaryConditions(); p = max diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H index cb42a4474a..4f4e68cb59 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H @@ -1,14 +1,14 @@ { - volScalarField rUA = 1.0/UEqn.A(); - surfaceScalarField rUAf = fvc::interpolate(rUA); + volScalarField rAU = 1.0/UEqn.A(); + surfaceScalarField rAUf = fvc::interpolate(rAU); - U = rUA*UEqn.H(); + U = rAU*UEqn.H(); surfaceScalarField phiU ( "phiU", (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); adjustPhi(phiU, U, p_rgh); @@ -17,7 +17,7 @@ ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - )*rUAf*mesh.magSf(); + )*rAUf*mesh.magSf(); Pair > vDotP = twoPhaseProperties->vDotP(); const volScalarField& vDotcP = vDotP[0](); @@ -27,7 +27,7 @@ { fvScalarMatrix p_rghEqn ( - fvc::div(phi) - fvm::laplacian(rUAf, p_rgh) + fvc::div(phi) - fvm::laplacian(rAUf, p_rgh) - (vDotvP - vDotcP)*(pSat - rho*gh) + fvm::Sp(vDotvP - vDotcP, p_rgh) ); @@ -52,7 +52,7 @@ } } - U += rUA*fvc::reconstruct((phi - phiU)/rUAf); + U += rAU*fvc::reconstruct((phi - phiU)/rAUf); U.correctBoundaryConditions(); #include "continuityErrs.H" diff --git a/applications/solvers/multiphase/settlingFoam/pEqn.H b/applications/solvers/multiphase/settlingFoam/pEqn.H index 3d1e6816d7..806909ffe7 100644 --- a/applications/solvers/multiphase/settlingFoam/pEqn.H +++ b/applications/solvers/multiphase/settlingFoam/pEqn.H @@ -1,27 +1,27 @@ -volScalarField rUA = 1.0/UEqn.A(); +volScalarField rAU = 1.0/UEqn.A(); -surfaceScalarField rUAf +surfaceScalarField rAUf ( "(rho*(1|A(U)))", - fvc::interpolate(rho)*fvc::interpolate(rUA) + fvc::interpolate(rho)*fvc::interpolate(rAU) ); -U = rUA*UEqn.H(); +U = rAU*UEqn.H(); phi = fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); surfaceScalarField phiU("phiU", phi); -phi -= ghf*fvc::snGrad(rho)*rUAf*mesh.magSf(); +phi -= ghf*fvc::snGrad(rho)*rAUf*mesh.magSf(); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix p_rghEqn ( - fvm::laplacian(rUAf, p_rgh) == fvc::ddt(rho) + fvc::div(phi) + fvm::laplacian(rAUf, p_rgh) == fvc::ddt(rho) + fvc::div(phi) ); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); @@ -49,5 +49,5 @@ if (p_rgh.needReference()) #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U += rUA*fvc::reconstruct((phi - phiU)/rUAf); +U += rAU*fvc::reconstruct((phi - phiU)/rAUf); U.correctBoundaryConditions(); diff --git a/applications/test/LduMatrix/LduMatrixTest3.C b/applications/test/LduMatrix/LduMatrixTest3.C index 741e07d990..35e8a4ab85 100644 --- a/applications/test/LduMatrix/LduMatrixTest3.C +++ b/applications/test/LduMatrix/LduMatrixTest3.C @@ -102,11 +102,11 @@ int main(int argc, char *argv[]) for (int corr=0; corr("(1|A(" + U_.name() + "))"); // Integrate flow variables over cell set scalar volTot = 0.0; scalar magUbarAve = 0.0; - scalar rUAave = 0.0; + scalar rAUave = 0.0; forAllConstIter(cellSet, selectedCellSet_, iter) { label cellI = iter.key(); @@ -176,27 +176,27 @@ void Foam::pressureGradientExplicitSource::update() volTot += volCell; magUbarAve += (flowDir_ & U_[cellI])*volCell; - rUAave += rUA[cellI]*volCell; + rAUave += rAU[cellI]*volCell; } // Collect across all processors reduce(volTot, sumOp()); reduce(magUbarAve, sumOp()); - reduce(rUAave, sumOp()); + reduce(rAUave, sumOp()); // Volume averages magUbarAve /= volTot; - rUAave /= volTot; + rAUave /= volTot; // Calculate the pressure gradient increment needed to adjust the average // flow-rate to the desired value - scalar gradPplus = (mag(Ubar_) - magUbarAve)/rUAave; + scalar gradPplus = (mag(Ubar_) - magUbarAve)/rAUave; // Apply correction to velocity field forAllConstIter(cellSet, selectedCellSet_, iter) { label cellI = iter.key(); - U_[cellI] += flowDir_*rUA[cellI]*gradPplus; + U_[cellI] += flowDir_*rAU[cellI]*gradPplus; } // Update pressure gradient diff --git a/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/pEqn.H b/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/pEqn.H index 9443f909a3..3d414f4af6 100644 --- a/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/pEqn.H +++ b/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +U = rAU*UEqn.H(); if (transonic) { @@ -11,7 +11,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -21,7 +21,7 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -38,7 +38,7 @@ else fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -47,7 +47,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -62,7 +62,7 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes index ea089af844..6de4135a48 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes @@ -44,7 +44,7 @@ laplacianSchemes laplacian(nuf,rhoU) Gauss linear corrected; laplacian(muEff,U) Gauss linear corrected; laplacian(rrhoUAf,p) Gauss linear corrected; - laplacian(rUAf,p) Gauss linear corrected; + laplacian(rAUf,p) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(1,p) Gauss linear corrected; } diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes index ea089af844..6de4135a48 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes @@ -44,7 +44,7 @@ laplacianSchemes laplacian(nuf,rhoU) Gauss linear corrected; laplacian(muEff,U) Gauss linear corrected; laplacian(rrhoUAf,p) Gauss linear corrected; - laplacian(rUAf,p) Gauss linear corrected; + laplacian(rAUf,p) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(1,p) Gauss linear corrected; } diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes index 48be074223..f3c3cc3d66 100644 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes @@ -45,7 +45,7 @@ laplacianSchemes laplacian(nuf,rhoU) Gauss linear corrected; laplacian(muEff,U) Gauss linear corrected; laplacian(rrhoUAf,p) Gauss linear corrected; - laplacian(rUAf,p) Gauss linear corrected; + laplacian(rAUf,p) Gauss linear corrected; laplacian(DomegaEff,omega) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(1,p) Gauss linear corrected;