diff --git a/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H b/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H
index f9e309ffec..e0b16f0f39 100644
--- a/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H
+++ b/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H
@@ -16,11 +16,8 @@ IOdictionary thermophysicalProperties
dimensionedScalar Pr
(
- dimensionedScalar::lookupOrDefault
- (
- "Pr",
- thermophysicalProperties,
- 1.0
- )
+ "Pr",
+ dimless,
+ thermophysicalProperties.subDict("mixture").subDict("transport")
+ .lookup("Pr")
);
-
diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C b/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C
index 166afa67b6..557344fa62 100644
--- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C
+++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.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
@@ -22,11 +22,11 @@ License
along with OpenFOAM. If not, see .
Application
- uncoupledKinematicParcelFoam
+ uncoupledKinematicParcelDyMFoam
Description
Transient solver for the passive transport of a single kinematic
- particle could.
+ particle cloud.
Uses a pre-calculated velocity field to evolve the cloud.
diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C
index 12043167d0..79436625e2 100644
--- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C
+++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.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
@@ -26,7 +26,7 @@ Application
Description
Transient solver for the passive transport of a single kinematic
- particle could.
+ particle cloud.
Uses a pre-calculated velocity field to evolve the cloud.
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/DDtU.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/DDtU.H
index 96b6a63a43..1685caa588 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/DDtU.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/DDtU.H
@@ -3,9 +3,11 @@
fvc::ddt(U1)
+ fvc::div(phi1, U1)
- fvc::div(phi1)*U1;
+ mrfZones.addCoriolis(U1, DDtU1);
DDtU2 =
fvc::ddt(U2)
+ fvc::div(phi2, U2)
- fvc::div(phi2)*U2;
+ mrfZones.addCoriolis(U2, DDtU2);
}
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H
index fe40ce2f49..5d61f0eaf7 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H
@@ -45,7 +45,7 @@ fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
- fvm::Sp(dragCoeff/rho1, U1)
- alpha1*alpha2/rho1*(liftForce - Cvm*rho2*DDtU2)
);
- mrfZones.addCoriolis(alpha1, U1Eqn);
+ mrfZones.addCoriolis(alpha1*(1 + Cvm*rho2*alpha2/rho1), U1Eqn);
U1Eqn.relax();
}
@@ -76,7 +76,7 @@ fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
- fvm::Sp(dragCoeff/rho2, U2)
+ alpha1*alpha2/rho2*(liftForce + Cvm*rho2*DDtU1)
);
- mrfZones.addCoriolis(alpha2, U2Eqn);
+ mrfZones.addCoriolis(alpha2*(1 + Cvm*rho2*alpha1/rho2), U2Eqn);
U2Eqn.relax();
}
}
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C
index 78d70a1537..c736f8194d 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.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
@@ -33,6 +33,7 @@ Description
#include "fvCFD.H"
#include "nearWallDist.H"
#include "wallFvPatch.H"
+#include "fixedValueFvsPatchFields.H"
#include "Switch.H"
#include "IFstream.H"
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H
index 0f28f2330d..3b4d2be679 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H
@@ -77,4 +77,15 @@ volScalarField heatTransferCoeff
heatTransferCoeff *= alpha1Coeff;
liftForce = Cl*(alpha1*rho1 + alpha2*rho2)*(Ur ^ fvc::curl(U));
+
+ // Remove lift, drag and phase heat-transfer at fixed-flux boundaries
+ forAll(phi1.boundaryField(), patchi)
+ {
+ if (isA(phi1.boundaryField()[patchi]))
+ {
+ dragCoeff.boundaryField()[patchi] = 0.0;
+ heatTransferCoeff.boundaryField()[patchi] = 0.0;
+ liftForce.boundaryField()[patchi] = vector::zero;
+ }
+ }
}
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H
index 1f1b308715..11f3d4ddb5 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H
@@ -122,16 +122,22 @@
U1 = HbyA1
+ fvc::reconstruct
(
- rAlphaAU1f*(g & mesh.Sf())
- + rAlphaAU1f*mSfGradp/fvc::interpolate(rho1)
+ rAlphaAU1f
+ *(
+ (g & mesh.Sf())
+ + mSfGradp/fvc::interpolate(rho1)
+ )
);
U1.correctBoundaryConditions();
U2 = HbyA2
+ fvc::reconstruct
(
- rAlphaAU2f*(g & mesh.Sf())
- + rAlphaAU2f*mSfGradp/fvc::interpolate(rho2)
+ rAlphaAU2f
+ *(
+ (g & mesh.Sf())
+ + mSfGradp/fvc::interpolate(rho2)
+ )
);
U2.correctBoundaryConditions();
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/DDtU.H b/applications/solvers/multiphase/multiphaseEulerFoam/DDtU.H
index f0f5bad356..dc39b70863 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/DDtU.H
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/DDtU.H
@@ -6,4 +6,6 @@ forAllIter(PtrDictionary, fluid.phases(), iter)
fvc::ddt(phase.U())
+ fvc::div(phase.phi(), phase.U())
- fvc::div(phase.phi())*phase.U();
+
+ mrfZones.addCoriolis(phase.U(), phase.DDtU());
}
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H
index b612e6b5d9..d4b371915c 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H
@@ -49,7 +49,11 @@ forAllIter(PtrDictionary, fluid.phases(), iter)
)
)
);
- mrfZones.addCoriolis(alpha, UEqns[phasei]);
+ mrfZones.addCoriolis
+ (
+ alpha*(1 + (1/phase.rho())*fluid.Cvm(phase)),
+ UEqns[phasei]
+ );
UEqns[phasei].relax();
phasei++;
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
index 2224030613..620499a2e7 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.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
@@ -25,6 +25,7 @@ License
#include "multiphaseSystem.H"
#include "alphaContactAngleFvPatchScalarField.H"
+#include "fixedValueFvsPatchFields.H"
#include "Time.H"
#include "subCycle.H"
#include "MULES.H"
@@ -610,6 +611,21 @@ Foam::tmp Foam::multiphaseSystem::Svm
}
}
+ // Remove lift at fixed-flux boundaries
+ forAll(phase.phi().boundaryField(), patchi)
+ {
+ if
+ (
+ isA
+ (
+ phase.phi().boundaryField()[patchi]
+ )
+ )
+ {
+ tSvm().boundaryField()[patchi] = vector::zero;
+ }
+ }
+
return tSvm;
}
@@ -623,9 +639,7 @@ Foam::multiphaseSystem::dragCoeffs() const
{
const dragModel& dm = *iter();
- dragCoeffsPtr().insert
- (
- iter.key(),
+ volScalarField* Kptr =
(
max
(
@@ -642,8 +656,24 @@ Foam::multiphaseSystem::dragCoeffs() const
dm.residualSlip()
)
)
- ).ptr()
- );
+ ).ptr();
+
+ // Remove drag at fixed-flux boundaries
+ forAll(dm.phase1().phi().boundaryField(), patchi)
+ {
+ if
+ (
+ isA
+ (
+ dm.phase1().phi().boundaryField()[patchi]
+ )
+ )
+ {
+ Kptr->boundaryField()[patchi] = 0.0;
+ }
+ }
+
+ dragCoeffsPtr().insert(iter.key(), Kptr);
}
return dragCoeffsPtr;
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H
index 9c8c2d4f18..6dc67ce353 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H
@@ -159,11 +159,10 @@
forAllIter(PtrDictionary, fluid.phases(), iter)
{
phaseModel& phase = iter();
- Dp += alphafs[phasei]*rAlphaAUfs[phasei]/phase.rho();
+ Dp += mag(alphafs[phasei]*rAlphaAUfs[phasei])/phase.rho();
phasei++;
}
- Dp = mag(Dp);
while (pimple.correctNonOrthogonal())
{
@@ -173,6 +172,8 @@
- fvm::laplacian(Dp, p)
);
+ pEqnIncomp.setReference(pRefCell, pRefValue);
+
solve
(
// (
@@ -196,7 +197,10 @@
phase.phi() =
phiHbyAs[phasei]
+ rAlphaAUfs[phasei]*mSfGradp/phase.rho();
- phi += alphafs[phasei]*phase.phi();
+ phi +=
+ alphafs[phasei]*phiHbyAs[phasei]
+ + mag(alphafs[phasei]*rAlphaAUfs[phasei])
+ *mSfGradp/phase.rho();
phasei++;
}
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/DDtU.H b/applications/solvers/multiphase/twoPhaseEulerFoam/DDtU.H
index 96b6a63a43..1685caa588 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/DDtU.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/DDtU.H
@@ -3,9 +3,11 @@
fvc::ddt(U1)
+ fvc::div(phi1, U1)
- fvc::div(phi1)*U1;
+ mrfZones.addCoriolis(U1, DDtU1);
DDtU2 =
fvc::ddt(U2)
+ fvc::div(phi2, U2)
- fvc::div(phi2)*U2;
+ mrfZones.addCoriolis(U2, DDtU2);
}
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/UEqns.H b/applications/solvers/multiphase/twoPhaseEulerFoam/UEqns.H
index 0c0cc1543a..6fae832a21 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/UEqns.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/UEqns.H
@@ -53,7 +53,7 @@ fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
//+ alpha2/rho1*K*U2 // Explicit drag transfered to p-equation
- alpha2/rho1*(liftCoeff - Cvm*rho2*DDtU2)
);
- mrfZones.addCoriolis(U1Eqn);
+ mrfZones.addCoriolis(scalar(1) + Cvm*rho2*alpha2/rho1, U1Eqn);
U1Eqn.relax();
}
@@ -93,7 +93,7 @@ fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
//+ alpha1/rho2*K*U1 // Explicit drag transfered to p-equation
+ alpha1/rho2*(liftCoeff + Cvm*rho2*DDtU1)
);
- mrfZones.addCoriolis(U2Eqn);
+ mrfZones.addCoriolis(scalar(1) + Cvm*rho2*alpha1/rho2, U2Eqn);
U2Eqn.relax();
}
}
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/liftDragCoeffs.H b/applications/solvers/multiphase/twoPhaseEulerFoam/liftDragCoeffs.H
index 097123378c..415afe9483 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/liftDragCoeffs.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/liftDragCoeffs.H
@@ -19,3 +19,13 @@
(
Cl*(alpha2*rho2 + alpha1*rho1)*(Ur ^ fvc::curl(U))
);
+
+ // Remove lift and drag at fixed-flux boundaries
+ forAll(phi1.boundaryField(), patchi)
+ {
+ if (isA(phi1.boundaryField()[patchi]))
+ {
+ K.boundaryField()[patchi] = 0.0;
+ liftCoeff.boundaryField()[patchi] = vector::zero;
+ }
+ }
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H
index 348cc847d7..9b543bcd25 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H
@@ -5,8 +5,8 @@
volScalarField rAU1(1.0/U1Eqn.A());
volScalarField rAU2(1.0/U2Eqn.A());
- rAU1f = fvc::interpolate(rAU1);
- surfaceScalarField rAU2f(fvc::interpolate(rAU2));
+ rAU1f = 1.0/fvc::interpolate(U1Eqn.A());
+ surfaceScalarField rAU2f(1.0/fvc::interpolate(U2Eqn.A()));
volVectorField HbyA1("HbyA1", U1);
HbyA1 = rAU1*U1Eqn.H();
@@ -16,39 +16,19 @@
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())
- );
+ surfaceScalarField ppDrag("ppDrag", 0.0*phi1);
if (g0.value() > 0.0)
{
- phiDrag1 -= ppMagf*fvc::snGrad(alpha1)*mesh.magSf();
+ ppDrag -= 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;
- }
+ ppDrag -= rAU1f*fvc::snGrad(kineticTheory.pa()/rho1)*mesh.magSf();
}
surfaceScalarField phiHbyA1
@@ -56,7 +36,9 @@
"phiHbyA1",
(fvc::interpolate(HbyA1) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU1, U1, phi1)
- + phiDrag1
+ + fvc::interpolate(alpha2/rho1*K*rAU1)*phi2
+ + ppDrag
+ + rAU1f*(g & mesh.Sf())
);
mrfZones.relativeFlux(phiHbyA1);
@@ -65,7 +47,8 @@
"phiHbyA2",
(fvc::interpolate(HbyA2) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU2, U2, phi2)
- + phiDrag2
+ + fvc::interpolate(alpha1/rho2*K*rAU2)*phi1
+ + rAU2f*(g & mesh.Sf())
);
mrfZones.relativeFlux(phiHbyA2);
@@ -76,6 +59,9 @@
surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
+ HbyA1 += alpha2*(1.0/rho1)*rAU1*K*U2;
+ HbyA2 += alpha1*(1.0/rho2)*rAU2*K*U1;
+
surfaceScalarField Dp
(
"Dp",
@@ -104,10 +90,19 @@
p.relax();
SfGradp = pEqn.flux()/Dp;
- U1 = HbyA1 + fvc::reconstruct(phiDrag1 - rAU1f*SfGradp/rho1);
+ U1 = HbyA1
+ + fvc::reconstruct
+ (
+ ppDrag
+ + rAU1f*((g & mesh.Sf()) - SfGradp/rho1)
+ );
U1.correctBoundaryConditions();
- U2 = HbyA2 + fvc::reconstruct(phiDrag2 - rAU2f*SfGradp/rho2);
+ U2 = HbyA2
+ + fvc::reconstruct
+ (
+ rAU2f*((g & mesh.Sf()) - SfGradp/rho2)
+ );
U2.correctBoundaryConditions();
U = alpha1*U1 + alpha2*U2;
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H.old b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H.old
new file mode 100644
index 0000000000..348cc847d7
--- /dev/null
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H.old
@@ -0,0 +1,118 @@
+{
+ 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/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C
index d9da532aef..178032db6f 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C
@@ -35,6 +35,7 @@ Description
#include "subCycle.H"
#include "nearWallDist.H"
#include "wallFvPatch.H"
+#include "fixedValueFvsPatchFields.H"
#include "Switch.H"
#include "IFstream.H"
diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
index 5f6a49ab3b..c67f5b289b 100644
--- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
+++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
@@ -163,6 +163,7 @@ hexLabel {hexDigit}+
zeroLabel {digit}*
signedInteger [-+]?{integer}
word ({alpha}|{digit}|{dotColonDash})*
+wordBraces ({word}|{lbrac}|{rbrac})*
exponent_part [eE][-+]?{digit}+
fractional_constant [-+]?(({digit}*"."{digit}+)|({digit}+".")|({digit}))
@@ -184,6 +185,7 @@ schemeSymbolList ({schemeSymbolListElement}+{space})
starStar ("**")
text ({space}({word}*{space})*)
+textBraces ({space}({wordBraces}*{space})*)
anythingInBlock ([^)]*)
dateDDMMYYYY ({digit}{digit}"/"{digit}{digit}"/"{digit}{digit}{digit}{digit})
@@ -276,11 +278,10 @@ endOfSection {space}")"{space}
BEGIN(readHeader);
}
-{anythingInBlock} {
- Info<< "Header: " << YYText() << endl;
+{quote}{textBraces}{quote} {
+ Info<< "Reading header: " << YYText() << endl;
}
-
{dimension} {
BEGIN(readDimension);
}
diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
index ff4780b65b..a0873ab4c9 100644
--- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
+++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
@@ -38,6 +38,7 @@ Description
if flipMap is false)
- not parallel
+\verbatim
Internal face extrusion
-----------------------
@@ -109,6 +110,8 @@ Notes:
only work if the coupled edge extrudes a different face so if there
are more than 1 cell inbetween.
+\endverbatim
+
\*---------------------------------------------------------------------------*/
#include "argList.H"
diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C
index b3d9d3f515..6fb57aa027 100644
--- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C
+++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -142,14 +142,6 @@ int main(int argc, char *argv[])
"additionalPatches",
"((master2 slave2) .. (masterN slaveN))"
);
- argList::addBoolOption("internalFacesOnly");
-
- argList::addOption
- (
- "additionalPatches",
- "(patch2 .. patchN)",
- "specify additional patches for creating baffles"
- );
argList::addBoolOption
(
"internalFacesOnly",
diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C
index b34676fac5..d129efde6d 100644
--- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C
+++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.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
@@ -2194,6 +2194,8 @@ int main(int argc, char *argv[])
label regionI = -1;
+ (void)mesh.tetBasePtIs();
+
label cellI = mesh.findCell(insidePoint);
Info<< nl << "Found point " << insidePoint << " in cell " << cellI
diff --git a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C
index a6556f143d..f95b906f5f 100644
--- a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C
+++ b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C
@@ -156,6 +156,7 @@ int main(int argc, char *argv[])
);
#include "addOverwriteOption.H"
+ #include "addRegionOption.H"
argList::validArgs.append("cellSet");
argList::addOption
(
@@ -167,7 +168,12 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
runTime.functionObjects().off();
- #include "createMesh.H"
+
+ Foam::word meshRegionName = polyMesh::defaultRegion;
+ args.optionReadIfPresent("region", meshRegionName);
+
+ #include "createNamedMesh.H"
+
const word oldInstance = mesh.pointsInstance();
diff --git a/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C b/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C
index 3c9277c546..5bce3be0c2 100644
--- a/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C
+++ b/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.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
@@ -61,23 +61,22 @@ int main(int argc, char *argv[])
// Check for new mesh
mesh.readUpdate();
- volVectorField cc
- (
- IOobject
- (
- "cellCentres",
- runTime.timeName(),
- mesh,
- IOobject::NO_READ,
- IOobject::AUTO_WRITE
- ),
- mesh.C()
- );
-
- // Info<< "Writing cellCentre positions to " << cc.name() << " in "
- // << runTime.timeName() << endl;
+ //volVectorField cc
+ //(
+ // IOobject
+ // (
+ // "cellCentres",
+ // runTime.timeName(),
+ // mesh,
+ // IOobject::NO_READ,
+ // IOobject::AUTO_WRITE
+ // ),
+ // 1.0*mesh.C()
+ //);
//
- // cc.write();
+ //Info<< "Writing cellCentre positions to " << cc.name() << " in "
+ // << runTime.timeName() << endl;
+ //cc.write();
Info<< "Writing components of cellCentre positions to volScalarFields"
<< " ccx, ccy, ccz in " << runTime.timeName() << endl;
diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
index bf44c1cd77..0c4628e0e5 100644
--- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
+++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -486,7 +486,7 @@ int main(int argc, char *argv[])
"word",
"name of dictionary to provide feature extraction information"
);
-
+
# include "setRootCase.H"
# include "createTime.H"
diff --git a/etc/config/settings.csh b/etc/config/settings.csh
index af7d2d7e91..179d145140 100644
--- a/etc/config/settings.csh
+++ b/etc/config/settings.csh
@@ -383,7 +383,7 @@ case OPENMPI:
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
- _foamAddMan $MPI_ARCH_PATH/man
+ _foamAddMan $MPI_ARCH_PATH/share/man
breaksw
case SYSTEMOPENMPI:
diff --git a/etc/config/settings.sh b/etc/config/settings.sh
index abb7030617..95c7046ec7 100644
--- a/etc/config/settings.sh
+++ b/etc/config/settings.sh
@@ -413,7 +413,7 @@ OPENMPI)
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
- _foamAddMan $MPI_ARCH_PATH/man
+ _foamAddMan $MPI_ARCH_PATH/share/man
;;
SYSTEMOPENMPI)
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H
index b04e77a514..f6f69bba9e 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H
@@ -96,6 +96,20 @@ T returnReduce
}
+// Reduce with sum of both value and count (for averaging)
+template
+void sumReduce
+(
+ T& Value,
+ label& Count,
+ const int tag = Pstream::msgType()
+)
+{
+ reduce(Value, sumOp(), tag);
+ reduce(Count, sumOp