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中文网

thegameT

thegame

@thegame
关于
帖子
19
主题
1
群组
0
粉丝
1
关注
7

帖子

最新

  • openFoam并行计算的计算效率如何提升
    thegameT thegame

    @李东岳 确实debug模式要大好多

    3b373659-4bc5-4cfb-bfc7-d808feb70c02-image.png


  • openFoam并行计算的计算效率如何提升
    thegameT thegame

    @李东岳
    差别不太大,编出来甚至还小一点,不太理解。。
    d9ea9f3b-5133-4e18-a272-6886205a2b4b-image.png


  • openFoam并行计算的计算效率如何提升
    thegameT thegame

    用OpenFOAM内置的吧。最近的WM_COMPILE_OPTION除了opt,debug模式外,还有一个Prof模式。这个Prof使用开源的gprof做的。效果还是可以的。使用教程见:
    https://meywang.wordpress.com/2011/07/29/openfoam-profiling/

    1- Add an environmental variable in the .bashrc (or .cshrc) file:
    export WM_COMPILE_OPTION=Prof
    2- Source the .bashrc file and recompile the OpenFOAM.
    3- Then, you will find a new command -pg is using during the compiling.
    (Of course, you can just add -pg in the files and options files of the solvers, and step1 is not needed now.)
    4- Run the solver you want and a gmon.out file will be created in the case dir.
    5- Use
    $gprof -b solvername(absolute path is needed)
    and you will get the sampling data.
    6- One can also use kprof to analyse the sampling data.
    

    效果会像下面一样(随便测的,执行时间太快了不会被统计到)

    Each sample counts as 0.01 seconds.
      %   cumulative   self              self     total           
     time   seconds   seconds    calls  us/call  us/call  name    
    100.00      0.01     0.01     1401     7.14     7.14  Foam::List<double>::List(Foam::List<double> const&)
      0.00      0.01     0.00    14376     0.00     0.00  Foam::word::stripInvalid()
      0.00      0.01     0.00     9305     0.00     0.00  Foam::List<double>::List(int)
      0.00      0.01     0.00     7812     0.00     0.00  Foam::fvsPatchField<double>::New(Foam::word const&, Foam::word const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::surfaceMesh> const&)
    

    还有些可视化的方法可见:
    https://codeyarns.com/tech/2013-06-24-how-to-visualize-profiler-output-as-graph-using-gprof2dot.html#gsc.tab=0

    效果见:
    d78dc060-927d-402f-86a7-0399d95633e9-image.png

    有个问题就是OpenFOAM的命名空间作用域太长了,生成的这种结构图肥肠不好看。暂时不知道怎么解决


  • 有谁对OpenFOAM+GPU感兴趣么?
    thegameT thegame

    @李东岳

    @李东岳 在 有谁对OpenFOAM+GPU感兴趣么? 中说:

    看错了 @thegame 我以为3060的显卡,原来他们用的A10

    替代文字

    这个图里面16c,是16核还是16个CPU?是不是16核?如果16核的话,1个CPU跟4c+4g差不多的速度。莫非是16个CPU,一共16乘以24个核?

    后面的4c+4g,是4核+4个GPU?还是4个CPU4个GPU

    给我整懵了

    我理解的c是CPU。4c 4g也是4个CPU+4个GPU。
    这个方法也有一些问题:
    这个方法矩阵组装那些是没有GPU加速的,而且涉及到OpenFOAM的LDU矩阵转换为CUDA的CSR会有额外的计算开销。所以甚至用这个方法还会拖慢速度,见下图。我理解这种方法可能只对DNS级别,矩阵很大的计算加速效果较好。对于物理过程复杂的多相流反应流那些加速效果,效果不好。这个方法最大的优势就是不用改代码,只需要外挂库就好。
    这套我是在笔记本WSL都可以编,就是按照那个网页的教程。
    6c0f8381-6e0d-4424-9bd9-7627bbda67b4-image.png

    另:最近狠狠打工,我也想试试李老师的大4090但是真的没时间(我之前试着在国内某超算上弄过,编译通过了,但是调多个GPU计算报错了,所以估摸得专门用一段时间来折腾)


  • 有谁对OpenFOAM+GPU感兴趣么?
    thegameT thegame

    https://blog.nextfoam.co.kr/2024/01/10/gpu-accelerated-openfoam-with-petsc4foam/
    李老师这个我之前了解了一点,发现已经有人测过了。按照这个网页的操作,之前的版本都可以编上(v2306)。我也编上试了一下,我这里没有多卡,我用单卡4060Ti测了些结果,基本和原作者的结果类似。


  • 使用overset计算浮体在波浪下运动时浮体运动异常(飞出去了。。)
    thegameT thegame

    你这个问题如果增加pimple外迭代解决的话,可能通过调小压力和速度收敛因子也能让计算稳定


  • foam-extend中block coulpled方法添加laplacian项
    thegameT thegame

    大佬问题解决了吗,看你贴的报错信息貌似是代码里面这段直接”=“出错了?
    /home/dong/foam/foam-extend-5.0/src/foam/lnInclude/PtrList.C:54:18: error: invalid conversion from ‘Foam::Field<double>’ to ‘Foam::CoeffField<double>’ [-fpermissive]
    54 | ptrs_[i] = (a[i]).clone().ptr();


  • 城市工厂流场CFD流场数据集
    thegameT thegame

    东岳老师, 你这些图批量做是咋做的?我之前也做了一个类似的算例,用paraview录制的python宏,能够自动画某个界面的图,但是每个图不能自动scale。我当时是要算32个方向的流场,当时可给我一阵点点点。。。


  • 求一篇关于 VOF 方法 MULES 的文章
    thegameT thegame

    @李东岳 李老师,提一个小笔误,P166:“第 1 个面的 own 网格单元序号为 0”,这里的序号应该是2


  • 请教OpenFOAM-7中postChannel工具中代码成员函数问题
    thegameT thegame

    00d4f1b7-3cbe-4541-8fc1-e899bf8ec13a-image.png
    代码路径:
    channelIndex.H
    channelIndexTemplates.C

    想请教各位,他在channelIndex.H这里传的是const bool asymmetric = false,但是在模板实现channelIndexTemplates.C中又是const bool asymmetric。那么在初始化的时候,到底是用的哪个呢?


  • openfoam后处理按照网格信息提取数据
    thegameT thegame

    @fangyuanaza 我也遇到这个问题了,貌似是工具里面判定网格中心点距离的问题,太小的网格就提取不到值


  • OpenFOAM9计算的uprimn2Mean异常
    thegameT thegame

    @李东岳 好嘞,谢谢老师解惑


  • OpenFOAM9计算的uprimn2Mean异常
    thegameT thegame

    @李东岳 东岳老师,这是因为of9新版本自己代码的原因吗?


  • wedge几何体下setFields的用法
    thegameT thegame

    @韬智tz 谢谢


  • wedge几何体下setFields的用法
    thegameT thegame

    @韬智tz 你好,我想请问下这是哪篇文章


  • 将icem网格导入openfoam,选择chtMultiRegionFoam求解器,出现错误如图所示,怎么解决呀
    thegameT thegame

    @jpzhao 我用了topoSet但好像还是同样的报错


  • 将icem网格导入openfoam,选择chtMultiRegionFoam求解器,出现错误如图所示,怎么解决呀
    thegameT thegame

    @jpzhao 是的,我也是用这个求解器做一个共轭传热相关的,两种固体一种流体,但是还没有解决,我运行那个电子元件导热算例不Allrun的话也出现这个问题


  • 将icem网格导入openfoam,选择chtMultiRegionFoam求解器,出现错误如图所示,怎么解决呀
    thegameT thegame

    你好,我也是将icem网格导入openfoam用这个求解器出现了以上的问题,不知道是否可以交流一下


  • small常数
    thegameT thegame

    https://www.cfd-online.com/Forums/openfoam-solving/120990-small-great-rootvsmall-what.html
    里面写了small常数还有这些以及大小

    static const doubleScalar doubleScalarGREAT = 1.0e+15;
    static const doubleScalar doubleScalarVGREAT = 1.0e+300;
    static const doubleScalar doubleScalarROOTVGREAT = 1.0e+150;
    static const doubleScalar doubleScalarSMALL = 1.0e-15;
    static const doubleScalar doubleScalarVSMALL = 1.0e-300;
    static const doubleScalar doubleScalarROOTVSMALL = 1.0e-150;
    

    以及在OpenFOAM-7数值改变了(https://github.com/OpenFOAM/OpenFOAM-7/commit/c902c7a396c43ff733b33294f79acab03d7b92d8#diff-118c1e97b96036fb1f9d7f1ee5912713)
    d8bec1f9-3829-4c38-873f-62207d498415-image.png
    测试了一下OpenFOAM-7的VSMALL结果:
    430638be-f3c0-4d6c-a853-fd82f9b03400-image.png

  • 登录

  • 没有帐号? 注册

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