mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
Buoyant solvers: changed the sign of phig to be consistent with the sign of the buoyancy force on the RHS of UEqn
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
HbyA = rAU*UEqn().H();
|
||||
UEqn.clear();
|
||||
|
||||
surfaceScalarField phig(rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
|
||||
surfaceScalarField phig(-rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
|
||||
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
adjustPhi(phiHbyA, U, p_rgh);
|
||||
|
||||
phiHbyA -= phig;
|
||||
phiHbyA += phig;
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
// Correct the momentum source with the pressure gradient flux
|
||||
// calculated from the relaxed pressure
|
||||
U = HbyA - rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf);
|
||||
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
HbyA = rAU*UEqn().H();
|
||||
UEqn.clear();
|
||||
|
||||
surfaceScalarField phig(rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
|
||||
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
|
||||
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
bool closedVolume = adjustPhi(phiHbyA, U, p_rgh);
|
||||
|
||||
phiHbyA -= phig;
|
||||
phiHbyA += phig;
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
// Correct the momentum source with the pressure gradient flux
|
||||
// calculated from the relaxed pressure
|
||||
U = HbyA - rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf);
|
||||
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rhorAUf);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user