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

This commit is contained in:
mattijs
2011-03-30 13:52:55 +01:00
5 changed files with 23 additions and 38 deletions

View File

@ -11,7 +11,7 @@
scalar rDeltaTSmoothingCoeff scalar rDeltaTSmoothingCoeff
( (
piso.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02) piso.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1)
); );
label nAlphaSpreadIter label nAlphaSpreadIter
@ -21,17 +21,17 @@
scalar alphaSpreadDiff scalar alphaSpreadDiff
( (
piso.lookupOrDefault<label>("alphaSpreadDiff", 0.2) piso.lookupOrDefault<scalar>("alphaSpreadDiff", 0.2)
); );
scalar alphaSpreadMax scalar alphaSpreadMax
( (
piso.lookupOrDefault<label>("alphaSpreadMax", 0.99) piso.lookupOrDefault<scalar>("alphaSpreadMax", 0.99)
); );
scalar alphaSpreadMin scalar alphaSpreadMin
( (
piso.lookupOrDefault<label>("alphaSpreadMin", 0.01) piso.lookupOrDefault<scalar>("alphaSpreadMin", 0.01)
); );
label nAlphaSweepIter label nAlphaSweepIter
@ -63,11 +63,14 @@
{ {
// Further limit the reciprocal time-step // Further limit the reciprocal time-step
// in the vicinity of the interface // in the vicinity of the interface
volScalarField alpha1Bar = fvc::average(alpha1);
rDeltaT.dimensionedInternalField() = max rDeltaT.dimensionedInternalField() = max
( (
rDeltaT.dimensionedInternalField(), rDeltaT.dimensionedInternalField(),
pos(alpha1.dimensionedInternalField() - 0.01) pos(alpha1Bar.dimensionedInternalField() - alphaSpreadMin)
*pos(0.99 - alpha1.dimensionedInternalField()) *pos(alphaSpreadMax - alpha1Bar.dimensionedInternalField())
*fvc::surfaceSum(mag(phi))().dimensionedInternalField() *fvc::surfaceSum(mag(phi))().dimensionedInternalField()
/((2*maxAlphaCo)*mesh.V()) /((2*maxAlphaCo)*mesh.V())
); );

View File

@ -154,20 +154,13 @@ void Foam::fvc::spread
const label own = owner[facei]; const label own = owner[facei];
const label nbr = neighbour[facei]; const label nbr = neighbour[facei];
if if (mag(alpha[own] - alpha[nbr]) > alphaDiff)
(
(alpha[own] > alphaMin && alpha[own] < alphaMax)
|| (alpha[nbr] > alphaMin && alpha[nbr] < alphaMax)
)
{ {
if (mag(alpha[own] - alpha[nbr]) > alphaDiff) changedFaces.append(facei);
{ changedFacesInfo.append
changedFaces.append(facei); (
changedFacesInfo.append smoothData(max(field[own], field[nbr]))
( );
smoothData(max(field[own], field[nbr]))
);
}
} }
} }
@ -188,20 +181,10 @@ void Foam::fvc::spread
alpha.boundaryField()[patchi].patchNeighbourField() alpha.boundaryField()[patchi].patchNeighbourField()
); );
if if (mag(alpha[own] - alphapn[patchFacei]) > alphaDiff)
(
(alpha[own] > alphaMin && alpha[own] < alphaMax)
|| (
alphapn[patchFacei] > alphaMin
&& alphapn[patchFacei] < alphaMax
)
)
{ {
if (mag(alpha[own] - alphapn[patchFacei]) > alphaDiff) changedFaces.append(facei);
{ changedFacesInfo.append(smoothData(field[own]));
changedFaces.append(facei);
changedFacesInfo.append(smoothData(field[own]));
}
} }
} }
} }

View File

@ -29,9 +29,7 @@ boundaryField
outlet outlet
{ {
type inletOutlet; type zeroGradient;
inletValue uniform 0;
value uniform 0;
} }
sides sides

View File

@ -23,7 +23,7 @@ startTime 0;
stopAt endTime; stopAt endTime;
endTime 3000; endTime 2000;
deltaT 1; deltaT 1;

View File

@ -83,9 +83,10 @@ PISO
nAlphaSubCycles 1; nAlphaSubCycles 1;
cAlpha 1; cAlpha 1;
maxCo 0.8; maxCo 0.9;
maxAlphaCo 0.2; maxAlphaCo 0.2;
rDeltaTSmoothingCoeff 0.02;
rDeltaTSmoothingCoeff 0.1;
rDeltaTDampingCoeff 1; rDeltaTDampingCoeff 1;
maxDeltaT 1; maxDeltaT 1;
} }