mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: rhoSimpleFoam - updated handling of generic sources
This commit is contained in:
@ -4,6 +4,8 @@
|
|||||||
(
|
(
|
||||||
fvm::div(phi, U)
|
fvm::div(phi, U)
|
||||||
+ turbulence->divDevRhoReff(U)
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
==
|
||||||
|
sources(rho, U)
|
||||||
);
|
);
|
||||||
|
|
||||||
UEqn().relax();
|
UEqn().relax();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
volScalarField rAU(1.0/UEqn().A());
|
volScalarField rAU(1.0/UEqn().A());
|
||||||
volVectorField HbyA("HbyA", U);
|
volVectorField HbyA("HbyA", U);
|
||||||
HbyA = rAU*(UEqn() == sources(rho, U))().H();
|
HbyA = rAU*UEqn().H();
|
||||||
|
|
||||||
UEqn.clear();
|
UEqn.clear();
|
||||||
|
|
||||||
@ -20,6 +20,8 @@
|
|||||||
fvc::interpolate(psi)*(fvc::interpolate(HbyA) & mesh.Sf())
|
fvc::interpolate(psi)*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
sources.relativeFlux(fvc::interpolate(psi), phid);
|
||||||
|
|
||||||
while (simple.correctNonOrthogonal())
|
while (simple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
@ -53,6 +55,8 @@
|
|||||||
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
|
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||||
|
|
||||||
closedVolume = adjustPhi(phiHbyA, U, p);
|
closedVolume = adjustPhi(phiHbyA, U, p);
|
||||||
|
|
||||||
while (simple.correctNonOrthogonal())
|
while (simple.correctNonOrthogonal())
|
||||||
|
|||||||
Reference in New Issue
Block a user