diff --git a/applications/solvers/combustion/fireFoam/pEqn.H b/applications/solvers/combustion/fireFoam/pEqn.H index 3f4f485cf6..22c3f0139a 100644 --- a/applications/solvers/combustion/fireFoam/pEqn.H +++ b/applications/solvers/combustion/fireFoam/pEqn.H @@ -4,6 +4,9 @@ volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rhorAUf("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()); diff --git a/applications/solvers/multiphase/bubbleFoam/pEqn.H b/applications/solvers/multiphase/bubbleFoam/pEqn.H index 631c9cbba6..d438b1124f 100644 --- a/applications/solvers/multiphase/bubbleFoam/pEqn.H +++ b/applications/solvers/multiphase/bubbleFoam/pEqn.H @@ -38,16 +38,18 @@ ( (fvc::interpolate(HbyA1) & mesh.Sf()) + fvc::ddtPhiCorr(rAU1, U1, phi1) - + phiDrag1 ); surfaceScalarField phiHbyA2 ( (fvc::interpolate(HbyA2) & mesh.Sf()) + fvc::ddtPhiCorr(rAU2, U2, phi2) - + phiDrag2 ); + phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2; + + phiHbyA1 += phiDrag1; + phiHbyA2 += phiDrag2; surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2); surfaceScalarField Dp diff --git a/applications/solvers/multiphase/cavitatingFoam/UEqn.H b/applications/solvers/multiphase/cavitatingFoam/UEqn.H index 9a5761b59f..1ca0b9f0a5 100644 --- a/applications/solvers/multiphase/cavitatingFoam/UEqn.H +++ b/applications/solvers/multiphase/cavitatingFoam/UEqn.H @@ -1,17 +1,8 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) - - fvm::laplacian(muEff, U) - //- (fvc::grad(U) & fvc::grad(muf)) - - fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H index 257f6d48b5..7cc250a66a 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H @@ -1,17 +1,8 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index 9e67a47c4f..80011d1ab5 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -36,6 +36,7 @@ (fvc::interpolate(HbyA) & mesh.Sf()) + fvc::ddtPhiCorr(rAU, rho, U, phi) ); + phi = phiHbyA; surfaceScalarField phig ( diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H index 709d30c398..926abe2a09 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H @@ -2,11 +2,6 @@ rho1 = rho10 + psi1*p; rho2 = rho20 + psi2*p; - mrfZones.absoluteFlux(phi1.oldTime()); - mrfZones.absoluteFlux(phi1); - mrfZones.absoluteFlux(phi2.oldTime()); - mrfZones.absoluteFlux(phi2); - surfaceScalarField alpha1f(fvc::interpolate(alpha1)); surfaceScalarField alpha2f(scalar(1) - alpha1f); @@ -22,6 +17,11 @@ volVectorField HbyA2("HbyA2", U2); HbyA2 = rAU2*U2Eqn.H(); + mrfZones.absoluteFlux(phi1.oldTime()); + mrfZones.absoluteFlux(phi1); + mrfZones.absoluteFlux(phi2.oldTime()); + mrfZones.absoluteFlux(phi2); + surfaceScalarField ppDrag("ppDrag", 0.0*phi1); if (g0.value() > 0.0) @@ -41,18 +41,29 @@ "phiHbyA1", (fvc::interpolate(HbyA1) & mesh.Sf()) + fvc::ddtPhiCorr(rAU1, alpha1, U1, phi1) - + fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2 - + ppDrag - + rAlphaAU1f*(g & mesh.Sf()) ); - mrfZones.relativeFlux(phiHbyA1); surfaceScalarField phiHbyA2 ( "phiHbyA2", (fvc::interpolate(HbyA2) & mesh.Sf()) + fvc::ddtPhiCorr(rAU2, alpha2, U2, phi2) - + fvc::interpolate((1.0/rho2)*rAU2*dragCoeff)*phi1 + ); + + phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2; + mrfZones.relativeFlux(phi); + + phiHbyA1 += + ( + fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2 + + ppDrag + + rAlphaAU1f*(g & mesh.Sf()) + ); + mrfZones.relativeFlux(phiHbyA1); + + phiHbyA2 += + ( + fvc::interpolate((1.0/rho2)*rAU2*dragCoeff)*phi1 + rAlphaAU2f*(g & mesh.Sf()) ); mrfZones.relativeFlux(phiHbyA2); diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H b/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H index 9c56c4d26f..1f4f0bbbeb 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H @@ -11,9 +11,9 @@ (fvc::interpolate(HbyA) & mesh.Sf()) + fvc::ddtPhiCorr(rAU, rho, U, phi) ); - mrfZones.relativeFlux(phiHbyA); - adjustPhi(phiHbyA, U, p_rgh); + mrfZones.relativeFlux(phiHbyA); + phi = phiHbyA; surfaceScalarField phig ( diff --git a/applications/solvers/multiphase/interFoam/UEqn.H b/applications/solvers/multiphase/interFoam/UEqn.H index 257f6d48b5..7cc250a66a 100644 --- a/applications/solvers/multiphase/interFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/UEqn.H @@ -1,17 +1,8 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H index d942f2c501..5b089550c5 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H @@ -19,6 +19,8 @@ fvc::makeAbsolute(phiHbyA, U); } + phiAbs = phiHbyA; + surfaceScalarField phig ( ( diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H index d1bc7bf1ed..53c2161f97 100644 --- a/applications/solvers/multiphase/interFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/pEqn.H @@ -13,6 +13,7 @@ ); adjustPhi(phiHbyA, U, p_rgh); + phi = phiHbyA; surfaceScalarField phig ( diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H index b8fe82ff14..062c5523c9 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H @@ -1,18 +1,9 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties->muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev2(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H index e3ef0dc9ef..7ff971ed7f 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H @@ -11,8 +11,8 @@ (fvc::interpolate(HbyA) & mesh.Sf()) + fvc::ddtPhiCorr(rAU, rho, U, phi) ); - adjustPhi(phiHbyA, U, p_rgh); + phi = phiHbyA; surfaceScalarField phig ( diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H index 9ed3fecce9..07d867b1e7 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H @@ -58,6 +58,8 @@ dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0) ); + phi = dimensionedScalar("phi", phi.dimensions(), 0); + phasei = 0; forAllIter(PtrDictionary, fluid.phases(), iter) { @@ -74,14 +76,17 @@ ( (fvc::interpolate(HbyAs[phasei]) & mesh.Sf()) + fvc::ddtPhiCorr(rAUs[phasei], alpha, phase.U(), phase.phi()) - + rAlphaAUfs[phasei] + ); + mrfZones.relativeFlux(phiHbyAs[phasei]); + + phi += alphafs[phasei]*phiHbyAs[phasei]; + + phiHbyAs[phasei] += + rAlphaAUfs[phasei] *( fluid.surfaceTension(phase)*mesh.magSf()/phase.rho() + (g & mesh.Sf()) - ) - ); - - mrfZones.relativeFlux(phiHbyAs[phasei]); + ); multiphaseSystem::dragModelTable::const_iterator dmIter = fluid.dragModels().begin(); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/pEqn.H index 7bc1eeb12c..823216897c 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/pEqn.H @@ -11,9 +11,9 @@ (fvc::interpolate(HbyA) & mesh.Sf()) + fvc::ddtPhiCorr(rAU, rho, U, phi) ); - mrfZones.relativeFlux(phiHbyA); - adjustPhi(phiHbyA, U, p_rgh); + mrfZones.relativeFlux(phiHbyA); + phi = phiHbyA; surfaceScalarField phig ( diff --git a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H index 43ee1e3eb9..fbcba7db72 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H @@ -1,17 +1,8 @@ - surfaceScalarField muEff - ( - "muEff", - mixture.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(mixture.rhoPhi(), U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H index c1e346ce43..82bf3dbd59 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H @@ -11,8 +11,8 @@ (fvc::interpolate(HbyA) & mesh.Sf()) + fvc::ddtPhiCorr(rAU, rho, U, phi) ); - adjustPhi(phiHbyA, U, p_rgh); + phi = phiHbyA; surfaceScalarField phig ( diff --git a/applications/solvers/multiphase/settlingFoam/UEqn.H b/applications/solvers/multiphase/settlingFoam/UEqn.H index d6232da309..ff6323bca2 100644 --- a/applications/solvers/multiphase/settlingFoam/UEqn.H +++ b/applications/solvers/multiphase/settlingFoam/UEqn.H @@ -11,7 +11,6 @@ ) - fvm::laplacian(muEff, U, "laplacian(muEff,U)") - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*dev2(T(fvc::grad(U)))) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/settlingFoam/pEqn.H b/applications/solvers/multiphase/settlingFoam/pEqn.H index 9f27e992a8..6d61ec8730 100644 --- a/applications/solvers/multiphase/settlingFoam/pEqn.H +++ b/applications/solvers/multiphase/settlingFoam/pEqn.H @@ -15,6 +15,7 @@ + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); + phi = phiHbyA; surfaceScalarField phig ( diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H index 3dbb374774..7afd323dd0 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H @@ -1,17 +1,8 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H index ddfca4e3ea..e090522de6 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H @@ -11,8 +11,8 @@ (fvc::interpolate(HbyA) & mesh.Sf()) + fvc::ddtPhiCorr(rAU, rho, U, phi) ); - adjustPhi(phiHbyA, U, p_rgh); + phi = phiHbyA; surfaceScalarField phig ( diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H index 9b543bcd25..546e1a3e41 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H @@ -36,18 +36,29 @@ "phiHbyA1", (fvc::interpolate(HbyA1) & mesh.Sf()) + fvc::ddtPhiCorr(rAU1, U1, phi1) - + fvc::interpolate(alpha2/rho1*K*rAU1)*phi2 - + ppDrag - + rAU1f*(g & mesh.Sf()) ); - mrfZones.relativeFlux(phiHbyA1); surfaceScalarField phiHbyA2 ( "phiHbyA2", (fvc::interpolate(HbyA2) & mesh.Sf()) + fvc::ddtPhiCorr(rAU2, U2, phi2) - + fvc::interpolate(alpha1/rho2*K*rAU2)*phi1 + ); + + phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2; + mrfZones.relativeFlux(phi); + + phiHbyA1 += + ( + fvc::interpolate(alpha2/rho1*K*rAU1)*phi2 + + ppDrag + + rAU1f*(g & mesh.Sf()) + ); + mrfZones.relativeFlux(phiHbyA1); + + phiHbyA2 += + ( + fvc::interpolate(alpha1/rho2*K*rAU2)*phi1 + rAU2f*(g & mesh.Sf()) ); mrfZones.relativeFlux(phiHbyA2); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H.old b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H.old deleted file mode 100644 index 348cc847d7..0000000000 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H.old +++ /dev/null @@ -1,118 +0,0 @@ -{ - surfaceScalarField alpha1f(fvc::interpolate(alpha1)); - surfaceScalarField alpha2f(scalar(1) - alpha1f); - - volScalarField rAU1(1.0/U1Eqn.A()); - volScalarField rAU2(1.0/U2Eqn.A()); - - rAU1f = fvc::interpolate(rAU1); - surfaceScalarField rAU2f(fvc::interpolate(rAU2)); - - volVectorField HbyA1("HbyA1", U1); - HbyA1 = rAU1*U1Eqn.H(); - - volVectorField HbyA2("HbyA2", U2); - HbyA2 = rAU2*U2Eqn.H(); - - mrfZones.absoluteFlux(phi1.oldTime()); - mrfZones.absoluteFlux(phi1); - - mrfZones.absoluteFlux(phi2.oldTime()); - mrfZones.absoluteFlux(phi2); - - surfaceScalarField phiDrag1 - ( - fvc::interpolate(alpha2/rho1*K*rAU1)*phi2 + rAU1f*(g & mesh.Sf()) - ); - - if (g0.value() > 0.0) - { - phiDrag1 -= ppMagf*fvc::snGrad(alpha1)*mesh.magSf(); - } - - if (kineticTheory.on()) - { - phiDrag1 -= rAU1f*fvc::snGrad(kineticTheory.pa()/rho1)*mesh.magSf(); - } - - - surfaceScalarField phiDrag2 - ( - fvc::interpolate(alpha1/rho2*K*rAU2)*phi1 + rAU2f*(g & mesh.Sf()) - ); - - // Fix for gravity on outlet boundary. - forAll(p.boundaryField(), patchi) - { - if (isA(p.boundaryField()[patchi])) - { - phiDrag1.boundaryField()[patchi] = 0.0; - phiDrag2.boundaryField()[patchi] = 0.0; - } - } - - surfaceScalarField phiHbyA1 - ( - "phiHbyA1", - (fvc::interpolate(HbyA1) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU1, U1, phi1) - + phiDrag1 - ); - mrfZones.relativeFlux(phiHbyA1); - - surfaceScalarField phiHbyA2 - ( - "phiHbyA2", - (fvc::interpolate(HbyA2) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU2, U2, phi2) - + phiDrag2 - ); - mrfZones.relativeFlux(phiHbyA2); - - mrfZones.relativeFlux(phi1.oldTime()); - mrfZones.relativeFlux(phi1); - mrfZones.relativeFlux(phi2.oldTime()); - mrfZones.relativeFlux(phi2); - - surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2); - - surfaceScalarField Dp - ( - "Dp", - alpha1f*rAU1f/rho1 + alpha2f*rAU2f/rho2 - ); - - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix pEqn - ( - fvm::laplacian(Dp, p) == fvc::div(phiHbyA) - ); - - pEqn.setReference(pRefCell, pRefValue); - - pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); - - if (pimple.finalNonOrthogonalIter()) - { - surfaceScalarField SfGradp(pEqn.flux()/Dp); - - phi1 = phiHbyA1 - rAU1f*SfGradp/rho1; - phi2 = phiHbyA2 - rAU2f*SfGradp/rho2; - phi = alpha1f*phi1 + alpha2f*phi2; - - p.relax(); - SfGradp = pEqn.flux()/Dp; - - U1 = HbyA1 + fvc::reconstruct(phiDrag1 - rAU1f*SfGradp/rho1); - U1.correctBoundaryConditions(); - - U2 = HbyA2 + fvc::reconstruct(phiDrag2 - rAU2f*SfGradp/rho2); - U2.correctBoundaryConditions(); - - U = alpha1*U1 + alpha2*U2; - } - } -} - -#include "continuityErrs.H" diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H index 97891ad639..4f85d6dad8 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H @@ -161,7 +161,7 @@ ) ); } - else if(nuType == "field") + else if (nuType == "field") { nuIO.readOpt() = IOobject::MUST_READ; nuPtr.reset diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H index c8817c5975..afcff762e4 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H @@ -81,7 +81,7 @@ if (thermalStress) ); } - else if(CType == "field") + else if (CType == "field") { CIO.readOpt() = IOobject::MUST_READ; @@ -214,7 +214,7 @@ if (thermalStress) { FatalErrorIn ( - "readThermalProperties.H" + "readThermalProperties.H" ) << "Valid type entries are uniform or field for alpha" << abort(FatalError); } @@ -228,5 +228,4 @@ if (thermalStress) threeKalpha = threeK*alpha; DT = k/C; - } diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C index 2518dc0450..0969b1e560 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C +++ b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,6 @@ Usage #include "argList.H" #include "Time.H" -#include "timeSelector.H" #include "fvMesh.H" #include "unitConversion.H" #include "polyTopoChange.H" @@ -354,7 +353,6 @@ int main(int argc, char *argv[]) { # include "addOverwriteOption.H" argList::noParallel(); - timeSelector::addOptions(true, false); argList::validArgs.append("featureAngle [0-180]"); argList::addBoolOption @@ -376,9 +374,6 @@ int main(int argc, char *argv[]) # include "setRootCase.H" # include "createTime.H" - - instantList timeDirs = timeSelector::select0(runTime, args); - # include "createMesh.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/mesh/manipulation/topoSet/topoSetDict b/applications/utilities/mesh/manipulation/topoSet/topoSetDict index be90a8fb80..7a2049c686 100644 --- a/applications/utilities/mesh/manipulation/topoSet/topoSetDict +++ b/applications/utilities/mesh/manipulation/topoSet/topoSetDict @@ -171,13 +171,13 @@ FoamFile // insidePoint (1 2 3); // point inside region to select // } // -// // Cells underneath plane such that volume is reached. Can be used -// // in setFields. +// // Cells underneath plane such that volume is reached. E.g. for use +// // in setFields to set the level given a wanted volume. // source targetVolumeToCell; // sourceInfo // { // volume 2e-05; -// normal (1 1 1); +// normal (0 1 0); // usually in direction of gravity // } // // diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H index 123036f63a..8657a9cc21 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H @@ -1,21 +1,27 @@ -// check for "points" in all of the result directories +// check for "points" in any of the result directories -bool meshMoving = true; -if (Times.size() > 2) +bool meshMoving = false; +if (Times.size() > 1) { - for (label n1=2; n1 Foam::dictionary::New(Istream& is) bool Foam::dictionary::read(Istream& is, const bool keepHeader) { + // Check for empty dictionary + if (is.eof()) + { + return true; + } + if (!is.good()) { FatalIOErrorIn("dictionary::read(Istream&, bool)", is) diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H index 3a3c234821..1f9c51ac9f 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H @@ -323,8 +323,6 @@ class globalMeshData // its own master. Maybe store as well? void calcGlobalCoPointSlaves() const; - const labelListList& globalCoPointSlaves() const; - const mapDistribute& globalCoPointSlavesMap() const; //- Disallow default bitwise copy construct @@ -547,6 +545,11 @@ public: //- Is my edge same orientation as master edge const PackedBoolList& globalEdgeOrientation() const; + // Collocated point to collocated point + + const labelListList& globalCoPointSlaves() const; + const mapDistribute& globalCoPointSlavesMap() const; + // Coupled point to boundary faces. These are uncoupled boundary // faces only but include empty patches. diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C index 7ecd1b84a1..b4333fc3a7 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -339,6 +339,31 @@ bool Foam::globalPoints::storeInitialInfo } +void Foam::globalPoints::printProcPoint +( + const labelList& patchToMeshPoint, + const labelPair& pointInfo +) const +{ + label procI = globalIndexAndTransform::processor(pointInfo); + label index = globalIndexAndTransform::index(pointInfo); + label trafoI = globalIndexAndTransform::transformIndex(pointInfo); + + Pout<< " proc:" << procI; + Pout<< " localpoint:"; + Pout<< index; + Pout<< " through transform:" + << trafoI << " bits:" + << globalTransforms_.decodeTransformIndex(trafoI); + + if (procI == Pstream::myProcNo()) + { + label meshPointI = localToMeshPoint(patchToMeshPoint, index); + Pout<< " at:" << mesh_.points()[meshPointI]; + } +} + + void Foam::globalPoints::printProcPoints ( const labelList& patchToMeshPoint, @@ -347,23 +372,7 @@ void Foam::globalPoints::printProcPoints { forAll(pointInfo, i) { - label procI = globalIndexAndTransform::processor(pointInfo[i]); - label index = globalIndexAndTransform::index(pointInfo[i]); - label trafoI = globalIndexAndTransform::transformIndex(pointInfo[i]); - - Pout<< " proc:" << procI; - Pout<< " localpoint:"; - Pout<< index; - Pout<< " through transform:" - << trafoI << " bits:" - << globalTransforms_.decodeTransformIndex(trafoI); - - if (procI == Pstream::myProcNo()) - { - label meshPointI = localToMeshPoint(patchToMeshPoint, index); - Pout<< " at:" << mesh_.points()[meshPointI]; - } - + printProcPoint(patchToMeshPoint, pointInfo[i]); Pout<< endl; } } diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H index daef012fe7..de7a6b88d0 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -206,6 +206,12 @@ class globalPoints ); //- Debug printing + void printProcPoint + ( + const labelList& patchToMeshPoint, + const labelPair& pointInfo + ) const; + void printProcPoints ( const labelList& patchToMeshPoint, diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C b/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C index 9a9830545e..d765e9f60b 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C @@ -97,6 +97,16 @@ void Foam::polyMesh::clearAddressing() geometricD_ = Vector