icoFoam求解器解析中问题。
-
大家好,在icoFoam解析中
volScalarField rAU(1.0/UEqn.A()); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H();//公式(15)
UEqn.A()、UEqn.H()是什么意思?
-
@OF九月九 在 [icoFoam求解器解析中问题。]
\begin{equation}
UEqn.A() = \frac{1}{{{A_\mathrm{p}}}}
\end{equation}\begin{equation}
UEqn.H() = \left( { - \sum {{A_\mathrm{n}}u_n^r} + E_\mathrm{p}^r} \right)
\end{equation}Clear?
:sunglasses:
-
我知道是这个,我以为.A()和.H()包含什么重要东西呢。谢了!:happy:
-
@cfd中文网 你好,不过似乎UEqn.A()应该等于Ap吧。按你给出的定义,
rAU*UEqn.H()
就等于Ap*UEqn.H()
了,这和HbyA的定义不一致了。
-
是的,你说的正确,
UEqn.A()
等于Ap
。
-
if (nonOrth == nNonOrthCorr)
{
phi = phiHbyA - pEqn.flux();
//使用求解的压力场修正通量场,在最后一次修正的时候通量守恒,Issa指出,大约需要2-3次内循环步。
//对应方程(26),pEqn.flux()返回方程(26)方程右边第二项,也为fvc::interpolate(rUA)*fvc::snGrad(p)*mag(mesh.Sf())。
//某些可压缩求解器其中的pEqn.flux()可能为+号,即为phi = phiHbyA + pEqn.flux()。这是因为pEqn中的laplacian项为−号
}
@东岳 做个勘误,注释中的fvc::interpolate(rUA)*fvc::snGrad§*mag(mesh.Sf())
似乎应该是rAU
还行麻烦解释一下
surfaceScalarField phiHbyA ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) //此处依据Rhie-chow插值原理,HbyA使用线性插值得到, //即需要在算例中设定interpolate(HbyA)的格式 + fvc::interpolate(rAU)*fvc::ddtCorr(U, phi) );
里面的
fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)
的 意思。谢谢啦。
-
@东岳 李老师,您好。个人认为icoFoam解析中公式(22)->(23)推导过程中,(22)式等号右侧高斯积分中的
1/Ap,f
在(23)式中应该变成散度项里的1/Ap
。
-
@张某人 多谢,已更新
@maoyanjun_dut 有空我研究研究
-
@李东岳 李老师,您好。
volScalarField rAU(1.0/UEqn.A());
这个重理论上分析应该是矢量才对,但是细节上的操作确实做成了体标量场。template<class Type> Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Type>::A() const { tmp<volScalarField> tAphi ( volScalarField::New ( "A("+psi_.name()+')', psi_.mesh(), dimensions_/psi_.dimensions()/dimVol, extrapolatedCalculatedFvPatchScalarField::typeName ) ); tAphi.ref().primitiveFieldRef() = D()/psi_.mesh().V(); tAphi.ref().correctBoundaryConditions(); return tAphi; }
$ A=\frac{A_p}{\Delta V}$
在计算系数Diag的过程中,将边界对主对角线的系数进行了平均更新:template<class Type> Foam::tmp<Foam::scalarField> Foam::fvMatrix<Type>::D() const { tmp<scalarField> tdiag(new scalarField(diag())); //这里进行了平均处理并修正了主对角线系数。 addCmptAvBoundaryDiag(tdiag.ref()); return tdiag; }
为什么这样操作呢?这样会使得系数矩阵不一样了!