Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    multiRegion case中采用coupled interface边界上信息来计算turbulent viscosity

    OpenFOAM
    2
    3
    266
    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.
    • S
      shiyu last edited by

      如题,请问如何在multiRegion case中,获取coupled interface边界上信息,比如速度的梯度snGrad,来计算湍流模型中的turbulent viscosity?
      已知在一些coupled的边界条件中,如turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C,
      我们可以采用

      // Get the coupling information from the mappedPatchBase
      const mappedPatchBase& mpp =
          refCast<const mappedPatchBase>(patch().patch());
      const polyMesh& nbrMesh = mpp.sampleMesh();
      

      但问题是 在湍流模型中计算turbulent viscosity的correctNut( ),也需要调用nbrMesh来获取隔壁信息,该怎么定义patch( )呢?(边界条件中不需要额外定义patch() ),谢谢!

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

        @shiyu 这样的话看起来需要硬植入,比如你的xxx是你的coupled interface,那就是你的patch

        CFD课程 改成线上了 http://dyfluid.com/class.html
        CFD高性能服务器 http://dyfluid.com/servers.html

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

          @李东岳 感谢李老师的快速回复。
          不过我还是不太确定,尝试了以下语句:

          label patchID = this->mesh_.boundaryMesh().findPatchID("A_to_B");  
          fvPatch& patch = this->mesh_.boundaryMesh()[patchID];
          

          编译报错如下:

          error: type 'Foam::fvPatch' does not provide a call operator
                    refCast<const mappedPatchBase>(patch().patch());
          

          该如何解决呢?网上查了半天没有类似的问题。

          1 Reply Last reply Reply Quote
          • First post
            Last post

          CFD中文网 | 东岳流体 | 京ICP备15017992号-2