mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Corrected handling of the wall BCs of p for buoyant flows.
This commit is contained in:
@ -58,8 +58,6 @@ else
|
||||
//+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
//bool closedVolume = adjustPhi(phi, U, p);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
// Pressure corrector
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
|
||||
phi = fvc::interpolate(U) & mesh.Sf();
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
surfaceScalarField buoyancyPhi =
|
||||
rUAf*fvc::interpolate(rhok)*(g & mesh.Sf());
|
||||
phi += buoyancyPhi;
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
|
||||
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
|
||||
bool closedVolume = adjustPhi(phi, U, p);
|
||||
|
||||
surfaceScalarField buoyancyPhi =
|
||||
rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf());
|
||||
phi += buoyancyPhi;
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
{
|
||||
wordList pcorrTypes(p.boundaryField().types());
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
{
|
||||
|
||||
@ -104,12 +104,6 @@ int main(int argc, char *argv[])
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
|
||||
if (mesh.changing())
|
||||
{
|
||||
gh = g & mesh.C();
|
||||
ghf = g & mesh.Cf();
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
// --- Outer-corrector loop
|
||||
|
||||
@ -46,11 +46,6 @@
|
||||
#include "createPhi.H"
|
||||
|
||||
|
||||
Info<< "Calculating field g.h\n" << endl;
|
||||
volScalarField gh("gh", g & mesh.C());
|
||||
surfaceScalarField ghf("ghf", g & mesh.Cf());
|
||||
|
||||
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
twoPhaseMixture twoPhaseProperties(U, phi);
|
||||
|
||||
@ -134,7 +129,11 @@
|
||||
);
|
||||
|
||||
|
||||
wordList pcorrTypes(p.boundaryField().types());
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
# include "continuityErrs.H"
|
||||
#include "continuityErrs.H"
|
||||
|
||||
volScalarField pcorr
|
||||
(
|
||||
@ -36,5 +36,5 @@
|
||||
}
|
||||
}
|
||||
|
||||
# include "continuityErrs.H"
|
||||
#include "continuityErrs.H"
|
||||
}
|
||||
|
||||
@ -92,7 +92,11 @@
|
||||
incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
|
||||
);
|
||||
|
||||
wordList pcorrTypes(p.boundaryField().types());
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
{
|
||||
|
||||
@ -86,9 +86,6 @@ int main(int argc, char *argv[])
|
||||
<< " s" << endl;
|
||||
}
|
||||
|
||||
volScalarField gh("gh", g & mesh.C());
|
||||
surfaceScalarField ghf("ghf", g & mesh.Cf());
|
||||
|
||||
if (mesh.changing() && correctPhi)
|
||||
{
|
||||
#include "correctPhi.H"
|
||||
|
||||
@ -5,19 +5,19 @@
|
||||
U = rAU*UEqn.H();
|
||||
surfaceScalarField phiU("phiU", (fvc::interpolate(U) & mesh.Sf()));
|
||||
|
||||
if (p.needReference())
|
||||
{
|
||||
fvc::makeRelative(phiU, U);
|
||||
adjustPhi(phiU, U, p);
|
||||
fvc::makeAbsolute(phiU, U);
|
||||
}
|
||||
|
||||
phi = phiU +
|
||||
(
|
||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rAUf;
|
||||
|
||||
if (p.needReference())
|
||||
{
|
||||
fvc::makeRelative(phi, U);
|
||||
adjustPhi(phi, U, p);
|
||||
fvc::makeAbsolute(phi, U);
|
||||
}
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
{
|
||||
# include "continuityErrs.H"
|
||||
#include "continuityErrs.H"
|
||||
|
||||
wordList pcorrTypes(p.boundaryField().types());
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
{
|
||||
@ -46,5 +50,5 @@
|
||||
}
|
||||
}
|
||||
|
||||
# include "continuityErrs.H"
|
||||
#include "continuityErrs.H"
|
||||
}
|
||||
|
||||
@ -7,17 +7,18 @@
|
||||
surfaceScalarField phiU
|
||||
(
|
||||
"phiU",
|
||||
(fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
adjustPhi(phiU, U, p);
|
||||
|
||||
phi = phiU +
|
||||
(
|
||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
{
|
||||
# include "continuityErrs.H"
|
||||
#include "continuityErrs.H"
|
||||
|
||||
wordList pcorrTypes(p.boundaryField().types());
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
{
|
||||
|
||||
@ -11,14 +11,14 @@
|
||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
adjustPhi(phiU, U, p);
|
||||
|
||||
phi = phiU +
|
||||
(
|
||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
Pair<tmp<volScalarField> > vDotP = twoPhaseProperties->vDotP();
|
||||
const volScalarField& vDotcP = vDotP[0]();
|
||||
const volScalarField& vDotvP = vDotP[1]();
|
||||
|
||||
@ -10,14 +10,14 @@
|
||||
(fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
adjustPhi(phiU, U, p);
|
||||
|
||||
phi = phiU +
|
||||
(
|
||||
mixture.surfaceTensionForce()*mesh.magSf()
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
|
||||
Reference in New Issue
Block a user