植入的能量方程是这样的
xiaoyangfoamer
帖子
-
VOF中模拟yeti与气泡换热 -
VOF中模拟yeti与气泡换热问题是这样的,模拟的流体的热物性参数(rho、cp、mu、kappa)随温度变化比较明显,且有关于温度T的关联式,我想要在循环中计算温度场后每计算一步新的温度场就更新热物性参数来减小计算误差,但是在createFields.H中定义了温度场后不能将关联式写进去,所以又创建了一个updateProperties.H来写入关联式: rho1 = 11065.0-1.293*(T-273.15) ; // ρ(T) [kg/m3]
mu1 = 4.94e-4exp(754.1/(T + scalar(1e-12))); // μ(T) [Pa.s]
kappaf1 = 3.284 + 0.01617(T - 273.15)-2.305e-06pow(T,2); // k(T) [W/mK]
Cp1 = 164.8-3.94T+1.25e-05pow(T,2)-4.56e05pow(T,-2); // Cp(T) [J/kgK]
rho1.correctBoundaryConditions();
mu1.correctBoundaryConditions();
kappaf1.correctBoundaryConditions();
Cp1.correctBoundaryConditions();
// 惰性气体保持常值,无需更新
mu2 = 4.43e-6+6.678e-08T-1.551e-011pow(T, 2);
kappaf2 = 3.462e-03 + 5.249e-5*(T - 273.15)-1.23e-08*pow(T,2);
mu2.correctBoundaryConditions();
kappaf2.correctBoundaryConditions();rhoMixT = alpha1*rho1 + (1 - alpha1)*rho2; CpMix = alpha1*Cp1 + (1 - alpha1)*Cp2; // rhoCp used in transient term (alpha-weighted rho*Cp) rhoCp = alpha1*rho1*Cp1 + (1 - alpha1)*rho2*Cp2; // molecular conductivity kappafLam = alpha1*kappaf1 + (1 - alpha1)*kappaf2; // turbulent thermal conductivity: k_turb = rhoCp * (nut / Prt)
{
const volScalarField& nutField = turbulence->nut(); // from turbulence model
volScalarField kappafTurb
(
IOobject("kappafTurb", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE),
rhoCp * (nutField/PrtConst)
);// effective conductivity kappafsum = kappafLam + kappafTurb; kappafsum.correctBoundaryConditions();
}
// write a short log
Info<< " rho1: [" << gMin(rho1) << ", " << gMax(rho1) << "] kg/m3" << nl
<< " mu1: [" << gMin(mu1) << ", " << gMax(mu1) << "] Pa.s" << nl
<< " kappaf1: [" << gMin(kappaf1) << ", " << gMax(kappaf1) << "] W/mK" << nl
<< " Cp1: [" << gMin(Cp1) << ", " << gMax(Cp1) << "] J/kgK" << nl;
}一直没有编译成功,请问是我的思路的问题么 -
openfoam使用VOF模拟孔口气泡吹入@李东岳
李老师我之后alpha.water是这样设置的:
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
p_rgh是这样设置的
atmosphere
{
type totalPressure;
p0 uniform 0;
}
能满足吗 -
openfoam使用VOF模拟孔口气泡吹入如图所示,下部孔口气泡吹入时,上方的自由液面部分会出现如图所示的对称的凹陷,这是什么原因造成的,应该调整p_rgh字典文件(设定的自由液面处是totalpressure)还是要调整离散文件。
-
openfoam中如何将一个面设置为内部面@李东岳 李老师您的意思是我只画小圆柱的两个面就行是么
-
openfoam中如何将一个面设置为内部面针对这种计算域,想要在openfoam中将喷嘴的下部面进气,而上部面应该设置为内部面才能使流体顺利通过,已经绘制了pipetop.stl几何文件,想要利用snappyhexmesh加密喷嘴处的网格,openfoam中有没有能够将toposet捕捉到的这个面转化为一个内部面的工具,或者其他工具能够使喷嘴通气,请各位大佬赐教。
-
OpenFOAM中使用ke模型时可以不使用壁面函数么因为我模拟的射流入口处距离壁面很远,达到了一定比例(之前在文献看到过,具体多少忘了),此时可以不考虑壁面对于射流后产生湍流的影响,因为我就只是想看射流后的气泡流,不研究壁面对其的影响,请各位大佬赐教。
-
interIsofoam射流问题@李东岳 感谢东岳老师的回复,设置我也贴一下:
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很小就调粗网格了,能够调成功的话打算在捕获相界面的方法上下点功夫。
-
interIsofoam射流问题模拟的具体工况如图所示
圆柱容器里面是液体,圆柱喷嘴喷出气体(喷嘴上部面转化为内部网格处理),使用interIsofoam求解器,主要想观察气体喷出后生成的气泡的形状和运动轨迹,网格由icem绘制转化至openfoam,checkmesh信息如下:Check mesh... Time = 0 Mesh stats points: 624312 faces: 1851102 internal faces: 1828728 cells: 613305 faces per cell: 6 boundary patches: 5 point zones: 0 face zones: 3 cell zones: 2 Overall number of cells of each type: hexahedra: 613305 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology outlet 1485 1508 ok (non-closed singly connected) nozzlewall 1232 660 multiply connected (shared edge) bottom 616 660 ok (non-closed singly connected) pipewall 18172 18216 ok (non-closed singly connected) inlet 869 892 ok (non-closed singly connected) ".*" 22374 21760 multiply connected (shared edge) Detected 1232 bad edges (possibly relevant for finite-area) Checking faceZone topology for multiply connected surfaces... FaceZone Faces Points Surface topology int_FLUID 1792538 612440 multiply connected (shared edge) int_FLUID_AIR 35321 13380 multiply connected (shared edge) int_INTERIOR1 869 892 ok (non-closed singly connected) <<Writing 624224 conflicting points to set nonManifoldPoints Checking basic cellZone addressing... CellZone Cells Points Volume BoundingBox FLUID 601139 612440 0.000704116 (-0.0149602 -0.0149572 0) (0.0149602 0.0149572 1) FLUID_AIR 12166 13380 1.92837e-09 (-0.000391458 -0.000391429 0) (0.000391458 0.000391429 0.004) Checking basic pointZone addressing... No pointZones found. Checking geometry... Overall domain bounding box (-0.0149602 -0.0149572 0) (0.0149602 0.0149572 1) Mesh has 3 geometric (non-empty/wedge) directions (1 1 1) Mesh has 3 solution (non-empty) directions (1 1 1) Boundary openness (4.6938e-16 1.39741e-15 1.52826e-18) OK. Max cell openness = 4.03117e-16 OK. Max aspect ratio = 389.103 OK. Minimum face area = 2.38205e-10. Maximum face area = 7.65441e-06. Face area magnitudes OK. Min volume = 5.02898e-14. Max volume = 1.47182e-08. Total volume = 0.000704118. Cell volumes OK. Mesh non-orthogonality Max: 35.2075 average: 4.51619 Non-orthogonality check OK. Face pyramids OK. Max skewness = 1.90366 OK. Coupled point location match (average 0) OK. Mesh OK.
现在存在的问题是虽然网格数只有60w,但计算开始时的时间步长在10e-5,随着计算过程的推进逐渐变小至10e-30,并且喷嘴上方喷出的气体应该转变为气泡分类而不是如下图所示的一个柱状区域,我想求助各位大佬,我这个是网格的问题还是算法的问题。