Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新
    1. Home
    2. 刘雄国
    刘
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups

    刘雄国

    @刘雄国

    36
    Posts
    698
    Profile views
    5
    Followers
    2
    Following
    Joined Last Online

    刘雄国 Follow

    Best posts made by 刘雄国

    • RE: 请问大家用过gdb调试openfoam吗?

      Now I have an idea. It is very easy.
      If we want to debug a virtual function in OpenFOAM, just add one line in the specific position.
      "
      int c = getchar();
      "
      Then recompile this library and run it in gdb mode. If the program stops, "ctrl + c" kills the program. And just type 'bt' to print a backtrace of the entire stack.

      "
      (gdb) r
      Starting program: /OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Debug/bin/
      Missing separate debuginfos, use: zypper install glibc-debuginfo-2.22-19.1.x86_64
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/lib64/libthread_db.so.1".
      ...
      ^C
      Program received signal SIGINT, Interrupt.
      0x00007ffff08f1320 in __read_nocancel () from /lib64/libc.so.6
      Missing separate debuginfos, use: zypper install libgcc_s1-debuginfo-7.3.1+r258812-10.1.x86_64 libstdc++6-debuginfo-7.3.1+r261272-106.1.x86_64 libz1-debuginfo-1.2.8-14.3.1.x86_64 openmpi-libs-debuginfo-1.10.6-4.1.x86_64
      (gdb) bt
      "

      Thanks for your attention.

      posted in OpenFOAM
      刘
      刘雄国

    Latest posts made by 刘雄国

    • RE: 看个乐:renumberMesh后的魔性云图

      减少mpi 通信

      posted in OpenFOAM
      刘
      刘雄国
    • RE: turbulence->validate有何意义

      其实也不难,你用grep大概能猜出个所以然来。
      grep -rn "validate"
      其他都是空函数只有一个函数有点意思

      template<class BasicTurbulenceModel>
      void Foam::ReynoldsStress<BasicTurbulencemModel>::validate()
      {
                 correctNut();
      }
      

      然后我又grep 了correctNut()
      常用的是kOmega 我看了下

      template<class BasicTurbulenceModel>
      void kOmega<BasicTurbulenceModel>::correctNut()
      {
           this->nut_ = k_/omega_;
           correctBC;
           BasicTurbulenceModel::correctNut():
      }
      

      我虽然没有一行行debug, 大概猜出来就是湍流初始化。最开始给定k omega 初始值计算出第一步的nut 初始值给k omega方程,即previous time step,欢迎指正。

      posted in OpenFOAM
      刘
      刘雄国
    • RE: 求助帖:OpenFOAM后处理极小数

      volScalarField YcMinus0dot7 = Yc(s) - 0.7;

      posted in OpenFOAM
      刘
      刘雄国
    • RE: 欧拉-拉格朗日方法,用不同的线程来进行流场计算和颗粒跟踪

      @hurricane007 在 欧拉-拉格朗日方法,用不同的线程来进行流场计算和颗粒跟踪 中说:

      如果有这种求解器的话,求指点一下,如果不能的话,求讨论一下为啥不能

      线程 != processor 进程
      OpenFOAM only applies the MPI library, not OpenMP. Another problem, the particle/cloud classes require the local velocity, temperature, turbulence, and pressure field to calculate the particle velocity or forces. You need to solve that, how particle tracking slaves access the those information from CFD slaves. Furthermore, does the particle field affect the fluid field? Then, ... It is complex.
      Sorry, I don't have Chinese typing now.

      posted in OpenFOAM
      刘
      刘雄国
    • RE: List类的clear()函数

      可以参照vector<>内存管理模式,网上很多资料。不清空内存是为了防止堆空间内存反复allocate和delete,防止重复调用系统资源,这样运行速度下降。allocated size是分配了多少空间,size是你用多少个空间。
      double a[10] = {1,1,1};
      类似这种,分配10个double空间,实际上只用了3个double空间,当然这使用的是栈内存。

      posted in OpenFOAM
      刘
      刘雄国
    • RE: 并行效率疑问

      @刘雄国 在 并行效率疑问 中说:

      大牛说 下一代cfd 需要 大规模计算机网格 + Algorithm + Coding 整体考虑 我觉得很有道理

      我说错了, 下一代cfd 需要 大规模计算机网格 + CFD Algorithm + CFD Coding + physical网格 整体考虑

      posted in OpenFOAM
      刘
      刘雄国
    • RE: 并行效率疑问

      OpenFOAM 矩阵计算效率是可以更高,这点没有疑问. 矩阵计算效率高不高 主要取决于 MPI 通信
      1000 processors 以上 不同节点上 计算 OpenFOAM 要重构

      效率高不高除了算法,计算问题类型, 代码优化等有关系

      大牛说 下一代cfd 需要 大规模计算机网格 + Algorithm + Coding 整体考虑 我觉得很有道理

      问过openfoam developer, 他的意思是 OpenFOAM is a general CFD solver. They want to solve specific problem to make money (ESI).

      posted in OpenFOAM
      刘
      刘雄国
    • RE: 请问,MPPIC这个方法的particle distribution function的运作

      @zhe qtcreator line-by-line debuging

      posted in OpenFOAM
      刘
      刘雄国
    • RE: 请问DPMFoam不能用于非常精细的网格的模型么?

      OpenFOAM 颗粒的粒径可以大于网格尺寸, 这个库是有bug的,你需要花时间认真读读

      posted in OpenFOAM
      刘
      刘雄国
    • RE: 拉格朗日粒子在平行運算下的問題

      @r07522121 google MPI load balance

      posted in OpenFOAM
      刘
      刘雄国