mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -4,6 +4,9 @@ volScalarField rAU(1.0/UEqn.A());
|
|||||||
surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU));
|
surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU));
|
||||||
volVectorField HbyA("HbyA", U);
|
volVectorField HbyA("HbyA", U);
|
||||||
HbyA = rAU*UEqn.H();
|
HbyA = rAU*UEqn.H();
|
||||||
|
phi.boundaryField() =
|
||||||
|
fvc::interpolate(rho.boundaryField()*U.boundaryField())
|
||||||
|
& mesh.Sf().boundaryField();
|
||||||
|
|
||||||
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
|
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
|
||||||
|
|
||||||
|
|||||||
@ -38,16 +38,18 @@
|
|||||||
(
|
(
|
||||||
(fvc::interpolate(HbyA1) & mesh.Sf())
|
(fvc::interpolate(HbyA1) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU1, U1, phi1)
|
+ fvc::ddtPhiCorr(rAU1, U1, phi1)
|
||||||
+ phiDrag1
|
|
||||||
);
|
);
|
||||||
|
|
||||||
surfaceScalarField phiHbyA2
|
surfaceScalarField phiHbyA2
|
||||||
(
|
(
|
||||||
(fvc::interpolate(HbyA2) & mesh.Sf())
|
(fvc::interpolate(HbyA2) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU2, U2, phi2)
|
+ fvc::ddtPhiCorr(rAU2, U2, phi2)
|
||||||
+ phiDrag2
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2;
|
||||||
|
|
||||||
|
phiHbyA1 += phiDrag1;
|
||||||
|
phiHbyA2 += phiDrag2;
|
||||||
surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
|
surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
|
||||||
|
|
||||||
surfaceScalarField Dp
|
surfaceScalarField Dp
|
||||||
|
|||||||
@ -1,17 +1,8 @@
|
|||||||
surfaceScalarField muEff
|
|
||||||
(
|
|
||||||
"muEff",
|
|
||||||
twoPhaseProperties.muf()
|
|
||||||
+ fvc::interpolate(rho*turbulence->nut())
|
|
||||||
);
|
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U)
|
fvm::ddt(rho, U)
|
||||||
+ fvm::div(phi, U)
|
+ fvm::div(phi, U)
|
||||||
- fvm::laplacian(muEff, U)
|
+ turbulence->divDevRhoReff(rho, U)
|
||||||
//- (fvc::grad(U) & fvc::grad(muf))
|
|
||||||
- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
UEqn.relax();
|
UEqn.relax();
|
||||||
|
|||||||
@ -1,17 +1,8 @@
|
|||||||
surfaceScalarField muEff
|
|
||||||
(
|
|
||||||
"muEff",
|
|
||||||
twoPhaseProperties.muf()
|
|
||||||
+ fvc::interpolate(rho*turbulence->nut())
|
|
||||||
);
|
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U)
|
fvm::ddt(rho, U)
|
||||||
+ fvm::div(rhoPhi, U)
|
+ fvm::div(rhoPhi, U)
|
||||||
- fvm::laplacian(muEff, U)
|
+ turbulence->divDevRhoReff(rho, U)
|
||||||
- (fvc::grad(U) & fvc::grad(muEff))
|
|
||||||
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
UEqn.relax();
|
UEqn.relax();
|
||||||
|
|||||||
@ -36,6 +36,7 @@
|
|||||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||||
);
|
);
|
||||||
|
phi = phiHbyA;
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,11 +2,6 @@
|
|||||||
rho1 = rho10 + psi1*p;
|
rho1 = rho10 + psi1*p;
|
||||||
rho2 = rho20 + psi2*p;
|
rho2 = rho20 + psi2*p;
|
||||||
|
|
||||||
mrfZones.absoluteFlux(phi1.oldTime());
|
|
||||||
mrfZones.absoluteFlux(phi1);
|
|
||||||
mrfZones.absoluteFlux(phi2.oldTime());
|
|
||||||
mrfZones.absoluteFlux(phi2);
|
|
||||||
|
|
||||||
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
|
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
|
||||||
surfaceScalarField alpha2f(scalar(1) - alpha1f);
|
surfaceScalarField alpha2f(scalar(1) - alpha1f);
|
||||||
|
|
||||||
@ -22,6 +17,11 @@
|
|||||||
volVectorField HbyA2("HbyA2", U2);
|
volVectorField HbyA2("HbyA2", U2);
|
||||||
HbyA2 = rAU2*U2Eqn.H();
|
HbyA2 = rAU2*U2Eqn.H();
|
||||||
|
|
||||||
|
mrfZones.absoluteFlux(phi1.oldTime());
|
||||||
|
mrfZones.absoluteFlux(phi1);
|
||||||
|
mrfZones.absoluteFlux(phi2.oldTime());
|
||||||
|
mrfZones.absoluteFlux(phi2);
|
||||||
|
|
||||||
surfaceScalarField ppDrag("ppDrag", 0.0*phi1);
|
surfaceScalarField ppDrag("ppDrag", 0.0*phi1);
|
||||||
|
|
||||||
if (g0.value() > 0.0)
|
if (g0.value() > 0.0)
|
||||||
@ -41,18 +41,29 @@
|
|||||||
"phiHbyA1",
|
"phiHbyA1",
|
||||||
(fvc::interpolate(HbyA1) & mesh.Sf())
|
(fvc::interpolate(HbyA1) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU1, alpha1, U1, phi1)
|
+ fvc::ddtPhiCorr(rAU1, alpha1, U1, phi1)
|
||||||
+ fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2
|
|
||||||
+ ppDrag
|
|
||||||
+ rAlphaAU1f*(g & mesh.Sf())
|
|
||||||
);
|
);
|
||||||
mrfZones.relativeFlux(phiHbyA1);
|
|
||||||
|
|
||||||
surfaceScalarField phiHbyA2
|
surfaceScalarField phiHbyA2
|
||||||
(
|
(
|
||||||
"phiHbyA2",
|
"phiHbyA2",
|
||||||
(fvc::interpolate(HbyA2) & mesh.Sf())
|
(fvc::interpolate(HbyA2) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU2, alpha2, U2, phi2)
|
+ fvc::ddtPhiCorr(rAU2, alpha2, U2, phi2)
|
||||||
+ fvc::interpolate((1.0/rho2)*rAU2*dragCoeff)*phi1
|
);
|
||||||
|
|
||||||
|
phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2;
|
||||||
|
mrfZones.relativeFlux(phi);
|
||||||
|
|
||||||
|
phiHbyA1 +=
|
||||||
|
(
|
||||||
|
fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2
|
||||||
|
+ ppDrag
|
||||||
|
+ rAlphaAU1f*(g & mesh.Sf())
|
||||||
|
);
|
||||||
|
mrfZones.relativeFlux(phiHbyA1);
|
||||||
|
|
||||||
|
phiHbyA2 +=
|
||||||
|
(
|
||||||
|
fvc::interpolate((1.0/rho2)*rAU2*dragCoeff)*phi1
|
||||||
+ rAlphaAU2f*(g & mesh.Sf())
|
+ rAlphaAU2f*(g & mesh.Sf())
|
||||||
);
|
);
|
||||||
mrfZones.relativeFlux(phiHbyA2);
|
mrfZones.relativeFlux(phiHbyA2);
|
||||||
|
|||||||
@ -11,9 +11,9 @@
|
|||||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||||
);
|
);
|
||||||
mrfZones.relativeFlux(phiHbyA);
|
|
||||||
|
|
||||||
adjustPhi(phiHbyA, U, p_rgh);
|
adjustPhi(phiHbyA, U, p_rgh);
|
||||||
|
mrfZones.relativeFlux(phiHbyA);
|
||||||
|
phi = phiHbyA;
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,17 +1,8 @@
|
|||||||
surfaceScalarField muEff
|
|
||||||
(
|
|
||||||
"muEff",
|
|
||||||
twoPhaseProperties.muf()
|
|
||||||
+ fvc::interpolate(rho*turbulence->nut())
|
|
||||||
);
|
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U)
|
fvm::ddt(rho, U)
|
||||||
+ fvm::div(rhoPhi, U)
|
+ fvm::div(rhoPhi, U)
|
||||||
- fvm::laplacian(muEff, U)
|
+ turbulence->divDevRhoReff(rho, U)
|
||||||
- (fvc::grad(U) & fvc::grad(muEff))
|
|
||||||
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
UEqn.relax();
|
UEqn.relax();
|
||||||
|
|||||||
@ -19,6 +19,8 @@
|
|||||||
fvc::makeAbsolute(phiHbyA, U);
|
fvc::makeAbsolute(phiHbyA, U);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
phiAbs = phiHbyA;
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
adjustPhi(phiHbyA, U, p_rgh);
|
adjustPhi(phiHbyA, U, p_rgh);
|
||||||
|
phi = phiHbyA;
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,18 +1,9 @@
|
|||||||
surfaceScalarField muEff
|
|
||||||
(
|
|
||||||
"muEff",
|
|
||||||
twoPhaseProperties->muf()
|
|
||||||
+ fvc::interpolate(rho*turbulence->nut())
|
|
||||||
);
|
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U)
|
fvm::ddt(rho, U)
|
||||||
+ fvm::div(rhoPhi, U)
|
+ fvm::div(rhoPhi, U)
|
||||||
- fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U)
|
- fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U)
|
||||||
- fvm::laplacian(muEff, U)
|
+ turbulence->divDevRhoReff(rho, U)
|
||||||
- (fvc::grad(U) & fvc::grad(muEff))
|
|
||||||
//- fvc::div(muEff*(fvc::interpolate(dev2(fvc::grad(U))) & mesh.Sf()))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
UEqn.relax();
|
UEqn.relax();
|
||||||
|
|||||||
@ -11,8 +11,8 @@
|
|||||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||||
);
|
);
|
||||||
|
|
||||||
adjustPhi(phiHbyA, U, p_rgh);
|
adjustPhi(phiHbyA, U, p_rgh);
|
||||||
|
phi = phiHbyA;
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
(
|
(
|
||||||
|
|||||||
@ -58,6 +58,8 @@
|
|||||||
dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0)
|
dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
phi = dimensionedScalar("phi", phi.dimensions(), 0);
|
||||||
|
|
||||||
phasei = 0;
|
phasei = 0;
|
||||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||||
{
|
{
|
||||||
@ -74,14 +76,17 @@
|
|||||||
(
|
(
|
||||||
(fvc::interpolate(HbyAs[phasei]) & mesh.Sf())
|
(fvc::interpolate(HbyAs[phasei]) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAUs[phasei], alpha, phase.U(), phase.phi())
|
+ fvc::ddtPhiCorr(rAUs[phasei], alpha, phase.U(), phase.phi())
|
||||||
+ rAlphaAUfs[phasei]
|
);
|
||||||
|
mrfZones.relativeFlux(phiHbyAs[phasei]);
|
||||||
|
|
||||||
|
phi += alphafs[phasei]*phiHbyAs[phasei];
|
||||||
|
|
||||||
|
phiHbyAs[phasei] +=
|
||||||
|
rAlphaAUfs[phasei]
|
||||||
*(
|
*(
|
||||||
fluid.surfaceTension(phase)*mesh.magSf()/phase.rho()
|
fluid.surfaceTension(phase)*mesh.magSf()/phase.rho()
|
||||||
+ (g & mesh.Sf())
|
+ (g & mesh.Sf())
|
||||||
)
|
);
|
||||||
);
|
|
||||||
|
|
||||||
mrfZones.relativeFlux(phiHbyAs[phasei]);
|
|
||||||
|
|
||||||
multiphaseSystem::dragModelTable::const_iterator dmIter =
|
multiphaseSystem::dragModelTable::const_iterator dmIter =
|
||||||
fluid.dragModels().begin();
|
fluid.dragModels().begin();
|
||||||
|
|||||||
@ -11,9 +11,9 @@
|
|||||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||||
);
|
);
|
||||||
mrfZones.relativeFlux(phiHbyA);
|
|
||||||
|
|
||||||
adjustPhi(phiHbyA, U, p_rgh);
|
adjustPhi(phiHbyA, U, p_rgh);
|
||||||
|
mrfZones.relativeFlux(phiHbyA);
|
||||||
|
phi = phiHbyA;
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,17 +1,8 @@
|
|||||||
surfaceScalarField muEff
|
|
||||||
(
|
|
||||||
"muEff",
|
|
||||||
mixture.muf()
|
|
||||||
+ fvc::interpolate(rho*turbulence->nut())
|
|
||||||
);
|
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U)
|
fvm::ddt(rho, U)
|
||||||
+ fvm::div(mixture.rhoPhi(), U)
|
+ fvm::div(mixture.rhoPhi(), U)
|
||||||
- fvm::laplacian(muEff, U)
|
+ turbulence->divDevRhoReff(rho, U)
|
||||||
- (fvc::grad(U) & fvc::grad(muEff))
|
|
||||||
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
UEqn.relax();
|
UEqn.relax();
|
||||||
|
|||||||
@ -11,8 +11,8 @@
|
|||||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||||
);
|
);
|
||||||
|
|
||||||
adjustPhi(phiHbyA, U, p_rgh);
|
adjustPhi(phiHbyA, U, p_rgh);
|
||||||
|
phi = phiHbyA;
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
(
|
(
|
||||||
|
|||||||
@ -11,7 +11,6 @@
|
|||||||
)
|
)
|
||||||
- fvm::laplacian(muEff, U, "laplacian(muEff,U)")
|
- fvm::laplacian(muEff, U, "laplacian(muEff,U)")
|
||||||
- (fvc::grad(U) & fvc::grad(muEff))
|
- (fvc::grad(U) & fvc::grad(muEff))
|
||||||
//- fvc::div(muEff*dev2(T(fvc::grad(U))))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
UEqn.relax();
|
UEqn.relax();
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
phi = phiHbyA;
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,17 +1,8 @@
|
|||||||
surfaceScalarField muEff
|
|
||||||
(
|
|
||||||
"muEff",
|
|
||||||
twoPhaseProperties.muf()
|
|
||||||
+ fvc::interpolate(rho*turbulence->nut())
|
|
||||||
);
|
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U)
|
fvm::ddt(rho, U)
|
||||||
+ fvm::div(rhoPhi, U)
|
+ fvm::div(rhoPhi, U)
|
||||||
- fvm::laplacian(muEff, U)
|
+ turbulence->divDevRhoReff(rho, U)
|
||||||
- (fvc::grad(U) & fvc::grad(muEff))
|
|
||||||
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
UEqn.relax();
|
UEqn.relax();
|
||||||
|
|||||||
@ -11,8 +11,8 @@
|
|||||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||||
);
|
);
|
||||||
|
|
||||||
adjustPhi(phiHbyA, U, p_rgh);
|
adjustPhi(phiHbyA, U, p_rgh);
|
||||||
|
phi = phiHbyA;
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
(
|
(
|
||||||
|
|||||||
@ -36,18 +36,29 @@
|
|||||||
"phiHbyA1",
|
"phiHbyA1",
|
||||||
(fvc::interpolate(HbyA1) & mesh.Sf())
|
(fvc::interpolate(HbyA1) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU1, U1, phi1)
|
+ fvc::ddtPhiCorr(rAU1, U1, phi1)
|
||||||
+ fvc::interpolate(alpha2/rho1*K*rAU1)*phi2
|
|
||||||
+ ppDrag
|
|
||||||
+ rAU1f*(g & mesh.Sf())
|
|
||||||
);
|
);
|
||||||
mrfZones.relativeFlux(phiHbyA1);
|
|
||||||
|
|
||||||
surfaceScalarField phiHbyA2
|
surfaceScalarField phiHbyA2
|
||||||
(
|
(
|
||||||
"phiHbyA2",
|
"phiHbyA2",
|
||||||
(fvc::interpolate(HbyA2) & mesh.Sf())
|
(fvc::interpolate(HbyA2) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU2, U2, phi2)
|
+ fvc::ddtPhiCorr(rAU2, U2, phi2)
|
||||||
+ fvc::interpolate(alpha1/rho2*K*rAU2)*phi1
|
);
|
||||||
|
|
||||||
|
phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2;
|
||||||
|
mrfZones.relativeFlux(phi);
|
||||||
|
|
||||||
|
phiHbyA1 +=
|
||||||
|
(
|
||||||
|
fvc::interpolate(alpha2/rho1*K*rAU1)*phi2
|
||||||
|
+ ppDrag
|
||||||
|
+ rAU1f*(g & mesh.Sf())
|
||||||
|
);
|
||||||
|
mrfZones.relativeFlux(phiHbyA1);
|
||||||
|
|
||||||
|
phiHbyA2 +=
|
||||||
|
(
|
||||||
|
fvc::interpolate(alpha1/rho2*K*rAU2)*phi1
|
||||||
+ rAU2f*(g & mesh.Sf())
|
+ rAU2f*(g & mesh.Sf())
|
||||||
);
|
);
|
||||||
mrfZones.relativeFlux(phiHbyA2);
|
mrfZones.relativeFlux(phiHbyA2);
|
||||||
|
|||||||
@ -1,118 +0,0 @@
|
|||||||
{
|
|
||||||
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
|
|
||||||
surfaceScalarField alpha2f(scalar(1) - alpha1f);
|
|
||||||
|
|
||||||
volScalarField rAU1(1.0/U1Eqn.A());
|
|
||||||
volScalarField rAU2(1.0/U2Eqn.A());
|
|
||||||
|
|
||||||
rAU1f = fvc::interpolate(rAU1);
|
|
||||||
surfaceScalarField rAU2f(fvc::interpolate(rAU2));
|
|
||||||
|
|
||||||
volVectorField HbyA1("HbyA1", U1);
|
|
||||||
HbyA1 = rAU1*U1Eqn.H();
|
|
||||||
|
|
||||||
volVectorField HbyA2("HbyA2", U2);
|
|
||||||
HbyA2 = rAU2*U2Eqn.H();
|
|
||||||
|
|
||||||
mrfZones.absoluteFlux(phi1.oldTime());
|
|
||||||
mrfZones.absoluteFlux(phi1);
|
|
||||||
|
|
||||||
mrfZones.absoluteFlux(phi2.oldTime());
|
|
||||||
mrfZones.absoluteFlux(phi2);
|
|
||||||
|
|
||||||
surfaceScalarField phiDrag1
|
|
||||||
(
|
|
||||||
fvc::interpolate(alpha2/rho1*K*rAU1)*phi2 + rAU1f*(g & mesh.Sf())
|
|
||||||
);
|
|
||||||
|
|
||||||
if (g0.value() > 0.0)
|
|
||||||
{
|
|
||||||
phiDrag1 -= ppMagf*fvc::snGrad(alpha1)*mesh.magSf();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (kineticTheory.on())
|
|
||||||
{
|
|
||||||
phiDrag1 -= rAU1f*fvc::snGrad(kineticTheory.pa()/rho1)*mesh.magSf();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
surfaceScalarField phiDrag2
|
|
||||||
(
|
|
||||||
fvc::interpolate(alpha1/rho2*K*rAU2)*phi1 + rAU2f*(g & mesh.Sf())
|
|
||||||
);
|
|
||||||
|
|
||||||
// Fix for gravity on outlet boundary.
|
|
||||||
forAll(p.boundaryField(), patchi)
|
|
||||||
{
|
|
||||||
if (isA<zeroGradientFvPatchScalarField>(p.boundaryField()[patchi]))
|
|
||||||
{
|
|
||||||
phiDrag1.boundaryField()[patchi] = 0.0;
|
|
||||||
phiDrag2.boundaryField()[patchi] = 0.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
surfaceScalarField phiHbyA1
|
|
||||||
(
|
|
||||||
"phiHbyA1",
|
|
||||||
(fvc::interpolate(HbyA1) & mesh.Sf())
|
|
||||||
+ fvc::ddtPhiCorr(rAU1, U1, phi1)
|
|
||||||
+ phiDrag1
|
|
||||||
);
|
|
||||||
mrfZones.relativeFlux(phiHbyA1);
|
|
||||||
|
|
||||||
surfaceScalarField phiHbyA2
|
|
||||||
(
|
|
||||||
"phiHbyA2",
|
|
||||||
(fvc::interpolate(HbyA2) & mesh.Sf())
|
|
||||||
+ fvc::ddtPhiCorr(rAU2, U2, phi2)
|
|
||||||
+ phiDrag2
|
|
||||||
);
|
|
||||||
mrfZones.relativeFlux(phiHbyA2);
|
|
||||||
|
|
||||||
mrfZones.relativeFlux(phi1.oldTime());
|
|
||||||
mrfZones.relativeFlux(phi1);
|
|
||||||
mrfZones.relativeFlux(phi2.oldTime());
|
|
||||||
mrfZones.relativeFlux(phi2);
|
|
||||||
|
|
||||||
surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
|
|
||||||
|
|
||||||
surfaceScalarField Dp
|
|
||||||
(
|
|
||||||
"Dp",
|
|
||||||
alpha1f*rAU1f/rho1 + alpha2f*rAU2f/rho2
|
|
||||||
);
|
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
|
||||||
{
|
|
||||||
fvScalarMatrix pEqn
|
|
||||||
(
|
|
||||||
fvm::laplacian(Dp, p) == fvc::div(phiHbyA)
|
|
||||||
);
|
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
|
||||||
|
|
||||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
|
||||||
|
|
||||||
if (pimple.finalNonOrthogonalIter())
|
|
||||||
{
|
|
||||||
surfaceScalarField SfGradp(pEqn.flux()/Dp);
|
|
||||||
|
|
||||||
phi1 = phiHbyA1 - rAU1f*SfGradp/rho1;
|
|
||||||
phi2 = phiHbyA2 - rAU2f*SfGradp/rho2;
|
|
||||||
phi = alpha1f*phi1 + alpha2f*phi2;
|
|
||||||
|
|
||||||
p.relax();
|
|
||||||
SfGradp = pEqn.flux()/Dp;
|
|
||||||
|
|
||||||
U1 = HbyA1 + fvc::reconstruct(phiDrag1 - rAU1f*SfGradp/rho1);
|
|
||||||
U1.correctBoundaryConditions();
|
|
||||||
|
|
||||||
U2 = HbyA2 + fvc::reconstruct(phiDrag2 - rAU2f*SfGradp/rho2);
|
|
||||||
U2.correctBoundaryConditions();
|
|
||||||
|
|
||||||
U = alpha1*U1 + alpha2*U2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "continuityErrs.H"
|
|
||||||
@ -161,7 +161,7 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if(nuType == "field")
|
else if (nuType == "field")
|
||||||
{
|
{
|
||||||
nuIO.readOpt() = IOobject::MUST_READ;
|
nuIO.readOpt() = IOobject::MUST_READ;
|
||||||
nuPtr.reset
|
nuPtr.reset
|
||||||
|
|||||||
@ -81,7 +81,7 @@ if (thermalStress)
|
|||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(CType == "field")
|
else if (CType == "field")
|
||||||
{
|
{
|
||||||
CIO.readOpt() = IOobject::MUST_READ;
|
CIO.readOpt() = IOobject::MUST_READ;
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ if (thermalStress)
|
|||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"readThermalProperties.H"
|
"readThermalProperties.H"
|
||||||
) << "Valid type entries are uniform or field for alpha"
|
) << "Valid type entries are uniform or field for alpha"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -228,5 +228,4 @@ if (thermalStress)
|
|||||||
|
|
||||||
threeKalpha = threeK*alpha;
|
threeKalpha = threeK*alpha;
|
||||||
DT = k/C;
|
DT = k/C;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -56,7 +56,6 @@ Usage
|
|||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "timeSelector.H"
|
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "unitConversion.H"
|
#include "unitConversion.H"
|
||||||
#include "polyTopoChange.H"
|
#include "polyTopoChange.H"
|
||||||
@ -354,7 +353,6 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
# include "addOverwriteOption.H"
|
# include "addOverwriteOption.H"
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
timeSelector::addOptions(true, false);
|
|
||||||
|
|
||||||
argList::validArgs.append("featureAngle [0-180]");
|
argList::validArgs.append("featureAngle [0-180]");
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
@ -376,9 +374,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|||||||
@ -171,13 +171,13 @@ FoamFile
|
|||||||
// insidePoint (1 2 3); // point inside region to select
|
// insidePoint (1 2 3); // point inside region to select
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// // Cells underneath plane such that volume is reached. Can be used
|
// // Cells underneath plane such that volume is reached. E.g. for use
|
||||||
// // in setFields.
|
// // in setFields to set the level given a wanted volume.
|
||||||
// source targetVolumeToCell;
|
// source targetVolumeToCell;
|
||||||
// sourceInfo
|
// sourceInfo
|
||||||
// {
|
// {
|
||||||
// volume 2e-05;
|
// volume 2e-05;
|
||||||
// normal (1 1 1);
|
// normal (0 1 0); // usually in direction of gravity
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|||||||
@ -1,21 +1,27 @@
|
|||||||
// check for "points" in all of the result directories
|
// check for "points" in any of the result directories
|
||||||
|
|
||||||
bool meshMoving = true;
|
bool meshMoving = false;
|
||||||
if (Times.size() > 2)
|
if (Times.size() > 1)
|
||||||
{
|
{
|
||||||
for (label n1=2; n1<Times.size() && meshMoving; ++n1)
|
// We already loaded a mesh (usually from constant). See if any other
|
||||||
|
// points files
|
||||||
|
forAll(Times, timeI)
|
||||||
{
|
{
|
||||||
meshMoving = IOobject
|
if (Times[timeI].name() != mesh.pointsInstance())
|
||||||
(
|
{
|
||||||
"points",
|
IOobject io
|
||||||
Times[n1].name(),
|
(
|
||||||
polyMesh::meshSubDir,
|
"points",
|
||||||
mesh,
|
Times[timeI].name(),
|
||||||
IOobject::NO_READ
|
polyMesh::meshSubDir,
|
||||||
).headerOk();
|
mesh,
|
||||||
|
IOobject::NO_READ
|
||||||
|
);
|
||||||
|
if (io.headerOk())
|
||||||
|
{
|
||||||
|
meshMoving = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
meshMoving = false;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1014,6 +1014,7 @@ void Foam::ensightMesh::write
|
|||||||
const fileName& postProcPath,
|
const fileName& postProcPath,
|
||||||
const word& prepend,
|
const word& prepend,
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
|
const bool meshMoving,
|
||||||
Ostream& ensightCaseFile
|
Ostream& ensightCaseFile
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
@ -1027,7 +1028,7 @@ void Foam::ensightMesh::write
|
|||||||
{
|
{
|
||||||
timeFile += "000.";
|
timeFile += "000.";
|
||||||
}
|
}
|
||||||
else if (mesh_.moving())
|
else if (meshMoving)
|
||||||
{
|
{
|
||||||
timeFile += itoa(timeIndex) + '.';
|
timeFile += itoa(timeIndex) + '.';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -380,6 +380,7 @@ public:
|
|||||||
const fileName& postProcPath,
|
const fileName& postProcPath,
|
||||||
const word& prepend,
|
const word& prepend,
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
|
const bool meshMoving,
|
||||||
Ostream& ensightCaseFile
|
Ostream& ensightCaseFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -228,6 +228,13 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "checkMeshMoving.H"
|
# include "checkMeshMoving.H"
|
||||||
|
|
||||||
|
if (meshMoving)
|
||||||
|
{
|
||||||
|
Info<< "Detected a moving mesh (multiple polyMesh/points files)."
|
||||||
|
<< " Writing meshes for every timestep." << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
wordHashSet allCloudNames;
|
wordHashSet allCloudNames;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
@ -346,13 +353,14 @@ int main(int argc, char *argv[])
|
|||||||
eMesh.correct();
|
eMesh.correct();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeIndex == 0 || (meshState != polyMesh::UNCHANGED))
|
if (timeIndex == 0 || meshMoving)
|
||||||
{
|
{
|
||||||
eMesh.write
|
eMesh.write
|
||||||
(
|
(
|
||||||
ensightDir,
|
ensightDir,
|
||||||
prepend,
|
prepend,
|
||||||
timeIndex,
|
timeIndex,
|
||||||
|
meshMoving,
|
||||||
ensightCaseFile
|
ensightCaseFile
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,6 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "timeSelector.H"
|
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "topoSetSource.H"
|
#include "topoSetSource.H"
|
||||||
@ -360,14 +359,8 @@ public:
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
timeSelector::addOptions();
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
Info<< "Reading setFieldsDict\n" << endl;
|
Info<< "Reading setFieldsDict\n" << endl;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,7 +58,6 @@ Note
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "timeSelector.H"
|
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
|
|
||||||
#include "MeshedSurfaces.H"
|
#include "MeshedSurfaces.H"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -52,7 +52,6 @@ Note
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "timeSelector.H"
|
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "triSurface.H"
|
#include "triSurface.H"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -59,7 +59,6 @@ Note
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "timeSelector.H"
|
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
|
|
||||||
#include "MeshedSurfaces.H"
|
#include "MeshedSurfaces.H"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -59,7 +59,6 @@ Note
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "timeSelector.H"
|
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
|
|
||||||
#include "MeshedSurfaces.H"
|
#include "MeshedSurfaces.H"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -56,7 +56,6 @@ Note
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "timeSelector.H"
|
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
|
|
||||||
#include "UnsortedMeshedSurfaces.H"
|
#include "UnsortedMeshedSurfaces.H"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -95,7 +95,9 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Note: use ASCII for now - binary IO of dictionaries is
|
// Note: use ASCII for now - binary IO of dictionaries is
|
||||||
// not currently supported
|
// not currently supported or rather the primitiveEntries of
|
||||||
|
// the dictionary think they are in binary form whereas they are
|
||||||
|
// not. Could reset all the ITstreams to ascii?
|
||||||
IPstream fromAbove
|
IPstream fromAbove
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::scheduled,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -80,6 +80,12 @@ Foam::autoPtr<Foam::dictionary> Foam::dictionary::New(Istream& is)
|
|||||||
|
|
||||||
bool Foam::dictionary::read(Istream& is, const bool keepHeader)
|
bool Foam::dictionary::read(Istream& is, const bool keepHeader)
|
||||||
{
|
{
|
||||||
|
// Check for empty dictionary
|
||||||
|
if (is.eof())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!is.good())
|
if (!is.good())
|
||||||
{
|
{
|
||||||
FatalIOErrorIn("dictionary::read(Istream&, bool)", is)
|
FatalIOErrorIn("dictionary::read(Istream&, bool)", is)
|
||||||
|
|||||||
@ -323,8 +323,6 @@ class globalMeshData
|
|||||||
// its own master. Maybe store as well?
|
// its own master. Maybe store as well?
|
||||||
|
|
||||||
void calcGlobalCoPointSlaves() const;
|
void calcGlobalCoPointSlaves() const;
|
||||||
const labelListList& globalCoPointSlaves() const;
|
|
||||||
const mapDistribute& globalCoPointSlavesMap() const;
|
|
||||||
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
@ -547,6 +545,11 @@ public:
|
|||||||
//- Is my edge same orientation as master edge
|
//- Is my edge same orientation as master edge
|
||||||
const PackedBoolList& globalEdgeOrientation() const;
|
const PackedBoolList& globalEdgeOrientation() const;
|
||||||
|
|
||||||
|
// Collocated point to collocated point
|
||||||
|
|
||||||
|
const labelListList& globalCoPointSlaves() const;
|
||||||
|
const mapDistribute& globalCoPointSlavesMap() const;
|
||||||
|
|
||||||
// Coupled point to boundary faces. These are uncoupled boundary
|
// Coupled point to boundary faces. These are uncoupled boundary
|
||||||
// faces only but include empty patches.
|
// faces only but include empty patches.
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -339,6 +339,31 @@ bool Foam::globalPoints::storeInitialInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::globalPoints::printProcPoint
|
||||||
|
(
|
||||||
|
const labelList& patchToMeshPoint,
|
||||||
|
const labelPair& pointInfo
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
label procI = globalIndexAndTransform::processor(pointInfo);
|
||||||
|
label index = globalIndexAndTransform::index(pointInfo);
|
||||||
|
label trafoI = globalIndexAndTransform::transformIndex(pointInfo);
|
||||||
|
|
||||||
|
Pout<< " proc:" << procI;
|
||||||
|
Pout<< " localpoint:";
|
||||||
|
Pout<< index;
|
||||||
|
Pout<< " through transform:"
|
||||||
|
<< trafoI << " bits:"
|
||||||
|
<< globalTransforms_.decodeTransformIndex(trafoI);
|
||||||
|
|
||||||
|
if (procI == Pstream::myProcNo())
|
||||||
|
{
|
||||||
|
label meshPointI = localToMeshPoint(patchToMeshPoint, index);
|
||||||
|
Pout<< " at:" << mesh_.points()[meshPointI];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::globalPoints::printProcPoints
|
void Foam::globalPoints::printProcPoints
|
||||||
(
|
(
|
||||||
const labelList& patchToMeshPoint,
|
const labelList& patchToMeshPoint,
|
||||||
@ -347,23 +372,7 @@ void Foam::globalPoints::printProcPoints
|
|||||||
{
|
{
|
||||||
forAll(pointInfo, i)
|
forAll(pointInfo, i)
|
||||||
{
|
{
|
||||||
label procI = globalIndexAndTransform::processor(pointInfo[i]);
|
printProcPoint(patchToMeshPoint, pointInfo[i]);
|
||||||
label index = globalIndexAndTransform::index(pointInfo[i]);
|
|
||||||
label trafoI = globalIndexAndTransform::transformIndex(pointInfo[i]);
|
|
||||||
|
|
||||||
Pout<< " proc:" << procI;
|
|
||||||
Pout<< " localpoint:";
|
|
||||||
Pout<< index;
|
|
||||||
Pout<< " through transform:"
|
|
||||||
<< trafoI << " bits:"
|
|
||||||
<< globalTransforms_.decodeTransformIndex(trafoI);
|
|
||||||
|
|
||||||
if (procI == Pstream::myProcNo())
|
|
||||||
{
|
|
||||||
label meshPointI = localToMeshPoint(patchToMeshPoint, index);
|
|
||||||
Pout<< " at:" << mesh_.points()[meshPointI];
|
|
||||||
}
|
|
||||||
|
|
||||||
Pout<< endl;
|
Pout<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -206,6 +206,12 @@ class globalPoints
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Debug printing
|
//- Debug printing
|
||||||
|
void printProcPoint
|
||||||
|
(
|
||||||
|
const labelList& patchToMeshPoint,
|
||||||
|
const labelPair& pointInfo
|
||||||
|
) const;
|
||||||
|
|
||||||
void printProcPoints
|
void printProcPoints
|
||||||
(
|
(
|
||||||
const labelList& patchToMeshPoint,
|
const labelList& patchToMeshPoint,
|
||||||
|
|||||||
@ -97,6 +97,16 @@ void Foam::polyMesh::clearAddressing()
|
|||||||
geometricD_ = Vector<label>::zero;
|
geometricD_ = Vector<label>::zero;
|
||||||
solutionD_ = Vector<label>::zero;
|
solutionD_ = Vector<label>::zero;
|
||||||
|
|
||||||
|
// Update zones
|
||||||
|
pointZones_.clearAddressing();
|
||||||
|
faceZones_.clearAddressing();
|
||||||
|
cellZones_.clearAddressing();
|
||||||
|
|
||||||
|
// Remove the stored tet base points
|
||||||
|
tetBasePtIsPtr_.clear();
|
||||||
|
// Remove the cell tree
|
||||||
|
cellTreePtr_.clear();
|
||||||
|
|
||||||
pointMesh::Delete(*this);
|
pointMesh::Delete(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,52 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 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/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef DataEntryFws_H
|
||||||
|
#define DataEntryFws_H
|
||||||
|
|
||||||
|
#include "DataEntry.H"
|
||||||
|
#include "vector.H"
|
||||||
|
#include "symmTensor.H"
|
||||||
|
#include "sphericalTensor.H"
|
||||||
|
#include "tensor.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
typedef DataEntry<label> labelDataEntry;
|
||||||
|
typedef DataEntry<scalar> scalarDataEntry;
|
||||||
|
typedef DataEntry<vector> vectorDataEntry;
|
||||||
|
typedef DataEntry<symmTensor> symmTensorDataEntry;
|
||||||
|
typedef DataEntry<sphericalTensor> sphericalTensorDataEntry;
|
||||||
|
typedef DataEntry<tensor> tensorDataEntry;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -25,14 +25,14 @@ License
|
|||||||
|
|
||||||
#include "polynomial.H"
|
#include "polynomial.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(polynomial, 0);
|
defineTypeNameAndDebug(polynomial, 0);
|
||||||
DataEntry<scalar>::adddictionaryConstructorToTable<polynomial>
|
addToRunTimeSelectionTable(scalarDataEntry, polynomial, dictionary);
|
||||||
addpolynomialConstructorToTable_;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ namespace Foam
|
|||||||
|
|
||||||
Foam::polynomial::polynomial(const word& entryName, const dictionary& dict)
|
Foam::polynomial::polynomial(const word& entryName, const dictionary& dict)
|
||||||
:
|
:
|
||||||
DataEntry<scalar>(entryName),
|
scalarDataEntry(entryName),
|
||||||
coeffs_(),
|
coeffs_(),
|
||||||
canIntegrate_(true),
|
canIntegrate_(true),
|
||||||
dimensions_(dimless)
|
dimensions_(dimless)
|
||||||
@ -52,15 +52,17 @@ Foam::polynomial::polynomial(const word& entryName, const dictionary& dict)
|
|||||||
is.putBack(firstToken);
|
is.putBack(firstToken);
|
||||||
if (firstToken == token::BEGIN_SQR)
|
if (firstToken == token::BEGIN_SQR)
|
||||||
{
|
{
|
||||||
is >> this->dimensions_;
|
is >> this->dimensions_;
|
||||||
}
|
}
|
||||||
|
|
||||||
is >> coeffs_;
|
is >> coeffs_;
|
||||||
|
|
||||||
if (!coeffs_.size())
|
if (!coeffs_.size())
|
||||||
{
|
{
|
||||||
FatalErrorIn("Foam::polynomial::polynomial(const word&, dictionary&)")
|
FatalErrorIn
|
||||||
<< "polynomial coefficients for entry " << this->name_
|
(
|
||||||
|
"Foam::polynomial::polynomial(const word&, const dictionary&)"
|
||||||
|
) << "polynomial coefficients for entry " << this->name_
|
||||||
<< " are invalid (empty)" << nl << exit(FatalError);
|
<< " are invalid (empty)" << nl << exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,8 +79,10 @@ Foam::polynomial::polynomial(const word& entryName, const dictionary& dict)
|
|||||||
{
|
{
|
||||||
if (!canIntegrate_)
|
if (!canIntegrate_)
|
||||||
{
|
{
|
||||||
WarningIn("Foam::polynomial::polynomial(const word&, dictionary&)")
|
WarningIn
|
||||||
<< "Polynomial " << this->name_ << " cannot be integrated"
|
(
|
||||||
|
"Foam::polynomial::polynomial(const word&, const dictionary&)"
|
||||||
|
) << "Polynomial " << this->name_ << " cannot be integrated"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,7 +95,7 @@ Foam::polynomial::polynomial
|
|||||||
const List<Tuple2<scalar, scalar> >& coeffs
|
const List<Tuple2<scalar, scalar> >& coeffs
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
DataEntry<scalar>(entryName),
|
scalarDataEntry(entryName),
|
||||||
coeffs_(coeffs),
|
coeffs_(coeffs),
|
||||||
canIntegrate_(true),
|
canIntegrate_(true),
|
||||||
dimensions_(dimless)
|
dimensions_(dimless)
|
||||||
@ -101,7 +105,7 @@ Foam::polynomial::polynomial
|
|||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"Foam::polynomial::polynomial"
|
"Foam::polynomial::polynomial"
|
||||||
"(const word&, const List<Tuple2<scalar, scalar> >&&)"
|
"(const word&, const List<Tuple2<scalar, scalar> >&)"
|
||||||
) << "polynomial coefficients for entry " << this->name_
|
) << "polynomial coefficients for entry " << this->name_
|
||||||
<< " are invalid (empty)" << nl << exit(FatalError);
|
<< " are invalid (empty)" << nl << exit(FatalError);
|
||||||
}
|
}
|
||||||
@ -122,7 +126,7 @@ Foam::polynomial::polynomial
|
|||||||
WarningIn
|
WarningIn
|
||||||
(
|
(
|
||||||
"Foam::polynomial::polynomial"
|
"Foam::polynomial::polynomial"
|
||||||
"(const word&, const List<Tuple2<scalar, scalar> >&&)"
|
"(const word&, const List<Tuple2<scalar, scalar> >&)"
|
||||||
) << "Polynomial " << this->name_ << " cannot be integrated"
|
) << "Polynomial " << this->name_ << " cannot be integrated"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
@ -132,7 +136,7 @@ Foam::polynomial::polynomial
|
|||||||
|
|
||||||
Foam::polynomial::polynomial(const polynomial& poly)
|
Foam::polynomial::polynomial(const polynomial& poly)
|
||||||
:
|
:
|
||||||
DataEntry<scalar>(poly),
|
scalarDataEntry(poly),
|
||||||
coeffs_(poly.coeffs_),
|
coeffs_(poly.coeffs_),
|
||||||
canIntegrate_(poly.canIntegrate_),
|
canIntegrate_(poly.canIntegrate_),
|
||||||
dimensions_(poly.dimensions_)
|
dimensions_(poly.dimensions_)
|
||||||
@ -201,7 +205,8 @@ Foam::dimensioned<Foam::scalar> Foam::polynomial::dimValue
|
|||||||
|
|
||||||
Foam::dimensioned<Foam::scalar> Foam::polynomial::dimIntegrate
|
Foam::dimensioned<Foam::scalar> Foam::polynomial::dimIntegrate
|
||||||
(
|
(
|
||||||
const scalar x1, const scalar x2
|
const scalar x1,
|
||||||
|
const scalar x2
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return dimensioned<scalar>
|
return dimensioned<scalar>
|
||||||
@ -212,4 +217,5 @@ Foam::dimensioned<Foam::scalar> Foam::polynomial::dimIntegrate
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -48,6 +48,7 @@ SourceFiles
|
|||||||
#include "DataEntry.H"
|
#include "DataEntry.H"
|
||||||
#include "Tuple2.H"
|
#include "Tuple2.H"
|
||||||
#include "dimensionSet.H"
|
#include "dimensionSet.H"
|
||||||
|
#include "DataEntryFwd.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -70,7 +71,7 @@ Ostream& operator<<
|
|||||||
|
|
||||||
class polynomial
|
class polynomial
|
||||||
:
|
:
|
||||||
public DataEntry<scalar>
|
public scalarDataEntry
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -107,9 +108,9 @@ public:
|
|||||||
polynomial(const polynomial& poly);
|
polynomial(const polynomial& poly);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual tmp<DataEntry<scalar> > clone() const
|
virtual tmp<scalarDataEntry> clone() const
|
||||||
{
|
{
|
||||||
return tmp<DataEntry<scalar> >(new polynomial(*this));
|
return tmp<scalarDataEntry>(new polynomial(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -107,12 +107,7 @@ Foam::UIPstream::UIPstream
|
|||||||
|
|
||||||
if (!messageSize_)
|
if (!messageSize_)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
setEof();
|
||||||
(
|
|
||||||
"UIPstream::UIPstream(const commsTypes, const int, "
|
|
||||||
"DynamicList<char>&, streamFormat, versionNumber)"
|
|
||||||
) << "read failed"
|
|
||||||
<< Foam::abort(FatalError);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -199,11 +194,7 @@ Foam::UIPstream::UIPstream(const int fromProcNo, PstreamBuffers& buffers)
|
|||||||
|
|
||||||
if (!messageSize_)
|
if (!messageSize_)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
setEof();
|
||||||
(
|
|
||||||
"UIPstream::UIPstream(const int, PstreamBuffers&)"
|
|
||||||
) << "read failed"
|
|
||||||
<< Foam::abort(FatalError);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -272,7 +272,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
|
|||||||
|
|
||||||
forAll(ft_, cellI)
|
forAll(ft_, cellI)
|
||||||
{
|
{
|
||||||
if(ft_[cellI] < ftStoich)
|
if (ft_[cellI] < ftStoich)
|
||||||
{
|
{
|
||||||
pc[cellI] = ft_[cellI]*(YprodTotal/ftStoich);
|
pc[cellI] = ft_[cellI]*(YprodTotal/ftStoich);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C
|
|||||||
rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C
|
rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C
|
||||||
rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C
|
rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C
|
||||||
|
|
||||||
|
diffusion/diffusions.C
|
||||||
infinitelyFastChemistry/infinitelyFastChemistrys.C
|
infinitelyFastChemistry/infinitelyFastChemistrys.C
|
||||||
|
|
||||||
PaSR/PaSRs.C
|
PaSR/PaSRs.C
|
||||||
|
|||||||
@ -138,7 +138,7 @@ void Foam::combustionModels::PaSR<Type>::correct()
|
|||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::fvScalarMatrix>
|
Foam::tmp<Foam::fvScalarMatrix>
|
||||||
Foam::combustionModels::PaSR<Type>::R(const volScalarField& Y) const
|
Foam::combustionModels::PaSR<Type>::R(volScalarField& Y) const
|
||||||
{
|
{
|
||||||
tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime));
|
tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime));
|
||||||
|
|
||||||
|
|||||||
@ -103,7 +103,7 @@ public:
|
|||||||
virtual void correct();
|
virtual void correct();
|
||||||
|
|
||||||
//- Fuel consumption rate matrix.
|
//- Fuel consumption rate matrix.
|
||||||
virtual tmp<fvScalarMatrix> R(const volScalarField& Y) const;
|
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||||
|
|
||||||
//- Heat release rate calculated from fuel consumption rate matrix
|
//- Heat release rate calculated from fuel consumption rate matrix
|
||||||
virtual tmp<volScalarField> dQ() const;
|
virtual tmp<volScalarField> dQ() const;
|
||||||
|
|||||||
@ -135,7 +135,7 @@ public:
|
|||||||
virtual void correct() = 0;
|
virtual void correct() = 0;
|
||||||
|
|
||||||
//- Fuel consumption rate matrix, i.e. source term for fuel equation
|
//- Fuel consumption rate matrix, i.e. source term for fuel equation
|
||||||
virtual tmp<fvScalarMatrix> R(const volScalarField& Y) const = 0;
|
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const = 0;
|
||||||
|
|
||||||
//- Heat release rate calculated from fuel consumption rate matrix
|
//- Heat release rate calculated from fuel consumption rate matrix
|
||||||
virtual tmp<volScalarField> dQ() const = 0;
|
virtual tmp<volScalarField> dQ() const = 0;
|
||||||
|
|||||||
106
src/combustionModels/diffusion/diffusion.C
Normal file
106
src/combustionModels/diffusion/diffusion.C
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
|
||||||
|
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 "diffusion.H"
|
||||||
|
#include "fvcGrad.H"
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace combustionModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CombThermoType, class ThermoType>
|
||||||
|
diffusion<CombThermoType, ThermoType>::diffusion
|
||||||
|
(
|
||||||
|
const word& modelType, const fvMesh& mesh
|
||||||
|
)
|
||||||
|
:
|
||||||
|
singleStepCombustion<CombThermoType, ThermoType>(modelType, mesh),
|
||||||
|
C_(readScalar(this->coeffs().lookup("C"))),
|
||||||
|
oxidantName_(this->coeffs().template lookupOrDefault<word>("oxidant", "O2"))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CombThermoType, class ThermoType>
|
||||||
|
diffusion<CombThermoType, ThermoType>::~diffusion()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CombThermoType, class ThermoType>
|
||||||
|
void diffusion<CombThermoType, ThermoType>::correct()
|
||||||
|
{
|
||||||
|
this->wFuel_ ==
|
||||||
|
dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0);
|
||||||
|
|
||||||
|
if (this->active())
|
||||||
|
{
|
||||||
|
this->singleMixturePtr_->fresCorrect();
|
||||||
|
|
||||||
|
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||||
|
|
||||||
|
const volScalarField& YFuel =
|
||||||
|
this->thermoPtr_->composition().Y()[fuelI];
|
||||||
|
|
||||||
|
if (this->thermoPtr_->composition().contains(oxidantName_))
|
||||||
|
{
|
||||||
|
const volScalarField& YO2 =
|
||||||
|
this->thermoPtr_->composition().Y(oxidantName_);
|
||||||
|
|
||||||
|
this->wFuel_ ==
|
||||||
|
C_*this->turbulence().muEff()
|
||||||
|
*mag(fvc::grad(YFuel) & fvc::grad(YO2))
|
||||||
|
*pos(YFuel)*pos(YO2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CombThermoType, class ThermoType>
|
||||||
|
bool diffusion<CombThermoType, ThermoType>::read()
|
||||||
|
{
|
||||||
|
if (singleStepCombustion<CombThermoType, ThermoType>::read())
|
||||||
|
{
|
||||||
|
this->coeffs().lookup("C") >> C_ ;
|
||||||
|
this->coeffs().readIfPresent("oxidant", oxidantName_);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace combustionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
122
src/combustionModels/diffusion/diffusion.H
Normal file
122
src/combustionModels/diffusion/diffusion.H
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::combustionModels::diffusion
|
||||||
|
|
||||||
|
Description
|
||||||
|
Simple diffusion-based combustion model based on the principle mixed is
|
||||||
|
burnt. Additional parameter C is used to distribute the heat release rate
|
||||||
|
in time.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
diffusion.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef diffusion_H
|
||||||
|
#define diffusion_H
|
||||||
|
|
||||||
|
#include "singleStepCombustion.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace combustionModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class diffusion Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class CombThermoType, class ThermoType>
|
||||||
|
class diffusion
|
||||||
|
:
|
||||||
|
public singleStepCombustion<CombThermoType, ThermoType>
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Model constant
|
||||||
|
scalar C_;
|
||||||
|
|
||||||
|
//- Name of oxidant - default is "O2"
|
||||||
|
word oxidantName_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow copy construct
|
||||||
|
diffusion(const diffusion&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const diffusion&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("diffusion");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
diffusion(const word& modelType, const fvMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~diffusion();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Evolution
|
||||||
|
|
||||||
|
//- Correct combustion rate
|
||||||
|
virtual void correct();
|
||||||
|
|
||||||
|
|
||||||
|
// I-O
|
||||||
|
|
||||||
|
//- Update properties
|
||||||
|
virtual bool read();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace combustionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "diffusion.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
74
src/combustionModels/diffusion/diffusions.C
Normal file
74
src/combustionModels/diffusion/diffusions.C
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 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 "makeCombustionTypes.H"
|
||||||
|
|
||||||
|
#include "thermoPhysicsTypes.H"
|
||||||
|
#include "psiThermoCombustion.H"
|
||||||
|
#include "rhoThermoCombustion.H"
|
||||||
|
#include "diffusion.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace combustionModels
|
||||||
|
{
|
||||||
|
makeCombustionTypesThermo
|
||||||
|
(
|
||||||
|
diffusion,
|
||||||
|
psiThermoCombustion,
|
||||||
|
gasThermoPhysics,
|
||||||
|
psiCombustionModel
|
||||||
|
);
|
||||||
|
|
||||||
|
makeCombustionTypesThermo
|
||||||
|
(
|
||||||
|
diffusion,
|
||||||
|
psiThermoCombustion,
|
||||||
|
constGasThermoPhysics,
|
||||||
|
psiCombustionModel
|
||||||
|
);
|
||||||
|
|
||||||
|
makeCombustionTypesThermo
|
||||||
|
(
|
||||||
|
diffusion,
|
||||||
|
rhoThermoCombustion,
|
||||||
|
gasThermoPhysics,
|
||||||
|
rhoCombustionModel
|
||||||
|
);
|
||||||
|
|
||||||
|
makeCombustionTypesThermo
|
||||||
|
(
|
||||||
|
diffusion,
|
||||||
|
rhoThermoCombustion,
|
||||||
|
constGasThermoPhysics,
|
||||||
|
rhoCombustionModel
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -59,7 +59,7 @@ template<class CombThermoType>
|
|||||||
Foam::tmp<Foam::fvScalarMatrix>
|
Foam::tmp<Foam::fvScalarMatrix>
|
||||||
Foam::combustionModels::noCombustion<CombThermoType>::R
|
Foam::combustionModels::noCombustion<CombThermoType>::R
|
||||||
(
|
(
|
||||||
const volScalarField& Y
|
volScalarField& Y
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
tmp<fvScalarMatrix> tSu
|
tmp<fvScalarMatrix> tSu
|
||||||
|
|||||||
@ -84,8 +84,8 @@ public:
|
|||||||
//- Correct combustion rate
|
//- Correct combustion rate
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
|
|
||||||
//- Fuel consumption rate matrix.
|
//- Fuel consumption rate matrix
|
||||||
virtual tmp<fvScalarMatrix> R(const volScalarField& Y) const;
|
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||||
|
|
||||||
//- Heat release rate calculated from fuel consumption rate matrix
|
//- Heat release rate calculated from fuel consumption rate matrix
|
||||||
virtual tmp<volScalarField> dQ() const;
|
virtual tmp<volScalarField> dQ() const;
|
||||||
|
|||||||
@ -53,7 +53,8 @@ singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
|
|||||||
),
|
),
|
||||||
this->mesh(),
|
this->mesh(),
|
||||||
dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
|
dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
|
||||||
)
|
),
|
||||||
|
semiImplicit_(readBool(this->coeffs_.lookup("semiImplicit")))
|
||||||
{
|
{
|
||||||
if (isA<singleStepReactingMixture<ThermoType> >(this->thermo()))
|
if (isA<singleStepReactingMixture<ThermoType> >(this->thermo()))
|
||||||
{
|
{
|
||||||
@ -79,6 +80,15 @@ singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
|
|||||||
<< "Please select a thermo package based on "
|
<< "Please select a thermo package based on "
|
||||||
<< "singleStepReactingMixture" << exit(FatalError);
|
<< "singleStepReactingMixture" << exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (semiImplicit_)
|
||||||
|
{
|
||||||
|
Info<< "Combustion mode: semi-implicit" << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< "Combustion mode: explicit" << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,17 +105,28 @@ template<class CombThermoType, class ThermoType>
|
|||||||
Foam::tmp<Foam::fvScalarMatrix>
|
Foam::tmp<Foam::fvScalarMatrix>
|
||||||
singleStepCombustion<CombThermoType, ThermoType>::R
|
singleStepCombustion<CombThermoType, ThermoType>::R
|
||||||
(
|
(
|
||||||
const volScalarField& Y
|
volScalarField& Y
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const label specieI = this->thermoPtr_->composition().species()[Y.name()];
|
const label specieI = this->thermoPtr_->composition().species()[Y.name()];
|
||||||
|
|
||||||
const volScalarField wSpecie
|
volScalarField wSpecie
|
||||||
(
|
(
|
||||||
wFuel_*singleMixturePtr_->specieStoichCoeffs()[specieI]
|
wFuel_*singleMixturePtr_->specieStoichCoeffs()[specieI]
|
||||||
);
|
);
|
||||||
|
|
||||||
return wSpecie + fvm::Sp(0.0*wSpecie, Y);
|
if (semiImplicit_)
|
||||||
|
{
|
||||||
|
const label fNorm = singleMixturePtr_->specieProd()[specieI];
|
||||||
|
const volScalarField fres(singleMixturePtr_->fres(specieI));
|
||||||
|
wSpecie /= max(fNorm*(Y - fres), 1e-2);
|
||||||
|
|
||||||
|
return -fNorm*wSpecie*fres + fNorm*fvm::Sp(wSpecie, Y);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return wSpecie + fvm::Sp(0.0*wSpecie, Y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -114,7 +135,8 @@ Foam::tmp<Foam::volScalarField>
|
|||||||
singleStepCombustion< CombThermoType, ThermoType>::Sh() const
|
singleStepCombustion< CombThermoType, ThermoType>::Sh() const
|
||||||
{
|
{
|
||||||
const label fuelI = singleMixturePtr_->fuelIndex();
|
const label fuelI = singleMixturePtr_->fuelIndex();
|
||||||
const volScalarField& YFuel = this->thermoPtr_->composition().Y(fuelI);
|
volScalarField& YFuel =
|
||||||
|
const_cast<volScalarField&>(this->thermoPtr_->composition().Y(fuelI));
|
||||||
|
|
||||||
return -singleMixturePtr_->qFuel()*(R(YFuel) & YFuel);
|
return -singleMixturePtr_->qFuel()*(R(YFuel) & YFuel);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,6 +71,9 @@ protected:
|
|||||||
//- Fuel consumption rate
|
//- Fuel consumption rate
|
||||||
volScalarField wFuel_;
|
volScalarField wFuel_;
|
||||||
|
|
||||||
|
//- Semi-implicit (true) or explicit (false) treatment
|
||||||
|
bool semiImplicit_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -89,7 +92,7 @@ public:
|
|||||||
// Evolution
|
// Evolution
|
||||||
|
|
||||||
//- Fuel consumption rate matrix
|
//- Fuel consumption rate matrix
|
||||||
virtual tmp<fvScalarMatrix> R(const volScalarField& Y) const;
|
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||||
|
|
||||||
//- Heat release rate calculated from fuel consumption rate matrix
|
//- Heat release rate calculated from fuel consumption rate matrix
|
||||||
virtual tmp<volScalarField> dQ() const;
|
virtual tmp<volScalarField> dQ() const;
|
||||||
|
|||||||
@ -68,17 +68,11 @@ void Foam::interRegionHeatTransferModel::check()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!secSourceFound)
|
if (!secSourceFound)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"constantHeatTransfer::interRegionHeatTransferModel"
|
"constantHeatTransfer::interRegionHeatTransferModel::check()"
|
||||||
"("
|
|
||||||
" const word& name,"
|
|
||||||
" const word& modelType,"
|
|
||||||
" const dictionary& dict,"
|
|
||||||
" const fvMesh& mesh"
|
|
||||||
")"
|
|
||||||
) << "Secondary source name not found" << secondarySourceName_
|
) << "Secondary source name not found" << secondarySourceName_
|
||||||
<< " in region " << secondaryMesh.name()
|
<< " in region " << secondaryMesh.name()
|
||||||
<< nl
|
<< nl
|
||||||
@ -125,9 +119,12 @@ Foam::interRegionHeatTransferModel::interRegionHeatTransferModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::interRegionHeatTransferModel::~interRegionHeatTransferModel()
|
Foam::interRegionHeatTransferModel::~interRegionHeatTransferModel()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
@ -222,7 +219,7 @@ void Foam::interRegionHeatTransferModel::addSup
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(h.dimensions() == dimTemperature)
|
else if (h.dimensions() == dimTemperature)
|
||||||
{
|
{
|
||||||
eEqn += htc_*Tmapped - fvm::Sp(htc_, h);
|
eEqn += htc_*Tmapped - fvm::Sp(htc_, h);
|
||||||
|
|
||||||
@ -269,4 +266,6 @@ bool Foam::interRegionHeatTransferModel::read(const dictionary& dict)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -98,20 +98,19 @@ calculatedFvPatchField<Type>::calculatedFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class Type2>
|
|
||||||
tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
||||||
(
|
(
|
||||||
const fvPatchField<Type2>& pf
|
const fvPatch& p
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typename patchConstructorTable::iterator patchTypeCstrIter =
|
typename patchConstructorTable::iterator patchTypeCstrIter =
|
||||||
patchConstructorTablePtr_->find(pf.patch().type());
|
patchConstructorTablePtr_->find(p.type());
|
||||||
|
|
||||||
if (patchTypeCstrIter != patchConstructorTablePtr_->end())
|
if (patchTypeCstrIter != patchConstructorTablePtr_->end())
|
||||||
{
|
{
|
||||||
return patchTypeCstrIter()
|
return patchTypeCstrIter()
|
||||||
(
|
(
|
||||||
pf.patch(),
|
p,
|
||||||
DimensionedField<Type, volMesh>::null()
|
DimensionedField<Type, volMesh>::null()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -121,7 +120,7 @@ tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
|||||||
(
|
(
|
||||||
new calculatedFvPatchField<Type>
|
new calculatedFvPatchField<Type>
|
||||||
(
|
(
|
||||||
pf.patch(),
|
p,
|
||||||
DimensionedField<Type, volMesh>::null()
|
DimensionedField<Type, volMesh>::null()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -129,6 +128,17 @@ tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
template<class Type2>
|
||||||
|
tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
||||||
|
(
|
||||||
|
const fvPatchField<Type2>& pf
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return NewCalculatedType(pf.patch());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -257,6 +257,13 @@ public:
|
|||||||
const dictionary&
|
const dictionary&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Return a pointer to a new calculatedFvPatchField created on
|
||||||
|
// freestore without setting patchField values
|
||||||
|
static tmp<fvPatchField<Type> > NewCalculatedType
|
||||||
|
(
|
||||||
|
const fvPatch&
|
||||||
|
);
|
||||||
|
|
||||||
//- Return a pointer to a new calculatedFvPatchField created on
|
//- Return a pointer to a new calculatedFvPatchField created on
|
||||||
// freestore without setting patchField values
|
// freestore without setting patchField values
|
||||||
template<class Type2>
|
template<class Type2>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -97,21 +97,20 @@ calculatedFvsPatchField<Type>::calculatedFvsPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class Type2>
|
|
||||||
tmp<fvsPatchField<Type> > fvsPatchField<Type>::NewCalculatedType
|
tmp<fvsPatchField<Type> > fvsPatchField<Type>::NewCalculatedType
|
||||||
(
|
(
|
||||||
const fvsPatchField<Type2>& pf
|
const fvPatch& p
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typename patchConstructorTable::iterator patchTypeCstrIter =
|
typename patchConstructorTable::iterator patchTypeCstrIter =
|
||||||
patchConstructorTablePtr_->find(pf.patch().type());
|
patchConstructorTablePtr_->find(p.type());
|
||||||
|
|
||||||
if (patchTypeCstrIter != patchConstructorTablePtr_->end())
|
if (patchTypeCstrIter != patchConstructorTablePtr_->end())
|
||||||
{
|
{
|
||||||
return patchTypeCstrIter()
|
return patchTypeCstrIter()
|
||||||
(
|
(
|
||||||
pf.patch(),
|
p,
|
||||||
Field<Type>::null()
|
DimensionedField<Type, surfaceMesh>::null()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -120,14 +119,25 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::NewCalculatedType
|
|||||||
(
|
(
|
||||||
new calculatedFvsPatchField<Type>
|
new calculatedFvsPatchField<Type>
|
||||||
(
|
(
|
||||||
pf.patch(),
|
p,
|
||||||
Field<Type>::null()
|
DimensionedField<Type, surfaceMesh>::null()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
template<class Type2>
|
||||||
|
tmp<fvsPatchField<Type> > fvsPatchField<Type>::NewCalculatedType
|
||||||
|
(
|
||||||
|
const fvsPatchField<Type2>& pf
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return NewCalculatedType(pf.patch());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -247,6 +247,13 @@ public:
|
|||||||
const dictionary&
|
const dictionary&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Return a pointer to a new calculatedFvsPatchField created on
|
||||||
|
// freestore without setting patchField values
|
||||||
|
static tmp<fvsPatchField<Type> > NewCalculatedType
|
||||||
|
(
|
||||||
|
const fvPatch&
|
||||||
|
);
|
||||||
|
|
||||||
//- Return a pointer to a new calculatedFvsPatchField created on
|
//- Return a pointer to a new calculatedFvsPatchField created on
|
||||||
// freestore without setting patchField values
|
// freestore without setting patchField values
|
||||||
template<class Type2>
|
template<class Type2>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -302,6 +302,43 @@ interpolate
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<FieldField<fvsPatchField, Type> > interpolate
|
||||||
|
(
|
||||||
|
const FieldField<fvPatchField, Type>& fvpff
|
||||||
|
)
|
||||||
|
{
|
||||||
|
FieldField<fvsPatchField, Type>* fvspffPtr
|
||||||
|
(
|
||||||
|
new FieldField<fvsPatchField, Type>(fvpff.size())
|
||||||
|
);
|
||||||
|
|
||||||
|
forAll(*fvspffPtr, patchi)
|
||||||
|
{
|
||||||
|
fvspffPtr->set
|
||||||
|
(
|
||||||
|
patchi,
|
||||||
|
fvsPatchField<Type>::NewCalculatedType(fvpff[patchi].patch()).ptr()
|
||||||
|
);
|
||||||
|
(*fvspffPtr)[patchi] = fvpff[patchi];
|
||||||
|
}
|
||||||
|
|
||||||
|
return tmp<FieldField<fvsPatchField, Type> >(fvspffPtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<FieldField<fvsPatchField, Type> > interpolate
|
||||||
|
(
|
||||||
|
const tmp<FieldField<fvPatchField, Type> >& tfvpff
|
||||||
|
)
|
||||||
|
{
|
||||||
|
tmp<FieldField<fvsPatchField, Type> > tfvspff = interpolate(tfvpff());
|
||||||
|
tfvpff.clear();
|
||||||
|
return tfvspff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace fvc
|
} // End namespace fvc
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -163,12 +163,26 @@ namespace fvc
|
|||||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Interpolate tmp field onto faces using 'interpolate(\<name\>)'
|
//- Interpolate field onto faces using 'interpolate(\<name\>)'
|
||||||
template<class Type>
|
template<class Type>
|
||||||
static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
|
static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
|
||||||
(
|
(
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& tvf
|
const GeometricField<Type, fvPatchField, volMesh>& tvf
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Interpolate boundary field onto faces (simply a type conversion)
|
||||||
|
template<class Type>
|
||||||
|
static tmp<FieldField<fvsPatchField, Type> > interpolate
|
||||||
|
(
|
||||||
|
const FieldField<fvPatchField, Type>& fvpff
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Interpolate boundary field onto faces (simply a type conversion)
|
||||||
|
template<class Type>
|
||||||
|
static tmp<FieldField<fvsPatchField, Type> > interpolate
|
||||||
|
(
|
||||||
|
const tmp<FieldField<fvPatchField, Type> >& tfvpff
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,8 +51,8 @@ void volPointInterpolation::syncUntransformedData
|
|||||||
const indirectPrimitivePatch& cpp = gmd.coupledPatch();
|
const indirectPrimitivePatch& cpp = gmd.coupledPatch();
|
||||||
const labelList& meshPoints = cpp.meshPoints();
|
const labelList& meshPoints = cpp.meshPoints();
|
||||||
|
|
||||||
const mapDistribute& slavesMap = gmd.globalPointSlavesMap();
|
const mapDistribute& slavesMap = gmd.globalCoPointSlavesMap();
|
||||||
const labelListList& slaves = gmd.globalPointSlaves();
|
const labelListList& slaves = gmd.globalCoPointSlaves();
|
||||||
|
|
||||||
List<Type> elems(slavesMap.constructSize());
|
List<Type> elems(slavesMap.constructSize());
|
||||||
forAll(meshPoints, i)
|
forAll(meshPoints, i)
|
||||||
@ -105,8 +105,8 @@ void volPointInterpolation::pushUntransformedData
|
|||||||
const indirectPrimitivePatch& cpp = gmd.coupledPatch();
|
const indirectPrimitivePatch& cpp = gmd.coupledPatch();
|
||||||
const labelList& meshPoints = cpp.meshPoints();
|
const labelList& meshPoints = cpp.meshPoints();
|
||||||
|
|
||||||
const mapDistribute& slavesMap = gmd.globalPointSlavesMap();
|
const mapDistribute& slavesMap = gmd.globalCoPointSlavesMap();
|
||||||
const labelListList& slaves = gmd.globalPointSlaves();
|
const labelListList& slaves = gmd.globalCoPointSlaves();
|
||||||
|
|
||||||
List<Type> elems(slavesMap.constructSize());
|
List<Type> elems(slavesMap.constructSize());
|
||||||
forAll(meshPoints, i)
|
forAll(meshPoints, i)
|
||||||
@ -155,14 +155,14 @@ void volPointInterpolation::addSeparated
|
|||||||
refCast<coupledPointPatchField<Type> >
|
refCast<coupledPointPatchField<Type> >
|
||||||
(pf.boundaryField()[patchI]).initSwapAddSeparated
|
(pf.boundaryField()[patchI]).initSwapAddSeparated
|
||||||
(
|
(
|
||||||
Pstream::blocking, //Pstream::nonBlocking,
|
Pstream::nonBlocking,
|
||||||
pf.internalField()
|
pf.internalField()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Block for any outstanding requests
|
// Block for any outstanding requests
|
||||||
//Pstream::waitRequests();
|
Pstream::waitRequests();
|
||||||
|
|
||||||
forAll(pf.boundaryField(), patchI)
|
forAll(pf.boundaryField(), patchI)
|
||||||
{
|
{
|
||||||
@ -171,7 +171,7 @@ void volPointInterpolation::addSeparated
|
|||||||
refCast<coupledPointPatchField<Type> >
|
refCast<coupledPointPatchField<Type> >
|
||||||
(pf.boundaryField()[patchI]).swapAddSeparated
|
(pf.boundaryField()[patchI]).swapAddSeparated
|
||||||
(
|
(
|
||||||
Pstream::blocking, //Pstream::nonBlocking,
|
Pstream::nonBlocking,
|
||||||
pf.internalField()
|
pf.internalField()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -306,7 +306,6 @@ void volPointInterpolation::interpolateBoundaryField
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sum collocated contributions
|
// Sum collocated contributions
|
||||||
//mesh().globalData().syncPointData(pfi, plusEqOp<Type>());
|
|
||||||
syncUntransformedData(pfi, plusEqOp<Type>());
|
syncUntransformedData(pfi, plusEqOp<Type>());
|
||||||
|
|
||||||
// And add separated contributions
|
// And add separated contributions
|
||||||
@ -314,9 +313,7 @@ void volPointInterpolation::interpolateBoundaryField
|
|||||||
|
|
||||||
// Push master data to slaves. It is possible (not sure how often) for
|
// Push master data to slaves. It is possible (not sure how often) for
|
||||||
// a coupled point to have its master on a different patch so
|
// a coupled point to have its master on a different patch so
|
||||||
// to make sure just push master data to slaves. Reuse the syncPointData
|
// to make sure just push master data to slaves.
|
||||||
// structure.
|
|
||||||
//mesh().globalData().syncPointData(pfi, nopEqOp<Type>());
|
|
||||||
pushUntransformedData(pfi);
|
pushUntransformedData(pfi);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -113,10 +113,8 @@ void volPointInterpolation::calcBoundaryAddressing()
|
|||||||
{
|
{
|
||||||
boolList oldData(isPatchPoint_);
|
boolList oldData(isPatchPoint_);
|
||||||
|
|
||||||
//mesh().globalData().syncPointData(isPatchPoint_, orEqOp<bool>());
|
|
||||||
syncUntransformedData(isPatchPoint_, orEqOp<bool>());
|
syncUntransformedData(isPatchPoint_, orEqOp<bool>());
|
||||||
|
|
||||||
|
|
||||||
forAll(isPatchPoint_, pointI)
|
forAll(isPatchPoint_, pointI)
|
||||||
{
|
{
|
||||||
if (isPatchPoint_[pointI] != oldData[pointI])
|
if (isPatchPoint_[pointI] != oldData[pointI])
|
||||||
@ -272,7 +270,7 @@ void volPointInterpolation::makeWeights()
|
|||||||
makeInternalWeights(sumWeights);
|
makeInternalWeights(sumWeights);
|
||||||
|
|
||||||
|
|
||||||
// Create boundary weights; add to sumWeights
|
// Create boundary weights; override sumWeights
|
||||||
makeBoundaryWeights(sumWeights);
|
makeBoundaryWeights(sumWeights);
|
||||||
|
|
||||||
|
|
||||||
@ -292,7 +290,6 @@ void volPointInterpolation::makeWeights()
|
|||||||
|
|
||||||
|
|
||||||
// Sum collocated contributions
|
// Sum collocated contributions
|
||||||
//mesh().globalData().syncPointData(sumWeights, plusEqOp<scalar>());
|
|
||||||
syncUntransformedData(sumWeights, plusEqOp<scalar>());
|
syncUntransformedData(sumWeights, plusEqOp<scalar>());
|
||||||
|
|
||||||
// And add separated contributions
|
// And add separated contributions
|
||||||
@ -302,7 +299,6 @@ void volPointInterpolation::makeWeights()
|
|||||||
// a coupled point to have its master on a different patch so
|
// a coupled point to have its master on a different patch so
|
||||||
// to make sure just push master data to slaves. Reuse the syncPointData
|
// to make sure just push master data to slaves. Reuse the syncPointData
|
||||||
// structure.
|
// structure.
|
||||||
//mesh().globalData().syncPointData(sumWeights, nopEqOp<scalar>());
|
|
||||||
pushUntransformedData(sumWeights);
|
pushUntransformedData(sumWeights);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
/* Coal parcel and sub-models */
|
/* Coal parcel and sub-models */
|
||||||
coalParcel/makeCoalParcelSubmodels.C
|
coalParcel/makeCoalParcelSubmodels.C
|
||||||
|
coalCloudList/coalCloudList.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libcoalCombustion
|
LIB = $(FOAM_LIBBIN)/libcoalCombustion
|
||||||
|
|||||||
92
src/lagrangian/coalCombustion/coalCloudList/coalCloudList.C
Normal file
92
src/lagrangian/coalCombustion/coalCloudList/coalCloudList.C
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 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 "coalCloudList.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::coalCloudList::coalCloudList
|
||||||
|
(
|
||||||
|
const volScalarField& rho,
|
||||||
|
const volVectorField& U,
|
||||||
|
const dimensionedVector& g,
|
||||||
|
const SLGThermo& slgThermo
|
||||||
|
)
|
||||||
|
:
|
||||||
|
PtrList<coalCloud>(),
|
||||||
|
mesh_(rho.mesh())
|
||||||
|
{
|
||||||
|
IOdictionary props
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"coalCloudList",
|
||||||
|
mesh_.time().constant(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::MUST_READ
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
const wordHashSet cloudNames(wordList(props.lookup("clouds")));
|
||||||
|
|
||||||
|
setSize(cloudNames.size());
|
||||||
|
|
||||||
|
label i = 0;
|
||||||
|
forAllConstIter(wordHashSet, cloudNames, iter)
|
||||||
|
{
|
||||||
|
const word& name = iter.key();
|
||||||
|
|
||||||
|
Info<< "creating cloud: " << name << endl;
|
||||||
|
|
||||||
|
set
|
||||||
|
(
|
||||||
|
i++,
|
||||||
|
new coalCloud
|
||||||
|
(
|
||||||
|
name,
|
||||||
|
rho,
|
||||||
|
U,
|
||||||
|
g,
|
||||||
|
slgThermo
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::coalCloudList::evolve()
|
||||||
|
{
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
operator[](i).evolve();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
126
src/lagrangian/coalCombustion/coalCloudList/coalCloudList.H
Normal file
126
src/lagrangian/coalCombustion/coalCloudList/coalCloudList.H
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 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/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef coalCloudList_H
|
||||||
|
#define coalCloudList_H
|
||||||
|
|
||||||
|
#include "coalCloud.H"
|
||||||
|
#include "volFieldsFwd.H"
|
||||||
|
#include "fvMatricesFwd.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class coalCloudList Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class coalCloudList
|
||||||
|
:
|
||||||
|
public PtrList<coalCloud>
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
//- Reference to the mesh
|
||||||
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructor
|
||||||
|
|
||||||
|
coalCloudList
|
||||||
|
(
|
||||||
|
const volScalarField& rho,
|
||||||
|
const volVectorField& U,
|
||||||
|
const dimensionedVector& g,
|
||||||
|
const SLGThermo& slgThermo
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Evolution
|
||||||
|
|
||||||
|
//- Evolve the cloud collection
|
||||||
|
void evolve();
|
||||||
|
|
||||||
|
|
||||||
|
// Source terms
|
||||||
|
|
||||||
|
//- Return const reference to momentum source
|
||||||
|
inline tmp<DimensionedField<vector, volMesh> > UTrans() const;
|
||||||
|
|
||||||
|
//- Return tmp momentum source term
|
||||||
|
inline tmp<fvVectorMatrix> SU(volVectorField& U) const;
|
||||||
|
|
||||||
|
//- Sensible enthalpy transfer [J/kg]
|
||||||
|
inline tmp<DimensionedField<scalar, volMesh> > hsTrans() const;
|
||||||
|
|
||||||
|
//- Return sensible enthalpy source term [J/kg/m3/s]
|
||||||
|
inline tmp<fvScalarMatrix> Sh(volScalarField& hs) const;
|
||||||
|
|
||||||
|
|
||||||
|
//- Return mass source term for specie i - specie eqn
|
||||||
|
inline tmp<fvScalarMatrix> SYi
|
||||||
|
(
|
||||||
|
const label i,
|
||||||
|
volScalarField& Yi
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Return total mass transfer [kg/m3]
|
||||||
|
inline tmp<DimensionedField<scalar, volMesh> > rhoTrans() const;
|
||||||
|
|
||||||
|
//- Return tmp total mass source for carrier phase
|
||||||
|
// - fully explicit
|
||||||
|
inline tmp<DimensionedField<scalar, volMesh> > Srho() const;
|
||||||
|
|
||||||
|
//- Return tmp total mass source for carrier phase specie i
|
||||||
|
// - fully explicit
|
||||||
|
inline tmp<DimensionedField<scalar, volMesh> > Srho
|
||||||
|
(
|
||||||
|
const label i
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Return total mass source term [kg/m3/s]
|
||||||
|
inline tmp<fvScalarMatrix> Srho(volScalarField& rho) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "coalCloudListI.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
262
src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H
Normal file
262
src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H
Normal file
@ -0,0 +1,262 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 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 "fvMatrices.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "DimensionedField.H"
|
||||||
|
|
||||||
|
Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh> >
|
||||||
|
Foam::coalCloudList::UTrans() const
|
||||||
|
{
|
||||||
|
tmp<DimensionedField<vector, volMesh> > tfld
|
||||||
|
(
|
||||||
|
new DimensionedField<vector, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"UTransEff",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedVector("zero", dimMass*dimVelocity, vector::zero)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
DimensionedField<vector, volMesh>& fld = tfld();
|
||||||
|
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
fld += operator[](i).UTrans();
|
||||||
|
}
|
||||||
|
|
||||||
|
return tfld;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::fvVectorMatrix> Foam::coalCloudList::SU
|
||||||
|
(
|
||||||
|
volVectorField& U
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<fvVectorMatrix> tfvm(new fvVectorMatrix(U, dimForce));
|
||||||
|
fvVectorMatrix& fvm = tfvm();
|
||||||
|
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
fvm += operator[](i).SU(U);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tfvm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
||||||
|
Foam::coalCloudList::hsTrans() const
|
||||||
|
{
|
||||||
|
tmp<DimensionedField<scalar, volMesh> > tfld
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"hsTransEff",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("zero", dimEnergy, 0.0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh>& fld = tfld();
|
||||||
|
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
fld += operator[](i).hsTrans();
|
||||||
|
}
|
||||||
|
|
||||||
|
return tfld;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::fvScalarMatrix> Foam::coalCloudList::Sh
|
||||||
|
(
|
||||||
|
volScalarField& hs
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(hs, dimEnergy/dimTime));
|
||||||
|
fvScalarMatrix& fvm = tfvm();
|
||||||
|
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
fvm += operator[](i).Sh(hs);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tfvm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::fvScalarMatrix> Foam::coalCloudList::SYi
|
||||||
|
(
|
||||||
|
const label ii,
|
||||||
|
volScalarField& Yi
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(Yi, dimMass/dimTime));
|
||||||
|
fvScalarMatrix& fvm = tfvm();
|
||||||
|
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
fvm += operator[](i).SYi(ii, Yi);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tfvm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
||||||
|
Foam::coalCloudList::rhoTrans() const
|
||||||
|
{
|
||||||
|
tmp<DimensionedField<scalar, volMesh> > tfld
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rhoTransEff",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("zero", dimMass, 0.0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh>& fld = tfld();
|
||||||
|
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
forAll(operator[](i).rhoTrans(), j)
|
||||||
|
{
|
||||||
|
fld += operator[](i).rhoTrans()[j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return tfld;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
||||||
|
Foam::coalCloudList::Srho() const
|
||||||
|
{
|
||||||
|
tmp<DimensionedField<scalar, volMesh> > tfld
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rhoTransEff",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("zero", dimDensity/dimTime, 0.0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh>& fld = tfld();
|
||||||
|
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
fld += operator[](i).Srho();
|
||||||
|
}
|
||||||
|
|
||||||
|
return tfld;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
||||||
|
Foam::coalCloudList::Srho
|
||||||
|
(
|
||||||
|
const label i
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<DimensionedField<scalar, volMesh> > tfld
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rhoTransEff",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("zero", dimDensity/dimTime, 0.0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh>& fld = tfld();
|
||||||
|
|
||||||
|
forAll(*this, j)
|
||||||
|
{
|
||||||
|
fld += operator[](j).Srho(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tfld;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::fvScalarMatrix> Foam::coalCloudList::Srho
|
||||||
|
(
|
||||||
|
volScalarField& rho
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(rho, dimMass/dimTime));
|
||||||
|
fvScalarMatrix& fvm = tfvm();
|
||||||
|
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
fvm += operator[](i).Srho(rho);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tfvm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,6 +31,7 @@ License
|
|||||||
#include "NoSurfaceReaction.H"
|
#include "NoSurfaceReaction.H"
|
||||||
#include "COxidationDiffusionLimitedRate.H"
|
#include "COxidationDiffusionLimitedRate.H"
|
||||||
#include "COxidationKineticDiffusionLimitedRate.H"
|
#include "COxidationKineticDiffusionLimitedRate.H"
|
||||||
|
#include "COxidationHurtMitchell.H"
|
||||||
#include "COxidationMurphyShaddix.H"
|
#include "COxidationMurphyShaddix.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -43,6 +44,7 @@ License
|
|||||||
COxidationKineticDiffusionLimitedRate, \
|
COxidationKineticDiffusionLimitedRate, \
|
||||||
CloudType \
|
CloudType \
|
||||||
); \
|
); \
|
||||||
|
makeSurfaceReactionModelType(COxidationHurtMitchell, CloudType); \
|
||||||
makeSurfaceReactionModelType(COxidationMurphyShaddix, CloudType);
|
makeSurfaceReactionModelType(COxidationMurphyShaddix, CloudType);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,206 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 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 "COxidationHurtMitchell.H"
|
||||||
|
#include "mathematicalConstants.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
Foam::COxidationHurtMitchell<CloudType>::COxidationHurtMitchell
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
CloudType& owner
|
||||||
|
)
|
||||||
|
:
|
||||||
|
SurfaceReactionModel<CloudType>(dict, owner, typeName),
|
||||||
|
Sb_(readScalar(this->coeffDict().lookup("Sb"))),
|
||||||
|
CsLocalId_(-1),
|
||||||
|
ashLocalId_(-1),
|
||||||
|
O2GlobalId_(owner.composition().globalCarrierId("O2")),
|
||||||
|
CO2GlobalId_(owner.composition().globalCarrierId("CO2")),
|
||||||
|
WC_(0.0),
|
||||||
|
WO2_(0.0),
|
||||||
|
HcCO2_(0.0),
|
||||||
|
heatOfReaction_(-1.0)
|
||||||
|
{
|
||||||
|
// Determine Cs and ash ids
|
||||||
|
label idSolid = owner.composition().idSolid();
|
||||||
|
CsLocalId_ = owner.composition().localId(idSolid, "C");
|
||||||
|
ashLocalId_ = owner.composition().localId(idSolid, "ash", true);
|
||||||
|
|
||||||
|
// Set local copies of thermo properties
|
||||||
|
WO2_ = owner.thermo().carrier().W(O2GlobalId_);
|
||||||
|
const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_);
|
||||||
|
WC_ = WCO2 - WO2_;
|
||||||
|
|
||||||
|
HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_);
|
||||||
|
|
||||||
|
const scalar YCloc = owner.composition().Y0(idSolid)[CsLocalId_];
|
||||||
|
const scalar YSolidTot = owner.composition().YMixture0()[idSolid];
|
||||||
|
Info<< " C(s): particle mass fraction = " << YCloc*YSolidTot << endl;
|
||||||
|
|
||||||
|
if (this->coeffDict().readIfPresent("heatOfReaction", heatOfReaction_))
|
||||||
|
{
|
||||||
|
Info<< " Using user specified heat of reaction: "
|
||||||
|
<< heatOfReaction_ << " [J/kg]" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
Foam::COxidationHurtMitchell<CloudType>::COxidationHurtMitchell
|
||||||
|
(
|
||||||
|
const COxidationHurtMitchell<CloudType>& srm
|
||||||
|
)
|
||||||
|
:
|
||||||
|
SurfaceReactionModel<CloudType>(srm),
|
||||||
|
Sb_(srm.Sb_),
|
||||||
|
CsLocalId_(srm.CsLocalId_),
|
||||||
|
ashLocalId_(srm.ashLocalId_),
|
||||||
|
O2GlobalId_(srm.O2GlobalId_),
|
||||||
|
CO2GlobalId_(srm.CO2GlobalId_),
|
||||||
|
WC_(srm.WC_),
|
||||||
|
WO2_(srm.WO2_),
|
||||||
|
HcCO2_(srm.HcCO2_),
|
||||||
|
heatOfReaction_(srm.heatOfReaction_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
Foam::COxidationHurtMitchell<CloudType>::~COxidationHurtMitchell()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
Foam::scalar Foam::COxidationHurtMitchell<CloudType>::calculate
|
||||||
|
(
|
||||||
|
const scalar dt,
|
||||||
|
const label cellI,
|
||||||
|
const scalar d,
|
||||||
|
const scalar T,
|
||||||
|
const scalar Tc,
|
||||||
|
const scalar pc,
|
||||||
|
const scalar rhoc,
|
||||||
|
const scalar mass,
|
||||||
|
const scalarField& YGas,
|
||||||
|
const scalarField& YLiquid,
|
||||||
|
const scalarField& YSolid,
|
||||||
|
const scalarField& YMixture,
|
||||||
|
const scalar N,
|
||||||
|
scalarField& dMassGas,
|
||||||
|
scalarField& dMassLiquid,
|
||||||
|
scalarField& dMassSolid,
|
||||||
|
scalarField& dMassSRCarrier
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
const label idGas = CloudType::parcelType::GAS;
|
||||||
|
const label idSolid = CloudType::parcelType::SLD;
|
||||||
|
const scalar Ychar = YMixture[idSolid]*YSolid[CsLocalId_];
|
||||||
|
|
||||||
|
// Surface combustion until combustible fraction is consumed
|
||||||
|
if (Ychar < SMALL)
|
||||||
|
{
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const SLGThermo& thermo = this->owner().thermo();
|
||||||
|
|
||||||
|
// Local mass fraction of O2 in the carrier phase
|
||||||
|
const scalar YO2 = thermo.carrier().Y(O2GlobalId_)[cellI];
|
||||||
|
|
||||||
|
// No combustion if no oxygen present
|
||||||
|
if (YO2 < SMALL)
|
||||||
|
{
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Conversion from [g/cm^2) to [kg/m^2]
|
||||||
|
const scalar convSI = 1000.0/10000.0;
|
||||||
|
|
||||||
|
// Universal gas constant in [kcal/mol/K]
|
||||||
|
const scalar RRcal = 1985.877534;
|
||||||
|
|
||||||
|
// Dry mass fraction
|
||||||
|
scalar Ydaf = YMixture[idGas] + YMixture[idSolid];
|
||||||
|
if (ashLocalId_ != -1)
|
||||||
|
{
|
||||||
|
Ydaf -= YMixture[idSolid]*YSolid[ashLocalId_];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Char percentage
|
||||||
|
const scalar charPrc = Ychar/Ydaf*100.0;
|
||||||
|
|
||||||
|
// Particle surface area
|
||||||
|
const scalar Ap = constant::mathematical::pi*sqr(d);
|
||||||
|
|
||||||
|
// Far field partial pressure O2 [Pa]
|
||||||
|
// Note: Should really use the surface partial pressure
|
||||||
|
const scalar ppO2 = max(0.0, rhoc*YO2/WO2_*specie::RR*Tc);
|
||||||
|
|
||||||
|
// Activation energy [kcal/mol]
|
||||||
|
const scalar E = -5.94 + 0.355*charPrc;
|
||||||
|
|
||||||
|
// Pre-exponential factor [g/(cm^2.s.atm^0.5)]
|
||||||
|
const scalar lnK1750 = 2.8 - 0.0758*charPrc;
|
||||||
|
const scalar A = exp(lnK1750 + E/RRcal/1750.0);
|
||||||
|
|
||||||
|
// Kinetic rate of char oxidation [g/(cm^2.s.atm^0.5)]
|
||||||
|
const scalar Rk = A*exp(-E/(RRcal*T));
|
||||||
|
|
||||||
|
// Molar reaction rate per unit surface area [kmol/(m^2.s)]
|
||||||
|
const scalar qCsLim = mass*Ychar/(WC_*Ap*dt);
|
||||||
|
const scalar qCs = min(convSI*Rk*Foam::sqrt(ppO2/101325.0), qCsLim);
|
||||||
|
|
||||||
|
// Calculate the number of molar units reacted [kmol]
|
||||||
|
const scalar dOmega = qCs*Ap*dt;
|
||||||
|
|
||||||
|
// Add to carrier phase mass transfer
|
||||||
|
dMassSRCarrier[O2GlobalId_] += -dOmega*Sb_*WO2_;
|
||||||
|
dMassSRCarrier[CO2GlobalId_] += dOmega*(WC_ + Sb_*WO2_);
|
||||||
|
|
||||||
|
// Add to particle mass transfer
|
||||||
|
dMassSolid[CsLocalId_] += dOmega*WC_;
|
||||||
|
|
||||||
|
|
||||||
|
// Return the heat of reaction [J]
|
||||||
|
// note: carrier sensible enthalpy exchange handled via change in mass
|
||||||
|
if (heatOfReaction_ < 0)
|
||||||
|
{
|
||||||
|
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||||
|
return dOmega*(WC_*HsC - (WC_ + Sb_*WO2_)*HcCO2_);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return dOmega*WC_*heatOfReaction_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,184 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 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/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
COxidationHurtMitchell
|
||||||
|
|
||||||
|
Description
|
||||||
|
Char oxidation model given by Hurt and Mitchell:
|
||||||
|
|
||||||
|
Based on the reference:
|
||||||
|
Hurt R. and Mitchell R., "Unified high-temperature char combustion
|
||||||
|
kinetics for a suite of coals of various rank", 24th Symposium in
|
||||||
|
Combustion, The Combustion Institute, 1992, p 1243-1250
|
||||||
|
|
||||||
|
Model specifies the rate of char combustion.
|
||||||
|
|
||||||
|
C(s) + Sb*O2 -> CO2
|
||||||
|
|
||||||
|
where Sb is the stoichiometry of the reaction
|
||||||
|
|
||||||
|
Model validity:
|
||||||
|
Gas temperature: Tc > 1500 K
|
||||||
|
Particle sizes: 75 um -> 200 um
|
||||||
|
Pox > 0.3 atm
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef COxidationHurtMitchell_H
|
||||||
|
#define COxidationHurtMitchell_H
|
||||||
|
|
||||||
|
#include "SurfaceReactionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// Forward class declarations
|
||||||
|
template<class CloudType>
|
||||||
|
class COxidationHurtMitchell;
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class COxidationHurtMitchell Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
class COxidationHurtMitchell
|
||||||
|
:
|
||||||
|
public SurfaceReactionModel<CloudType>
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
// Model constants
|
||||||
|
|
||||||
|
//- Stoichiometry of reaction
|
||||||
|
const scalar Sb_;
|
||||||
|
|
||||||
|
|
||||||
|
// Addressing
|
||||||
|
|
||||||
|
//- Cs position in global/local lists
|
||||||
|
label CsLocalId_;
|
||||||
|
|
||||||
|
//- Ash position in global/local lists
|
||||||
|
label ashLocalId_;
|
||||||
|
|
||||||
|
//- O2 position in global list
|
||||||
|
label O2GlobalId_;
|
||||||
|
|
||||||
|
//- CO2 positions in global list
|
||||||
|
label CO2GlobalId_;
|
||||||
|
|
||||||
|
|
||||||
|
// Local copies of thermo properties
|
||||||
|
|
||||||
|
//- Molecular weight of C [kg/kmol]
|
||||||
|
scalar WC_;
|
||||||
|
|
||||||
|
//- Molecular weight of O2 [kg/kmol]
|
||||||
|
scalar WO2_;
|
||||||
|
|
||||||
|
//- Formation enthalpy for CO2 [J/kg]
|
||||||
|
scalar HcCO2_;
|
||||||
|
|
||||||
|
//- Heat of reaction [J/kg] (optional)
|
||||||
|
scalar heatOfReaction_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("COxidationHurtMitchell");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from dictionary
|
||||||
|
COxidationHurtMitchell
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
CloudType& owner
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct copy
|
||||||
|
COxidationHurtMitchell
|
||||||
|
(
|
||||||
|
const COxidationHurtMitchell<CloudType>& srm
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
|
||||||
|
{
|
||||||
|
return autoPtr<SurfaceReactionModel<CloudType> >
|
||||||
|
(
|
||||||
|
new COxidationHurtMitchell<CloudType>(*this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~COxidationHurtMitchell();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Update surface reactions
|
||||||
|
virtual scalar calculate
|
||||||
|
(
|
||||||
|
const scalar dt,
|
||||||
|
const label cellI,
|
||||||
|
const scalar d,
|
||||||
|
const scalar T,
|
||||||
|
const scalar Tc,
|
||||||
|
const scalar pc,
|
||||||
|
const scalar rhoc,
|
||||||
|
const scalar mass,
|
||||||
|
const scalarField& YGas,
|
||||||
|
const scalarField& YLiquid,
|
||||||
|
const scalarField& YSolid,
|
||||||
|
const scalarField& YMixture,
|
||||||
|
const scalar N,
|
||||||
|
scalarField& dMassGas,
|
||||||
|
scalarField& dMassLiquid,
|
||||||
|
scalarField& dMassSolid,
|
||||||
|
scalarField& dMassSRCarrier
|
||||||
|
) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
#include "COxidationHurtMitchell.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -68,15 +68,13 @@ Foam::scalar Foam::NoBinaryCollision<CloudType>::sigmaTcR
|
|||||||
(
|
(
|
||||||
"Foam::scalar Foam::NoBinaryCollision<CloudType>::sigmaTcR"
|
"Foam::scalar Foam::NoBinaryCollision<CloudType>::sigmaTcR"
|
||||||
"("
|
"("
|
||||||
"label typeIdP,"
|
"const typename CloudType::parcelType&, "
|
||||||
"label typeIdQ,"
|
"const typename CloudType::parcelType"
|
||||||
"const vector& UP,"
|
|
||||||
"const vector& UQ"
|
|
||||||
") const"
|
") const"
|
||||||
)
|
)
|
||||||
<< "sigmaTcR called on NoBinaryCollision model, this should "
|
<< "sigmaTcR called on NoBinaryCollision model, this should "
|
||||||
<< "not happen, this is not an actual model." << nl
|
<< "not happen, this is not an actual model." << nl
|
||||||
<< "Enclose calls to sigmaTcR within a if(binaryCollision().active()) "
|
<< "Enclose calls to sigmaTcR within a if (binaryCollision().active()) "
|
||||||
<< " check."
|
<< " check."
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|
||||||
|
|||||||
@ -661,7 +661,7 @@ void Foam::KinematicCloud<CloudType>::evolve()
|
|||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
void Foam::KinematicCloud<CloudType>::motion(TrackData& td)
|
void Foam::KinematicCloud<CloudType>::motion(TrackData& td)
|
||||||
{
|
{
|
||||||
td.part() = TrackData::tpLinearTrack;
|
td.part() = TrackData::tpLinearTrack;
|
||||||
CloudType::move(td, solution_.trackTime());
|
CloudType::move(td, solution_.trackTime());
|
||||||
@ -670,6 +670,159 @@ void Foam::KinematicCloud<CloudType>::motion(TrackData& td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
void Foam::KinematicCloud<CloudType>::patchData
|
||||||
|
(
|
||||||
|
const parcelType& p,
|
||||||
|
const polyPatch& pp,
|
||||||
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs,
|
||||||
|
vector& nw,
|
||||||
|
vector& Up
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
label patchI = pp.index();
|
||||||
|
label patchFaceI = pp.whichFace(p.face());
|
||||||
|
|
||||||
|
vector n = tetIs.faceTri(mesh_).normal();
|
||||||
|
n /= mag(n);
|
||||||
|
|
||||||
|
vector U = U_.boundaryField()[patchI][patchFaceI];
|
||||||
|
|
||||||
|
// Unless the face is rotating, the required normal is n;
|
||||||
|
nw = n;
|
||||||
|
|
||||||
|
if (!mesh_.moving())
|
||||||
|
{
|
||||||
|
// Only wall patches may have a non-zero wall velocity from
|
||||||
|
// the velocity field when the mesh is not moving.
|
||||||
|
|
||||||
|
if (isA<wallPolyPatch>(pp))
|
||||||
|
{
|
||||||
|
Up = U;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Up = vector::zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vector U00 = U_.oldTime().boundaryField()[patchI][patchFaceI];
|
||||||
|
|
||||||
|
vector n00 = tetIs.oldFaceTri(mesh_).normal();
|
||||||
|
|
||||||
|
// Difference in normal over timestep
|
||||||
|
vector dn = vector::zero;
|
||||||
|
|
||||||
|
if (mag(n00) > SMALL)
|
||||||
|
{
|
||||||
|
// If the old normal is zero (for example in layer
|
||||||
|
// addition) then use the current normal, meaning that the
|
||||||
|
// motion can only be translational, and dn remains zero,
|
||||||
|
// otherwise, calculate dn:
|
||||||
|
|
||||||
|
n00 /= mag(n00);
|
||||||
|
|
||||||
|
dn = n - n00;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Total fraction through the timestep of the motion,
|
||||||
|
// including stepFraction before the current tracking step
|
||||||
|
// and the current trackFraction
|
||||||
|
// i.e.
|
||||||
|
// let s = stepFraction, t = trackFraction
|
||||||
|
// Motion of x in time:
|
||||||
|
// |-----------------|---------|---------|
|
||||||
|
// x00 x0 xi x
|
||||||
|
//
|
||||||
|
// where xi is the correct value of x at the required
|
||||||
|
// tracking instant.
|
||||||
|
//
|
||||||
|
// x0 = x00 + s*(x - x00) = s*x + (1 - s)*x00
|
||||||
|
//
|
||||||
|
// i.e. the motion covered by previous tracking portions
|
||||||
|
// within this timestep, and
|
||||||
|
//
|
||||||
|
// xi = x0 + t*(x - x0)
|
||||||
|
// = t*x + (1 - t)*x0
|
||||||
|
// = t*x + (1 - t)*(s*x + (1 - s)*x00)
|
||||||
|
// = (s + t - s*t)*x + (1 - (s + t - s*t))*x00
|
||||||
|
//
|
||||||
|
// let m = (s + t - s*t)
|
||||||
|
//
|
||||||
|
// xi = m*x + (1 - m)*x00 = x00 + m*(x - x00);
|
||||||
|
//
|
||||||
|
// In the same form as before.
|
||||||
|
|
||||||
|
scalar m =
|
||||||
|
p.stepFraction()
|
||||||
|
+ trackFraction
|
||||||
|
- (p.stepFraction()*trackFraction);
|
||||||
|
|
||||||
|
// When the mesh is moving, the velocity field on wall patches
|
||||||
|
// will contain the velocity associated with the motion of the
|
||||||
|
// mesh, in which case it is interpolated in time using m.
|
||||||
|
// For other patches the face velocity will need to be
|
||||||
|
// reconstructed from the face centre motion.
|
||||||
|
|
||||||
|
const vector& Cf = mesh_.faceCentres()[p.face()];
|
||||||
|
|
||||||
|
vector Cf00 = mesh_.faces()[p.face()].centre(mesh_.oldPoints());
|
||||||
|
|
||||||
|
if (isA<wallPolyPatch>(pp))
|
||||||
|
{
|
||||||
|
Up = U00 + m*(U - U00);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Up = (Cf - Cf00)/mesh_.time().deltaTValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mag(dn) > SMALL)
|
||||||
|
{
|
||||||
|
// Rotational motion, nw requires interpolation and a
|
||||||
|
// rotational velocity around face centre correction to Up
|
||||||
|
// is required.
|
||||||
|
|
||||||
|
nw = n00 + m*dn;
|
||||||
|
|
||||||
|
// Cf at tracking instant
|
||||||
|
vector Cfi = Cf00 + m*(Cf - Cf00);
|
||||||
|
|
||||||
|
// Normal vector cross product
|
||||||
|
vector omega = (n00 ^ n);
|
||||||
|
|
||||||
|
scalar magOmega = mag(omega);
|
||||||
|
|
||||||
|
// magOmega = sin(angle between unit normals)
|
||||||
|
// Normalise omega vector by magOmega, then multiply by
|
||||||
|
// angle/dt to give the correct angular velocity vector.
|
||||||
|
omega *= Foam::asin(magOmega)/(magOmega*mesh_.time().deltaTValue());
|
||||||
|
|
||||||
|
// Project position onto face and calculate this position
|
||||||
|
// relative to the face centre.
|
||||||
|
vector facePos =
|
||||||
|
p.position()
|
||||||
|
- ((p.position() - Cfi) & nw)*nw
|
||||||
|
- Cfi;
|
||||||
|
|
||||||
|
Up += (omega ^ facePos);
|
||||||
|
}
|
||||||
|
|
||||||
|
// No further action is required if the motion is
|
||||||
|
// translational only, nw and Up have already been set.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
void Foam::KinematicCloud<CloudType>::updateMesh()
|
||||||
|
{
|
||||||
|
injectors_.updateMesh();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::KinematicCloud<CloudType>::autoMap(const mapPolyMesh& mapper)
|
void Foam::KinematicCloud<CloudType>::autoMap(const mapPolyMesh& mapper)
|
||||||
{
|
{
|
||||||
@ -678,6 +831,8 @@ void Foam::KinematicCloud<CloudType>::autoMap(const mapPolyMesh& mapper)
|
|||||||
tdType td(*this);
|
tdType td(*this);
|
||||||
|
|
||||||
Cloud<parcelType>::template autoMap<tdType>(td, mapper);
|
Cloud<parcelType>::template autoMap<tdType>(td, mapper);
|
||||||
|
|
||||||
|
updateMesh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -554,9 +554,24 @@ public:
|
|||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
void motion(TrackData& td);
|
void motion(TrackData& td);
|
||||||
|
|
||||||
|
//- Calculate the patch normal and velocity to interact with,
|
||||||
|
// accounting for patch motion if required.
|
||||||
|
void patchData
|
||||||
|
(
|
||||||
|
const parcelType& p,
|
||||||
|
const polyPatch& pp,
|
||||||
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs,
|
||||||
|
vector& normal,
|
||||||
|
vector& Up
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Mapping
|
// Mapping
|
||||||
|
|
||||||
|
//- Update mesh
|
||||||
|
void updateMesh();
|
||||||
|
|
||||||
//- Remap the cells of particles corresponding to the
|
//- Remap the cells of particles corresponding to the
|
||||||
// mesh topology change with a default tracking data object
|
// mesh topology change with a default tracking data object
|
||||||
virtual void autoMap(const mapPolyMesh&);
|
virtual void autoMap(const mapPolyMesh&);
|
||||||
|
|||||||
@ -87,8 +87,6 @@ void Foam::ReactingCloud<CloudType>::cloudReset(ReactingCloud<CloudType>& c)
|
|||||||
|
|
||||||
compositionModel_.reset(c.compositionModel_.ptr());
|
compositionModel_.reset(c.compositionModel_.ptr());
|
||||||
phaseChangeModel_.reset(c.phaseChangeModel_.ptr());
|
phaseChangeModel_.reset(c.phaseChangeModel_.ptr());
|
||||||
|
|
||||||
dMassPhaseChange_ = c.dMassPhaseChange_;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -111,8 +109,7 @@ Foam::ReactingCloud<CloudType>::ReactingCloud
|
|||||||
constProps_(this->particleProperties(), this->solution().active()),
|
constProps_(this->particleProperties(), this->solution().active()),
|
||||||
compositionModel_(NULL),
|
compositionModel_(NULL),
|
||||||
phaseChangeModel_(NULL),
|
phaseChangeModel_(NULL),
|
||||||
rhoTrans_(thermo.carrier().species().size()),
|
rhoTrans_(thermo.carrier().species().size())
|
||||||
dMassPhaseChange_(0.0)
|
|
||||||
{
|
{
|
||||||
if (this->solution().active())
|
if (this->solution().active())
|
||||||
{
|
{
|
||||||
@ -167,8 +164,7 @@ Foam::ReactingCloud<CloudType>::ReactingCloud
|
|||||||
constProps_(c.constProps_),
|
constProps_(c.constProps_),
|
||||||
compositionModel_(c.compositionModel_->clone()),
|
compositionModel_(c.compositionModel_->clone()),
|
||||||
phaseChangeModel_(c.phaseChangeModel_->clone()),
|
phaseChangeModel_(c.phaseChangeModel_->clone()),
|
||||||
rhoTrans_(c.rhoTrans_.size()),
|
rhoTrans_(c.rhoTrans_.size())
|
||||||
dMassPhaseChange_(c.dMassPhaseChange_)
|
|
||||||
{
|
{
|
||||||
forAll(c.rhoTrans_, i)
|
forAll(c.rhoTrans_, i)
|
||||||
{
|
{
|
||||||
@ -209,8 +205,7 @@ Foam::ReactingCloud<CloudType>::ReactingCloud
|
|||||||
compositionModel_(c.compositionModel_->clone()),
|
compositionModel_(c.compositionModel_->clone()),
|
||||||
// compositionModel_(NULL),
|
// compositionModel_(NULL),
|
||||||
phaseChangeModel_(NULL),
|
phaseChangeModel_(NULL),
|
||||||
rhoTrans_(0),
|
rhoTrans_(0)
|
||||||
dMassPhaseChange_(0.0)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -350,6 +345,8 @@ void Foam::ReactingCloud<CloudType>::autoMap(const mapPolyMesh& mapper)
|
|||||||
tdType td(*this);
|
tdType td(*this);
|
||||||
|
|
||||||
Cloud<parcelType>::template autoMap<tdType>(td, mapper);
|
Cloud<parcelType>::template autoMap<tdType>(td, mapper);
|
||||||
|
|
||||||
|
this->updateMesh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -121,12 +121,6 @@ protected:
|
|||||||
PtrList<DimensionedField<scalar, volMesh> > rhoTrans_;
|
PtrList<DimensionedField<scalar, volMesh> > rhoTrans_;
|
||||||
|
|
||||||
|
|
||||||
// Check
|
|
||||||
|
|
||||||
//- Total mass transferred to continuous phase via phase change
|
|
||||||
scalar dMassPhaseChange_;
|
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
// New parcel helper functions
|
// New parcel helper functions
|
||||||
|
|||||||
@ -264,6 +264,8 @@ void Foam::ReactingMultiphaseCloud<CloudType>::autoMap
|
|||||||
tdType td(*this);
|
tdType td(*this);
|
||||||
|
|
||||||
Cloud<parcelType>::template autoMap<tdType>(td, mapper);
|
Cloud<parcelType>::template autoMap<tdType>(td, mapper);
|
||||||
|
|
||||||
|
this->updateMesh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,69 @@ void Foam::ThermoCloud<CloudType>::setModels()
|
|||||||
).ptr()
|
).ptr()
|
||||||
);
|
);
|
||||||
|
|
||||||
this->subModelProperties().lookup("radiation") >> radiation_;
|
if (this->solution().coupled())
|
||||||
|
{
|
||||||
|
this->subModelProperties().lookup("radiation") >> radiation_;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (radiation_)
|
||||||
|
{
|
||||||
|
radAreaP_.reset
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
this->name() + "::radAreaP",
|
||||||
|
this->db().time().timeName(),
|
||||||
|
this->db(),
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
this->mesh(),
|
||||||
|
dimensionedScalar("zero", dimArea, 0.0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
radT4_.reset
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
this->name() + "::radT4",
|
||||||
|
this->db().time().timeName(),
|
||||||
|
this->db(),
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
this->mesh(),
|
||||||
|
dimensionedScalar("zero", pow4(dimTemperature), 0.0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
radAreaPT4_.reset
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
this->name() + "::radAreaPT4",
|
||||||
|
this->db().time().timeName(),
|
||||||
|
this->db(),
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
this->mesh(),
|
||||||
|
dimensionedScalar
|
||||||
|
(
|
||||||
|
"zero",
|
||||||
|
sqr(dimLength)*pow4(dimTemperature),
|
||||||
|
0.0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -98,13 +160,16 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
|
|||||||
heatTransferModel_(NULL),
|
heatTransferModel_(NULL),
|
||||||
TIntegrator_(NULL),
|
TIntegrator_(NULL),
|
||||||
radiation_(false),
|
radiation_(false),
|
||||||
|
radAreaP_(NULL),
|
||||||
|
radT4_(NULL),
|
||||||
|
radAreaPT4_(NULL),
|
||||||
hsTrans_
|
hsTrans_
|
||||||
(
|
(
|
||||||
new DimensionedField<scalar, volMesh>
|
new DimensionedField<scalar, volMesh>
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
this->name() + "hsTrans",
|
this->name() + "::hsTrans",
|
||||||
this->db().time().timeName(),
|
this->db().time().timeName(),
|
||||||
this->db(),
|
this->db(),
|
||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
@ -120,7 +185,7 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
this->name() + "hsCoeff",
|
this->name() + "::hsCoeff",
|
||||||
this->db().time().timeName(),
|
this->db().time().timeName(),
|
||||||
this->db(),
|
this->db(),
|
||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
@ -165,13 +230,16 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
|
|||||||
heatTransferModel_(c.heatTransferModel_->clone()),
|
heatTransferModel_(c.heatTransferModel_->clone()),
|
||||||
TIntegrator_(c.TIntegrator_->clone()),
|
TIntegrator_(c.TIntegrator_->clone()),
|
||||||
radiation_(c.radiation_),
|
radiation_(c.radiation_),
|
||||||
|
radAreaP_(NULL),
|
||||||
|
radT4_(NULL),
|
||||||
|
radAreaPT4_(NULL),
|
||||||
hsTrans_
|
hsTrans_
|
||||||
(
|
(
|
||||||
new DimensionedField<scalar, volMesh>
|
new DimensionedField<scalar, volMesh>
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
this->name() + "hsTrans",
|
this->name() + "::hsTrans",
|
||||||
this->db().time().timeName(),
|
this->db().time().timeName(),
|
||||||
this->db(),
|
this->db(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
@ -187,7 +255,7 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
this->name() + "hsCoeff",
|
this->name() + "::hsCoeff",
|
||||||
this->db().time().timeName(),
|
this->db().time().timeName(),
|
||||||
this->db(),
|
this->db(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
@ -197,7 +265,61 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
|
|||||||
c.hsCoeff()
|
c.hsCoeff()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{}
|
{
|
||||||
|
if (radiation_)
|
||||||
|
{
|
||||||
|
radAreaP_.reset
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
this->name() + "::radAreaP",
|
||||||
|
this->db().time().timeName(),
|
||||||
|
this->db(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
c.radAreaP()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
radT4_.reset
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
this->name() + "::radT4",
|
||||||
|
this->db().time().timeName(),
|
||||||
|
this->db(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
c.radT4()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
radAreaPT4_.reset
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
this->name() + "::radAreaPT4",
|
||||||
|
this->db().time().timeName(),
|
||||||
|
this->db(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
c.radAreaPT4()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
@ -218,6 +340,9 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
|
|||||||
heatTransferModel_(NULL),
|
heatTransferModel_(NULL),
|
||||||
TIntegrator_(NULL),
|
TIntegrator_(NULL),
|
||||||
radiation_(false),
|
radiation_(false),
|
||||||
|
radAreaP_(NULL),
|
||||||
|
radT4_(NULL),
|
||||||
|
radAreaPT4_(NULL),
|
||||||
hsTrans_(NULL),
|
hsTrans_(NULL),
|
||||||
hsCoeff_(NULL)
|
hsCoeff_(NULL)
|
||||||
{}
|
{}
|
||||||
@ -285,6 +410,13 @@ void Foam::ThermoCloud<CloudType>::resetSourceTerms()
|
|||||||
CloudType::resetSourceTerms();
|
CloudType::resetSourceTerms();
|
||||||
hsTrans_->field() = 0.0;
|
hsTrans_->field() = 0.0;
|
||||||
hsCoeff_->field() = 0.0;
|
hsCoeff_->field() = 0.0;
|
||||||
|
|
||||||
|
if (radiation_)
|
||||||
|
{
|
||||||
|
radAreaP_->field() = 0.0;
|
||||||
|
radT4_->field() = 0.0;
|
||||||
|
radAreaPT4_->field() = 0.0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -298,6 +430,13 @@ void Foam::ThermoCloud<CloudType>::relaxSources
|
|||||||
|
|
||||||
this->relax(hsTrans_(), cloudOldTime.hsTrans(), "h");
|
this->relax(hsTrans_(), cloudOldTime.hsTrans(), "h");
|
||||||
this->relax(hsCoeff_(), cloudOldTime.hsCoeff(), "h");
|
this->relax(hsCoeff_(), cloudOldTime.hsCoeff(), "h");
|
||||||
|
|
||||||
|
if (radiation_)
|
||||||
|
{
|
||||||
|
this->relax(radAreaP_(), cloudOldTime.radAreaP(), "radiation");
|
||||||
|
this->relax(radT4_(), cloudOldTime.radT4(), "radiation");
|
||||||
|
this->relax(radAreaPT4_(), cloudOldTime.radAreaPT4(), "radiation");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -308,6 +447,13 @@ void Foam::ThermoCloud<CloudType>::scaleSources()
|
|||||||
|
|
||||||
this->scale(hsTrans_(), "h");
|
this->scale(hsTrans_(), "h");
|
||||||
this->scale(hsCoeff_(), "h");
|
this->scale(hsCoeff_(), "h");
|
||||||
|
|
||||||
|
if (radiation_)
|
||||||
|
{
|
||||||
|
this->scale(radAreaP_(), "radiation");
|
||||||
|
this->scale(radT4_(), "radiation");
|
||||||
|
this->scale(radAreaPT4_(), "radiation");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -341,6 +487,8 @@ void Foam::ThermoCloud<CloudType>::autoMap(const mapPolyMesh& mapper)
|
|||||||
tdType td(*this);
|
tdType td(*this);
|
||||||
|
|
||||||
Cloud<parcelType>::template autoMap<tdType>(td, mapper);
|
Cloud<parcelType>::template autoMap<tdType>(td, mapper);
|
||||||
|
|
||||||
|
this->updateMesh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -132,6 +132,15 @@ protected:
|
|||||||
//- Include radiation
|
//- Include radiation
|
||||||
Switch radiation_;
|
Switch radiation_;
|
||||||
|
|
||||||
|
//- Radiation sum of parcel projected areas
|
||||||
|
autoPtr<DimensionedField<scalar, volMesh> > radAreaP_;
|
||||||
|
|
||||||
|
//- Radiation sum of parcel temperature^4
|
||||||
|
autoPtr<DimensionedField<scalar, volMesh> > radT4_;
|
||||||
|
|
||||||
|
//- Radiation sum of parcel projected areas * temperature^4
|
||||||
|
autoPtr<DimensionedField<scalar, volMesh> > radAreaPT4_;
|
||||||
|
|
||||||
|
|
||||||
// Sources
|
// Sources
|
||||||
|
|
||||||
@ -244,6 +253,26 @@ public:
|
|||||||
//- Radiation flag
|
//- Radiation flag
|
||||||
inline bool radiation() const;
|
inline bool radiation() const;
|
||||||
|
|
||||||
|
//- Radiation sum of parcel projected areas [m2]
|
||||||
|
inline DimensionedField<scalar, volMesh>& radAreaP();
|
||||||
|
|
||||||
|
//- Radiation sum of parcel projected areas [m2]
|
||||||
|
inline const DimensionedField<scalar, volMesh>&
|
||||||
|
radAreaP() const;
|
||||||
|
|
||||||
|
//- Radiation sum of parcel temperature^4 [K4]
|
||||||
|
inline DimensionedField<scalar, volMesh>& radT4();
|
||||||
|
|
||||||
|
//- Radiation sum of parcel temperature^4 [K4]
|
||||||
|
inline const DimensionedField<scalar, volMesh>& radT4() const;
|
||||||
|
|
||||||
|
//- Radiation sum of parcel projected area*temperature^4 [m2K4]
|
||||||
|
inline DimensionedField<scalar, volMesh>& radAreaPT4();
|
||||||
|
|
||||||
|
//- Radiation sum of parcel temperature^4 [m2K4]
|
||||||
|
inline const DimensionedField<scalar, volMesh>&
|
||||||
|
radAreaPT4() const;
|
||||||
|
|
||||||
|
|
||||||
// Sources
|
// Sources
|
||||||
|
|
||||||
|
|||||||
@ -89,6 +89,114 @@ inline bool Foam::ThermoCloud<CloudType>::radiation() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
|
Foam::ThermoCloud<CloudType>::radAreaP()
|
||||||
|
{
|
||||||
|
if (!radiation_)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"inline Foam::DimensionedField<Foam::scalar, Foam::volMesh> "
|
||||||
|
"Foam::ThermoCloud<CloudType>::radAreaP()"
|
||||||
|
) << "Radiation field requested, but radiation model not active"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return radAreaP_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
|
Foam::ThermoCloud<CloudType>::radAreaP() const
|
||||||
|
{
|
||||||
|
if (!radiation_)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"inline Foam::DimensionedField<Foam::scalar, Foam::volMesh> "
|
||||||
|
"Foam::ThermoCloud<CloudType>::radAreaP()"
|
||||||
|
) << "Radiation field requested, but radiation model not active"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return radAreaP_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
|
Foam::ThermoCloud<CloudType>::radT4()
|
||||||
|
{
|
||||||
|
if (!radiation_)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"inline Foam::DimensionedField<Foam::scalar, Foam::volMesh> "
|
||||||
|
"Foam::ThermoCloud<CloudType>::radT4()"
|
||||||
|
) << "Radiation field requested, but radiation model not active"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return radT4_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
|
Foam::ThermoCloud<CloudType>::radT4() const
|
||||||
|
{
|
||||||
|
if (!radiation_)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"inline Foam::DimensionedField<Foam::scalar, Foam::volMesh> "
|
||||||
|
"Foam::ThermoCloud<CloudType>::radT4()"
|
||||||
|
) << "Radiation field requested, but radiation model not active"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return radT4_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
|
Foam::ThermoCloud<CloudType>::radAreaPT4()
|
||||||
|
{
|
||||||
|
if (!radiation_)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"inline Foam::DimensionedField<Foam::scalar, Foam::volMesh> "
|
||||||
|
"Foam::ThermoCloud<CloudType>::radAreaPT4()"
|
||||||
|
) << "Radiation field requested, but radiation model not active"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return radAreaPT4_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
|
Foam::ThermoCloud<CloudType>::radAreaPT4() const
|
||||||
|
{
|
||||||
|
if (!radiation_)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"inline Foam::DimensionedField<Foam::scalar, Foam::volMesh> "
|
||||||
|
"Foam::ThermoCloud<CloudType>::radAreaPT4()"
|
||||||
|
) << "Radiation field requested, but radiation model not active"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return radAreaPT4_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
Foam::ThermoCloud<CloudType>::hsTrans()
|
Foam::ThermoCloud<CloudType>::hsTrans()
|
||||||
@ -182,21 +290,15 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::Ep() const
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Need to check if coupled as field is created on-the-fly
|
if (radiation_)
|
||||||
if (radiation_ && this->solution().coupled())
|
|
||||||
{
|
{
|
||||||
scalarField& Ep = tEp().internalField();
|
scalarField& Ep = tEp().internalField();
|
||||||
|
const scalar dt = this->db().time().deltaTValue();
|
||||||
const scalarField& V = this->mesh().V();
|
const scalarField& V = this->mesh().V();
|
||||||
const scalar epsilon = constProps_.epsilon0();
|
const scalar epsilon = constProps_.epsilon0();
|
||||||
|
const scalarField& sumAreaPT4 = radAreaPT4_->field();
|
||||||
|
|
||||||
forAllConstIter(typename ThermoCloud<CloudType>, *this, iter)
|
Ep = sumAreaPT4*epsilon*physicoChemical::sigma.value()/V/dt;
|
||||||
{
|
|
||||||
const parcelType& p = iter();
|
|
||||||
const label cellI = p.cell();
|
|
||||||
Ep[cellI] += p.nParticle()*p.areaP()*pow4(p.T());
|
|
||||||
}
|
|
||||||
|
|
||||||
Ep *= epsilon*physicoChemical::sigma.value()/V;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return tEp;
|
return tEp;
|
||||||
@ -224,21 +326,15 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::ap() const
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Need to check if coupled as field is created on-the-fly
|
if (radiation_)
|
||||||
if (radiation_ && this->solution().coupled())
|
|
||||||
{
|
{
|
||||||
scalarField& ap = tap().internalField();
|
scalarField& ap = tap().internalField();
|
||||||
|
const scalar dt = this->db().time().deltaTValue();
|
||||||
const scalarField& V = this->mesh().V();
|
const scalarField& V = this->mesh().V();
|
||||||
const scalar epsilon = constProps_.epsilon0();
|
const scalar epsilon = constProps_.epsilon0();
|
||||||
|
const scalarField& sumAreaP = radAreaP_->field();
|
||||||
|
|
||||||
forAllConstIter(typename ThermoCloud<CloudType>, *this, iter)
|
ap = sumAreaP*epsilon/V/dt;
|
||||||
{
|
|
||||||
const parcelType& p = iter();
|
|
||||||
const label cellI = p.cell();
|
|
||||||
ap[cellI] += p.nParticle()*p.areaP();
|
|
||||||
}
|
|
||||||
|
|
||||||
ap *= epsilon/V;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return tap;
|
return tap;
|
||||||
@ -267,23 +363,16 @@ Foam::ThermoCloud<CloudType>::sigmap() const
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Need to check if coupled as field is created on-the-fly
|
if (radiation_)
|
||||||
if (radiation_ && this->solution().coupled())
|
|
||||||
{
|
{
|
||||||
scalarField& sigmap = tsigmap().internalField();
|
scalarField& sigmap = tsigmap().internalField();
|
||||||
|
const scalar dt = this->db().time().deltaTValue();
|
||||||
const scalarField& V = this->mesh().V();
|
const scalarField& V = this->mesh().V();
|
||||||
const scalar epsilon = constProps_.epsilon0();
|
const scalar epsilon = constProps_.epsilon0();
|
||||||
const scalar f = constProps_.f0();
|
const scalar f = constProps_.f0();
|
||||||
|
const scalarField& sumAreaP = radAreaP_->field();
|
||||||
|
|
||||||
forAllConstIter(typename ThermoCloud<CloudType>, *this, iter)
|
sigmap *= sumAreaP*(1.0 - f)*(1.0 - epsilon)/V/dt;
|
||||||
{
|
|
||||||
const parcelType& p = iter();
|
|
||||||
const label cellI = p.cell();
|
|
||||||
sigmap[cellI] += p.nParticle()*p.areaP();
|
|
||||||
}
|
|
||||||
|
|
||||||
sigmap *= (1.0 - f)*(1.0 - epsilon)/V;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return tsigmap;
|
return tsigmap;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -363,7 +363,7 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
|||||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||||
|
|
||||||
// Invoke post-processing model
|
// Invoke post-processing model
|
||||||
td.cloud().functions().postPatch(p, patchI, pp.whichFace(p.face()));
|
td.cloud().functions().postPatch(p, pp, trackFraction, tetIs);
|
||||||
|
|
||||||
// Invoke surface film model
|
// Invoke surface film model
|
||||||
if (td.cloud().surfaceFilm().transferParcel(p, pp, td.keepParticle))
|
if (td.cloud().surfaceFilm().transferParcel(p, pp, td.keepParticle))
|
||||||
|
|||||||
@ -268,12 +268,15 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
(
|
(
|
||||||
td,
|
td,
|
||||||
dt,
|
dt,
|
||||||
|
this->age_,
|
||||||
Ts,
|
Ts,
|
||||||
d0,
|
d0,
|
||||||
T0,
|
T0,
|
||||||
mass0,
|
mass0,
|
||||||
this->mass0_,
|
this->mass0_,
|
||||||
YMix[GAS]*YGas_,
|
YMix[GAS]*YGas_,
|
||||||
|
YMix[LIQ]*YLiquid_,
|
||||||
|
YMix[SLD]*YSolid_,
|
||||||
canCombust_,
|
canCombust_,
|
||||||
dMassDV,
|
dMassDV,
|
||||||
Sh,
|
Sh,
|
||||||
@ -466,6 +469,16 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
// Update sensible enthalpy transfer
|
// Update sensible enthalpy transfer
|
||||||
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
||||||
td.cloud().hsCoeff()[cellI] += np0*Sph;
|
td.cloud().hsCoeff()[cellI] += np0*Sph;
|
||||||
|
|
||||||
|
// Update radiation fields
|
||||||
|
if (td.cloud().radiation())
|
||||||
|
{
|
||||||
|
const scalar ap = this->areaP();
|
||||||
|
const scalar T4 = pow4(this->T_);
|
||||||
|
td.cloud().radAreaP()[cellI] += dt*np0*ap;
|
||||||
|
td.cloud().radT4()[cellI] += dt*np0*T4;
|
||||||
|
td.cloud().radAreaP()[cellI] += dt*np0*ap*T4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -476,12 +489,15 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
|||||||
(
|
(
|
||||||
TrackData& td,
|
TrackData& td,
|
||||||
const scalar dt,
|
const scalar dt,
|
||||||
|
const scalar age,
|
||||||
const scalar Ts,
|
const scalar Ts,
|
||||||
const scalar d,
|
const scalar d,
|
||||||
const scalar T,
|
const scalar T,
|
||||||
const scalar mass,
|
const scalar mass,
|
||||||
const scalar mass0,
|
const scalar mass0,
|
||||||
const scalarField& YGasEff,
|
const scalarField& YGasEff,
|
||||||
|
const scalarField& YLiquidEff,
|
||||||
|
const scalarField& YSolidEff,
|
||||||
bool& canCombust,
|
bool& canCombust,
|
||||||
scalarField& dMassDV,
|
scalarField& dMassDV,
|
||||||
scalar& Sh,
|
scalar& Sh,
|
||||||
@ -510,10 +526,13 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
|||||||
td.cloud().devolatilisation().calculate
|
td.cloud().devolatilisation().calculate
|
||||||
(
|
(
|
||||||
dt,
|
dt,
|
||||||
|
age,
|
||||||
mass0,
|
mass0,
|
||||||
mass,
|
mass,
|
||||||
T,
|
T,
|
||||||
YGasEff,
|
YGasEff,
|
||||||
|
YLiquidEff,
|
||||||
|
YSolidEff,
|
||||||
canCombust,
|
canCombust,
|
||||||
dMassDV
|
dMassDV
|
||||||
);
|
);
|
||||||
@ -638,7 +657,8 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
|||||||
ParcelType(p),
|
ParcelType(p),
|
||||||
YGas_(p.YGas_),
|
YGas_(p.YGas_),
|
||||||
YLiquid_(p.YLiquid_),
|
YLiquid_(p.YLiquid_),
|
||||||
YSolid_(p.YSolid_)
|
YSolid_(p.YSolid_),
|
||||||
|
canCombust_(p.canCombust_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -652,7 +672,8 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
|||||||
ParcelType(p, mesh),
|
ParcelType(p, mesh),
|
||||||
YGas_(p.YGas_),
|
YGas_(p.YGas_),
|
||||||
YLiquid_(p.YLiquid_),
|
YLiquid_(p.YLiquid_),
|
||||||
YSolid_(p.YSolid_)
|
YSolid_(p.YSolid_),
|
||||||
|
canCombust_(p.canCombust_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -196,12 +196,15 @@ protected:
|
|||||||
(
|
(
|
||||||
TrackData& td,
|
TrackData& td,
|
||||||
const scalar dt, // timestep
|
const scalar dt, // timestep
|
||||||
const scalar Ts, // Surface temperature
|
const scalar age, // age
|
||||||
|
const scalar Ts, // surface temperature
|
||||||
const scalar d, // diameter
|
const scalar d, // diameter
|
||||||
const scalar T, // temperature
|
const scalar T, // temperature
|
||||||
const scalar mass, // mass
|
const scalar mass, // mass
|
||||||
const scalar mass0, // mass (initial on injection)
|
const scalar mass0, // mass (initial on injection)
|
||||||
const scalarField& YGasEff,// Gas component mass fractions
|
const scalarField& YGasEff,// gas component mass fractions
|
||||||
|
const scalarField& YLiquidEff,// liquid component mass fractions
|
||||||
|
const scalarField& YSolidEff,// solid component mass fractions
|
||||||
bool& canCombust, // 'can combust' flag
|
bool& canCombust, // 'can combust' flag
|
||||||
scalarField& dMassDV, // mass transfer - local to particle
|
scalarField& dMassDV, // mass transfer - local to particle
|
||||||
scalar& Sh, // explicit particle enthalpy source
|
scalar& Sh, // explicit particle enthalpy source
|
||||||
|
|||||||
@ -458,6 +458,16 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
// Update sensible enthalpy transfer
|
// Update sensible enthalpy transfer
|
||||||
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
||||||
td.cloud().hsCoeff()[cellI] += np0*Sph;
|
td.cloud().hsCoeff()[cellI] += np0*Sph;
|
||||||
|
|
||||||
|
// Update radiation fields
|
||||||
|
if (td.cloud().radiation())
|
||||||
|
{
|
||||||
|
const scalar ap = this->areaP();
|
||||||
|
const scalar T4 = pow4(this->T_);
|
||||||
|
td.cloud().radAreaP()[cellI] += dt*np0*ap;
|
||||||
|
td.cloud().radT4()[cellI] += dt*np0*T4;
|
||||||
|
td.cloud().radAreaP()[cellI] += dt*np0*ap*T4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -144,7 +144,7 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
|
|||||||
Ts = td.cloud().constProps().TMin();
|
Ts = td.cloud().constProps().TMin();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assuming thermo props vary linearly with T for small dT
|
// Assuming thermo props vary linearly with T for small d(T)
|
||||||
const scalar TRatio = Tc_/Ts;
|
const scalar TRatio = Tc_/Ts;
|
||||||
|
|
||||||
rhos = this->rhoc_*TRatio;
|
rhos = this->rhoc_*TRatio;
|
||||||
@ -252,6 +252,16 @@ void Foam::ThermoParcel<ParcelType>::calc
|
|||||||
|
|
||||||
// Update sensible enthalpy coefficient
|
// Update sensible enthalpy coefficient
|
||||||
td.cloud().hsCoeff()[cellI] += np0*Sph;
|
td.cloud().hsCoeff()[cellI] += np0*Sph;
|
||||||
|
|
||||||
|
// Update radiation fields
|
||||||
|
if (td.cloud().radiation())
|
||||||
|
{
|
||||||
|
const scalar ap = this->areaP();
|
||||||
|
const scalar T4 = pow4(this->T_);
|
||||||
|
td.cloud().radAreaP()[cellI] += dt*np0*ap;
|
||||||
|
td.cloud().radT4()[cellI] += dt*np0*T4;
|
||||||
|
td.cloud().radAreaP()[cellI] += dt*np0*ap*T4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,7 +37,7 @@ License
|
|||||||
#include "ManualInjection.H"
|
#include "ManualInjection.H"
|
||||||
#include "NoInjection.H"
|
#include "NoInjection.H"
|
||||||
#include "PatchInjection.H"
|
#include "PatchInjection.H"
|
||||||
|
#include "PatchFlowRateInjection.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -53,7 +53,8 @@ License
|
|||||||
makeInjectionModelType(KinematicLookupTableInjection, CloudType); \
|
makeInjectionModelType(KinematicLookupTableInjection, CloudType); \
|
||||||
makeInjectionModelType(ManualInjection, CloudType); \
|
makeInjectionModelType(ManualInjection, CloudType); \
|
||||||
makeInjectionModelType(NoInjection, CloudType); \
|
makeInjectionModelType(NoInjection, CloudType); \
|
||||||
makeInjectionModelType(PatchInjection, CloudType);
|
makeInjectionModelType(PatchInjection, CloudType); \
|
||||||
|
makeInjectionModelType(PatchFlowRateInjection, CloudType);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -35,6 +35,7 @@ License
|
|||||||
#include "ManualInjection.H"
|
#include "ManualInjection.H"
|
||||||
#include "NoInjection.H"
|
#include "NoInjection.H"
|
||||||
#include "PatchInjection.H"
|
#include "PatchInjection.H"
|
||||||
|
#include "PatchFlowRateInjection.H"
|
||||||
#include "ReactingMultiphaseLookupTableInjection.H"
|
#include "ReactingMultiphaseLookupTableInjection.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -49,6 +50,7 @@ License
|
|||||||
makeInjectionModelType(ManualInjection, CloudType); \
|
makeInjectionModelType(ManualInjection, CloudType); \
|
||||||
makeInjectionModelType(NoInjection, CloudType); \
|
makeInjectionModelType(NoInjection, CloudType); \
|
||||||
makeInjectionModelType(PatchInjection, CloudType); \
|
makeInjectionModelType(PatchInjection, CloudType); \
|
||||||
|
makeInjectionModelType(PatchFlowRateInjection, CloudType); \
|
||||||
makeInjectionModelType(ReactingMultiphaseLookupTableInjection, CloudType);
|
makeInjectionModelType(ReactingMultiphaseLookupTableInjection, CloudType);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -35,6 +35,7 @@ License
|
|||||||
#include "ManualInjection.H"
|
#include "ManualInjection.H"
|
||||||
#include "NoInjection.H"
|
#include "NoInjection.H"
|
||||||
#include "PatchInjection.H"
|
#include "PatchInjection.H"
|
||||||
|
#include "PatchFlowRateInjection.H"
|
||||||
#include "ReactingLookupTableInjection.H"
|
#include "ReactingLookupTableInjection.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -49,6 +50,7 @@ License
|
|||||||
makeInjectionModelType(ManualInjection, CloudType); \
|
makeInjectionModelType(ManualInjection, CloudType); \
|
||||||
makeInjectionModelType(NoInjection, CloudType); \
|
makeInjectionModelType(NoInjection, CloudType); \
|
||||||
makeInjectionModelType(PatchInjection, CloudType); \
|
makeInjectionModelType(PatchInjection, CloudType); \
|
||||||
|
makeInjectionModelType(PatchFlowRateInjection, CloudType); \
|
||||||
makeInjectionModelType(ReactingLookupTableInjection, CloudType);
|
makeInjectionModelType(ReactingLookupTableInjection, CloudType);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -107,8 +107,9 @@ template<class CloudType>
|
|||||||
void Foam::CloudFunctionObject<CloudType>::postPatch
|
void Foam::CloudFunctionObject<CloudType>::postPatch
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType&,
|
const typename CloudType::parcelType&,
|
||||||
const label,
|
const polyPatch&,
|
||||||
const label
|
const scalar,
|
||||||
|
const tetIndices&
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -141,8 +141,9 @@ public:
|
|||||||
virtual void postPatch
|
virtual void postPatch
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p,
|
const typename CloudType::parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& testIs
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Post-face hook
|
//- Post-face hook
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -146,13 +146,14 @@ template<class CloudType>
|
|||||||
void Foam::CloudFunctionObjectList<CloudType>::postPatch
|
void Foam::CloudFunctionObjectList<CloudType>::postPatch
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p,
|
const typename CloudType::parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
this->operator[](i).postPatch(p, patchI, patchFaceI);
|
this->operator[](i).postPatch(p, pp, trackFraction, tetIs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -121,8 +121,9 @@ public:
|
|||||||
virtual void postPatch
|
virtual void postPatch
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p,
|
const typename CloudType::parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Post-face hook
|
//- Post-face hook
|
||||||
|
|||||||
@ -166,29 +166,32 @@ template<class CloudType>
|
|||||||
void Foam::ParticleErosion<CloudType>::postPatch
|
void Foam::ParticleErosion<CloudType>::postPatch
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const label patchI = pp.index();
|
||||||
|
|
||||||
const label localPatchI = applyToPatch(patchI);
|
const label localPatchI = applyToPatch(patchI);
|
||||||
|
|
||||||
if (localPatchI != -1)
|
if (localPatchI != -1)
|
||||||
{
|
{
|
||||||
const fvMesh& mesh = this->owner().mesh();
|
vector nw;
|
||||||
|
vector Up;
|
||||||
|
|
||||||
// patch-normal direction
|
// patch-normal direction
|
||||||
vector nw = p.currentTetIndices().faceTri(mesh).normal();
|
this->owner().patchData(p, pp, trackFraction, tetIs, nw, Up);
|
||||||
|
|
||||||
// particle direction of travel
|
// particle velocity reletive to patch
|
||||||
const vector& U = p.U();
|
const vector& U = p.U() - Up;
|
||||||
|
|
||||||
// quick reject if particle travelling away from the patch
|
// quick reject if particle travelling away from the patch
|
||||||
if ((-nw & U) < 0)
|
if ((nw & U) < 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nw /= mag(nw);
|
|
||||||
const scalar magU = mag(U);
|
const scalar magU = mag(U);
|
||||||
const vector Udir = U/magU;
|
const vector Udir = U/magU;
|
||||||
|
|
||||||
@ -197,6 +200,7 @@ void Foam::ParticleErosion<CloudType>::postPatch
|
|||||||
|
|
||||||
const scalar coeff = p.nParticle()*p.mass()*sqr(magU)/(p_*psi_*K_);
|
const scalar coeff = p.nParticle()*p.mass()*sqr(magU)/(p_*psi_*K_);
|
||||||
|
|
||||||
|
const label patchFaceI = pp.whichFace(p.face());
|
||||||
scalar& Q = QPtr_->boundaryField()[patchI][patchFaceI];
|
scalar& Q = QPtr_->boundaryField()[patchI][patchFaceI];
|
||||||
if (tan(alpha) < K_/6.0)
|
if (tan(alpha) < K_/6.0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -126,8 +126,9 @@ public:
|
|||||||
virtual void postPatch
|
virtual void postPatch
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -218,11 +218,14 @@ template<class CloudType>
|
|||||||
void Foam::PatchPostProcessing<CloudType>::postPatch
|
void Foam::PatchPostProcessing<CloudType>::postPatch
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label
|
const scalar,
|
||||||
|
const tetIndices& tetIs
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const label patchI = pp.index();
|
||||||
const label localPatchI = applyToPatch(patchI);
|
const label localPatchI = applyToPatch(patchI);
|
||||||
|
|
||||||
if (localPatchI != -1 && patchData_[localPatchI].size() < maxStoredParcels_)
|
if (localPatchI != -1 && patchData_[localPatchI].size() < maxStoredParcels_)
|
||||||
{
|
{
|
||||||
times_[localPatchI].append(this->owner().time().value());
|
times_[localPatchI].append(this->owner().time().value());
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -127,8 +127,9 @@ public:
|
|||||||
virtual void postPatch
|
virtual void postPatch
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -306,8 +306,9 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
|||||||
this->owner().functions().postPatch
|
this->owner().functions().postPatch
|
||||||
(
|
(
|
||||||
p,
|
p,
|
||||||
patchI,
|
mesh.boundaryMesh()[patchI],
|
||||||
patchFaceI
|
1.0,
|
||||||
|
p.currentTetIndices()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user