VOF方法给气相添加组分方程,液相部分存在组分,怎么解决
-
使用compressibleInterFoam,给气相添加组分方程,如下:
{ volScalarField Yt(0.0*Y[0]); alpharho2 = alpha2*rho2; volScalarField alphamuEff("alphamuEff",alpha2*turbulence.muEff()); forAll(Y, i) { if (i != inertIndex && i != liquidIndex && composition.active(i)) { volScalarField& Yi = Y[i]; fvScalarMatrix YEqn ( fvm::ddt(alpharho2, Yi) + fvm::div(alpharho2Phi, Yi) - fvm::laplacian(alphamuEff, Yi) == fvOptions(rho, Yi) ); YEqn.relax(); fvOptions.constrain(YEqn); YEqn.solve("Yi"); fvOptions.correct(Yi); Yi.max(0.0); Yt += Yi; } } Y[inertIndex] = scalar(1) - Yt; Y[inertIndex].max(0.0); }
对一个简单的横向射流的算例进行计算,横向流入均匀速度空气(组分只有N2和O2),垂直向上射入水,下图分别为相体积分数和O2的质量分数,在相体积分数为1的部分,为什么还会有气体组分呢。
-
@Tens 您好,我参考了phaseScalarTransport.C的方法,人为地乘以了alpha来区分界面,您看这样合理嘛?但是在求解过程中,当来流温度过高时,会出现局部质量分数过大的问题,非常困惑
phaseScalarTransport.C
:if (phi.dimensions() == dimMass/dimTime) { const volScalarField& rho = mesh_.lookupObject<volScalarField>(rhoName_); while (control.correctNonOrthogonal()) { fvScalarMatrix PhiEqn ( fvm::laplacian(Phi, laplacianScheme) + fvc::ddt(rho, alpha) + fvc::div(alphaPhi) ); PhiEqn.solve(pName_); if (control.finalNonOrthogonalIter()) { alphaPhi += PhiEqn.flux(); } } if (alphaPhi.dimensions() == dimMass/dimTime) { const volScalarField& rho = mesh_.lookupObject<volScalarField>(rhoName_); for (int i=0; i<=nCorr_; i++) { fvScalarMatrix fieldEqn ( fvm::ddt(alpha, rho, s_) + fvm::div(alphaPhi, s_, divScheme) - fvm::laplacian ( fvc::interpolate(alpha)*fvc::interpolate(D), s_, laplacianScheme ) == fvOptions_(alpha, rho, s_) - fvm::ddt(residualAlpha_*rho, s_) + fvc::ddt(residualAlpha_*rho, s_) ); fieldEqn.relax(relaxCoeff); fvOptions_.constrain(fieldEqn); fieldEqn.solve(schemesField_); } if (!alphaSPtr_.valid()) { alphaSPtr_.set ( new volScalarField ( IOobject ( "alpha" + word(toupper(fieldName_[0])) + fieldName_(1, fieldName_.size() - 1), mesh_.time().timeName(), mesh_, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh_, dimensionedScalar(s_.dimensions(), Zero) ) ); } alphaSPtr_() = alpha*s_;//人为地乘以alpha