Skip to content
Snippets Groups Projects
Commit dbe5e082 authored by Andrew Heather's avatar Andrew Heather
Browse files

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
parent 0421563d
No related branches found
No related tags found
No related merge requests found
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 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment