Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
在interPhaseChangeFoam的alpha.H里面的phirb是什么?在alpha.H中没有声明?
word alphaScheme("div(phi,alpha)"); word alpharScheme("div(phirb,alpha)"); surfaceScalarField phir("phir", phic*interface.nHatf());
还有能帮我解释一下这段代码的意思吗?先谢过了!!!
tmp<surfaceScalarField> talphaPhiCorr ( fvc::flux ( phi, alpha1, alphaScheme ) + fvc::flux ( -fvc::flux(-phir, alpha2, alpharScheme), alpha1, alpharScheme ) );
@小龙 就是求解alpha的输运方程,只不过加了人工压缩相。这个求解器有很多细节东西,需要不断的琢磨代码。另外,这个是写的较为详细解析的链接:https://zhuanlan.zhihu.com/p/25002760?refer=haidong。
@mohui 可以给我解释一下fvc::flux吗?这个不是求通量吗?比如fvc::flux(U)是速度通量,这里面是求phi,alpha1,alphaScheme的通量吗?
fvc::flux
fvc::flux(U)
phi,alpha1,alphaScheme
fvc::flux(phi, alpha1, alphaScheme) = fv::convectionScheme<Type>::New ( mesh(), phi, alphaScheme )().flux(phi, alpha1) = phi*interpolate(phi, alpha1) = phi*alpha1f
因此,代码fvc::flux(phi, alpha1, alphaScheme)即为$\nabla\cdot\left(\alpha \mathbf{U}\right)$
fvc::flux(phi, alpha1, alphaScheme)
https://github.com/OpenFOAM/OpenFOAM-dev/blob/master/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.C
https://github.com/OpenFOAM/OpenFOAM-dev/blob/master/src/finiteVolume/finiteVolume/fvc/fvcFluxTemplates.C