mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
update
This commit is contained in:
@ -5,10 +5,13 @@
|
|||||||
U = rUA*UEqn().H();
|
U = rUA*UEqn().H();
|
||||||
UEqn.clear();
|
UEqn.clear();
|
||||||
|
|
||||||
phi =
|
surfaceScalarField phiU
|
||||||
|
(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rUA, U, phi)
|
+ fvc::ddtPhiCorr(rUA, U, phi)
|
||||||
+ betaghf*fvc::snGrad(T)*rUAf*mesh.magSf();
|
);
|
||||||
|
|
||||||
|
phi = phiU + betaghf*fvc::snGrad(T)*rUAf*mesh.magSf();
|
||||||
|
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
@ -17,8 +20,7 @@
|
|||||||
fvm::laplacian(rUAf, pd) == fvc::div(phi)
|
fvm::laplacian(rUAf, pd) == fvc::div(phi)
|
||||||
);
|
);
|
||||||
|
|
||||||
// retain the residual from the first iteration
|
if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
|
||||||
if (nonOrth == 0)
|
|
||||||
{
|
{
|
||||||
pdEqn.solve(mesh.solver(pd.name() + "Final"));
|
pdEqn.solve(mesh.solver(pd.name() + "Final"));
|
||||||
}
|
}
|
||||||
@ -29,17 +31,12 @@
|
|||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
if (nonOrth == nNonOrthCorr)
|
||||||
{
|
{
|
||||||
// Calculate the conservative fluxes
|
phi += pdEqn.flux();
|
||||||
phi -= pdEqn.flux();
|
|
||||||
|
|
||||||
// Correct the momentum source with the pressure gradient flux
|
|
||||||
// calculated from the relaxed pressure
|
|
||||||
U -=
|
|
||||||
rUA
|
|
||||||
*fvc::reconstruct((pdEqn.flux() - betaghf*fvc::snGrad(T))/rUAf);
|
|
||||||
U.correctBoundaryConditions();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
#include "continuityErrs.H"
|
#include "continuityErrs.H"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user