我在模𣝅单车行驶的外部流场,主要是想求CdA。湍流模型用了k omega SST,求解器则是用了simpleFoam。我借用了motorBike的范例,稍为修改了一下。我设了初始速度为15m/s,0Pa。以下是log.simpleFoam里的头几个iteration:
Create time
Create mesh for time = 0
[AdminPC:02105] 5 more processes have sent help message help-btl-vader.txt / cma-permission-denied
[AdminPC:02105] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
SIMPLE: Convergence criteria found
U: tolerance 0.0001
p: tolerance 0.0001
"(k|omega)": tolerance 0.0001
Reading field p
Reading field U
Reading/calculating face flux field phi
Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmegaSST
Selecting patchDistMethod meshWave
RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
alphaK1 0.85;
alphaK2 1;
alphaOmega1 0.5;
alphaOmega2 0.856;
gamma1 0.555556;
gamma2 0.44;
beta1 0.075;
beta2 0.0828;
betaStar 0.09;
a1 0.31;
b1 1;
c1 10;
F3 false;
}
No MRF models present
No finite volume options present
Starting time loop
streamLine streamLines:
automatic track length specified through number of sub cycles : 5
Reading surface description:
yNormal
forces forceCoeffs1:
Not including porosity effects
forceCoeffs forceCoeffs1:
Not including porosity effects
Time = 1
smoothSolver: Solving for Ux, Initial residual = 0.176082, Final residual = 0.0175161, No Iterations 8
smoothSolver: Solving for Uy, Initial residual = 0.0854752, Final residual = 0.0078422, No Iterations 6
smoothSolver: Solving for Uz, Initial residual = 0.0535574, Final residual = 0.00446781, No Iterations 9
GAMG: Solving for p, Initial residual = 1, Final residual = 0.00968802, No Iterations 15
time step continuity errors : sum local = 9.19838e-08, global = 1.35003e-09, cumulative = 1.35003e-09
smoothSolver: Solving for omega, Initial residual = 0.999998, Final residual = 2.29698e-05, No Iterations 1
smoothSolver: Solving for k, Initial residual = 1, Final residual = 6.96747e-05, No Iterations 1
ExecutionTime = 252.73 s ClockTime = 563 s
forceCoeffs forceCoeffs1 write:
Cm = 0.404453
Cd = 0.754425
Cl = -0.0101646
Cl(f) = 0.399371
Cl(r) = -0.409535
Time = 2
smoothSolver: Solving for Ux, Initial residual = 0.114146, Final residual = 0.00945059, No Iterations 8
smoothSolver: Solving for Uy, Initial residual = 0.03572, Final residual = 0.0033767, No Iterations 7
smoothSolver: Solving for Uz, Initial residual = 0.268761, Final residual = 0.023381, No Iterations 8
GAMG: Solving for p, Initial residual = 0.00423399, Final residual = 3.88164e-05, No Iterations 14
time step continuity errors : sum local = 7.09901e-08, global = 1.05225e-09, cumulative = 2.40228e-09
smoothSolver: Solving for omega, Initial residual = 0.786768, Final residual = 6.02541e-05, No Iterations 1
smoothSolver: Solving for k, Initial residual = 0.347618, Final residual = 8.09935e-05, No Iterations 1
ExecutionTime = 358.52 s ClockTime = 941 s
forceCoeffs forceCoeffs1 write:
Cm = 0.372383
Cd = 0.710432
Cl = -0.0032843
Cl(f) = 0.370741
Cl(r) = -0.374025
Time = 3
smoothSolver: Solving for Ux, Initial residual = 0.134328, Final residual = 0.0118087, No Iterations 8
smoothSolver: Solving for Uy, Initial residual = 0.116996, Final residual = 0.0105707, No Iterations 7
smoothSolver: Solving for Uz, Initial residual = 0.0580452, Final residual = 0.00576293, No Iterations 7
GAMG: Solving for p, Initial residual = 0.00317963, Final residual = 3.03476e-05, No Iterations 18
time step continuity errors : sum local = 7.20084e-08, global = 7.35963e-10, cumulative = 3.13824e-09
smoothSolver: Solving for omega, Initial residual = 0.373588, Final residual = 9.57613e-05, No Iterations 1
smoothSolver: Solving for k, Initial residual = 0.103448, Final residual = 8.1809e-05, No Iterations 1
ExecutionTime = 509.1 s ClockTime = 1274 s
forceCoeffs forceCoeffs1 write:
Cm = 0.28686
Cd = 0.550375
Cl = 0.0178247
Cl(f) = 0.295772
Cl(r) = -0.277947
Time = 4
smoothSolver: Solving for Ux, Initial residual = 0.581453, Final residual = 0.0506933, No Iterations 7
smoothSolver: Solving for Uy, Initial residual = 0.438063, Final residual = 0.0375534, No Iterations 14
smoothSolver: Solving for Uz, Initial residual = 0.28364, Final residual = 0.0228554, No Iterations 19
GAMG: Solving for p, Initial residual = 0.100663, Final residual = 0.000964993, No Iterations 24
time step continuity errors : sum local = 2.71584e-06, global = -6.86095e-08, cumulative = -6.54713e-08
smoothSolver: Solving for omega, Initial residual = 0.156237, Final residual = 0.000151387, No Iterations 1
smoothSolver: Solving for k, Initial residual = 0.0248487, Final residual = 9.03384e-05, No Iterations 1
ExecutionTime = 625.86 s ClockTime = 1558 s
forceCoeffs forceCoeffs1 write:
Cm = -2.36372
Cd = 5.23947
Cl = -45.4406
Cl(f) = -25.084
Cl(r) = -20.3566
Time = 5
smoothSolver: Solving for Ux, Initial residual = 0.748694, Final residual = 0.0654467, No Iterations 6
smoothSolver: Solving for Uy, Initial residual = 0.707975, Final residual = 0.0671149, No Iterations 10
smoothSolver: Solving for Uz, Initial residual = 0.645301, Final residual = 0.0580618, No Iterations 11
GAMG: Solving for p, Initial residual = 0.331992, Final residual = 0.00325251, No Iterations 29
time step continuity errors : sum local = 4.57856e-05, global = 1.35323e-06, cumulative = 1.28776e-06
smoothSolver: Solving for omega, Initial residual = 0.0619606, Final residual = 0.000791318, No Iterations 1
smoothSolver: Solving for k, Initial residual = 0.00576973, Final residual = 0.000313824, No Iterations 2
ExecutionTime = 753.75 s ClockTime = 1825 s
forceCoeffs forceCoeffs1 write:
Cm = 48393.6
Cd = 355643
Cl = -193536
Cl(f) = -48374.2
Cl(r) = -145161
Time = 6
smoothSolver: Solving for Ux, Initial residual = 0.77583, Final residual = 0.0469625, No Iterations 11
smoothSolver: Solving for Uy, Initial residual = 0.647136, Final residual = 0.0587523, No Iterations 9
smoothSolver: Solving for Uz, Initial residual = 0.801675, Final residual = 0.0450629, No Iterations 11
GAMG: Solving for p, Initial residual = 2.42318e-05, Final residual = 2.34325e-07, No Iterations 43
time step continuity errors : sum local = 0.000116095, global = 5.64454e-06, cumulative = 6.9323e-06
smoothSolver: Solving for omega, Initial residual = 0.0295412, Final residual = 0.00216916, No Iterations 2
smoothSolver: Solving for k, Initial residual = 0.00243104, Final residual = 0.000230323, No Iterations 3
ExecutionTime = 908.36 s ClockTime = 2133 s
forceCoeffs forceCoeffs1 write:
Cm = -735398
Cd = -1.66962e+06
Cl = -1.74826e+07
Cl(f) = -9.47672e+06
Cl(r) = -8.00593e+06
Time = 7
smoothSolver: Solving for Ux, Initial residual = 0.577761, Final residual = 0.0517967, No Iterations 47
smoothSolver: Solving for Uy, Initial residual = 0.570563, Final residual = 0.0531017, No Iterations 47
smoothSolver: Solving for Uz, Initial residual = 0.546372, Final residual = 0.0538754, No Iterations 36
GAMG: Solving for p, Initial residual = 0.0134, Final residual = 0.0431707, No Iterations 1000
time step continuity errors : sum local = 500.302, global = -256.052, cumulative = -256.052
smoothSolver: Solving for omega, Initial residual = 0.726855, Final residual = 0.0688681, No Iterations 4
smoothSolver: Solving for k, Initial residual = 0.053017, Final residual = 0.00485332, No Iterations 4
ExecutionTime = 2723 s ClockTime = 4119 s
forceCoeffs forceCoeffs1 write:
Cm = 1.42517e+06
Cd = 7.85747e+06
Cl = -2.46218e+07
Cl(f) = -1.08857e+07
Cl(r) = -1.37361e+07
Time = 8
smoothSolver: Solving for Ux, Initial residual = 0.612081, Final residual = 0.0499664, No Iterations 29
smoothSolver: Solving for Uy, Initial residual = 0.562296, Final residual = 0.0483684, No Iterations 28
smoothSolver: Solving for Uz, Initial residual = 0.628358, Final residual = 0.0614706, No Iterations 14
GAMG: Solving for p, Initial residual = 0.999964, Final residual = 0.0500564, No Iterations 1000
time step continuity errors : sum local = 1.61271e+08, global = -40286.8, cumulative = -40542.9
smoothSolver: Solving for omega, Initial residual = 0.00412419, Final residual = 0.000290188, No Iterations 4
smoothSolver: Solving for k, Initial residual = 0.00274375, Final residual = 0.000233623, No Iterations 5
ExecutionTime = 4529.61 s ClockTime = 6088 s
forceCoeffs forceCoeffs1 write:
Cm = -6.60893e+13
Cd = -5.13466e+14
Cl = 1.211e+14
Cl(f) = -5.53934e+12
Cl(r) = 1.26639e+14
Time = 9
smoothSolver: Solving for Ux, Initial residual = 0.804576, Final residual = 13.5575, No Iterations 1000
smoothSolver: Solving for Uy, Initial residual = 0.785135, Final residual = 82.7634, No Iterations 1000
smoothSolver: Solving for Uz, Initial residual = 0.874744, Final residual = 9.53614, No Iterations 1000
-------------------------------------------------------
Primary job terminated normally, but 1 process returned
a non-zero exit code.. Per user-direction, the job has been aborted.
-------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:
Process name: [[12118,1],0]
Exit code: 145
--------------------------------------------------------------------------
可见在第四秒就崩溃了。Boundary Condition我都是参考motorbike的, 只改了velocity, k和omega:
- flowVelocity (0 0 15);
- pressure 0;
- turbulentKE 0.00135;
- turbulentOmega 900;
k和omega的值是我参考了其他文章,用了turbulence intensity level = 0.2%, 和eddy viscousity ratio = 0.1,从而算出來的。
以下是snappyHexMeshDict, fvScheme 和 fvSolution,求求大佬指点一下问题出在哪,谢谢
snappyHexMesh:
castellatedMesh true;
snap true;
addLayers true;
{
figure
{
type triSurfaceMesh;
file "figure.stl";
}
refinementBox
{
type searchableBox;
min ( -750 0 -1000);
max ( 1830 2685 2640);
}
};
castellatedMeshControls
{
maxLocalCells 1000000;
maxGlobalCells 30000000;
minRefinementCells 15;
maxLoadUnbalance 0.15;
nCellsBetweenLevels 3;
features
(
{
file "figure.eMesh";
level 7;
}
);
refinementSurfaces
{
figure
{
level (7 7);
patchInfo
{
type wall;
inGroups (figureGroup);
}
}
}
resolveFeatureAngle 20;
refinementRegions
{
refinementBox
{
mode inside;
levels ((1E15 4));
}
figure
{
mode distance;
levels
(
(2 8)
(10 6)
);
}
}
locationInMesh (402.1 1802 1002.7) ;
allowFreeStandingZoneFaces true;
}
snapControls
{
nSmoothPatch 5;
tolerance 2.25;
nSolveIter 30;
nRelaxIter 5;
nFeatureSnapIter 10;
implicitFeatureSnap false;
explicitFeatureSnap true;
multiRegionFeatureSnap false;
}
addLayersControls
{
relativeSizes true;
layers
{
"(lowerWall|figure).*"
{
nSurfaceLayers 10;
}
}
expansionRatio 1.2;
thickness 0.8;
minThickness 0.0001;
nGrow 0;
featureAngle 180;
slipFeatureAngle 30;
nRelaxIter 5;
nSmoothSurfaceNormals 1;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.6;
maxThicknessToMedialRatio 0.3;
minMedianAxisAngle 90;
nBufferCellsNoExtrude 0;
nLayerIter 15;
}
meshQualityControls
{
#include "meshQualityDict"
}
writeFlags
(
scalarLevels
layerSets
layerFields
);
mergeTolerance 1e-6;
fvSchemes:
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
grad(U) cellLimited Gauss linear 1;
}
divSchemes
{
default none;
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,k) bounded Gauss upwind;
div(phi,omega) bounded Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
wallDist
{
method meshWave;
}
fvSolution:
solvers
{
p
{
solver GAMG;
smoother GaussSeidel;
tolerance 1e-7;
relTol 0.01;
}
Phi
{
$p;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
omega
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
consistent yes;
residualControl
{
U 1e-4;
p 1e-4;
"(k|omega)" 1e-4;
}
}
potentialFlow
{
nNonOrthogonalCorrectors 10;
}
relaxationFactors
{
equations
{
U 0.9;
k 0.7;
omega 0.7;
}
}
cache
{
grad(U);
}