mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
multiphase: Changed phiU to phiHbyA and cache HbyA rather than store the velocity predictor in U
This commit is contained in:
@ -2,8 +2,8 @@
|
||||
rho1 = eos1->rho(p, T);
|
||||
rho2 = eos2->rho(p, T);
|
||||
|
||||
volScalarField rAU = 1.0/UEqn.A();
|
||||
surfaceScalarField rAUf = fvc::interpolate(rAU);
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
|
||||
|
||||
tmp<fvScalarMatrix> p_rghEqnComp1;
|
||||
tmp<fvScalarMatrix> p_rghEqnComp2;
|
||||
@ -27,20 +27,25 @@
|
||||
- fvc::Sp(fvc::div(phid2), p_rgh);
|
||||
}
|
||||
|
||||
U = rAU*UEqn.H();
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn.H();
|
||||
|
||||
surfaceScalarField phiU
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiU",
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
);
|
||||
|
||||
phi = phiU +
|
||||
surfaceScalarField phig
|
||||
(
|
||||
(
|
||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
|
||||
- ghf*fvc::snGrad(rho)
|
||||
)*rAUf*mesh.magSf();
|
||||
)*rAUf*mesh.magSf()
|
||||
);
|
||||
|
||||
phiHbyA += phig;
|
||||
|
||||
// Thermodynamic density needs to be updated by psi*d(p) after the
|
||||
// pressure solution - done in 2 parts. Part 1:
|
||||
@ -50,7 +55,7 @@
|
||||
{
|
||||
fvScalarMatrix p_rghEqnIncomp
|
||||
(
|
||||
fvc::div(phi)
|
||||
fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rAUf, p_rgh)
|
||||
);
|
||||
|
||||
@ -74,12 +79,14 @@
|
||||
pos(alpha2)*(p_rghEqnComp2 & p_rgh)/rho2
|
||||
- pos(alpha1)*(p_rghEqnComp1 & p_rgh)/rho1
|
||||
);
|
||||
phi += p_rghEqnIncomp.flux();
|
||||
}
|
||||
}
|
||||
|
||||
U += rAU*fvc::reconstruct((phi - phiU)/rAUf);
|
||||
phi = phiHbyA + p_rghEqnIncomp.flux();
|
||||
|
||||
U = HbyA
|
||||
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin);
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
volScalarField rAU("Dp", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dpf", fvc::interpolate(rAU));
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
|
||||
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn.H();
|
||||
@ -11,7 +11,6 @@
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
);
|
||||
|
||||
mrfZones.relativeFlux(phiHbyA);
|
||||
|
||||
adjustPhi(phiHbyA, U, p_rgh);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
volScalarField rAU("Dp", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dpf", fvc::interpolate(rAU));
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
|
||||
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn.H();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
volScalarField rAU("Dp", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dpf", fvc::interpolate(rAU));
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
|
||||
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn.H();
|
||||
|
||||
@ -1,24 +1,28 @@
|
||||
{
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
surfaceScalarField rAUf(fvc::interpolate(rAU));
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
|
||||
|
||||
U = rAU*UEqn.H();
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn.H();
|
||||
|
||||
surfaceScalarField phiU
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiU",
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
);
|
||||
|
||||
adjustPhi(phiU, U, p_rgh);
|
||||
adjustPhi(phiHbyA, U, p_rgh);
|
||||
|
||||
phi =
|
||||
phiU
|
||||
+ (
|
||||
surfaceScalarField phig
|
||||
(
|
||||
(
|
||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
|
||||
- ghf*fvc::snGrad(rho)
|
||||
)*rAUf*mesh.magSf();
|
||||
)*rAUf*mesh.magSf()
|
||||
);
|
||||
|
||||
phiHbyA += phig;
|
||||
|
||||
Pair<tmp<volScalarField> > vDotP = twoPhaseProperties->vDotP();
|
||||
const volScalarField& vDotcP = vDotP[0]();
|
||||
@ -28,7 +32,7 @@
|
||||
{
|
||||
fvScalarMatrix p_rghEqn
|
||||
(
|
||||
fvc::div(phi) - fvm::laplacian(rAUf, p_rgh)
|
||||
fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh)
|
||||
- (vDotvP - vDotcP)*(pSat - rho*gh) + fvm::Sp(vDotvP - vDotcP, p_rgh)
|
||||
);
|
||||
|
||||
@ -38,12 +42,12 @@
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += p_rghEqn.flux();
|
||||
}
|
||||
}
|
||||
phi = phiHbyA + p_rghEqn.flux();
|
||||
|
||||
U += rAU*fvc::reconstruct((phi - phiU)/rAUf);
|
||||
U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
|
||||
@ -1,31 +1,32 @@
|
||||
{
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
surfaceScalarField rAUf(fvc::interpolate(rAU));
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
|
||||
|
||||
U = rAU*UEqn.H();
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn.H();
|
||||
|
||||
surfaceScalarField phiU
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiU",
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
//+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
);
|
||||
mrfZones.relativeFlux(phiU);
|
||||
mrfZones.relativeFlux(phiHbyA);
|
||||
|
||||
adjustPhi(phiU, U, p_rgh);
|
||||
adjustPhi(phiHbyA, U, p_rgh);
|
||||
|
||||
phi =
|
||||
phiU
|
||||
+ (
|
||||
mixture.surfaceTensionForce()
|
||||
- ghf*fvc::snGrad(rho)
|
||||
)*rAUf*mesh.magSf();
|
||||
surfaceScalarField phig
|
||||
(
|
||||
- ghf*fvc::snGrad(rho)*rAUf*mesh.magSf()
|
||||
);
|
||||
|
||||
phiHbyA += phig;
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
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));
|
||||
@ -34,12 +35,12 @@
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= p_rghEqn.flux();
|
||||
}
|
||||
}
|
||||
phi = phiHbyA - p_rghEqn.flux();
|
||||
|
||||
U += rAU*fvc::reconstruct((phi - phiU)/rAUf);
|
||||
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
|
||||
@ -1,29 +1,34 @@
|
||||
{
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
surfaceScalarField rAUf(fvc::interpolate(rAU));
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
|
||||
|
||||
U = rAU*UEqn.H();
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn.H();
|
||||
|
||||
surfaceScalarField phiU
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiU",
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
);
|
||||
|
||||
adjustPhi(phiU, U, p_rgh);
|
||||
adjustPhi(phiHbyA, U, p_rgh);
|
||||
|
||||
phi = phiU +
|
||||
surfaceScalarField phig
|
||||
(
|
||||
(
|
||||
mixture.surfaceTensionForce()
|
||||
- ghf*fvc::snGrad(rho)
|
||||
)*rAUf*mesh.magSf();
|
||||
)*rAUf*mesh.magSf()
|
||||
);
|
||||
|
||||
phiHbyA += phig;
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
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));
|
||||
@ -32,12 +37,12 @@
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= p_rghEqn.flux();
|
||||
}
|
||||
}
|
||||
phi = phiHbyA - p_rghEqn.flux();
|
||||
|
||||
U += rAU*fvc::reconstruct((phi - phiU)/rAUf);
|
||||
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
|
||||
@ -1,27 +1,32 @@
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
{
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
|
||||
surfaceScalarField rAUf
|
||||
surfaceScalarField rAUf("Dp", fvc::interpolate(rho*rAU));
|
||||
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn.H();
|
||||
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"(rho*(1|A(U)))",
|
||||
fvc::interpolate(rho)*fvc::interpolate(rAU)
|
||||
);
|
||||
|
||||
U = rAU*UEqn.H();
|
||||
phi =
|
||||
fvc::interpolate(rho)
|
||||
*(
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
surfaceScalarField phiU("phiU", phi);
|
||||
phi -= ghf*fvc::snGrad(rho)*rAUf*mesh.magSf();
|
||||
surfaceScalarField phig
|
||||
(
|
||||
- ghf*fvc::snGrad(rho)*rAUf*mesh.magSf()
|
||||
);
|
||||
|
||||
phiHbyA += phig;
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix p_rghEqn
|
||||
(
|
||||
fvm::laplacian(rAUf, p_rgh) == fvc::ddt(rho) + fvc::div(phi)
|
||||
fvm::laplacian(rAUf, p_rgh) == fvc::ddt(rho) + fvc::div(phiHbyA)
|
||||
);
|
||||
|
||||
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
|
||||
@ -30,7 +35,10 @@ while (pimple.correctNonOrthogonal())
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= p_rghEqn.flux();
|
||||
phi = phiHbyA - p_rghEqn.flux();
|
||||
|
||||
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,6 +57,4 @@ if (p_rgh.needReference())
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
U += rAU*fvc::reconstruct((phi - phiU)/rAUf);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
@ -1,24 +1,31 @@
|
||||
{
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
surfaceScalarField rAUf(fvc::interpolate(rAU));
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
|
||||
|
||||
U = rAU*UEqn.H();
|
||||
surfaceScalarField phiU
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn.H();
|
||||
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiU",
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
);
|
||||
|
||||
adjustPhi(phiU, U, p_rgh);
|
||||
adjustPhi(phiHbyA, U, p_rgh);
|
||||
|
||||
phi = phiU - ghf*fvc::snGrad(rho)*rAUf*mesh.magSf();
|
||||
surfaceScalarField phig
|
||||
(
|
||||
- ghf*fvc::snGrad(rho)*rAUf*mesh.magSf()
|
||||
);
|
||||
|
||||
phiHbyA += phig;
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
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));
|
||||
@ -27,12 +34,12 @@
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= p_rghEqn.flux();
|
||||
}
|
||||
}
|
||||
phi = phiHbyA - p_rghEqn.flux();
|
||||
|
||||
U += rAU*fvc::reconstruct((phi - phiU)/rAUf);
|
||||
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@ Foam::fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField
|
||||
phiHbyAName_("phiHbyA"),
|
||||
phiName_("phi"),
|
||||
rhoName_("rho"),
|
||||
DpName_("Dp"),
|
||||
adjoint_(false)
|
||||
{}
|
||||
|
||||
@ -57,6 +58,7 @@ Foam::fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField
|
||||
phiHbyAName_(ptf.phiHbyAName_),
|
||||
phiName_(ptf.phiName_),
|
||||
rhoName_(ptf.rhoName_),
|
||||
DpName_(ptf.rhoName_),
|
||||
adjoint_(ptf.adjoint_)
|
||||
{}
|
||||
|
||||
@ -72,6 +74,7 @@ Foam::fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField
|
||||
phiHbyAName_(dict.lookupOrDefault<word>("phiHbyA", "phiHbyA")),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
DpName_(dict.lookupOrDefault<word>("Dp", "Dp")),
|
||||
adjoint_(dict.lookupOrDefault<Switch>("adjoint", false))
|
||||
{
|
||||
if (dict.found("gradient"))
|
||||
@ -97,6 +100,7 @@ Foam::fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField
|
||||
phiHbyAName_(wbppsf.phiHbyAName_),
|
||||
phiName_(wbppsf.phiName_),
|
||||
rhoName_(wbppsf.rhoName_),
|
||||
DpName_(wbppsf.DpName_),
|
||||
adjoint_(wbppsf.adjoint_)
|
||||
{}
|
||||
|
||||
@ -111,6 +115,7 @@ Foam::fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField
|
||||
phiHbyAName_(wbppsf.phiHbyAName_),
|
||||
phiName_(wbppsf.phiName_),
|
||||
rhoName_(wbppsf.rhoName_),
|
||||
DpName_(wbppsf.DpName_),
|
||||
adjoint_(wbppsf.adjoint_)
|
||||
{}
|
||||
|
||||
@ -136,6 +141,7 @@ void Foam::fixedFluxPressureFvPatchScalarField::updateCoeffs()
|
||||
fvsPatchField<scalar> phip =
|
||||
patch().patchField<surfaceScalarField, scalar>(phi);
|
||||
|
||||
/*
|
||||
if (phi.dimensions() == dimDensity*dimVelocity*dimArea)
|
||||
{
|
||||
const fvPatchField<scalar>& rhop =
|
||||
@ -144,16 +150,38 @@ void Foam::fixedFluxPressureFvPatchScalarField::updateCoeffs()
|
||||
phip /= rhop;
|
||||
}
|
||||
|
||||
const fvPatchField<scalar>& Dpp =
|
||||
patch().lookupPatchField<volScalarField, scalar>("Dp");
|
||||
if (phiHbyA.dimensions() == dimDensity*dimVelocity*dimArea)
|
||||
{
|
||||
const fvPatchField<scalar>& rhop =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
|
||||
phiHbyAp /= rhop;
|
||||
}
|
||||
*/
|
||||
|
||||
const scalarField *DppPtr = NULL;
|
||||
|
||||
if (db().foundObject<volScalarField>(DpName_))
|
||||
{
|
||||
DppPtr =
|
||||
&patch().lookupPatchField<volScalarField, scalar>(DpName_);
|
||||
}
|
||||
else if (db().foundObject<surfaceScalarField>(DpName_))
|
||||
{
|
||||
const surfaceScalarField& Dp =
|
||||
db().lookupObject<surfaceScalarField>(DpName_);
|
||||
|
||||
DppPtr =
|
||||
&patch().patchField<surfaceScalarField, scalar>(Dp);
|
||||
}
|
||||
|
||||
if (adjoint_)
|
||||
{
|
||||
gradient() = (phip - phiHbyAp)/patch().magSf()/Dpp;
|
||||
gradient() = (phip - phiHbyAp)/patch().magSf()/(*DppPtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
gradient() = (phiHbyAp - phip)/patch().magSf()/Dpp;
|
||||
gradient() = (phiHbyAp - phip)/patch().magSf()/(*DppPtr);
|
||||
}
|
||||
|
||||
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||
@ -166,6 +194,7 @@ void Foam::fixedFluxPressureFvPatchScalarField::write(Ostream& os) const
|
||||
writeEntryIfDifferent<word>(os, "phiHbyA", "phiHbyA", phiHbyAName_);
|
||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntryIfDifferent<word>(os, "Dp", "Dp", rhoName_);
|
||||
os.writeKeyword("adjoint") << adjoint_ << token::END_STATEMENT << nl;
|
||||
gradient().writeEntry("gradient", os);
|
||||
}
|
||||
|
||||
@ -71,6 +71,9 @@ class fixedFluxPressureFvPatchScalarField
|
||||
// if neccessary
|
||||
word rhoName_;
|
||||
|
||||
//- Name of the pressure diffusivity field
|
||||
word DpName_;
|
||||
|
||||
//- Is the pressure adjoint, i.e. has the opposite sign
|
||||
Switch adjoint_;
|
||||
|
||||
|
||||
@ -136,6 +136,7 @@ void Foam::multiphaseFixedFluxPressureFvPatchScalarField::updateCoeffs()
|
||||
fvsPatchField<scalar> phip =
|
||||
patch().patchField<surfaceScalarField, scalar>(phi);
|
||||
|
||||
/*
|
||||
if (phi.dimensions() == dimDensity*dimVelocity*dimArea)
|
||||
{
|
||||
const fvPatchField<scalar>& rhop =
|
||||
@ -144,6 +145,15 @@ void Foam::multiphaseFixedFluxPressureFvPatchScalarField::updateCoeffs()
|
||||
phip /= rhop;
|
||||
}
|
||||
|
||||
if (phiHbyA.dimensions() == dimDensity*dimVelocity*dimArea)
|
||||
{
|
||||
const fvPatchField<scalar>& rhop =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
|
||||
phiHbyAp /= rhop;
|
||||
}
|
||||
*/
|
||||
|
||||
const fvsPatchField<scalar>& Dpp =
|
||||
patch().lookupPatchField<surfaceScalarField, scalar>("Dp");
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
|
||||
laplacian(Dp,p_rgh) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
laplacian(mut,Alpha) Gauss linear corrected;
|
||||
|
||||
@ -39,7 +39,7 @@ laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
|
||||
laplacian(Dp,p_rgh) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
laplacian(mut,Alpha) Gauss linear corrected;
|
||||
|
||||
Reference in New Issue
Block a user