Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

R

random_ran

@random_ran
大神
关于
帖子
206
主题
12
群组
1
粉丝
35
关注
0

帖子

最新

  • 你要的OpenFOAM编程杂七杂八
    R random_ran

    @东岳 谢谢东岳老师的分享。

    我想补充一点:

    开源软件虽然是大多数人都听过的,但实际上更准确的说法是自由软件(FOSS )。这是 OF 官网的自我介绍:

    OpenFOAM is the leading free, open source software for computational fluid dynamics (CFD), owned by the OpenFOAM Foundation and distributed exclusively under the General Public Licence (GPL).

    两个术语:"开源"和"自由"的区别:wiki 上有这样的解释。


  • 请问大家OpenFOAM有没有这种类型的边界条件
    R random_ran

    @气固两相流

    OF 有的: 周期边界条件

    可以参考 这个算例文件:

    OpenFOAM-dev/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/createPatchDict


  • 在WSL里用源码包安装openfoam失败
    R random_ran

    @bestucan

    @quotation
    People sometimes ask me if it is a sin in the Church of Emacs to use
    vi. Using a free version of vi is not a sin; it is a penance. So happy
    hacking.
    @author Richard Stallman
    @end quotation


  • 请教:buoyantBoussinesqPimpleFoam边界条件设置
    R random_ran
        fvScalarMatrix TEqn
        (
            fvm::ddt(T)
          + fvm::div(phi, T)
          - fvm::laplacian(alphaEff, T)
         ==
            radiation->ST(rhoCpRef, T)
          + fvOptions ( t)
        );
    

    去掉这个

         ==
            radiation->ST(rhoCpRef, T)
          + fvOptions ( t)
    

    个人觉得,楼主提供的数值算例是对这个修改过方程的解, 但是这样的修改,能否在一定精度内代表真实的物理现象呢?


  • 请教:buoyantBoussinesqPimpleFoam边界条件设置
    R random_ran

    太棒了! 我运行了楼主写的 hotWater 求解器。

    我从运行结果上看,似乎是温度和期望值不同? 时间点为 50 的时候, 我发现温度的 contour 比较合理,热水上升。

    但是下边界层温度的梯度是不是太大了?即便在 300 秒后,从 温度的 contour 上看,依旧是非常明显的分层。 个人觉得温度应该从下自上缓慢过度才对?

    到模拟结束的时候,我发现全场的温度都稳定在了 27 (温度是 K?),确实是和想象中不一样。

    楼主有没有试过用原来的求解器做相同的算列?结果怎么样呢?


  • 我看新媒体 | CFD界的转型
    R random_ran

    w3 创立之初就是本着:

    Tim Berners-Lee, w3 发起者之一,入是说:

    @timberners_lee
    30 Nov 2018
    More
    The open web is #ForEveryone to exercise their freedom of expression. It is a creator’s ally. Let's make sure it stays that way.

    诸如像 Facebook ( Wechat 只是更进一步) 作为对 w3 精神的一种独特解释,RMS 对其一直炮轰不止。

    越来越多的人,发现了这个问题。

    比如像: 谢益辉的技术吐c*:

    微信最可恶的地方在于它倾向于把人锁在手机上,我看不出有任何技术性的理由(硬件?软件?)要把人硬锁在手机上,只能揣测手机端是微信的招财猫,只有在手机端才有暴利可图。不然为什么那么多功能在电脑端都没有?历史消息不同步,查找也麻烦得要死,给公众号文章留个言,非得在手机上戳戳戳戳半天(当然,可以在电脑键盘上打好了复制到手机,再从手机复制过去,就问你香不香菇)。

    再比如像 : Cal Newport 的观点:

    My commentary on social media has traditionally deployed a narrow focus on the individual: this is how social media is harming you, and here is what you can do to avoid these harms.


  • OpenFOAM周期边界生成不成功,cyclic的问题
    R random_ran

    好的,我再仔细研究研究 这个 LABEL_SIZE 的东西。有新的进展我再贴在这里。

    (话说你的博客好赞啊!超喜欢这种风格。不知道是否接受 OF 热心读者的问题呢?直接留言在 Disqus 好还是在这里发帖,博主会看见呢?)


  • 阿里ECS进行OpenFOAM的计算流程
    R random_ran

    恩,我觉得最便宜的组合就是买个 树莓派 (200块人民币?),然后 build OF,写算例文件,然后用

    "华为云12核24g三块八一小时。同配置用了阿里云的张家口服务器,算一个半小时总共花了一毛七"

    超级便宜哈。


  • OpenFOAM周期边界生成不成功,cyclic的问题
    R random_ran

    因为我几次遇到过在网络上由于这种潜在规则的问题的不明了导致的一些不必要的麻烦,所以谨慎点应该的。看来之后的交流会更加便捷 :)

    @youmengtian

    The reason why I checked polyModifyFace was that I wanted to study
    the piece of code in:

    //Line 82
    //~OpenFOAM-dev/src/dynamicMesh/polyTopoChange/polyTopoChange/modifyObject/polyModifyPoint.H [wrong!]
    ///OpenFOAM-dev/applications/utilities/mesh/manipulation/createPatch/createPatch.C [correct]
    meshMod.setAction
      (
          polyModifyFace
          (
    	  mesh.faces()[faceID],               // face
    	  faceID,                             // face ID
    	  mesh.faceOwner()[faceID],           // owner
    	  -1,                                 // neighbour
    	  false,                              // flip flux
    	  patchID,                            // patch ID
    	  false,                              // remove from zone
    	  zoneID,                             // zone ID
    	  zoneFlip                            // zone flip
          )
      );
    

    I don't know the reason why it crash, that's why I am asking.

    return autoPtr<topoAction>(new polyModifyFace(*this));
    

    Do you know how this function could trigger the following exception:

    terminate called after throwing an instance of 'std::bad_array_new_length'
    what():  std::bad_array_new_length
    

    I don't know.

    @wwzhao

    thanks for helping. This test case was built Jul 06 2018,
    so I am not sure the exactly envirmental varibles that I was playing with.

    I've double checked the:

    echo $WM_LABEL_SIZE
    32
    

    It looks like a right direction to further study this stuff. But, it
    needs more time, since I need to rebuid OF. Which Version would you
    like to suggest me to run? dev or v4.1?

    Also, if the default

    $WM_LABEL_SIZE</sub> is indeed 32
    

    what is its theoretical upper bond, i.e. running pisoFoam (motobike tutorial?).

    Can I change to any number (2^{5,6,7,8})?


  • Cd计算不准的问题-LES-Re3900-三维圆柱绕流-pisoFoam
    R random_ran

    @Regina 快去读读 @wwzhao 的博客,超详细的!


  • win10 ubuntu bash 下编译OpenFOAM遇到的问题
    R random_ran

    醉了,牛爵士也强推:

    “When I lost my .tex file to the Principia, I was devastated. Mathpix helped me effortlessly use equations from the Principia in my new work. I now have more time to stand beneath trees and get hit by apples.”

    哈哈,谢谢啦。


  • win10 ubuntu bash 下编译OpenFOAM遇到的问题
    R random_ran

    这个是老爱强推啊!!!

    “If I had known about Mathpix earlier, perhaps I would have had enough time to work out the Grand Unified Theory.”


  • win10 ubuntu bash 下编译OpenFOAM遇到的问题
    R random_ran

    @wwzhao 赞!


  • 黑莓派 ( raspberry pi 3 )上编译 OpenFOAM ...
    R random_ran

    为什么超想笑,不过要为 alan_afw2, wyldckat, 和 henry 点个赞!


  • 有人尝试过在OF中实现MMIM方法么?
    R random_ran

    @yhdthu thx


  • 有人尝试过在OF中实现MMIM方法么?
    R random_ran

    @yhdthu

    知乎现在支持 LaTeX 渲染了吗? 我看了你在知乎上的回答,想请教一下公式是怎么处理的?


  • OpenFOAM周期边界生成不成功,cyclic的问题
    R random_ran

    嗨 youmengtian:

    非常感谢阅读我的这个瞎折腾! 当时是想看看 OF 到底能跑多大的网格,所以才有了这些。

    由于这是 cfd-china , 默认大家都用中文,所以我有点担心会不会影响到别人。但是,这种边看代码,边写文档的东西,我目前只能在在 emacs 中高效地完成,所以就只能用英文来交流。 如果冒犯到你,请不要继续往下读。

    I am using OF-dev version (don't know exactly the date I downloaded
    it).

    The main classes are found in the flowing path:

    ~/OpenFOAM-dev/src/dynamicMesh/polyTopoChange/polyTopoChange/modifyObject/
    

    This for loop:

    //Line 707
    //~/OpenFOAM-dev/applications/utilities/mesh/manipulation/createPatch/createPatch.C
    
    void changePatchID
    (
      const polyMesh& mesh,
      const label faceID,
      const label patchID,
      polyTopoChange& meshMod
    )
    

    is the point that I feel something might wrong.

    I don't know exactly what polyModifyFace is a function or a
    class. I double checked the defination of polyModifyFace:

    //Line 82
    //~OpenFOAM-dev/src/dynamicMesh/polyTopoChange/polyTopoChange/modifyObject/polyModifyPoint.H
    meshMod.setAction
      (
          polyModifyFace
          (
    	  mesh.faces()[faceID],               // face
    	  faceID,                             // face ID
    	  mesh.faceOwner()[faceID],           // owner
    	  -1,                                 // neighbour
    	  false,                              // flip flux
    	  patchID,                            // patch ID
    	  false,                              // remove from zone
    	  zoneID,                             // zone ID
    	  zoneFlip                            // zone flip
          )
      );
    

    I think polyModifyFace really looks like a function definition in
    c++, but I might wrong.

    Another thing that I feel strange is that the implementation of the
    following classes are missing.

    3.5k 12-14 23:52 polyModifyCell.H
    7.5k 12-14 23:52 polyModifyFace.H
    4.2k 12-14 23:52 polyModifyPoint.H
    

    Is that becasue those classes are too easy?

    I furthe study the class (~/OpenFOAM-dev/src/dynamicMesh/polyTopoChange/polyTopoChange/modifyObject/polyModifyFace.H):

    //- Construct and return a clone
    virtual autoPtr<topoAction> clone() const
    {
        return autoPtr<topoAction>(new polyModifyFace(*this));
    }
    

    Is this clone() function mess up all the things? If so, what's the
    limited of it? How big (size of the mesh) the OF can handle?

    I agree with you. This mesh is converted from \*.msh file without any
    issue. convertMesh seems have a much large memory requirement. I am
    not sure exactly the order of it.

    What I want to do, is to run some small test to investigate the
    memory usage of convertMesh and creatPatch.

    Finally, why make it (matchToTolerance) smaller? Do you have any
    reference to this point? I might (can remember exactly) just use
    some default number here.


  • OpenFOAM周期边界生成不成功,cyclic的问题
    R random_ran

    @youmengtian 在 25亿网格直接模拟 中说:

    @random_ran 从check的结果来看,原始生成的网格没有什么问题。您说的周期性边界失败是指?可是尝试使用createPatch这个utility创建cyclic边界实现周期性边界。

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time
    
    Create polyMesh for time = 0
    
    Reading createPatchDict
    
    Adding new patch FRONT_CYC as patch 5 from 
    {
        type            cyclic;
        neighbourPatch  BACK_CYC;
        matchTolerance  0.01;
    }
    
    Adding new patch BACK_CYC as patch 6 from 
    {
        type            cyclic;
        neighbourPatch  FRONT_CYC;
        matchTolerance  0.01;
    }
    
    
    Moving faces from patch FRONT to patch 5
    terminate called after throwing an instance of 'std::bad_array_new_length'
      what():  std::bad_array_new_length
    

    cppreference 上说三种可能的原因,我觉得我的case是“too large”。

    #include <iostream>
    #include <new>
    #include <climits>
     
    int main()
    {
        int negative = -1;
        int small = 1;
        int large = INT_MAX;
        try {
            new int[negative];           // negative size
            new int[small]{1,2,3};       // too many initializers
            new int[large][1000000];     // too large
        } catch(const std::bad_array_new_length &e) {
            std::cout << e.what() << '\n';
        }
    }
    

    我顺着 Moving faces from patch FRONT to patch 5 找到 createPatch.C 源代码:

    ====> createPatch.C:  Line 705~714
                    forAll(pp, i)
                    {
                        changePatchID
                        (
                            mesh,
                            pp.start() + i,
                            destPatchi,
                            meshMod
                        );
                    }
    

    似乎是死在了这个循环里:

    changePatchID 的arguments:
    
    (
        const polyMesh& mesh,
        const label faceID,
        const label patchID,
        polyTopoChange& meshMod
    )
    

    changePatchID 里嵌套的这个函数很可疑 meshMod.setAction, 特别是 polyModifyFace 这个函数

    定义在

    polyModifyFace.H 奇怪 polyModifyPoint.C 居然不存在.

    看到这里,感觉无能为力了,想要找到类似这种 new int[large][1000000]; // too large
    的声明看来是行不通了。

    所以想请教大家的想法。


  • OpenFOAM周期边界生成不成功,cyclic的问题
    R random_ran

    不知道他们用的是 OF 吗?

    我自己用 OF 4.1 瞎折腾过一次 2.5 亿的网格,生成周期边界的时候总是过不去。

    $ checkMesh
    /*---------------------------------------------------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  4.1                                   |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    Build  : 4.1
    Exec   : checkMesh
    Date   : Jul 06 2018
    Time   : 15:54:53
    Host   : "cp0401"
    PID    : 12872
    Case   : /scratch/crazyuser/biggerMesh
    nProcs : 1
    sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
    fileModificationChecking : Monitoring run-time modified files using timeStampMaster
    allowSystemOperations : Allowing user-supplied system call operations
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time
    
    Create polyMesh for time = 0
    
    Time = 0
    
    Mesh stats
        points:           257514000
        faces:            769512000
        internal faces:   766488000
        cells:            256000000
        faces per cell:   6
        boundary patches: 5
        point zones:      0
        face zones:       1
        cell zones:       1
    
    Overall number of cells of each type:
        hexahedra:     256000000
        prisms:        0
        wedges:        0
        pyramids:      0
        tet wedges:    0
        tetrahedra:    0
        polyhedra:     0
    
    Checking topology...
        Boundary definition OK.
        Cell to face addressing OK.
        Point usage OK.
        Upper triangular ordering OK.
        Face vertices OK.
        Number of regions: 1 (OK).
    
    Checking patch topology for multiply connected surfaces...
        Patch               Faces    Points   Surface topology                  
        FRONT               1000000  1002000  ok (non-closed singly connected)  
        INLET               256000   257257   ok (non-closed singly connected)  
        OUTLET              256000   257257   ok (non-closed singly connected)  
        CYLINDER            512000   514000   ok (non-closed singly connected)  
        BACK                1000000  1002000  ok (non-closed singly connected)  
    
    Checking geometry...
        Overall domain bounding box (-32 -32 0) (32 32 3.33332)
        Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
        Mesh has 3 solution (non-empty) directions (1 1 1)
        Boundary openness (-4.65606e-16 4.16736e-21 -4.97036e-16) OK.
        Max cell openness = 3.18122e-16 OK.
        Max aspect ratio = 29.4282 OK.
        Minimum face area = 1.3175e-06. Maximum face area = 0.0385213.  Face area magnitudes OK.
        Min volume = 1.71549e-08. Max volume = 0.000501578.  Total volume = 10720.6.  Cell volumes OK.
        Mesh non-orthogonality Max: 1.72876e-05 average: 0
        Non-orthogonality check OK.
        Face pyramids OK.
        Max skewness = 0.00266764 OK.
        Coupled point location match (average 0) OK.
    
    Mesh OK.
    
    End
    
  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]