Commit 7f8dbac2 authored by Henry's avatar Henry
Browse files

LTSInterFoam: Improved the near-interface Courant number evaluation

parent 6d2037c8
......@@ -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]));
}
}
}
......
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