Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    icoFoam求解器解析中问题。

    OpenFOAM
    6
    9
    4861
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      OF九月九 last edited by 李东岳

      大家好,在icoFoam解析中

              volScalarField rAU(1.0/UEqn.A());
              volVectorField HbyA("HbyA", U);
              HbyA = rAU*UEqn.H();//公式(15)
      

      UEqn.A()、UEqn.H()是什么意思?

      OF界的小学生

      C 1 Reply Last reply Reply Quote
      • C
        CFD中文网 @OF九月九 last edited by

        @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:

        CFD中国标准用户测试帐号
        目前由徐笑笑登录

        张某人 1 Reply Last reply Reply Quote
        • O
          OF九月九 last edited by

          我知道是这个,我以为.A()和.H()包含什么重要东西呢。谢了!:happy:

          OF界的小学生

          1 Reply Last reply Reply Quote
          • 张某人
            张某人 @CFD中文网 last edited by

            @cfd中文网 你好,不过似乎UEqn.A()应该等于Ap吧。按你给出的定义,rAU*UEqn.H()就等于Ap*UEqn.H()了,这和HbyA的定义不一致了。

            让回流区再发展一会儿~

            1 Reply Last reply Reply Quote
            • 李东岳
              李东岳 管理员 last edited by 李东岳

              是的,你说的正确,UEqn.A()等于Ap。

              线上CFD课程 7月1日报名截止 http://dyfluid.com/class.html
              CFD高性能服务器 http://dyfluid.com/servers.html

              1 Reply Last reply Reply Quote
              • M
                maoyanjun_dut last edited by

                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) 的 意思。谢谢啦。

                Blog:http://maoyanjun.top
                厚德如海,纳川有藏。上善若水,利物不张。大哉斯言,勤勉勿忘。

                1 Reply Last reply Reply Quote
                • 张某人
                  张某人 last edited by

                  @东岳 李老师,您好。个人认为icoFoam解析中公式(22)->(23)推导过程中,(22)式等号右侧高斯积分中的1/Ap,f在(23)式中应该变成散度项里的1/Ap。

                  让回流区再发展一会儿~

                  1 Reply Last reply Reply Quote
                  • 李东岳
                    李东岳 管理员 last edited by

                    @张某人 多谢,已更新
                    @maoyanjun_dut 有空我研究研究

                    线上CFD课程 7月1日报名截止 http://dyfluid.com/class.html
                    CFD高性能服务器 http://dyfluid.com/servers.html

                    winsway_zero 1 Reply Last reply Reply Quote
                    • winsway_zero
                      winsway_zero @李东岳 last edited by

                      @李东岳 李老师,您好。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;
                       }
                      

                      为什么这样操作呢?这样会使得系数矩阵不一样了!

                      一生做好一件事,足矣~

                      1 Reply Last reply Reply Quote
                      • First post
                        Last post

                      CFD中文网 | 东岳流体 | 京ICP备15017992号-2
                      论坛登录问题反馈可联系 li.dy@dyfluid.com