mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Added ddtPhiCorr back into the pEqn, use if wisely.
This commit is contained in:
@ -55,7 +55,7 @@ else
|
|||||||
fvc::interpolate(rho)*
|
fvc::interpolate(rho)*
|
||||||
(
|
(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
//+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
);
|
);
|
||||||
|
|
||||||
//bool closedVolume = adjustPhi(phi, U, p);
|
//bool closedVolume = adjustPhi(phi, U, p);
|
||||||
|
|||||||
@ -34,7 +34,7 @@ if (transonic)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
phi =
|
phi =
|
||||||
fvc::interpolate(rho)*
|
fvc::interpolate(rho)*
|
||||||
(
|
(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
|
|||||||
@ -60,12 +60,11 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
# include "readControls.H"
|
# include "readControls.H"
|
||||||
# include "CourantNo.H"
|
# include "CourantNo.H"
|
||||||
|
# include "setDeltaT.H"
|
||||||
|
|
||||||
// Make the fluxes absolute
|
// Make the fluxes absolute
|
||||||
fvc::makeAbsolute(phi, U);
|
fvc::makeAbsolute(phi, U);
|
||||||
|
|
||||||
# include "setDeltaT.H"
|
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|||||||
@ -8,7 +8,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/sampling/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-linterfaceProperties \
|
-linterfaceProperties \
|
||||||
@ -18,5 +19,7 @@ EXE_LIBS = \
|
|||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldynamicFvMesh
|
-ldynamicFvMesh \
|
||||||
|
-lsampling
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,9 @@
|
|||||||
surfaceScalarField phic = mag(phi/mesh.magSf());
|
surfaceScalarField phic = mag(phi/mesh.magSf());
|
||||||
phic = min(interface.cAlpha()*phic, max(phic));
|
phic = min(interface.cAlpha()*phic, max(phic));
|
||||||
|
|
||||||
|
fvc::makeAbsolute(phi, U);
|
||||||
volScalarField divU = fvc::div(phi);
|
volScalarField divU = fvc::div(phi);
|
||||||
|
fvc::makeRelative(phi, U);
|
||||||
|
|
||||||
if (nAlphaSubCycles > 1)
|
if (nAlphaSubCycles > 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -42,6 +42,7 @@ Description
|
|||||||
#include "interfaceProperties.H"
|
#include "interfaceProperties.H"
|
||||||
#include "twoPhaseMixture.H"
|
#include "twoPhaseMixture.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
|
#include "probes.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -64,12 +65,11 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "readControls.H"
|
#include "readControls.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
// Make the fluxes absolute
|
// Make the fluxes absolute
|
||||||
fvc::makeAbsolute(phi, U);
|
fvc::makeAbsolute(phi, U);
|
||||||
|
|
||||||
#include "setDeltaT.H"
|
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
fvm::laplacian(rAUf, pcorr) == fvc::div(phi) - divU
|
fvm::laplacian(rAUf, pcorr) == fvc::div(phi) - divU
|
||||||
);
|
);
|
||||||
|
|
||||||
|
pcorrEqn.setReference(0, 0);
|
||||||
pcorrEqn.solve();
|
pcorrEqn.solve();
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
surfaceScalarField phiU
|
surfaceScalarField phiU
|
||||||
(
|
(
|
||||||
"phiU",
|
"phiU",
|
||||||
(fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi)
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
);
|
);
|
||||||
|
|
||||||
phi = phiU +
|
phi = phiU +
|
||||||
|
|||||||
@ -65,12 +65,11 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "readControls.H"
|
#include "readControls.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
// Make the fluxes absolute
|
// Make the fluxes absolute
|
||||||
fvc::makeAbsolute(phi, U);
|
fvc::makeAbsolute(phi, U);
|
||||||
|
|
||||||
#include "setDeltaT.H"
|
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user