@李东岳 感谢东岳老师的回复,设置我也贴一下:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"alpha.phase1.*"
{
nAlphaCorr 3;
nAlphaSubCycles 1;
alphaOuterCorrectors yes;
cAlpha 0;
isoFaceTol 1e-6;
surfCellTol 1e-6;
nAlphaBounds 3;
snapTol 1e-12;
clip true;
gardAlphaNormal false;
MULESCorr yes;
nLimiterIter 3;
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-8;
relTol 0;
orientationMethod LS; //RDF
splitWarpedFace false;
writePlicFields false;
mapAlphaField true;
nAlphaSubCycles 1;
cAlpha 1;
}
"pcorr.*"
{
solver GAMG;
tolerance 1e-08;
relTol 0.01;
smoother DIC;
cacheAgglomeration no;
}
p_rgh
{
solver GAMG;
tolerance 1e-08;
relTol 0.01;
smoother DIC;
cacheAgglomeration no;
}
p_rghFinal
{
$p_rgh;
relTol 0;
tolerance 1e-9;
}
U
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-07;
relTol 0;
}
UFinal
{
$U;
tolerance 1e-06;
relTol 0;
}
kFinal
{
$k;
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0;
}
epsilonFinal
{
$epsilon;
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0;
}
epsilon
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0;
}
k
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0;
}
}
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 3;
nCorrectors 5;
nNonOrthogonalCorrectors 1;
pRefPoint (0.01 0.01 0.01);
pRefValue 0;
}
reconstructionSchemes
{
alpha.phase1
{
method isoAlpha;
isoAlphaMethod isoAlpha;
alpha alpha.phase1;
isoValue 0.5;
surfaceCellSize 0;
linearCorrection true;
smoothNormals true;
nSmoothNormals 3;
cellNormalMethod corrected;
faceNormalMethod corrected;
}
}
relaxationFactors
{
fields
{
}
equations
{
".*" 1;
}
}
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default CrankNicolson 1;
}
gradSchemes
{
default Gauss linear ;
}
divSchemes
{
div(Phi,U) Gauss linearUpwind grad(U);
div(rhoPhi,U) Gauss limitedLinearV 1;
div(phi,alpha.phase1) Gauss interfaceCompression vanLeer 3;
div(phirb,alpha) Gauss interfaceCompression;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div((muEff*dev(T(grad(U))))) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
interfaceCompression
{
cAlpha 2;
}
wallDist
{
method meshWave;
}
fluxRequired
{
default no;
p_rgh;
pcorr;
alpha.phase1;
}
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue alpha.phase1 1
);
regions
(
cylinderToCell
{
p1 (0 0 0);
p2 (0 0 0.004);
radius 0.0003925;
fieldValues
(
volScalarFieldValue alpha.phase1 0
);
}
);
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application interIsoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.2;
deltaT 0.0001;
writeControl adjustableRunTime;
writeInterval 0.005;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
maxCo 5;
maxAlphaCo 1;
maxDeltaT 0.01;
libs ("libfiniteVolume.so" "libsampling.so");
functions
{
bubbleTracking
{
type surfaces;
libs ("libsampling.so");
surfaceFormat vtk;
fields (alpha.phase1 U);
surfaces
(
bubbleSurface
{
type isoSurface;
isoField alpha.phase1;
isoValue 0.5;
interpolate true;
}
);
executionInterval 5;
}
gasVolumeFraction
{
type volFieldValue;
libs ("libfieldFunctionObjects.so");
enabled true;
operation average;
fields (alpha.phase1);
mean on;
base time;
writeControl timeStep;
writeInterval 1;
log true;
valueOutput true;
writeFields false;
surfaceFormat none;
format csv;
}
FoamFile
{
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 1e-6;
boundaryField
{
outlet
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 1.04e5;
}
nozzlewall
{
type epsilonWallFunction;
value uniform 1e-6;
}
bottom
{
type epsilonWallFunction;
value uniform 1e-6;
}
pipewall
{
type epsilonWallFunction;
value uniform 1e-6;
}
}
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 1e-6;
boundaryField
{
outlet
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 11.34;
}
nozzlewall
{
type kqRWallFunction;
value uniform 1e-6;
}
bottom
{
type kqRWallFunction;
value uniform 1e-6;
}
pipewall
{
type kqRWallFunction;
value uniform 1e-6;
}
}
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 1e-6;
boundaryField
{
outlet
{
type calculated;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
nozzlewall
{
type nutkWallFunction;
value uniform 0;
}
bottom
{
type nutkWallFunction;
value $internalField;
}
pipewall
{
type nutkWallFunction;
value uniform 0;
}
}
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
outlet
{
type totalPressure;
p0 uniform 0;
}
inlet
{
type fixedFluxPressure;
value uniform 0;
}
nozzlewall
{
type fixedFluxPressure;
value uniform 0;
}
bottom
{
type fixedFluxPressure;
value uniform 0;
}
pipewall
{
type fixedFluxPressure;
value uniform 0;
}
}
具体就是这样,设定喷气体,容器里面充满液体,改了一个月也没怎么收敛,头大得很,之前画了个200w的网格,△t很小就调粗网格了,能够调成功的话打算在捕获相界面的方法上下点功夫。