Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2012-03-05 11:04:55 +00:00
49 changed files with 458 additions and 310 deletions

View File

@ -86,23 +86,28 @@ int main(int argc, char *argv[])
for (int corr=1; corr<=1; corr++) for (int corr=1; corr<=1; corr++)
{ {
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
U = rAU*UEqn.H(); surfaceScalarField phiHbyA
phi = (fvc::interpolate(U) & mesh.Sf()) (
+ fvc::ddtPhiCorr(rAU, U, phi); "phiHbyA",
(fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, U, phi)
);
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::laplacian(rAU, p) == fvc::div(phi) fvm::laplacian(rAU, p) == fvc::div(phiHbyA)
); );
pEqn.solve(); pEqn.solve();
phi -= pEqn.flux(); phi = phiHbyA - pEqn.flux();
#include "continuityErrs.H" #include "continuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
} }

View File

@ -1,7 +1,8 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
if (pimple.transonic()) if (pimple.transonic())
{ {
@ -10,7 +11,7 @@ if (pimple.transonic())
"phid", "phid",
fvc::interpolate(psi) fvc::interpolate(psi)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
) )
); );
@ -34,19 +35,22 @@ if (pimple.transonic())
} }
else else
{ {
phi = surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rho) fvc::interpolate(rho)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); )
);
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::ddt(psi, p) fvm::ddt(psi, p)
+ fvc::div(phi) + fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
@ -54,7 +58,7 @@ else
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
} }
@ -62,7 +66,7 @@ else
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);

View File

@ -1,7 +1,8 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
if (pimple.transonic()) if (pimple.transonic())
{ {
@ -9,7 +10,7 @@ if (pimple.transonic())
( (
"phid", "phid",
fvc::interpolate(psi) fvc::interpolate(psi)
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)) *((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U))
); );
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
@ -31,15 +32,19 @@ if (pimple.transonic())
} }
else else
{ {
phi = fvc::interpolate(rho) surfaceScalarField phiHbyA
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)); (
"phiHbyA",
fvc::interpolate(rho)
*((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U))
);
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::ddt(psi, p) fvm::ddt(psi, p)
+ fvc::div(phi) + fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
@ -47,7 +52,7 @@ else
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
} }
@ -55,7 +60,7 @@ else
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);

View File

@ -2,25 +2,29 @@ rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf(rAU.name() + 'f', fvc::interpolate(rho*rAU)); surfaceScalarField rhorAUf(rAU.name() + 'f', fvc::interpolate(rho*rAU));
U = rAU*UEqn.H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
surfaceScalarField phiU surfaceScalarField phig(rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
surfaceScalarField phiHbyA
( (
"phiHbyA",
fvc::interpolate(rho) fvc::interpolate(rho)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
) )
- phig
); );
phi = phiU - rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf();
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix p_rghEqn fvScalarMatrix p_rghEqn
( (
fvc::ddt(psi, rho)*gh fvc::ddt(psi, rho)*gh
+ fvc::div(phi) + fvc::div(phiHbyA)
+ fvm::ddt(psi, p_rgh) + fvm::ddt(psi, p_rgh)
- fvm::laplacian(rhorAUf, p_rgh) - fvm::laplacian(rhorAUf, p_rgh)
== ==
@ -32,7 +36,9 @@ while (pimple.correctNonOrthogonal())
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += p_rghEqn.flux(); phi = phiHbyA + p_rghEqn.flux();
U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() - phig)/rhorAUf);
U.correctBoundaryConditions();
} }
} }
@ -41,8 +47,6 @@ p = p_rgh + rho*gh;
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf);
U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); dpdt = fvc::ddt(p);

View File

@ -1,7 +1,8 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
if (pimple.transonic()) if (pimple.transonic())
{ {
@ -10,7 +11,7 @@ if (pimple.transonic())
"phid", "phid",
fvc::interpolate(psi) fvc::interpolate(psi)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
) )
); );
@ -34,19 +35,22 @@ if (pimple.transonic())
} }
else else
{ {
phi = surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rho) fvc::interpolate(rho)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); )
);
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::ddt(psi, p) fvm::ddt(psi, p)
+ fvc::div(phi) + fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
@ -54,7 +58,7 @@ else
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
} }
@ -62,7 +66,7 @@ else
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);

View File

@ -6,27 +6,25 @@
thermo.rho() -= psi*p; thermo.rho() -= psi*p;
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
if (pimple.transonic()) if (pimple.transonic())
{ {
surfaceScalarField phiv surfaceScalarField phiHbyA
( (
(fvc::interpolate(U) & mesh.Sf()) "phiHbyA",
(fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); );
phi = fvc::interpolate(rho)*phiv; surfaceScalarField phid("phid", fvc::interpolate(thermo.psi())*phiHbyA);
surfaceScalarField phid phiHbyA *= fvc::interpolate(rho);
(
"phid",
fvc::interpolate(thermo.psi())*phiv
);
fvScalarMatrix pDDtEqn fvScalarMatrix pDDtEqn
( (
fvc::ddt(rho) + fvc::div(phi) fvc::ddt(rho) + fvc::div(phiHbyA)
+ correction(fvm::ddt(psi, p) + fvm::div(phid, p)) + correction(fvm::ddt(psi, p) + fvm::div(phid, p))
); );
@ -42,23 +40,26 @@
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
} }
else else
{ {
phi = surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rho) fvc::interpolate(rho)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); )
);
fvScalarMatrix pDDtEqn fvScalarMatrix pDDtEqn
( (
fvc::ddt(rho) + psi*correction(fvm::ddt(p)) fvc::ddt(rho) + psi*correction(fvm::ddt(p))
+ fvc::div(phi) + fvc::div(phiHbyA)
); );
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
@ -73,7 +74,7 @@
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
} }
@ -84,7 +85,7 @@
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);

View File

@ -3,7 +3,8 @@ rho = max(rho, rhoMin);
rho = min(rho, rhoMax); rho = min(rho, rhoMax);
rho.relax(); rho.relax();
U = rAU*UEqn().H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
if (pimple.nCorrPISO() <= 1) if (pimple.nCorrPISO() <= 1)
{ {
@ -17,7 +18,7 @@ if (pimple.transonic())
"phid", "phid",
fvc::interpolate(psi) fvc::interpolate(psi)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
) )
); );
@ -41,12 +42,15 @@ if (pimple.transonic())
} }
else else
{ {
phi = surfaceScalarField phiHbyA
fvc::interpolate(rho)* (
( "phiHbyA",
(fvc::interpolate(U) & mesh.Sf()) fvc::interpolate(rho)
*(
(fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); )
);
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
@ -54,7 +58,7 @@ else
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::ddt(psi, p) fvm::ddt(psi, p)
+ fvc::div(phi) + fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
@ -62,7 +66,7 @@ else
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
} }
@ -81,7 +85,7 @@ rho.relax();
Info<< "rho max/min : " << max(rho).value() Info<< "rho max/min : " << max(rho).value()
<< " " << min(rho).value() << endl; << " " << min(rho).value() << endl;
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);

View File

@ -4,7 +4,8 @@ rho = min(rho, rhoMax);
rho.relax(); rho.relax();
volScalarField rAU(1.0/UEqn().A()); volScalarField rAU(1.0/UEqn().A());
U = rAU*UEqn().H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
if (pimple.nCorrPISO() <= 1) if (pimple.nCorrPISO() <= 1)
{ {
@ -18,7 +19,7 @@ if (pimple.transonic())
"phid", "phid",
fvc::interpolate(psi) fvc::interpolate(psi)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
) )
); );
@ -43,13 +44,17 @@ if (pimple.transonic())
} }
else else
{ {
phi = surfaceScalarField phiHbyA
fvc::interpolate(rho)* (
( "phiHbyA",
(fvc::interpolate(U) & mesh.Sf()) fvc::interpolate(rho)
*(
(fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); )
mrfZones.relativeFlux(fvc::interpolate(rho), phi); );
mrfZones.relativeFlux(fvc::interpolate(rho), phiHbyA);
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
@ -57,7 +62,7 @@ else
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::ddt(psi, p) fvm::ddt(psi, p)
+ fvc::div(phi) + fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
@ -65,7 +70,7 @@ else
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
} }
@ -83,7 +88,7 @@ rho.relax();
Info<< "rho max/min : " << max(rho).value() Info<< "rho max/min : " << max(rho).value()
<< " " << min(rho).value() << endl; << " " << min(rho).value() << endl;
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);

View File

@ -4,7 +4,9 @@ rho = min(rho, rhoMax);
rho.relax(); rho.relax();
volScalarField rAU(1.0/UEqn().A()); volScalarField rAU(1.0/UEqn().A());
U = rAU*UEqn().H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
UEqn.clear(); UEqn.clear();
bool closedVolume = false; bool closedVolume = false;
@ -14,7 +16,7 @@ if (simple.transonic())
surfaceScalarField phid surfaceScalarField phid
( (
"phid", "phid",
fvc::interpolate(psi)*(fvc::interpolate(U) & mesh.Sf()) fvc::interpolate(psi)*(fvc::interpolate(HbyA) & mesh.Sf())
); );
while (simple.correctNonOrthogonal()) while (simple.correctNonOrthogonal())
@ -40,14 +42,19 @@ if (simple.transonic())
} }
else else
{ {
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); surfaceScalarField phiHbyA
closedVolume = adjustPhi(phi, U, p); (
"phiHbyA",
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
);
closedVolume = adjustPhi(phiHbyA, U, p);
while (simple.correctNonOrthogonal()) while (simple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::laplacian(rho*rAU, p) == fvc::div(phi) fvm::laplacian(rho*rAU, p) == fvc::div(phiHbyA)
); );
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
@ -56,7 +63,7 @@ else
if (simple.finalNonOrthogonalIter()) if (simple.finalNonOrthogonalIter())
{ {
phi -= pEqn.flux(); phi = phiHbyA - pEqn.flux();
} }
} }
} }
@ -67,7 +74,7 @@ else
// Explicitly relax pressure for momentum corrector // Explicitly relax pressure for momentum corrector
p.relax(); p.relax();
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
// For closed-volume cases adjust the pressure and density levels // For closed-volume cases adjust the pressure and density levels

View File

@ -1,10 +1,12 @@
volVectorField HbyA("HbyA", U);
if (pressureImplicitPorosity) if (pressureImplicitPorosity)
{ {
U = trTU()&UEqn().H(); HbyA = trTU() & UEqn().H();
} }
else else
{ {
U = trAU()*UEqn().H(); HbyA = trAU()*UEqn().H();
} }
UEqn.clear(); UEqn.clear();
@ -16,7 +18,7 @@ if (simple.transonic())
surfaceScalarField phid surfaceScalarField phid
( (
"phid", "phid",
fvc::interpolate(psi)*(fvc::interpolate(U) & mesh.Sf()) fvc::interpolate(psi)*(fvc::interpolate(HbyA) & mesh.Sf())
); );
mrfZones.relativeFlux(fvc::interpolate(psi), phid); mrfZones.relativeFlux(fvc::interpolate(psi), phid);
@ -45,10 +47,15 @@ if (simple.transonic())
} }
else else
{ {
phi = fvc::interpolate(rho*U) & mesh.Sf(); surfaceScalarField phiHbyA
mrfZones.relativeFlux(fvc::interpolate(rho), phi); (
"phiHbyA",
fvc::interpolate(rho*HbyA) & mesh.Sf()
);
closedVolume = adjustPhi(phi, U, p); mrfZones.relativeFlux(fvc::interpolate(rho), phiHbyA);
closedVolume = adjustPhi(phiHbyA, U, p);
while (simple.correctNonOrthogonal()) while (simple.correctNonOrthogonal())
{ {
@ -56,11 +63,11 @@ else
if (pressureImplicitPorosity) if (pressureImplicitPorosity)
{ {
tpEqn = (fvm::laplacian(rho*trTU(), p) == fvc::div(phi)); tpEqn = (fvm::laplacian(rho*trTU(), p) == fvc::div(phiHbyA));
} }
else else
{ {
tpEqn = (fvm::laplacian(rho*trAU(), p) == fvc::div(phi)); tpEqn = (fvm::laplacian(rho*trAU(), p) == fvc::div(phiHbyA));
} }
tpEqn().setReference(pRefCell, pRefValue); tpEqn().setReference(pRefCell, pRefValue);
@ -69,7 +76,7 @@ else
if (simple.finalNonOrthogonalIter()) if (simple.finalNonOrthogonalIter())
{ {
phi -= tpEqn().flux(); phi = phiHbyA - tpEqn().flux();
} }
} }
} }
@ -81,11 +88,11 @@ p.relax();
if (pressureImplicitPorosity) if (pressureImplicitPorosity)
{ {
U -= trTU()&fvc::grad(p); U = HbyA - (trTU() & fvc::grad(p));
} }
else else
{ {
U -= trAU()*fvc::grad(p); U = HbyA - trAU()*fvc::grad(p);
} }
U.correctBoundaryConditions(); U.correctBoundaryConditions();

View File

@ -7,7 +7,10 @@ volScalarField p0(p);
volScalarField AU(UEqn().A()); volScalarField AU(UEqn().A());
volScalarField AtU(AU - UEqn().H1()); volScalarField AtU(AU - UEqn().H1());
U = UEqn().H()/AU;
volVectorField HbyA("HbyA", U);
HbyA = UEqn().H()/AU;
UEqn.clear(); UEqn.clear();
bool closedVolume = false; bool closedVolume = false;
@ -19,7 +22,7 @@ if (simple.transonic())
surfaceScalarField phid surfaceScalarField phid
( (
"phid", "phid",
fvc::interpolate(psi*U) & mesh.Sf() fvc::interpolate(psi*HbyA) & mesh.Sf()
); );
surfaceScalarField phic surfaceScalarField phic
@ -56,13 +59,18 @@ else
{ {
while (simple.correctNonOrthogonal()) while (simple.correctNonOrthogonal())
{ {
phi = fvc::interpolate(rho*U) & mesh.Sf(); surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rho*HbyA) & mesh.Sf()
);
closedVolume = adjustPhi(phi, U, p); closedVolume = adjustPhi(phi, U, p);
phi += fvc::interpolate(rho/AtU - rho/AU)*fvc::snGrad(p)*mesh.magSf(); phi += fvc::interpolate(rho/AtU - rho/AU)*fvc::snGrad(p)*mesh.magSf();
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvc::div(phi) fvc::div(phiHbyA)
//- fvm::laplacian(rho/AU, p) //- fvm::laplacian(rho/AU, p)
- fvm::laplacian(rho/AtU, p) - fvm::laplacian(rho/AtU, p)
); );
@ -73,7 +81,7 @@ else
if (simple.finalNonOrthogonalIter()) if (simple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
} }
@ -85,8 +93,8 @@ else
// Explicitly relax pressure for momentum corrector // Explicitly relax pressure for momentum corrector
p.relax(); p.relax();
U -= (fvc::grad(p0)*(1.0/AU - 1.0/AtU) + fvc::grad(p)/AtU); U = HbyA - (fvc::grad(p0)*(1.0/AU - 1.0/AtU) + fvc::grad(p)/AtU);
//U -= fvc::grad(p)/AU; //U = HbyA - fvc::grad(p)/AU;
U.correctBoundaryConditions(); U.correctBoundaryConditions();

View File

@ -1,14 +1,15 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
surfaceScalarField phid surfaceScalarField phid
( (
"phid", "phid",
fvc::interpolate(psi) fvc::interpolate(psi)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
) )
); );
@ -33,5 +34,5 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();

View File

@ -1,14 +1,15 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
U = UEqn.H()/UEqn.A(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
surfaceScalarField phid surfaceScalarField phid
( (
"phid", "phid",
fvc::interpolate(psi) fvc::interpolate(psi)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
- fvc::meshPhi(rho, U) - fvc::meshPhi(rho, U)
) )
); );
@ -29,5 +30,5 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();

View File

@ -93,17 +93,21 @@ int main(int argc, char *argv[])
for (int corr=0; corr<nCorr; corr++) for (int corr=0; corr<nCorr; corr++)
{ {
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
U = rAU*UEqn.H(); surfaceScalarField phiHbyA
(
phi = (fvc::interpolate(U) & mesh.Sf()) "phiHbyA",
+ fvc::ddtPhiCorr(rAU, U, phi); (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, U, phi)
);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::laplacian(rAU, p) == fvc::div(phi) fvm::laplacian(rAU, p) == fvc::div(phiHbyA)
); );
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
@ -111,13 +115,13 @@ int main(int argc, char *argv[])
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {
phi -= pEqn.flux(); phi = phiHbyA - pEqn.flux();
} }
} }
#include "continuityErrs.H" #include "continuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
} }
} }

View File

@ -2,19 +2,24 @@
volScalarField rAU("rAU", 1.0/UEqn.A()); volScalarField rAU("rAU", 1.0/UEqn.A());
surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU)); surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU));
U = rAU*UEqn.H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
phi = (fvc::interpolate(U) & mesh.Sf()) surfaceScalarField phig(rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
+ fvc::ddtPhiCorr(rAU, U, phi);
surfaceScalarField buoyancyPhi(rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf()); surfaceScalarField phiHbyA
phi -= buoyancyPhi; (
"phiHbyA",
(fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, U, phi)
- phig
);
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix p_rghEqn fvScalarMatrix p_rghEqn
( (
fvm::laplacian(rAUf, p_rgh) == fvc::div(phi) fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA)
); );
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
@ -24,14 +29,14 @@
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
// Calculate the conservative fluxes // Calculate the conservative fluxes
phi -= p_rghEqn.flux(); phi = phiHbyA - p_rghEqn.flux();
// Explicitly relax pressure for momentum corrector // Explicitly relax pressure for momentum corrector
p_rgh.relax(); p_rgh.relax();
// Correct the momentum source with the pressure gradient flux // Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure // calculated from the relaxed pressure
U -= rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rAUf); U = HbyA - rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
} }
} }

View File

@ -2,20 +2,27 @@
volScalarField rAU("rAU", 1.0/UEqn().A()); volScalarField rAU("rAU", 1.0/UEqn().A());
surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU)); surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU));
U = rAU*UEqn().H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
UEqn.clear(); UEqn.clear();
phi = fvc::interpolate(U) & mesh.Sf(); surfaceScalarField phig(rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
adjustPhi(phi, U, p_rgh);
surfaceScalarField buoyancyPhi(rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf()); surfaceScalarField phiHbyA
phi -= buoyancyPhi; (
"phiHbyA",
(fvc::interpolate(HbyA) & mesh.Sf())
);
adjustPhi(phiHbyA, U, p_rgh);
phiHbyA -= phig;
while (simple.correctNonOrthogonal()) while (simple.correctNonOrthogonal())
{ {
fvScalarMatrix p_rghEqn fvScalarMatrix p_rghEqn
( (
fvm::laplacian(rAUf, p_rgh) == fvc::div(phi) fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA)
); );
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
@ -25,14 +32,14 @@
if (simple.finalNonOrthogonalIter()) if (simple.finalNonOrthogonalIter())
{ {
// Calculate the conservative fluxes // Calculate the conservative fluxes
phi -= p_rghEqn.flux(); phi = phiHbyA - p_rghEqn.flux();
// Explicitly relax pressure for momentum corrector // Explicitly relax pressure for momentum corrector
p_rgh.relax(); p_rgh.relax();
// Correct the momentum source with the pressure gradient flux // Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure // calculated from the relaxed pressure
U -= rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rAUf); U = HbyA - rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
} }
} }

View File

@ -8,21 +8,26 @@
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU)); surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
U = rAU*UEqn.H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
phi = fvc::interpolate(rho)* surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
surfaceScalarField phiHbyA
( (
(fvc::interpolate(U) & mesh.Sf()) "phiHbyA",
+ fvc::ddtPhiCorr(rAU, rho, U, phi) fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
)
+ phig
); );
surfaceScalarField buoyancyPhi(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
phi += buoyancyPhi;
fvScalarMatrix p_rghDDtEqn fvScalarMatrix p_rghDDtEqn
( (
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
+ fvc::div(phi) + fvc::div(phiHbyA)
); );
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
@ -38,14 +43,14 @@
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
// Calculate the conservative fluxes // Calculate the conservative fluxes
phi += p_rghEqn.flux(); phi = phiHbyA + p_rghEqn.flux();
// Explicitly relax pressure for momentum corrector // Explicitly relax pressure for momentum corrector
p_rgh.relax(); p_rgh.relax();
// Correct the momentum source with the pressure gradient flux // Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure // calculated from the relaxed pressure
U += rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf); U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
} }

View File

@ -5,20 +5,27 @@
volScalarField rAU(1.0/UEqn().A()); volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU)); surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
U = rAU*UEqn().H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
UEqn.clear(); UEqn.clear();
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); surfaceScalarField phig(rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
bool closedVolume = adjustPhi(phi, U, p_rgh);
surfaceScalarField buoyancyPhi(rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); surfaceScalarField phiHbyA
phi -= buoyancyPhi; (
"phiHbyA",
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
);
bool closedVolume = adjustPhi(phiHbyA, U, p_rgh);
phiHbyA -= phig
while (simple.correctNonOrthogonal()) while (simple.correctNonOrthogonal())
{ {
fvScalarMatrix p_rghEqn fvScalarMatrix p_rghEqn
( (
fvm::laplacian(rhorAUf, p_rgh) == fvc::div(phi) fvm::laplacian(rhorAUf, p_rgh) == fvc::div(phiHbyA)
); );
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
@ -27,14 +34,14 @@
if (simple.finalNonOrthogonalIter()) if (simple.finalNonOrthogonalIter())
{ {
// Calculate the conservative fluxes // Calculate the conservative fluxes
phi -= p_rghEqn.flux(); phi = phiHbyA - p_rghEqn.flux();
// Explicitly relax pressure for momentum corrector // Explicitly relax pressure for momentum corrector
p_rgh.relax(); p_rgh.relax();
// Correct the momentum source with the pressure gradient flux // Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure // calculated from the relaxed pressure
U -= rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf); U = HbyA - rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
} }
} }

View File

@ -8,24 +8,27 @@
volScalarField rAU(1.0/UEqn().A()); volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU)); surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
U = rAU*UEqn().H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
surfaceScalarField phiU surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
surfaceScalarField phiHbyA
( (
"phiHbyA",
fvc::interpolate(rho) fvc::interpolate(rho)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
) )
+ phig
); );
phi = phiU - rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf();
{ {
fvScalarMatrix p_rghDDtEqn fvScalarMatrix p_rghDDtEqn
( (
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
+ fvc::div(phi) + fvc::div(phiHbyA)
); );
// Thermodynamic density needs to be updated by psi*d(p) after the // Thermodynamic density needs to be updated by psi*d(p) after the
@ -57,7 +60,11 @@
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {
phi += p_rghEqn.flux(); phi = phiHbyA + p_rghEqn.flux();
U = HbyA
+ rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf);
U.correctBoundaryConditions();
K = 0.5*magSqr(U);
} }
} }
@ -65,9 +72,6 @@
thermo.rho() += psi*p_rgh; thermo.rho() += psi*p_rgh;
} }
// Correct velocity field
U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf);
U.correctBoundaryConditions();
p = p_rgh + rho*gh; p = p_rgh + rho*gh;
// Update pressure time derivative // Update pressure time derivative

View File

@ -6,27 +6,23 @@
thermo.rho() -= psi*p; thermo.rho() -= psi*p;
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
U = rAU*(UEqn == sources(rho, U))().H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*(UEqn == sources(rho, U))().H();
if (pZones.size() > 0) surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
if (pZones.size() == 0)
{ {
// ddtPhiCorr not well defined for cases with porosity // ddtPhiCorr only used without porosity
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); phiHbyA += fvc::ddtPhiCorr(rAU, rho, U, phi);
}
else
{
phi =
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
} }
phiHbyA *= fvc::interpolate(rho);
fvScalarMatrix pDDtEqn fvScalarMatrix pDDtEqn
( (
fvc::ddt(rho) + psi*correction(fvm::ddt(p)) fvc::ddt(rho) + psi*correction(fvm::ddt(p))
+ fvc::div(phi) + fvc::div(phiHbyA)
== ==
parcels.Srho() parcels.Srho()
+ sources(psi, p, rho.name()) + sources(psi, p, rho.name())
@ -46,7 +42,7 @@
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
@ -58,7 +54,7 @@
#include "rhoEqn.H" // NOTE: flux and time scales now inconsistent #include "rhoEqn.H" // NOTE: flux and time scales now inconsistent
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
sources.correct(U); sources.correct(U);

View File

@ -1,7 +1,8 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
U = rAU*(UEqn == sources(rho, U))().H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*(UEqn == sources(rho, U))().H();
if (pimple.transonic()) if (pimple.transonic())
{ {
@ -10,7 +11,7 @@ if (pimple.transonic())
"phid", "phid",
fvc::interpolate(psi) fvc::interpolate(psi)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
) )
); );
@ -39,19 +40,22 @@ if (pimple.transonic())
} }
else else
{ {
phi = surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rho) fvc::interpolate(rho)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); )
);
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::ddt(psi, p) fvm::ddt(psi, p)
+ fvc::div(phi) + fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
== ==
coalParcels.Srho() coalParcels.Srho()
@ -64,7 +68,7 @@ else
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
} }
@ -72,7 +76,7 @@ else
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
sources.correct(U); sources.correct(U);

View File

@ -6,27 +6,23 @@
thermo.rho() -= psi*p; thermo.rho() -= psi*p;
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
U = rAU*(UEqn == sources(rho, U))().H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*(UEqn == sources(rho, U))().H();
if (pZones.size() > 0) surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
if (pZones.size() == 0)
{ {
// ddtPhiCorr not well defined for cases with porosity // ddtPhiCorr only used without porosity
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); phiHbyA += fvc::ddtPhiCorr(rAU, rho, U, phi);
}
else
{
phi =
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
} }
phiHbyA *= fvc::interpolate(rho);
fvScalarMatrix pDDtEqn fvScalarMatrix pDDtEqn
( (
fvc::ddt(rho) + psi*correction(fvm::ddt(p)) fvc::ddt(rho) + psi*correction(fvm::ddt(p))
+ fvc::div(phi) + fvc::div(phiHbyA)
== ==
parcels.Srho() parcels.Srho()
+ sources(psi, p, rho.name()) + sources(psi, p, rho.name())
@ -47,7 +43,7 @@
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
@ -57,7 +53,7 @@
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
sources.correct(U); sources.correct(U);

View File

@ -2,25 +2,29 @@ rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf(rAU.name() + 'f', fvc::interpolate(rho*rAU)); surfaceScalarField rhorAUf(rAU.name() + 'f', fvc::interpolate(rho*rAU));
U = rAU*UEqn.H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
surfaceScalarField phiU surfaceScalarField phig(rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
surfaceScalarField phiHbyA
( (
"phiHbyA",
fvc::interpolate(rho) fvc::interpolate(rho)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
) )
- phig
); );
phi = phiU - rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf();
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix p_rghEqn fvScalarMatrix p_rghEqn
( (
fvc::ddt(psi, rho)*gh fvc::ddt(psi, rho)*gh
+ fvc::div(phi) + fvc::div(phiHbyA)
+ fvm::ddt(psi, p_rgh) + fvm::ddt(psi, p_rgh)
- fvm::laplacian(rhorAUf, p_rgh) - fvm::laplacian(rhorAUf, p_rgh)
== ==
@ -32,7 +36,9 @@ while (pimple.correctNonOrthogonal())
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += p_rghEqn.flux(); phi = phiHbyA + p_rghEqn.flux();
U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() - phig)/rhorAUf);
U.correctBoundaryConditions();
} }
} }
@ -41,8 +47,6 @@ p = p_rgh + rho*gh;
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf);
U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); dpdt = fvc::ddt(p);

View File

@ -1,7 +1,8 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
if (pimple.transonic()) if (pimple.transonic())
{ {
@ -10,7 +11,7 @@ if (pimple.transonic())
"phid", "phid",
fvc::interpolate(psi) fvc::interpolate(psi)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
) )
); );
@ -36,19 +37,22 @@ if (pimple.transonic())
} }
else else
{ {
phi = surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rho) fvc::interpolate(rho)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); )
);
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::ddt(psi, p) fvm::ddt(psi, p)
+ fvc::div(phi) + fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
== ==
parcels.Srho() parcels.Srho()
@ -58,7 +62,7 @@ else
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
} }
@ -66,7 +70,7 @@ else
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);

View File

@ -1,7 +1,8 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
if (pimple.transonic()) if (pimple.transonic())
{ {
@ -10,7 +11,7 @@ if (pimple.transonic())
"phid", "phid",
fvc::interpolate(psi) fvc::interpolate(psi)
*( *(
((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)) ((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U))
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
) )
); );
@ -36,19 +37,22 @@ if (pimple.transonic())
} }
else else
{ {
phi = surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rho) fvc::interpolate(rho)
*( *(
((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)) ((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U))
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); )
);
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::ddt(psi, p) fvm::ddt(psi, p)
+ fvc::div(phi) + fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
== ==
parcels.Srho() parcels.Srho()
@ -58,7 +62,7 @@ else
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi = phiHbyA + pEqn.flux();
} }
} }
} }
@ -66,7 +70,7 @@ else
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);

View File

@ -9,11 +9,13 @@
)/psi; )/psi;
} }
surfaceScalarField rhof(fvc::interpolate(rho, "rhof")); surfaceScalarField rhof("rhof", fvc::interpolate(rho));
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rAUf("rAUf", rhof*fvc::interpolate(rAU)); surfaceScalarField rAUf("rAUf", rhof*fvc::interpolate(rAU));
volVectorField HbyA("HbyA", rAU*UEqn.H());
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
phiv = (fvc::interpolate(HbyA) & mesh.Sf()) phiv = (fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phiv); + fvc::ddtPhiCorr(rAU, rho, U, phiv);
@ -22,8 +24,6 @@
phiv -= phiGradp/rhof; phiv -= phiGradp/rhof;
#include "resetPhivPatches.H"
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn

View File

@ -1,15 +0,0 @@
fvsPatchScalarFieldField& phiPatches = phi.boundaryField();
const fvPatchScalarFieldField& rhoPatches = rho.boundaryField();
const fvPatchVectorFieldField& Upatches = U.boundaryField();
const fvsPatchVectorFieldField& SfPatches = mesh.Sf().boundaryField();
forAll(phiPatches, patchI)
{
if (phi.boundaryField().types()[patchI] == "calculated")
{
calculatedFvsPatchScalarField& phiPatch =
refCast<calculatedFvsPatchScalarField>(phiPatches[patchI]);
phiPatch == ((rhoPatches[patchI]*Upatches[patchI]) & SfPatches[patchI]);
}
}

View File

@ -1,19 +0,0 @@
surfaceScalarField::GeometricBoundaryField& phivPatches =
phiv.boundaryField();
const volVectorField::GeometricBoundaryField& Upatches =
U.boundaryField();
const surfaceVectorField::GeometricBoundaryField& SfPatches =
mesh.Sf().boundaryField();
forAll(phivPatches, patchI)
{
if (phiv.boundaryField().types()[patchI] == "calculated")
{
calculatedFvsPatchScalarField& phivPatch =
refCast<calculatedFvsPatchScalarField>(phivPatches[patchI]);
phivPatch == (Upatches[patchI] & SfPatches[patchI]);
}
}

View File

@ -41,10 +41,10 @@ void Foam::conformalVoronoiMesh::conformToSurface()
{ {
reconformationMode reconfMode = reconformationControl(); reconformationMode reconfMode = reconformationControl();
if (Pstream::parRun()) // if (Pstream::parRun())
{ // {
seedProcessorBoundarySurfaces(true); // seedProcessorBoundarySurfaces(true);
} // }
if (reconfMode == rmNone) if (reconfMode == rmNone)
{ {
@ -74,15 +74,15 @@ void Foam::conformalVoronoiMesh::conformToSurface()
storeSurfaceConformation(); storeSurfaceConformation();
} }
if (Pstream::parRun()) // if (Pstream::parRun())
{ // {
label nFarPoints = removeProcessorBoundarySeeds(true); // label nFarPoints = removeProcessorBoundarySeeds(true);
//
reduce(nFarPoints, sumOp<label>()); // reduce(nFarPoints, sumOp<label>());
//
Info<< " Removed " << nFarPoints // Info<< " Removed " << nFarPoints
<< " far points from the mesh." << endl; // << " far points from the mesh." << endl;
} // }
// reportSurfaceConformationQuality(); // reportSurfaceConformationQuality();
} }
@ -915,7 +915,7 @@ void Foam::conformalVoronoiMesh::seedProcessorBoundarySurfaces
label nFarPoints = 0; label nFarPoints = 0;
const scalar normalDistance = 5.0; const scalar normalDistance = 2.0;
const scalar pert = 0.1*(rndGen_.scalar01() - 0.5); const scalar pert = 0.1*(rndGen_.scalar01() - 0.5);
forAll(bMesh, patchI) forAll(bMesh, patchI)
@ -1465,7 +1465,7 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence
label cIInner = 0; label cIInner = 0;
label cIOuter = 0; label cIOuter = 0;
// seedProcessorBoundarySurfaces(true); seedProcessorBoundarySurfaces(true);
label cellIndexCount = 0; label cellIndexCount = 0;
for for
@ -1530,7 +1530,7 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence
if if
( (
(testCellInfluence[cit->cellIndex()] == 0) (testCellInfluence[cit->cellIndex()] == 0)
//&& (cit->real() || cit->hasFarPoint()) && (cit->real() || cit->hasFarPoint())
) )
{ {
const Foam::point& cc = cit->dual(); const Foam::point& cc = cit->dual();
@ -1553,15 +1553,18 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence
timeCheck("End of testing cell influence"); timeCheck("End of testing cell influence");
Pout<< "Number of quick rejections = " << nQuickRejections << endl; // Pout<< "Number of quick rejections = " << nQuickRejections << endl;
Pout<< "Number of influences = " << circumcentre.size() << endl; Pout<< "Number of influences = " << circumcentre.size() << endl;
// Increasing the circumspheres to increase the overlaps and compensate for // Increasing the circumspheres to increase the overlaps and compensate for
// floating point errors missing some referrals // floating point errors missing some referrals
labelListList circumsphereOverlaps labelListList circumsphereOverlaps
( = decomposition_().overlapsProcessors
overlapsProc(circumcentre, sqr(1.01)*circumradiusSqr) (
); circumcentre,
sqr(1.01)*circumradiusSqr,
false
);
timeCheck("End of increasing overlaps"); timeCheck("End of increasing overlaps");
@ -1624,13 +1627,12 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence
cIOuter++; cIOuter++;
} }
label nFarPoints = removeProcessorBoundarySeeds(true);
// label nFarPoints = removeProcessorBoundarySeeds(true); reduce(nFarPoints, sumOp<label>());
//
// reduce(nFarPoints, sumOp<label>()); Info<< " Removed " << nFarPoints
// << " far points from the mesh." << endl;
// Info<< " Removed " << nFarPoints
// << " far points from the mesh." << endl;
// seedProcessorBoundarySurfaces(false); // seedProcessorBoundarySurfaces(false);
@ -1745,6 +1747,8 @@ void Foam::conformalVoronoiMesh::referVertices
timeCheck("Start of referVertices " + stageName + " insertion."); timeCheck("Start of referVertices " + stageName + " insertion.");
label inserted = 0;
for (label procI = 0; procI < Pstream::nProcs(); procI++) for (label procI = 0; procI < Pstream::nProcs(); procI++)
{ {
const labelList& constructMap = pointMap.constructMap()[procI]; const labelList& constructMap = pointMap.constructMap()[procI];
@ -1774,12 +1778,18 @@ void Foam::conformalVoronoiMesh::referVertices
encodedProcI encodedProcI
); );
inserted++;
receivedVertices[procI].insert(origIndex); receivedVertices[procI].insert(origIndex);
} }
} }
} }
} }
reduce(inserted, sumOp<label>());
Info<< " Inserted " << stageName << " vertices " << inserted << endl;
Info<< " Total " << stageName << " vertices " << totalVertices << endl; Info<< " Total " << stageName << " vertices " << totalVertices << endl;
timeCheck("End of referVertices " + stageName); timeCheck("End of referVertices " + stageName);

View File

@ -50,12 +50,13 @@ namespace Foam
const char* Foam::NamedEnum const char* Foam::NamedEnum
< <
Foam::fieldValues::cellSource::operationType, Foam::fieldValues::cellSource::operationType,
8 9
>::names[] = >::names[] =
{ {
"none", "none",
"sum", "sum",
"average", "average",
"weightedAverage",
"volAverage", "volAverage",
"volIntegrate", "volIntegrate",
"min", "min",
@ -68,7 +69,7 @@ namespace Foam
const Foam::NamedEnum<Foam::fieldValues::cellSource::sourceType, 2> const Foam::NamedEnum<Foam::fieldValues::cellSource::sourceType, 2>
Foam::fieldValues::cellSource::sourceTypeNames_; Foam::fieldValues::cellSource::sourceTypeNames_;
const Foam::NamedEnum<Foam::fieldValues::cellSource::operationType, 8> const Foam::NamedEnum<Foam::fieldValues::cellSource::operationType, 9>
Foam::fieldValues::cellSource::operationTypeNames_; Foam::fieldValues::cellSource::operationTypeNames_;

View File

@ -51,9 +51,12 @@ Description
- none - none
- sum - sum
- average - average
- weightedAverage
- volAverage - volAverage
- volIntegrate - volIntegrate
- CoV (Coefficient of variation: standard deviation/mean) - CoV (Coefficient of variation: standard deviation/mean)
- min
- max
SourceFiles SourceFiles
cellSource.C cellSource.C
@ -105,6 +108,7 @@ public:
opNone, opNone,
opSum, opSum,
opAverage, opAverage,
opWeightedAverage,
opVolAverage, opVolAverage,
opVolIntegrate, opVolIntegrate,
opMin, opMin,
@ -113,7 +117,7 @@ public:
}; };
//- Operation type names //- Operation type names
static const NamedEnum<operationType, 8> operationTypeNames_; static const NamedEnum<operationType, 9> operationTypeNames_;
private: private:
@ -169,7 +173,8 @@ protected:
Type processValues Type processValues
( (
const Field<Type>& values, const Field<Type>& values,
const scalarField& V const scalarField& V,
const scalarField& weightField
) const; ) const;
//- Output file header information //- Output file header information

View File

@ -78,7 +78,8 @@ template<class Type>
Type Foam::fieldValues::cellSource::processValues Type Foam::fieldValues::cellSource::processValues
( (
const Field<Type>& values, const Field<Type>& values,
const scalarField& V const scalarField& V,
const scalarField& weightField
) const ) const
{ {
Type result = pTraits<Type>::zero; Type result = pTraits<Type>::zero;
@ -94,6 +95,11 @@ Type Foam::fieldValues::cellSource::processValues
result = sum(values)/values.size(); result = sum(values)/values.size();
break; break;
} }
case opWeightedAverage:
{
result = sum(values)/sum(weightField);
break;
}
case opVolAverage: case opVolAverage:
{ {
result = sum(values*V)/sum(V); result = sum(values*V)/sum(V);
@ -169,7 +175,7 @@ bool Foam::fieldValues::cellSource::writeValues(const word& fieldName)
if (Pstream::master()) if (Pstream::master())
{ {
Type result = processValues(values, V); Type result = processValues(values, V, weightField);
if (valueOutput_) if (valueOutput_)
{ {

View File

@ -53,12 +53,13 @@ namespace Foam
const char* Foam::NamedEnum const char* Foam::NamedEnum
< <
Foam::fieldValues::faceSource::operationType, Foam::fieldValues::faceSource::operationType,
8 9
>::names[] = >::names[] =
{ {
"none", "none",
"sum", "sum",
"average", "average",
"weightedAverage",
"areaAverage", "areaAverage",
"areaIntegrate", "areaIntegrate",
"min", "min",
@ -72,7 +73,7 @@ namespace Foam
const Foam::NamedEnum<Foam::fieldValues::faceSource::sourceType, 3> const Foam::NamedEnum<Foam::fieldValues::faceSource::sourceType, 3>
Foam::fieldValues::faceSource::sourceTypeNames_; Foam::fieldValues::faceSource::sourceTypeNames_;
const Foam::NamedEnum<Foam::fieldValues::faceSource::operationType, 8> const Foam::NamedEnum<Foam::fieldValues::faceSource::operationType, 9>
Foam::fieldValues::faceSource::operationTypeNames_; Foam::fieldValues::faceSource::operationTypeNames_;

View File

@ -59,6 +59,7 @@ Description
- none - none
- sum - sum
- average - average
- weightedAverage
- areaAverage - areaAverage
- areaIntegrate - areaIntegrate
- min - min
@ -132,6 +133,7 @@ public:
opNone, opNone,
opSum, opSum,
opAverage, opAverage,
opWeightedAverage,
opAreaAverage, opAreaAverage,
opAreaIntegrate, opAreaIntegrate,
opMin, opMin,
@ -140,7 +142,7 @@ public:
}; };
//- Operation type names //- Operation type names
static const NamedEnum<operationType, 8> operationTypeNames_; static const NamedEnum<operationType, 9> operationTypeNames_;
private: private:
@ -215,7 +217,8 @@ protected:
Type processValues Type processValues
( (
const Field<Type>& values, const Field<Type>& values,
const scalarField& magSf const scalarField& magSf,
const scalarField& weightField
) const; ) const;
//- Output file header information //- Output file header information

View File

@ -97,7 +97,9 @@ template<class Type>
Type Foam::fieldValues::faceSource::processValues Type Foam::fieldValues::faceSource::processValues
( (
const Field<Type>& values, const Field<Type>& values,
const scalarField& magSf const scalarField& magSf,
const scalarField& weightField
) const ) const
{ {
Type result = pTraits<Type>::zero; Type result = pTraits<Type>::zero;
@ -113,6 +115,11 @@ Type Foam::fieldValues::faceSource::processValues
result = sum(values)/values.size(); result = sum(values)/values.size();
break; break;
} }
case opWeightedAverage:
{
result = sum(values)/sum(weightField);
break;
}
case opAreaAverage: case opAreaAverage:
{ {
result = sum(values*magSf)/sum(magSf); result = sum(values*magSf)/sum(magSf);
@ -203,7 +210,7 @@ bool Foam::fieldValues::faceSource::writeValues(const word& fieldName)
if (Pstream::master()) if (Pstream::master())
{ {
Type result = processValues(values, magSf); Type result = processValues(values, magSf, weightField);
if (valueOutput_) if (valueOutput_)
{ {

View File

@ -27,22 +27,26 @@ boundaryField
inletValue uniform 0; inletValue uniform 0;
value uniform 0; value uniform 0;
} }
sides sides
{ {
type inletOutlet; type inletOutlet;
inletValue uniform 0; inletValue uniform 0;
value uniform 0; value uniform 0;
} }
base base
{ {
type zeroGradient; type zeroGradient;
} }
inlet inlet
{ {
type fixedValue; type fixedValue;
value uniform 1.0; value uniform 1.0;
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }

View File

@ -28,6 +28,11 @@ boundaryField
emissivity uniform 1.0; emissivity uniform 1.0;
value uniform 0; value uniform 0;
} }
frontAndBack
{
type empty;
}
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -28,6 +28,11 @@ boundaryField
emissivity uniform 1.0; emissivity uniform 1.0;
value uniform 0; value uniform 0;
} }
frontAndBack
{
type empty;
}
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -25,19 +25,23 @@ boundaryField
{ {
type calculated; type calculated;
} }
sides sides
{ {
type calculated; type calculated;
} }
base base
{ {
type calculated; type calculated;
} }
inlet inlet
{ {
type calculated; type calculated;
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }

View File

@ -27,22 +27,26 @@ boundaryField
inletValue $internalField; inletValue $internalField;
value $internalField; value $internalField;
} }
sides sides
{ {
type inletOutlet; type inletOutlet;
inletValue $internalField; inletValue $internalField;
value $internalField; value $internalField;
} }
base base
{ {
type zeroGradient; type zeroGradient;
} }
inlet inlet
{ {
type fixedValue; type fixedValue;
value uniform 0; value uniform 0;
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }

View File

@ -27,22 +27,26 @@ boundaryField
inletValue uniform 300; inletValue uniform 300;
value uniform 300; value uniform 300;
} }
sides sides
{ {
type inletOutlet; type inletOutlet;
inletValue uniform 300; inletValue uniform 300;
value uniform 300; value uniform 300;
} }
base base
{ {
type zeroGradient; type zeroGradient;
} }
inlet inlet
{ {
type fixedValue; type fixedValue;
value uniform 300; value uniform 300;
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }

View File

@ -29,23 +29,27 @@ boundaryField
value uniform (0 0 0); value uniform (0 0 0);
} }
sides sides
{ {
type pressureInletOutletVelocity; type pressureInletOutletVelocity;
outletValue uniform (0 0 0); outletValue uniform (0 0 0);
value uniform (0 0 0); value uniform (0 0 0);
} }
base base
{ {
type fixedValue; type fixedValue;
value uniform (0 0 0); value uniform (0 0 0);
} }
inlet inlet
{ {
type fixedValue; type fixedValue;
value uniform (0 0.05 0); value uniform (0 0.05 0);
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }

View File

@ -45,7 +45,8 @@ boundaryField
inletValue $internalField; inletValue $internalField;
value $internalField; value $internalField;
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }

View File

@ -25,19 +25,23 @@ boundaryField
{ {
type zeroGradient; type zeroGradient;
} }
sides sides
{ {
type zeroGradient; type zeroGradient;
} }
base base
{ {
type zeroGradient; type zeroGradient;
} }
inlet inlet
{ {
type zeroGradient; type zeroGradient;
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }

View File

@ -27,23 +27,27 @@ boundaryField
inletValue uniform 1e-4; inletValue uniform 1e-4;
value uniform 1e-4; value uniform 1e-4;
} }
sides sides
{ {
type inletOutlet; type inletOutlet;
inletValue uniform 1e-4; inletValue uniform 1e-4;
value uniform 1e-4; value uniform 1e-4;
} }
base base
{ {
type fixedValue; type fixedValue;
value uniform 1e-4; value uniform 1e-4;
} }
inlet inlet
{ {
type fixedValue; type fixedValue;
value uniform 1e-4; value uniform 1e-4;
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }

View File

@ -25,19 +25,23 @@ boundaryField
{ {
type zeroGradient; type zeroGradient;
} }
sides sides
{ {
type zeroGradient; type zeroGradient;
} }
base base
{ {
type zeroGradient; type zeroGradient;
} }
inlet inlet
{ {
type zeroGradient; type zeroGradient;
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }

View File

@ -28,26 +28,29 @@ boundaryField
inletValue uniform 0; inletValue uniform 0;
value uniform 0; value uniform 0;
} }
sides sides
{ {
type inletOutlet; type inletOutlet;
inletValue uniform 0; inletValue uniform 0;
value uniform 0; value uniform 0;
} }
base base
{ {
type zeroGradient; type zeroGradient;
} }
inlet inlet
{ {
type fixedValue; type fixedValue;
value uniform 0.0; value uniform 0.0;
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -32,17 +32,20 @@ boundaryField
type calculated; type calculated;
value $internalField; value $internalField;
} }
base base
{ {
type calculated; type calculated;
value $internalField; value $internalField;
} }
inlet inlet
{ {
type calculated; type calculated;
value $internalField; value $internalField;
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }

View File

@ -26,6 +26,7 @@ boundaryField
type buoyantPressure; type buoyantPressure;
value $internalField; value $internalField;
} }
sides sides
{ {
type totalPressure; type totalPressure;
@ -37,17 +38,20 @@ boundaryField
gamma 1; gamma 1;
value $internalField; value $internalField;
} }
base base
{ {
type buoyantPressure; type buoyantPressure;
value $internalField; value $internalField;
} }
inlet inlet
{ {
type buoyantPressure; type buoyantPressure;
value $internalField; value $internalField;
} }
frontBack
frontAndBack
{ {
type empty; type empty;
} }