mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
minor mods:
- added pdFinal option
- labelled muf - grad(muf) used, so can now manipulate in fvSolution etc
- added absolute/relative around the calculation of divU
This commit is contained in:
@ -1,6 +1,9 @@
|
|||||||
surfaceScalarField muf =
|
surfaceScalarField muf
|
||||||
|
(
|
||||||
|
"muf",
|
||||||
twoPhaseProperties.muf()
|
twoPhaseProperties.muf()
|
||||||
+ fvc::interpolate(rho*turbulence->nut());
|
+ fvc::interpolate(rho*turbulence->nut())
|
||||||
|
);
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
- ghf*fvc::snGrad(rho)
|
- ghf*fvc::snGrad(rho)
|
||||||
)*rUAf*mesh.magSf();
|
)*rUAf*mesh.magSf();
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pdEqnIncomp
|
fvScalarMatrix pdEqnIncomp
|
||||||
(
|
(
|
||||||
@ -38,15 +38,36 @@
|
|||||||
- fvm::laplacian(rUAf, pd)
|
- fvm::laplacian(rUAf, pd)
|
||||||
);
|
);
|
||||||
|
|
||||||
solve
|
if
|
||||||
(
|
(
|
||||||
|
oCorr == nOuterCorr-1
|
||||||
|
&& corr == nCorr-1
|
||||||
|
&& nonOrth == nNonOrthCorr
|
||||||
|
)
|
||||||
|
{
|
||||||
|
solve
|
||||||
(
|
(
|
||||||
max(alpha1, scalar(0))*(psi1/rho1)
|
(
|
||||||
+ max(alpha2, scalar(0))*(psi2/rho2)
|
max(alpha1, scalar(0))*(psi1/rho1)
|
||||||
)
|
+ max(alpha2, scalar(0))*(psi2/rho2)
|
||||||
*pdEqnComp()
|
)
|
||||||
+ pdEqnIncomp
|
*pdEqnComp()
|
||||||
);
|
+ pdEqnIncomp,
|
||||||
|
mesh.solver(pd.name() + "Final")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
(
|
||||||
|
max(alpha1, scalar(0))*(psi1/rho1)
|
||||||
|
+ max(alpha2, scalar(0))*(psi2/rho2)
|
||||||
|
)
|
||||||
|
*pdEqnComp()
|
||||||
|
+ pdEqnIncomp
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
if (nonOrth == nNonOrthCorr)
|
||||||
{
|
{
|
||||||
@ -62,7 +83,8 @@
|
|||||||
|
|
||||||
p = max
|
p = max
|
||||||
(
|
(
|
||||||
(pd + gh*(alpha1*rho10 + alpha2*rho20))/(1.0 - gh*(alpha1*psi1 + alpha2*psi2)),
|
(pd + gh*(alpha1*rho10 + alpha2*rho20))
|
||||||
|
/(1.0 - gh*(alpha1*psi1 + alpha2*psi2)),
|
||||||
pMin
|
pMin
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user