Skip to content

Commit

Permalink
reactingFoam, rhoPorousSimpleFoam, chtMultiRegionFoam, reactingParcel…
Browse files Browse the repository at this point in the history
…Foam, sprayFoam: Updated the handling of HbyA

Changed the interpolation of HbyA from

    fvc::flux(rho*HbyA)

to

    fvc::interpolate(rho)*fvc::flux(HbyA)

for consistency with the latest compressible p-U algorithm in rhoPimpleFoam.

For most cases this change does not affect the results but test on highly
compressible, transonic and supersonic cases have shown a small but clear
benefit in the new form.
  • Loading branch information
Henry Weller committed Oct 2, 2019
1 parent c32d7ea commit ebc4649
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion applications/solvers/combustion/reactingFoam/pEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ else
(
"phiHbyA",
(
fvc::flux(rho*HbyA)
fvc::interpolate(rho)*fvc::flux(HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
)
);
Expand Down
2 changes: 1 addition & 1 deletion applications/solvers/combustion/reactingFoam/pcEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ else
(
"phiHbyA",
(
fvc::flux(rho*HbyA)
fvc::interpolate(rho)*fvc::flux(HbyA)
+ MRF.zeroFilter(fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi))
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ surfaceScalarField phiHbyA
(
"phiHbyA",
(
fvc::flux(rho*HbyA)
fvc::interpolate(rho)*fvc::flux(HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
)
+ phig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@

bool closedVolume = false;

surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rho)*fvc::flux(HbyA)
);
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);

closedVolume = adjustPhi(phiHbyA, U, p);
Expand Down
2 changes: 1 addition & 1 deletion applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ surfaceScalarField phiHbyA
(
"phiHbyA",
(
fvc::flux(rho*HbyA)
fvc::interpolate(rho)*fvc::flux(HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
)
+ phig
Expand Down
2 changes: 1 addition & 1 deletion applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::flux(rho*HbyA)
fvc::interpolate(rho)*fvc::flux(HbyA)
);

MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::flux(rho*HbyA)
fvc::interpolate(rho)*fvc::flux(HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
);

Expand Down
2 changes: 1 addition & 1 deletion applications/solvers/lagrangian/reactingParcelFoam/pEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ surfaceScalarField phiHbyA
(
"phiHbyA",
(
fvc::flux(rho*HbyA)
fvc::interpolate(rho)*fvc::flux(HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
)
+ phig
Expand Down
2 changes: 1 addition & 1 deletion applications/solvers/lagrangian/sprayFoam/pEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ else
surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::flux(rho*HbyA)
fvc::interpolate(rho)*fvc::flux(HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi, rhoUf))
);

Expand Down

0 comments on commit ebc4649

Please sign in to comment.