mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Specialized dotInterpolate for the efficient calculation of flux fields
e.g. (fvc::interpolate(HbyA) & mesh.Sf()) -> fvc::flux(HbyA) This removes the need to create an intermediate face-vector field when computing fluxes which is more efficient, reduces the peak storage and improved cache coherency in addition to providing a simpler and cleaner API.
This commit is contained in:
@ -92,7 +92,7 @@ int main(int argc, char *argv[])
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rAUf*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
|
||||
|
||||
@ -24,13 +24,13 @@ surfaceScalarField phi
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::interpolate(U) & mesh.Sf()
|
||||
fvc::flux(U)
|
||||
);
|
||||
|
||||
if (args.optionFound("initialiseUBCs"))
|
||||
{
|
||||
U.correctBoundaryConditions();
|
||||
phi = fvc::interpolate(U) & mesh.Sf();
|
||||
phi = fvc::flux(U);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -121,8 +121,7 @@ int main(int argc, char *argv[])
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
Info<< "Interpolated velocity error = "
|
||||
<< (sqrt(sum(sqr((fvc::interpolate(U) & mesh.Sf()) - phi)))
|
||||
/sum(mesh.magSf())).value()
|
||||
<< (sqrt(sum(sqr(fvc::flux(U) - phi)))/sum(mesh.magSf())).value()
|
||||
<< endl;
|
||||
|
||||
// Write U and phi
|
||||
|
||||
@ -10,7 +10,7 @@ if (pimple.transonic())
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
|
||||
/fvc::interpolate(rho)
|
||||
)
|
||||
@ -41,7 +41,7 @@ else
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
@ -11,7 +11,7 @@ if (pimple.transonic())
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
@ -43,7 +43,7 @@ else
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
@ -12,7 +12,7 @@ if (pimple.transonic())
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
|
||||
)
|
||||
)
|
||||
@ -46,7 +46,7 @@ else
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
|
||||
)
|
||||
);
|
||||
|
||||
@ -10,7 +10,7 @@ surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
+ phig
|
||||
|
||||
@ -19,7 +19,7 @@ if (pimple.transonic())
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
@ -51,7 +51,7 @@ else
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
@ -19,7 +19,7 @@ if (pimple.transonic())
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
|
||||
/fvc::interpolate(rho)
|
||||
)
|
||||
@ -63,7 +63,7 @@ else
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
+ phig
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
@ -56,7 +56,7 @@
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
@ -95,7 +95,7 @@ surfaceScalarField neg
|
||||
dimensionedScalar("neg", dimless, -1.0)
|
||||
);
|
||||
|
||||
surfaceScalarField phi("phi", mesh.Sf() & fvc::interpolate(rhoU));
|
||||
surfaceScalarField phi("phi", fvc::flux(rhoU));
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
|
||||
@ -208,7 +208,7 @@ int main(int argc, char *argv[])
|
||||
"sigmaDotU",
|
||||
(
|
||||
fvc::interpolate(muEff)*mesh.magSf()*fvc::snGrad(U)
|
||||
+ (mesh.Sf() & fvc::interpolate(tauMC))
|
||||
+ fvc::dotInterpolate(mesh.Sf(), tauMC)
|
||||
)
|
||||
& (a_pos*U_pos + a_neg*U_neg)
|
||||
);
|
||||
|
||||
@ -201,7 +201,7 @@ int main(int argc, char *argv[])
|
||||
"sigmaDotU",
|
||||
(
|
||||
fvc::interpolate(muEff)*mesh.magSf()*fvc::snGrad(U)
|
||||
+ (mesh.Sf() & fvc::interpolate(tauMC))
|
||||
+ fvc::dotInterpolate(mesh.Sf(), tauMC)
|
||||
)
|
||||
& (a_pos*U_pos + a_neg*U_neg)
|
||||
);
|
||||
|
||||
@ -19,7 +19,7 @@ if (pimple.transonic())
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
@ -51,7 +51,7 @@ else
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
@ -19,7 +19,7 @@ if (pimple.transonic())
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
|
||||
/fvc::interpolate(rho)
|
||||
)
|
||||
@ -63,7 +63,7 @@ else
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
@ -19,7 +19,7 @@ if (pimple.transonic())
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
@ -51,7 +51,7 @@ else
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
|
||||
);
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(psi)*(fvc::interpolate(U) & mesh.Sf())
|
||||
fvc::interpolate(psi)*fvc::flux(U)
|
||||
);
|
||||
|
||||
rDeltaT.dimensionedInternalField() = max
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
*fvc::flux(HbyA)
|
||||
);
|
||||
|
||||
MRF.makeRelative(fvc::interpolate(psi), phid);
|
||||
@ -42,12 +42,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::interpolate(rho*HbyA) & mesh.Sf()
|
||||
);
|
||||
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
closedVolume = adjustPhi(phiHbyA, U, p);
|
||||
|
||||
@ -11,7 +11,7 @@ if (simple.transonic())
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
*fvc::flux(HbyA)
|
||||
);
|
||||
|
||||
MRF.makeRelative(fvc::interpolate(psi), phid);
|
||||
@ -52,12 +52,7 @@ if (simple.transonic())
|
||||
}
|
||||
else
|
||||
{
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::interpolate(rho*HbyA) & mesh.Sf()
|
||||
);
|
||||
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
closedVolume = adjustPhi(phiHbyA, U, p);
|
||||
|
||||
@ -16,12 +16,7 @@
|
||||
|
||||
bool closedVolume = false;
|
||||
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::interpolate(rho*HbyA) & mesh.Sf()
|
||||
);
|
||||
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
closedVolume = adjustPhi(phiHbyA, U, p);
|
||||
|
||||
@ -8,7 +8,7 @@ surfaceScalarField phid
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(mesh.Sf() & fvc::interpolate(HbyA))
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
|
||||
@ -8,7 +8,7 @@ surfaceScalarField phid
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(mesh.Sf() & fvc::interpolate(HbyA))
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -89,7 +89,7 @@ int main(int argc, char *argv[])
|
||||
"phid",
|
||||
psi
|
||||
*(
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
fvc::flux(U)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
(fvc::interpolate(B) & mesh.Sf())
|
||||
fvc::flux(B)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rAUf*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
|
||||
@ -147,8 +147,7 @@ int main(int argc, char *argv[])
|
||||
volScalarField rAB(1.0/BEqn.A());
|
||||
surfaceScalarField rABf("rABf", fvc::interpolate(rAB));
|
||||
|
||||
phiB = (fvc::interpolate(B) & mesh.Sf())
|
||||
+ rABf*fvc::ddtCorr(B, phiB);
|
||||
phiB = fvc::flux(B) + rABf*fvc::ddtCorr(B, phiB);
|
||||
|
||||
while (bpiso.correctNonOrthogonal())
|
||||
{
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rAUf*fvc::ddtCorr(U, phi)
|
||||
+ phig
|
||||
);
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
);
|
||||
|
||||
MRF.makeRelative(phiHbyA);
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
+ phig
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
);
|
||||
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
);
|
||||
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
+ phig
|
||||
|
||||
@ -128,11 +128,7 @@ int main(int argc, char *argv[])
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
tUEqn.clear();
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::interpolate(HbyA) & mesh.Sf()
|
||||
);
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
@ -175,7 +171,7 @@ int main(int argc, char *argv[])
|
||||
//(
|
||||
// fvc::reconstruct
|
||||
// (
|
||||
// mesh.magSf()*(fvc::snGrad(Ua) & fvc::interpolate(U))
|
||||
// mesh.magSf()*fvc::dotInterpolate(fvc::snGrad(Ua), U)
|
||||
// )
|
||||
//);
|
||||
|
||||
@ -204,11 +200,7 @@ int main(int argc, char *argv[])
|
||||
volVectorField HbyAa("HbyAa", Ua);
|
||||
HbyAa = rAUa*UaEqn.H();
|
||||
tUaEqn.clear();
|
||||
surfaceScalarField phiHbyAa
|
||||
(
|
||||
"phiHbyAa",
|
||||
fvc::interpolate(HbyAa) & mesh.Sf()
|
||||
);
|
||||
surfaceScalarField phiHbyAa("phiHbyAa", fvc::flux(HbyAa));
|
||||
adjustPhi(phiHbyAa, Ua, pa);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
|
||||
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ int main(int argc, char *argv[])
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ HbyA = rAUrel*UrelEqn.H();
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rAUrel)*fvc::ddtCorr(Urel, phi)
|
||||
);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rAU)*fvc::ddtCorr(U, Uf)
|
||||
);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -111,7 +111,7 @@ int main(int argc, char *argv[])
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rAU)*fvc::ddtCorr(h, hU, phi)
|
||||
- phih0
|
||||
);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
volVectorField HbyA("HbyA", Urel);
|
||||
HbyA = rAUrel*UrelEqn.H();
|
||||
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
|
||||
adjustPhi(phiHbyA, Urel, p);
|
||||
|
||||
tmp<volScalarField> rAtUrel(rAUrel);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
|
||||
MRF.makeRelative(phiHbyA);
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ else
|
||||
volVectorField& HbyA = tHbyA.ref();
|
||||
|
||||
tUEqn.clear();
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
|
||||
|
||||
MRF.makeRelative(phiHbyA);
|
||||
|
||||
|
||||
@ -14,8 +14,7 @@ surfaceScalarField rAUcf("Dp", fvc::interpolate(rAUc));
|
||||
|
||||
surfaceScalarField phicForces
|
||||
(
|
||||
(fvc::interpolate(rAUc*cloudVolSUSu/rhoc) & mesh.Sf())
|
||||
+ rAUcf*(g & mesh.Sf())
|
||||
fvc::flux(rAUc*cloudVolSUSu/rhoc) + rAUcf*(g & mesh.Sf())
|
||||
);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ alphacf*rAUcf*fvc::ddtCorr(Uc, phic)
|
||||
+ phicForces
|
||||
)
|
||||
|
||||
@ -11,7 +11,7 @@ if (pimple.transonic())
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
@ -44,7 +44,7 @@ else
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
@ -10,7 +10,7 @@ surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
+ phig
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::interpolate(rho)*fvc::flux(HbyA)
|
||||
);
|
||||
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
@ -19,7 +19,7 @@ if (pimple.transonic())
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
@ -52,7 +52,7 @@ else
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
@ -19,7 +19,7 @@ if (pimple.transonic())
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
@ -52,7 +52,7 @@ else
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(rho*HbyA) & mesh.Sf())
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
|
||||
);
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
|
||||
phi = (fvc::interpolate(HbyA) & mesh.Sf())
|
||||
phi = fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(U, Uf);
|
||||
fvc::makeRelative(phi, U);
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
|
||||
phi = (fvc::interpolate(HbyA) & mesh.Sf())
|
||||
phi = fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(U, phi);
|
||||
|
||||
surfaceScalarField phiGradp(rhorAUf*mesh.magSf()*fvc::snGrad(p));
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)
|
||||
);
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
|
||||
|
||||
@ -11,10 +11,7 @@
|
||||
dimensionedScalar("0", phi.dimensions(), 0)
|
||||
);
|
||||
|
||||
surfaceScalarField phir
|
||||
(
|
||||
mesh.Sf() & fvc::interpolate(UdmModel.Udm())
|
||||
);
|
||||
surfaceScalarField phir(fvc::flux(UdmModel.Udm()));
|
||||
|
||||
if (nAlphaSubCycles > 1)
|
||||
{
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
MRF.makeRelative(phiHbyA);
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)
|
||||
);
|
||||
MRF.makeRelative(phiHbyA);
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
MRF.makeRelative(phiHbyA);
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)
|
||||
);
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
adjustPhi(phiHbyA, U, p_rgh);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,6 +29,7 @@ License
|
||||
#include "slipFvPatchFields.H"
|
||||
#include "partialSlipFvPatchFields.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "fvcFlux.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -177,7 +178,7 @@ Foam::phaseModel::phaseModel
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::interpolate(U_) & mesh.Sf(),
|
||||
fvc::flux(U_),
|
||||
phiTypes
|
||||
)
|
||||
);
|
||||
|
||||
@ -97,7 +97,7 @@
|
||||
|
||||
phiHbyAs[phasei] =
|
||||
(
|
||||
(fvc::interpolate(HbyAs[phasei]) & mesh.Sf())
|
||||
fvc::flux(HbyAs[phasei])
|
||||
+ rAlphaAUfs[phasei]*fvc::ddtCorr(phase.U(), phase.phi())
|
||||
);
|
||||
MRF.makeRelative(phiHbyAs[phasei]);
|
||||
|
||||
@ -10,7 +10,7 @@ if (pimple.nCorrPISO() <= 1)
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rAUf*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ rAUf*fvc::ddtCorr(U, Uf)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "liftModel.H"
|
||||
#include "phasePair.H"
|
||||
#include "fvcCurl.H"
|
||||
#include "fvcFlux.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -78,11 +79,7 @@ Foam::tmp<Foam::volVectorField> Foam::liftModel::F() const
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::liftModel::Ff() const
|
||||
{
|
||||
const fvMesh& mesh(this->pair_.phase1().mesh());
|
||||
|
||||
return
|
||||
fvc::interpolate(pair_.dispersed())
|
||||
*(fvc::interpolate(Fi()) & mesh.Sf());
|
||||
return fvc::interpolate(pair_.dispersed())*fvc::flux(Fi());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ License
|
||||
|
||||
#include "wallLubricationModel.H"
|
||||
#include "phasePair.H"
|
||||
#include "fvcFlux.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "wallFvPatch.H"
|
||||
|
||||
@ -91,11 +92,7 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModel::F() const
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::wallLubricationModel::Ff() const
|
||||
{
|
||||
const fvMesh& mesh(this->pair_.phase1().mesh());
|
||||
|
||||
return
|
||||
fvc::interpolate(pair_.dispersed())
|
||||
*(fvc::interpolate(Fi()) & mesh.Sf());
|
||||
return fvc::interpolate(pair_.dispersed())*fvc::flux(Fi());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -35,6 +35,7 @@ License
|
||||
#include "fvmSup.H"
|
||||
#include "fvcDdt.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "fvcFlux.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "fvMatrix.H"
|
||||
|
||||
@ -109,7 +110,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::phi(const volVectorField& U) const
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::interpolate(U) & U.mesh().Sf(),
|
||||
fvc::flux(U),
|
||||
phiTypes
|
||||
)
|
||||
);
|
||||
|
||||
@ -51,7 +51,7 @@ PtrList<surfaceScalarField> phiFs(phases.size());
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject::groupName("phiF", phase.name()),
|
||||
(fvc::interpolate(rAUs[phasei]*Fs()[phasei]) & mesh.Sf())
|
||||
fvc::flux(rAUs[phasei]*Fs()[phasei])
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -201,7 +201,7 @@ while (pimple.correct())
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject::groupName("phiHbyA", phase.name()),
|
||||
(fvc::interpolate(HbyAs[phasei]) & mesh.Sf())
|
||||
fvc::flux(HbyAs[phasei])
|
||||
+ phiCorrCoeff
|
||||
*fvc::interpolate
|
||||
(
|
||||
@ -209,7 +209,7 @@ while (pimple.correct())
|
||||
)
|
||||
*(
|
||||
MRF.absolute(phase.phi().oldTime())
|
||||
- (fvc::interpolate(phase.U().oldTime()) & mesh.Sf())
|
||||
- fvc::flux(phase.U().oldTime())
|
||||
)/runTime.deltaT()
|
||||
- phigFs[phasei]
|
||||
)
|
||||
|
||||
@ -65,18 +65,10 @@ tmp<surfaceScalarField> phiF2;
|
||||
surfaceScalarField snGradAlpha1(fvc::snGrad(alpha1)*mesh.magSf());
|
||||
|
||||
// Phase-1 dispersion, lift and wall-lubrication flux
|
||||
phiF1 =
|
||||
(
|
||||
DbyA1()*snGradAlpha1
|
||||
+ (fvc::interpolate(rAU1*F) & mesh.Sf())
|
||||
);
|
||||
phiF1 = DbyA1()*snGradAlpha1 + fvc::flux(rAU1*F);
|
||||
|
||||
// Phase-2 dispersion, lift and wall-lubrication flux
|
||||
phiF2 =
|
||||
(
|
||||
- DbyA2()*snGradAlpha1
|
||||
- (fvc::interpolate(rAU2*F) & mesh.Sf())
|
||||
);
|
||||
phiF2 = - DbyA2()*snGradAlpha1 - fvc::flux(rAU2*F);
|
||||
|
||||
// Cache the phase diffusivities for implicit treatment in the
|
||||
// phase-fraction equation
|
||||
@ -175,11 +167,11 @@ while (pimple.correct())
|
||||
surfaceScalarField phiHbyA1
|
||||
(
|
||||
IOobject::groupName("phiHbyA", phase1.name()),
|
||||
(fvc::interpolate(HbyA1) & mesh.Sf())
|
||||
fvc::flux(HbyA1)
|
||||
+ phiCorrCoeff1*fvc::interpolate(alpha1.oldTime()*rho1.oldTime()*rAU1)
|
||||
*(
|
||||
MRF.absolute(phi1.oldTime())
|
||||
- (fvc::interpolate(U1.oldTime()) & mesh.Sf())
|
||||
- fvc::flux(U1.oldTime())
|
||||
)/runTime.deltaT()
|
||||
- phiF1()
|
||||
- phig1
|
||||
@ -189,11 +181,11 @@ while (pimple.correct())
|
||||
surfaceScalarField phiHbyA2
|
||||
(
|
||||
IOobject::groupName("phiHbyA", phase2.name()),
|
||||
(fvc::interpolate(HbyA2) & mesh.Sf())
|
||||
fvc::flux(HbyA2)
|
||||
+ phiCorrCoeff2*fvc::interpolate(alpha2.oldTime()*rho2.oldTime()*rAU2)
|
||||
*(
|
||||
MRF.absolute(phi2.oldTime())
|
||||
- (fvc::interpolate(U2.oldTime()) & mesh.Sf())
|
||||
- fvc::flux(U2.oldTime())
|
||||
)/runTime.deltaT()
|
||||
- phiF2()
|
||||
- phig2
|
||||
|
||||
@ -157,7 +157,7 @@ while (pimple.correct())
|
||||
*(
|
||||
(alphaRhof10 + Vmf)
|
||||
*MRF.absolute(phi1.oldTime())/runTime.deltaT()
|
||||
+ (fvc::interpolate(U1Eqn.H()) & mesh.Sf())
|
||||
+ fvc::flux(U1Eqn.H())
|
||||
+ Vmf*ddtPhi2
|
||||
+ Kdf*MRF.absolute(phi2)
|
||||
- Ff1()
|
||||
@ -175,7 +175,7 @@ while (pimple.correct())
|
||||
*(
|
||||
(alphaRhof20 + Vmf)
|
||||
*MRF.absolute(phi2.oldTime())/runTime.deltaT()
|
||||
+ (fvc::interpolate(U2Eqn.H()) & mesh.Sf())
|
||||
+ fvc::flux(U2Eqn.H())
|
||||
+ Vmf*ddtPhi1
|
||||
+ Kdf*MRF.absolute(phi1)
|
||||
- Ff2()
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
adjustPhi(phiHbyA, U, p_rgh);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "liftModel.H"
|
||||
#include "phasePair.H"
|
||||
#include "fvcCurl.H"
|
||||
#include "fvcFlux.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -78,11 +79,7 @@ Foam::tmp<Foam::volVectorField> Foam::liftModel::F() const
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::liftModel::Ff() const
|
||||
{
|
||||
const fvMesh& mesh(this->pair_.phase1().mesh());
|
||||
|
||||
return
|
||||
fvc::interpolate(pair_.dispersed())
|
||||
*(fvc::interpolate(Fi()) & mesh.Sf());
|
||||
return fvc::interpolate(pair_.dispersed())*fvc::flux(Fi());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,6 +25,7 @@ License
|
||||
|
||||
#include "wallLubricationModel.H"
|
||||
#include "phasePair.H"
|
||||
#include "fvcFlux.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -67,11 +68,7 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModel::F() const
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::wallLubricationModel::Ff() const
|
||||
{
|
||||
const fvMesh& mesh(this->pair_.phase1().mesh());
|
||||
|
||||
return
|
||||
fvc::interpolate(pair_.dispersed())
|
||||
*(fvc::interpolate(Fi()) & mesh.Sf());
|
||||
return fvc::interpolate(pair_.dispersed())*fvc::flux(Fi());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -70,18 +70,10 @@ tmp<surfaceScalarField> phiF2;
|
||||
surfaceScalarField snGradAlpha1(fvc::snGrad(alpha1)*mesh.magSf());
|
||||
|
||||
// Phase-1 dispersion, lift and wall-lubrication flux
|
||||
phiF1 =
|
||||
(
|
||||
Df1*snGradAlpha1
|
||||
+ (fvc::interpolate(rAU1*F) & mesh.Sf())
|
||||
);
|
||||
phiF1 = Df1*snGradAlpha1 + fvc::flux(rAU1*F);
|
||||
|
||||
// Phase-1 dispersion, lift and wall-lubrication flux
|
||||
phiF2 =
|
||||
(
|
||||
- Df2*snGradAlpha1
|
||||
- (fvc::interpolate(rAU2*F) & mesh.Sf())
|
||||
);
|
||||
phiF2 = - Df2*snGradAlpha1 - fvc::flux(rAU2*F);
|
||||
}
|
||||
|
||||
|
||||
@ -172,11 +164,11 @@ while (pimple.correct())
|
||||
surfaceScalarField phiHbyA1
|
||||
(
|
||||
IOobject::groupName("phiHbyA", phase1.name()),
|
||||
(fvc::interpolate(HbyA1) & mesh.Sf())
|
||||
fvc::flux(HbyA1)
|
||||
+ phiCorrCoeff1*fvc::interpolate(alpha1.oldTime()*rho1.oldTime()*rAU1)
|
||||
*(
|
||||
MRF.absolute(phi1.oldTime())
|
||||
- (fvc::interpolate(U1.oldTime()) & mesh.Sf())
|
||||
- fvc::flux(U1.oldTime())
|
||||
)/runTime.deltaT()
|
||||
- phiF1()
|
||||
- phig1
|
||||
@ -186,11 +178,11 @@ while (pimple.correct())
|
||||
surfaceScalarField phiHbyA2
|
||||
(
|
||||
IOobject::groupName("phiHbyA", phase2.name()),
|
||||
(fvc::interpolate(HbyA2) & mesh.Sf())
|
||||
fvc::flux(HbyA2)
|
||||
+ phiCorrCoeff2*fvc::interpolate(alpha2.oldTime()*rho2.oldTime()*rAU2)
|
||||
*(
|
||||
MRF.absolute(phi2.oldTime())
|
||||
- (fvc::interpolate(U2.oldTime()) & mesh.Sf())
|
||||
- fvc::flux(U2.oldTime())
|
||||
)/runTime.deltaT()
|
||||
- phiF2()
|
||||
- phig2
|
||||
|
||||
@ -156,7 +156,7 @@ while (pimple.correct())
|
||||
*(
|
||||
(alphaRhof10 + Vmf)
|
||||
*MRF.absolute(phi1.oldTime())/runTime.deltaT()
|
||||
+ (fvc::interpolate(U1Eqn.H()) & mesh.Sf())
|
||||
+ fvc::flux(U1Eqn.H())
|
||||
+ Vmf*ddtPhi2
|
||||
+ Kdf*MRF.absolute(phi2)
|
||||
- Ff1()
|
||||
@ -174,7 +174,7 @@ while (pimple.correct())
|
||||
*(
|
||||
(alphaRhof20 + Vmf)
|
||||
*MRF.absolute(phi2.oldTime())/runTime.deltaT()
|
||||
+ (fvc::interpolate(U2Eqn.H()) & mesh.Sf())
|
||||
+ fvc::flux(U2Eqn.H())
|
||||
+ Vmf*ddtPhi1
|
||||
+ Kdf*MRF.absolute(phi1)
|
||||
- Ff2()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,6 +34,7 @@ License
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "slipFvPatchFields.H"
|
||||
#include "partialSlipFvPatchFields.H"
|
||||
#include "fvcFlux.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
|
||||
|
||||
@ -175,7 +176,7 @@ Foam::phaseModel::phaseModel
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::interpolate(U_) & fluid_.mesh().Sf(),
|
||||
fvc::flux(U_),
|
||||
phiTypes
|
||||
)
|
||||
);
|
||||
|
||||
@ -390,6 +390,7 @@ laplacianSchemes = finiteVolume/laplacianSchemes
|
||||
$(laplacianSchemes)/laplacianScheme/laplacianSchemes.C
|
||||
$(laplacianSchemes)/gaussLaplacianScheme/gaussLaplacianSchemes.C
|
||||
|
||||
finiteVolume/fvc/fvcFlux.C
|
||||
finiteVolume/fvc/fvcMeshPhi.C
|
||||
finiteVolume/fvc/fvcSmooth/fvcSmooth.C
|
||||
finiteVolume/fvc/fvcReconstructMag.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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -46,7 +46,7 @@ surfaceScalarField phi
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
linearInterpolate(U) & mesh.Sf()
|
||||
fvc::flux(U)
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -46,7 +46,7 @@ surfaceScalarField phiv
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
linearInterpolate(U) & mesh.Sf()
|
||||
flux(U)
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -600,9 +600,10 @@ CoEulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
{
|
||||
const surfaceScalarField rDeltaT(fvc::interpolate(CorDeltaT()));
|
||||
|
||||
fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime()))
|
||||
phiUf0 - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
@ -615,12 +616,7 @@ CoEulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
),
|
||||
this->fvcDdtPhiCoeff
|
||||
(
|
||||
U.oldTime(),
|
||||
(mesh().Sf() & Uf.oldTime()),
|
||||
phiCorr
|
||||
)
|
||||
this->fvcDdtPhiCoeff(U.oldTime(), phiUf0, phiCorr)
|
||||
*rDeltaT*phiCorr
|
||||
)
|
||||
);
|
||||
@ -639,7 +635,7 @@ CoEulerDdtScheme<Type>::fvcDdtPhiCorr
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime()))
|
||||
phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
@ -681,10 +677,8 @@ CoEulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
rho.oldTime()*U.oldTime()
|
||||
);
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0))
|
||||
);
|
||||
fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
|
||||
fluxFieldType phiCorr(phiUf0 - fvc::dotInterpolate(mesh().Sf(), rhoU0));
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
(
|
||||
@ -697,13 +691,7 @@ CoEulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
),
|
||||
this->fvcDdtPhiCoeff
|
||||
(
|
||||
rhoU0,
|
||||
mesh().Sf() & Uf.oldTime(),
|
||||
phiCorr
|
||||
)
|
||||
*rDeltaT*phiCorr
|
||||
this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr)*rDeltaT*phiCorr
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -750,7 +738,7 @@ CoEulerDdtScheme<Type>::fvcDdtPhiCorr
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0))
|
||||
phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), rhoU0)
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
|
||||
@ -1227,9 +1227,10 @@ CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||
this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime())
|
||||
*(
|
||||
(rDtCoef*phi.oldTime() + offCentre_(dphidt0()))
|
||||
- (
|
||||
mesh().Sf()
|
||||
& fvc::interpolate(rDtCoef*U.oldTime() + offCentre_(ddt0()))
|
||||
- fvc::dotInterpolate
|
||||
(
|
||||
mesh().Sf(),
|
||||
rDtCoef*U.oldTime() + offCentre_(ddt0())
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1398,9 +1399,10 @@ CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||
this->fvcDdtPhiCoeff(rhoU0, phi.oldTime())
|
||||
*(
|
||||
(rDtCoef*phi.oldTime() + offCentre_(dphidt0()))
|
||||
- (
|
||||
mesh().Sf()
|
||||
& fvc::interpolate(rDtCoef*rhoU0 + offCentre_(ddt0()))
|
||||
- fvc::dotInterpolate
|
||||
(
|
||||
mesh().Sf(),
|
||||
rDtCoef*rhoU0 + offCentre_(ddt0())
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@ -489,9 +489,10 @@ EulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
{
|
||||
dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT();
|
||||
|
||||
fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime()))
|
||||
phiUf0 - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
@ -504,12 +505,7 @@ EulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
),
|
||||
this->fvcDdtPhiCoeff
|
||||
(
|
||||
U.oldTime(),
|
||||
mesh().Sf() & Uf.oldTime(),
|
||||
phiCorr
|
||||
)
|
||||
this->fvcDdtPhiCoeff(U.oldTime(), phiUf0, phiCorr)
|
||||
*rDeltaT*phiCorr
|
||||
)
|
||||
);
|
||||
@ -528,7 +524,7 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime()))
|
||||
phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
@ -570,10 +566,8 @@ EulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
rho.oldTime()*U.oldTime()
|
||||
);
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0))
|
||||
);
|
||||
fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
|
||||
fluxFieldType phiCorr(phiUf0 - fvc::dotInterpolate(mesh().Sf(), rhoU0));
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
(
|
||||
@ -586,13 +580,7 @@ EulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
),
|
||||
this->fvcDdtPhiCoeff
|
||||
(
|
||||
rhoU0,
|
||||
mesh().Sf() & Uf.oldTime(),
|
||||
phiCorr
|
||||
)
|
||||
*rDeltaT*phiCorr
|
||||
this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr)*rDeltaT*phiCorr
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -639,7 +627,7 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0))
|
||||
phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), rhoU0)
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
|
||||
@ -599,9 +599,10 @@ SLTSDdtScheme<Type>::fvcDdtUfCorr
|
||||
{
|
||||
const surfaceScalarField rDeltaT(fvc::interpolate(SLrDeltaT()));
|
||||
|
||||
fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime()))
|
||||
phiUf0 - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
@ -614,12 +615,7 @@ SLTSDdtScheme<Type>::fvcDdtUfCorr
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
),
|
||||
this->fvcDdtPhiCoeff
|
||||
(
|
||||
U.oldTime(),
|
||||
(mesh().Sf() & Uf.oldTime()),
|
||||
phiCorr
|
||||
)
|
||||
this->fvcDdtPhiCoeff(U.oldTime(), phiUf0, phiCorr)
|
||||
*rDeltaT*phiCorr
|
||||
)
|
||||
);
|
||||
@ -638,7 +634,7 @@ SLTSDdtScheme<Type>::fvcDdtPhiCorr
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime()))
|
||||
phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
@ -680,10 +676,8 @@ SLTSDdtScheme<Type>::fvcDdtUfCorr
|
||||
rho.oldTime()*U.oldTime()
|
||||
);
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0))
|
||||
);
|
||||
fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
|
||||
fluxFieldType phiCorr(phiUf0 - fvc::dotInterpolate(mesh().Sf(), rhoU0));
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
(
|
||||
@ -696,13 +690,7 @@ SLTSDdtScheme<Type>::fvcDdtUfCorr
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
),
|
||||
this->fvcDdtPhiCoeff
|
||||
(
|
||||
rhoU0,
|
||||
mesh().Sf() & Uf.oldTime(),
|
||||
phiCorr
|
||||
)
|
||||
*rDeltaT*phiCorr
|
||||
this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr)*rDeltaT*phiCorr
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -749,7 +737,7 @@ SLTSDdtScheme<Type>::fvcDdtPhiCorr
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0))
|
||||
phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), rhoU0)
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
|
||||
@ -748,15 +748,13 @@ backwardDdtScheme<Type>::fvcDdtPhiCorr
|
||||
*rDeltaT
|
||||
*(
|
||||
(coefft0*phi.oldTime() - coefft00*phi.oldTime().oldTime())
|
||||
- (
|
||||
mesh().Sf()
|
||||
& fvc::interpolate
|
||||
- fvc::dotInterpolate
|
||||
(
|
||||
mesh().Sf(),
|
||||
coefft0*U.oldTime() - coefft00*U.oldTime().oldTime()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -886,9 +884,10 @@ backwardDdtScheme<Type>::fvcDdtPhiCorr
|
||||
*rDeltaT
|
||||
*(
|
||||
(coefft0*phi.oldTime() - coefft00*phi.oldTime().oldTime())
|
||||
- (
|
||||
mesh().Sf()
|
||||
& fvc::interpolate(coefft0*rhoU0 - coefft00*rhoU00)
|
||||
- fvc::dotInterpolate
|
||||
(
|
||||
mesh().Sf(),
|
||||
coefft0*rhoU0 - coefft00*rhoU00
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@ -183,7 +183,7 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
|
||||
const fluxFieldType& phi
|
||||
)
|
||||
{
|
||||
return fvcDdtPhiCoeff(U, phi, phi - (mesh().Sf() & fvc::interpolate(U)));
|
||||
return fvcDdtPhiCoeff(U, phi, phi - fvc::dotInterpolate(mesh().Sf(), U));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -496,9 +496,10 @@ localEulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
{
|
||||
const surfaceScalarField rDeltaT(fvc::interpolate(localRDeltaT()));
|
||||
|
||||
fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime()))
|
||||
phiUf0 - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
@ -511,12 +512,7 @@ localEulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
),
|
||||
this->fvcDdtPhiCoeff
|
||||
(
|
||||
U.oldTime(),
|
||||
(mesh().Sf() & Uf.oldTime()),
|
||||
phiCorr
|
||||
)
|
||||
this->fvcDdtPhiCoeff(U.oldTime(), phiUf0, phiCorr)
|
||||
*rDeltaT*phiCorr
|
||||
)
|
||||
);
|
||||
@ -535,7 +531,7 @@ localEulerDdtScheme<Type>::fvcDdtPhiCorr
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime()))
|
||||
phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
@ -577,10 +573,8 @@ localEulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
rho.oldTime()*U.oldTime()
|
||||
);
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0))
|
||||
);
|
||||
fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
|
||||
fluxFieldType phiCorr(phiUf0 - fvc::dotInterpolate(mesh().Sf(), rhoU0));
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
(
|
||||
@ -593,13 +587,7 @@ localEulerDdtScheme<Type>::fvcDdtUfCorr
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
),
|
||||
this->fvcDdtPhiCoeff
|
||||
(
|
||||
rhoU0,
|
||||
mesh().Sf() & Uf.oldTime(),
|
||||
phiCorr
|
||||
)
|
||||
*rDeltaT*phiCorr
|
||||
this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr)*rDeltaT*phiCorr
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -646,7 +634,7 @@ localEulerDdtScheme<Type>::fvcDdtPhiCorr
|
||||
|
||||
fluxFieldType phiCorr
|
||||
(
|
||||
phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0))
|
||||
phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), rhoU0)
|
||||
);
|
||||
|
||||
return tmp<fluxFieldType>
|
||||
|
||||
@ -24,167 +24,32 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvcFlux.H"
|
||||
#include "fvMesh.H"
|
||||
#include "convectionScheme.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace fvc
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::flux
|
||||
(
|
||||
const surfaceScalarField& phi,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||
const word& name
|
||||
const volVectorField& vvf
|
||||
)
|
||||
{
|
||||
return fv::convectionScheme<Type>::New
|
||||
return scheme<vector>
|
||||
(
|
||||
vf.mesh(),
|
||||
phi,
|
||||
vf.mesh().divScheme(name)
|
||||
)().flux(phi, vf);
|
||||
vvf.mesh(),
|
||||
"flux(" + vvf.name() + ')'
|
||||
)().dotInterpolate(vvf.mesh().Sf(), vvf);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::flux
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||
const word& name
|
||||
const tmp<volVectorField>& tvvf
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(tphi(), vf, name)
|
||||
);
|
||||
tphi.clear();
|
||||
tmp<surfaceScalarField> Flux(fvc::flux(tvvf()));
|
||||
tvvf.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const surfaceScalarField& phi,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
|
||||
const word& name
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(phi, tvf(), name)
|
||||
);
|
||||
tvf.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
|
||||
const word& name
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(tphi(), tvf(), name)
|
||||
);
|
||||
tphi.clear();
|
||||
tvf.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const surfaceScalarField& phi,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
)
|
||||
{
|
||||
return fvc::flux
|
||||
(
|
||||
phi, vf, "flux("+phi.name()+','+vf.name()+')'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(tphi(), vf)
|
||||
);
|
||||
tphi.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const surfaceScalarField& phi,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(phi, tvf())
|
||||
);
|
||||
tvf.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(tphi(), tvf())
|
||||
);
|
||||
tphi.clear();
|
||||
tvf.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fvc
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -50,6 +50,19 @@ namespace Foam
|
||||
|
||||
namespace fvc
|
||||
{
|
||||
//- Return the face-flux field obtained from the given volVectorField
|
||||
tmp<surfaceScalarField> flux(const volVectorField& vvf);
|
||||
|
||||
//- Return the face-flux field obtained from the given tmp volVectorField
|
||||
tmp<surfaceScalarField> flux(const tmp<volVectorField>& tvvf);
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
|
||||
(
|
||||
const surfaceScalarField&,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
|
||||
(
|
||||
@ -120,7 +133,7 @@ namespace fvc
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "fvcFlux.C"
|
||||
#include "fvcFluxTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
190
src/finiteVolume/finiteVolume/fvc/fvcFluxTemplates.C
Normal file
190
src/finiteVolume/finiteVolume/fvc/fvcFluxTemplates.C
Normal file
@ -0,0 +1,190 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvcFlux.H"
|
||||
#include "fvMesh.H"
|
||||
#include "convectionScheme.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace fvc
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const surfaceScalarField& phi,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||
const word& name
|
||||
)
|
||||
{
|
||||
return fv::convectionScheme<Type>::New
|
||||
(
|
||||
vf.mesh(),
|
||||
phi,
|
||||
vf.mesh().divScheme(name)
|
||||
)().flux(phi, vf);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||
const word& name
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(tphi(), vf, name)
|
||||
);
|
||||
tphi.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const surfaceScalarField& phi,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
|
||||
const word& name
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(phi, tvf(), name)
|
||||
);
|
||||
tvf.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
|
||||
const word& name
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(tphi(), tvf(), name)
|
||||
);
|
||||
tphi.clear();
|
||||
tvf.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const surfaceScalarField& phi,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
)
|
||||
{
|
||||
return fvc::flux
|
||||
(
|
||||
phi, vf, "flux("+phi.name()+','+vf.name()+')'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(tphi(), vf)
|
||||
);
|
||||
tphi.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const surfaceScalarField& phi,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(phi, tvf())
|
||||
);
|
||||
tvf.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
|
||||
flux
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
|
||||
)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
|
||||
(
|
||||
fvc::flux(tphi(), tvf())
|
||||
);
|
||||
tphi.clear();
|
||||
tvf.clear();
|
||||
return Flux;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fvc
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "fvcMeshPhi.H"
|
||||
#include "fvMesh.H"
|
||||
#include "ddtScheme.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -121,7 +121,7 @@ gaussLaplacianScheme<Type, GType>::gammaSnGradCorr
|
||||
tgammaSnGradCorr.ref().replace
|
||||
(
|
||||
cmpt,
|
||||
SfGammaCorr & fvc::interpolate(fvc::grad(vf.component(cmpt)))
|
||||
fvc::dotInterpolate(SfGammaCorr, fvc::grad(vf.component(cmpt)))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -308,4 +308,66 @@ Foam::fvc::interpolate
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp
|
||||
<
|
||||
Foam::GeometricField
|
||||
<
|
||||
typename Foam::innerProduct<Foam::vector, Type>::type,
|
||||
Foam::fvsPatchField,
|
||||
Foam::surfaceMesh
|
||||
>
|
||||
>
|
||||
Foam::fvc::dotInterpolate
|
||||
(
|
||||
const surfaceVectorField& Sf,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
)
|
||||
{
|
||||
if (surfaceInterpolation::debug)
|
||||
{
|
||||
InfoInFunction
|
||||
<< "interpolating GeometricField<Type, fvPatchField, volMesh> "
|
||||
<< vf.name() << " using run-time selected scheme"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
return scheme<Type>
|
||||
(
|
||||
vf.mesh(),
|
||||
"dotInterpolate(" + Sf.name() + ',' + vf.name() + ')'
|
||||
)().dotInterpolate(Sf, vf);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp
|
||||
<
|
||||
Foam::GeometricField
|
||||
<
|
||||
typename Foam::innerProduct<Foam::vector, Type>::type,
|
||||
Foam::fvsPatchField,
|
||||
Foam::surfaceMesh
|
||||
>
|
||||
>
|
||||
Foam::fvc::dotInterpolate
|
||||
(
|
||||
const surfaceVectorField& Sf,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
|
||||
)
|
||||
{
|
||||
tmp
|
||||
<
|
||||
GeometricField
|
||||
<
|
||||
typename Foam::innerProduct<Foam::vector, Type>::type,
|
||||
fvsPatchField,
|
||||
surfaceMesh
|
||||
>
|
||||
> tsf = dotInterpolate(Sf, tvf());
|
||||
tvf.clear();
|
||||
return tsf;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -157,6 +157,13 @@ namespace fvc
|
||||
);
|
||||
|
||||
|
||||
//- Interpolate field onto faces using 'interpolate(\<name\>)'
|
||||
template<class Type>
|
||||
static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& tvf
|
||||
);
|
||||
|
||||
//- Interpolate tmp field onto faces using 'interpolate(\<name\>)'
|
||||
template<class Type>
|
||||
static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
|
||||
@ -164,12 +171,6 @@ namespace fvc
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
|
||||
);
|
||||
|
||||
//- Interpolate field onto faces using 'interpolate(\<name\>)'
|
||||
template<class Type>
|
||||
static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& tvf
|
||||
);
|
||||
|
||||
//- Interpolate boundary field onto faces (simply a type conversion)
|
||||
template<class Type>
|
||||
@ -190,6 +191,43 @@ namespace fvc
|
||||
{
|
||||
return one();
|
||||
}
|
||||
|
||||
|
||||
//- Interpolate field onto faces
|
||||
// and 'dot' with given surfaceVectorField Sf
|
||||
template<class Type>
|
||||
static
|
||||
tmp
|
||||
<
|
||||
GeometricField
|
||||
<
|
||||
typename innerProduct<vector, Type>::type,
|
||||
fvsPatchField,
|
||||
surfaceMesh
|
||||
>
|
||||
> dotInterpolate
|
||||
(
|
||||
const surfaceVectorField& Sf,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& tvf
|
||||
);
|
||||
|
||||
//- Interpolate tmp field onto faces
|
||||
// and 'dot' with given surfaceVectorField Sf
|
||||
template<class Type>
|
||||
static
|
||||
tmp
|
||||
<
|
||||
GeometricField
|
||||
<
|
||||
typename innerProduct<vector, Type>::type,
|
||||
fvsPatchField,
|
||||
surfaceMesh
|
||||
>
|
||||
> dotInterpolate
|
||||
(
|
||||
const surfaceVectorField& Sf,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -140,9 +140,10 @@ void Foam::displacementSBRStressFvMotionSolver::solve()
|
||||
(
|
||||
Df
|
||||
*(
|
||||
fvc::dotInterpolate
|
||||
(
|
||||
cellDisplacement_.mesh().Sf()
|
||||
& fvc::interpolate(gradCd.T() - gradCd)
|
||||
cellDisplacement_.mesh().Sf(),
|
||||
gradCd.T() - gradCd
|
||||
)
|
||||
|
||||
// Solid-body rotation "lambda" term
|
||||
@ -162,9 +163,10 @@ void Foam::displacementSBRStressFvMotionSolver::solve()
|
||||
(
|
||||
Df
|
||||
*(
|
||||
fvc::dotInterpolate
|
||||
(
|
||||
cellDisplacement_.mesh().Sf()
|
||||
& fvc::interpolate(gradCd + gradCd.T())
|
||||
cellDisplacement_.mesh().Sf(),
|
||||
gradCd + gradCd.T()
|
||||
)
|
||||
|
||||
// Solid-body rotation "lambda" term
|
||||
|
||||
@ -30,6 +30,7 @@ License
|
||||
#include "fvcSnGrad.H"
|
||||
#include "fvcReconstruct.H"
|
||||
#include "fvcVolumeIntegrate.H"
|
||||
#include "fvcFlux.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "mappedWallPolyPatch.H"
|
||||
#include "mapDistribute.H"
|
||||
@ -325,7 +326,7 @@ tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
|
||||
+ fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_)
|
||||
+ fvc::snGrad(delta_)*fvc::interpolate(pp)
|
||||
)
|
||||
- (fvc::interpolate(rho_*gTan()) & regionMesh().Sf())
|
||||
- fvc::flux(rho_*gTan())
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -365,15 +366,14 @@ void kinematicSingleLayer::solveThickness
|
||||
fvc::snGrad(pu, "snGrad(p)")
|
||||
+ fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_)
|
||||
)
|
||||
- (fvc::interpolate(rho_*gTan()) & regionMesh().Sf())
|
||||
- fvc::flux(rho_*gTan())
|
||||
);
|
||||
constrainFilmField(phiAdd, 0.0);
|
||||
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
(fvc::interpolate(U_*rho_) & regionMesh().Sf())
|
||||
- deltarUAf*phiAdd*rhof
|
||||
fvc::flux(U_*rho_) - deltarUAf*phiAdd*rhof
|
||||
);
|
||||
constrainFilmField(phid, 0.0);
|
||||
|
||||
@ -807,7 +807,7 @@ kinematicSingleLayer::kinematicSingleLayer
|
||||
IOobject::AUTO_WRITE,
|
||||
false
|
||||
),
|
||||
fvc::interpolate(deltaRho_*U_) & regionMesh().Sf()
|
||||
fvc::flux(deltaRho_*U_)
|
||||
);
|
||||
|
||||
phi_ == phi0;
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "fvcLaplacian.H"
|
||||
#include "fvcFlux.H"
|
||||
#include "fvm.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
@ -556,7 +557,7 @@ thermoSingleLayer::thermoSingleLayer
|
||||
IOobject::AUTO_WRITE,
|
||||
false
|
||||
),
|
||||
fvc::interpolate(deltaRho_*U_) & regionMesh().Sf()
|
||||
fvc::flux(deltaRho_*U_)
|
||||
);
|
||||
|
||||
phi_ == phi0;
|
||||
|
||||
@ -37,7 +37,7 @@ laplacianSchemes
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default none;
|
||||
default linear;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -37,7 +37,7 @@ laplacianSchemes
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default none;
|
||||
default linear;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user