Commit aef0a00b authored by mattijs's avatar mattijs
Browse files

Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev

parents 56609d10 4802014f
......@@ -11,7 +11,7 @@
scalar rDeltaTSmoothingCoeff
(
piso.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02)
piso.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1)
);
label nAlphaSpreadIter
......@@ -21,17 +21,17 @@
scalar alphaSpreadDiff
(
piso.lookupOrDefault<label>("alphaSpreadDiff", 0.2)
piso.lookupOrDefault<scalar>("alphaSpreadDiff", 0.2)
);
scalar alphaSpreadMax
(
piso.lookupOrDefault<label>("alphaSpreadMax", 0.99)
piso.lookupOrDefault<scalar>("alphaSpreadMax", 0.99)
);
scalar alphaSpreadMin
(
piso.lookupOrDefault<label>("alphaSpreadMin", 0.01)
piso.lookupOrDefault<scalar>("alphaSpreadMin", 0.01)
);
label nAlphaSweepIter
......@@ -63,11 +63,14 @@
{
// Further limit the reciprocal time-step
// in the vicinity of the interface
volScalarField alpha1Bar = fvc::average(alpha1);
rDeltaT.dimensionedInternalField() = max
(
rDeltaT.dimensionedInternalField(),
pos(alpha1.dimensionedInternalField() - 0.01)
*pos(0.99 - alpha1.dimensionedInternalField())
pos(alpha1Bar.dimensionedInternalField() - alphaSpreadMin)
*pos(alphaSpreadMax - alpha1Bar.dimensionedInternalField())
*fvc::surfaceSum(mag(phi))().dimensionedInternalField()
/((2*maxAlphaCo)*mesh.V())
);
......
......@@ -154,20 +154,13 @@ void Foam::fvc::spread
const label own = owner[facei];
const label nbr = neighbour[facei];
if
(
(alpha[own] > alphaMin && alpha[own] < alphaMax)
|| (alpha[nbr] > alphaMin && alpha[nbr] < alphaMax)
)
if (mag(alpha[own] - alpha[nbr]) > alphaDiff)
{
if (mag(alpha[own] - alpha[nbr]) > alphaDiff)
{
changedFaces.append(facei);
changedFacesInfo.append
(
smoothData(max(field[own], field[nbr]))
);
}
changedFaces.append(facei);
changedFacesInfo.append
(
smoothData(max(field[own], field[nbr]))
);
}
}
......@@ -188,20 +181,10 @@ void Foam::fvc::spread
alpha.boundaryField()[patchi].patchNeighbourField()
);
if
(
(alpha[own] > alphaMin && alpha[own] < alphaMax)
|| (
alphapn[patchFacei] > alphaMin
&& alphapn[patchFacei] < alphaMax
)
)
if (mag(alpha[own] - alphapn[patchFacei]) > alphaDiff)
{
if (mag(alpha[own] - alphapn[patchFacei]) > alphaDiff)
{
changedFaces.append(facei);
changedFacesInfo.append(smoothData(field[own]));
}
changedFaces.append(facei);
changedFacesInfo.append(smoothData(field[own]));
}
}
}
......
......@@ -29,9 +29,7 @@ boundaryField
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
type zeroGradient;
}
sides
......
......@@ -23,7 +23,7 @@ startTime 0;
stopAt endTime;
endTime 3000;
endTime 2000;
deltaT 1;
......
......@@ -83,9 +83,10 @@ PISO
nAlphaSubCycles 1;
cAlpha 1;
maxCo 0.8;
maxCo 0.9;
maxAlphaCo 0.2;
rDeltaTSmoothingCoeff 0.02;
rDeltaTSmoothingCoeff 0.1;
rDeltaTDampingCoeff 1;
maxDeltaT 1;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment