interfoam中植入Fluent中溶质在单相扩散的功能
-
再次补充:
使用QT调试,查出问题void Foam::DILUPreconditioner::calcReciprocalD ( scalarField& rD, const lduMatrix& matrix ) { scalar* __restrict__ rDPtr = rD.begin(); const label* const __restrict__ uPtr = matrix.lduAddr().upperAddr().begin(); const label* const __restrict__ lPtr = matrix.lduAddr().lowerAddr().begin(); const scalar* const __restrict__ upperPtr = matrix.upper().begin(); const scalar* const __restrict__ lowerPtr = matrix.lower().begin(); label nFaces = matrix.upper().size(); for (label face=0; face<nFaces; face++) { rDPtr[uPtr[face]] -= upperPtr[face]*lowerPtr[face]/rDPtr[lPtr[face]];//在这里报错。。。。。!!!!!!!! } label nCells = rD.size(); for (label cell=0; cell<nCells; cell++) { rDPtr[cell] = 1.0/rDPtr[cell]; } }
-
对流项如下
rhoPhi1=fvc::interpolate(rho*alpha1)*phi;
在两相欧拉模型中的能量方程的矩阵结构在初始时刻和本文的差不多
fvm::ddt(alpha1, rho1, he1) + fvm::div(alphaRhoPhi1, he1) - fvm::Sp(contErr1, he1)
不知其最后这项fvm::Sp(contErr1, he1)(隐式修正?),还有更后面有两项 heatTransferCoeff*he1/Cpv1
- fvm::Sp(heatTransferCoeff/Cpv1, he1是为了避免这类问题?软件版本是5.x