CFD中文网

    CFD中文网

    • 登录
    • 搜索
    • 最新
    1. 主页
    2. ibelief
    I
    • 资料
    • 关注 2
    • 粉丝 16
    • 主题 10
    • 帖子 270
    • 群组 1

    ibelief

    @ibelief

    1439
    资料浏览
    270
    帖子
    16
    粉丝
    2
    关注
    注册时间 最后登录

    ibelief 取消关注 关注
    讲师

    ibelief 发布的最佳帖子

    • 计算流体力学中的网格生成技术

      有限体积法中网格分类方法有很多,按照节点的排列是否有序可以分为结构化网格(structured grid)和非结构化网格(unstructured grid),所谓的结构化网格就是节点排列有序,节点之间的联系信息不需要专门存储。正交曲线坐标系和适体坐标系的网格就属于结构化网格,结构化网格中还有一种是多块结构化,即结构化网格分块,比如Patched 拼片式网格和搭接式网格(overlapping)。非结构化网格是指节点排列无序,节点之间的联系信息需要专门存储。比如Delaunay三角形化网格和前沿推进法生成的网格以及单元切割法和浸没边界法(immersed Boundary Method IBM)生成的网格。按照节点运动状况可以将网格分为运动网格和静止网格。按照节点分布在计算过程中的变动情况可以分为自适应网格(self-adaptive grid)和非自适应网格。

      块结构化网格为常见的结构化网格,块结构化网格的基本思想为:整个求解区域根据实际情况分成数小块,每块按常规结构化网格进行离散,各块中可采用适体坐标,以适应不规则区域的需要;各块间网格线不必连续。其具有以下优点:减轻复杂区域网格生成的难度;

      便于采用并行算法;便于照顾到不同区域中不同空间尺度的需要。例如Thakur S, Shyy W,Udarkumar H S. Numer Heat Transfer, B, 1998,33;367-396 文献中采用该方法对燃气烟道进行网格划分模拟。块结构划分思路如下图所示

      0_1527351177591_1acdf1b3-8f29-4698-832b-1bd9dc0ce171-image.png

      块结构化网格中有拼片式(patched)和搭接式(overlapping)。拼片式在疏密网格之间没有重叠区域。如下图所示

      0_1527351196035_82b36621-09ab-4a94-bd7d-08aaa56f0148-image.png

      而搭接式则存在疏密网格之间的重叠区域,同时网格线一定贯穿。如下图所示

      0_1527351206394_fd5a4e52-2264-4892-8e9d-7fdb31fca444-image.png

      块结构化网格的主要研究问题为疏密网格交界处与疏密网格重叠区的信息传递。信息传递问题相对复杂,在此暂不分析。

      非结构化网格中节点与节点间的关系没有固定的原则可循,节点与节点及节点与单元间的联系信息必须予以存储,每个单元与其周围单元的关系以及单元位置不能简单地通过递推来决定的网格系统。

      非结构化网格的分类

      按生成方法分:主要有Delaunay三角形法,前沿推进法等方法;按照非结构化网格的形状可以分为三角形,四边形,多边形,以及四面体六面体和多面体单元。

      一般来说,生成非结构化网格之前会已知计算区域及其边界上的节点分布,需确定计算区域内的节点位置及其相互间的连接关系,在此过程中研究重点主要有三个:

      1. 如何向计算区域内布置节点?
      2. 如何连接这些节点,确定节点间联系信息?
      3. 如何高效地存取节点间的联系信息?

      非结构化网格中节点的布置方法主要有单元顶点法和单元中心法,一般来说,单元中心法的离散过程难度较小。

      非结构化网格的生成方式较为复杂,前沿推进法可以参考以下文献:George P I, Serone E. The advancing front mesh generation method revisited. Int J Numer Methods Fluids, 1994, 37:3605-3619

      参考文献:陶文铨 《计算传热学的近代进展》

      发布在 Algorithm
      I
      ibelief
    • RE: ANSYS FLUENT UDF学习

      有
      以及6.3 已经是10多年之前的资料了,有些关键词已经改变了。

      https://mp.weixin.qq.com/s?__biz=MjM5MDkyMjA1Nw==&mid=2650142086&idx=1&sn=4ed2fa37805fbd681ac846dbb7b6be0c&chksm=bebc31a089cbb8b6705bd8f8cba6afcbbc967a6bdaab1c2ffee0b39e07abaa433e0ee0c0d859&token=734951311&lang=zh_CN#rd

      发布在 Fluent
      I
      ibelief
    • RE: 请教大家一个有关反应速率的udf急。

      #include "udf.h"
      DEFINE_EC_RATE(user_ec_rate, f, fthread, r, V, current, didV, Eeq)
      {
      double alpha_a = r->alpha_a, alpha_c = r->alpha_c;
      double io = r->io
      double T = F_T(f,fthread);
      double arg1, arg2;
      cxboolean tafelmethod = r->tafelmethod;
      int i;
      double eta;
      if (tafelmethod)
      {
      alpha_a = 2.303 * UNIVERSAL_GAS_CONSTANT * 298.15 /(alpha_a * FARADAY_CONSTANT);
      alpha_c = 2.303 * UNIVERSAL_GAS_CONSTANT * 298.15 /(alpha_c * FARADAY_CONSTANT);
      }
      Eeq = r->Eeq;
      eta = V - Eeq;
      for(i = 0; i<r->n_reactants; i++)
      if( ABS( r->exp_reactant[i] ) > SMALL_S )
      {
      int ni = r->reactant[i];
      io = pow((F_YI(f,fthread,ni)/MAX(r->yi_ref[ni],SMALL) + 1.0e-20), r->exp_reactant[i]);
      }
      for(i = 0; i<r->n_products; i++)
      if( ABS( r->exp_product[i] ) > SMALL_S )
      {
      int ni = r->product[i];
      io = pow((F_YI(f,fthread,ni)/MAX(r->yi_ref[ni],SMALL) + 1.0e-20), r->exp_product[i]);
      }
      arg1 = FARADAY_CONSTANT / (UNIVERSAL_GAS_CONSTANT
      T);
      arg2 = arg1
      eta;
      current = io( exp( arg2
      alpha_a ) - exp( -arg2
      alpha_c ) );
      didV = io( arg1alpha_aexp( arg2alpha_a ) + arg1alpha_cexp( -arg2alpha_c ) );
      /* If multiple electrochemical reactions are used, you can define rate for each reaction
      using the following if-statement /
      /

      if (STREQ(r->name, "reaction-1"))
      {
      ...
      }
      else if (STREQ(r->name, "reaction-2"))
      {
      ...
      }
      */
      }

      发布在 Fluent
      I
      ibelief
    • RE: 关于fluent使用GPU加速计算的问题(显存不足?)

      我之前也在探索怎么用GPU加速的问题
      您可以先参考一下这两个帖子

      https://www.cfd-online.com/Forums/fluent/148654-resolved-gpu-fluent.html
      https://www.cfd-online.com/Forums/hardware/187098-gpu-acceleration-ansys-fluent.html

      图片我没有粘贴过来~

      The topic of GPU acceleration for Ansys Fluent sometimes seems to be shrouded in mystery. So I ran a few benchmarks to answer some frequently asked questions and get a snapshot of the capability of this feature in 2017.

      Flow Setup:
      Benchmark case: 3D lid driven cavity in a cubical domain
      Grid resolution: 64x64x64 -> 262144 cells
      Reynolds number: 10000
      solver type: pressure-based, steady
      Turbulence model: standard k-epsilon
      Number of iterations: 100, reporting interval 10
      default settings whenever possible

      Software/Hardware:
      Operating system: Opensuse Leap 42.1
      Fluent version: Ansys Fluent 18.0
      CPU: Intel Xeon W3670, 6 cores, 3.2GHz, HT disabled
      Memory: 24 GB DDR3-1333 ECC triple-channel
      GPU: Quadro 5000 (theoretical compute performance: 722 GFLOPS single, 361 GFLOPS double, memory bandwidth: 126 GB/s, memory size: 2.5 GB GDDR5)

      1. Coupled algorithm

      As stated in this guide, GPU acceleration works best if the linear solver fraction is high which is usually the case when using the coupled solver. Fluent reported it to be around 60% or higher in all cases shown here. Without further ado:

      So obviously GPU acceleration works under the right circumstances.
      Using only one CPU core, adding the GPU results in a speed-up of 50-60% in single-precision (SP) and double precision (DP) respectively. But you can already see the diminishing returns with higher CPU core counts.

      1. SIMPLE algorithm

      Using the SIMPLE algorithm the picture is completely different. The linear solver fraction without a GPU is just below 30% for all cases, so GPU acceleration as it is currently implemented in Ansys Fluent can not be as effective. This is a caveat that Ansys is aware of and that is clearly stated in the more in-depth reviews of this feature.

      As expected, solution times are much higher with a GPU "acceleration".
      To be clear: this is not new information, Ansys never claimed that GPU acceleration was worth it with the SIMPLE algorithm.

      1. Pairing "high-end" CPUs with slow GPUs

      You might expect to be on the safe side as long as you are using the coupled solver. But we could already see the diminishing returns in case 1 with higher CPU core counts. We increase the discrepancy with different hardware: 2x Xeon E5-2687W, 128GB (16x8GB) DDR3-1600 reg ECC, Quadro 4000 (theoretical compute performance: 486 GFLOPS SP, 243 GFLOPS DP, memory bandwidth: 89.9 GB/s, memory size: 2 GB GDDR5)

      While solution times with a GPU and one CPU core are slightly lower than without a GPU, there is a huge performance penalty when using the GPU along with 14 CPU cores. This is despite the fact that the linear solver fraction is 60% without a GPU. So clearly, a low-end GPU will slow down fast CPUs even if the other criteria for using GPU acceleration are met.

      1. Consumer-grade graphics cards
        Lets see what a cheap consumer-grade graphics card can do for GPU acceleration. The hardware in this test: 2x Xeon E5-2650v4, 128GB (8x16GB) DDR4-2400 reg ECC, Geforce GTX 1060 6GB (theoretical compute performance: 4372 GFLOPS SP, 137 GFLOPS DP, memory bandwidth: 192 GB/s, memory size: 6 GB GDDR5). Note that there was a suspended computation residing in memory so the numbers might not be representative for the absolute performance of this processor type.

      The conclusion: GPU acceleration in Ansys Fluent definitely works with cheap gaming graphics cards. Even in DP the performance gains from the GPU are quite remarkable given its low DP performance. This might indicate that the workload in this benchmark is not entirely compute bound. Memory- and PCIe-transfers might also be important. However, the GPU is still a huge bottleneck as soon as we are using more CPU cores.

      1. Q&A

      Question
      When can I use GPU acceleration?
      Answer

      1. You need to use the right solver in the first place. For example the coupled flow solver or the DO radiation model. Switching from SIMPLE or its variants to coupled just to use GPU acceleration is probably not the best idea.
      2. Your model must fit into the GPU memory. You can estimate the amount of memory needed with the formulas in section 4 of the guide mentioned earlier. The benchmark I ran used ~0.5 GB of VRAM in single precision and ~1 GB in double precision. Again: if your model does not fit in the GPU memory, you currently can not use GPU acceleration. GPU memory from dual-cards or more than one card does stack, so you can use this to simulate larger models.

      Question
      Which GPUs can I use for GPU acceleration in Ansys Fluent
      Answer
      Ansys only recommends Tesla compute cards for this purpose. However, you can use virtually any recent Nvidia GPU. Yes, even Geforce cards, I verified this with a GTX 1060.
      That being said, not all GPUs are created equal. The main differentiation lies in the DP compute performance. Nearly all modern Geforce and Quadro GPUs have a DP/SP performance ratio of 1/32. A Quadro P6000, one of the most expensive GPUs you can buy right now has a theoretical peak performance of 11758 GFLOPS SP but only 367 GFLOPS DP. Just about the same as the seriously outdated Quadro 5000 I used in this test. This is not an issue if you want to compute in SP, but a colossal waste of money if you want to perform simulations in DP. In this case you will have to buy a Tesla card. Be careful though: even some of the Tesla cards now have reduced DP capabilities because their target application is deep learning.
      One of the last exceptions from this rule that is still somewhat relevant today is the first generation of Titan GPUs "Kepler" released in 2013 and 2014 (Titan, Titan Black, Titan Z). They have a DP/SP ratio of 1/3 and can be bought used for a reasonable price.

      Question
      Should I spend extra money on a compute GPU when buying a new Fluent workstation
      Answer
      For a "general purpose" Workstation with a limited budget the answer is probably no. You are better off spending excess money on more CPU performance in most cases. Only when you have maxed out CPU performance or if you are sure that you mostly use the solvers that benefit from GPU acceleration and your models are small enough you might consider it.

      Edit: here is a nearly exhaustive list of Nvidia GPUs with high DP capabilities:

      发布在 Fluent
      I
      ibelief
    • RE: 掺混了纳米颗粒的煤油在圆管内的流动

      fluent dpm 中有parcel 这个概念,比如一个parcel 中有10^21个粒子,这样的话,单位体积中有100 个parcel 这样的话,就可以用了。
      另外,如果droplet 的属性一样的话,不考虑droplet之间相互作用的话,就可以直接用典型粒子代替。
      如果考虑相间作用的话,可能需要其他方案。

      发布在 Fluent
      I
      ibelief
    • RE: CFDer专用春联

      psb.jpg

      春风催碧叶
      夜灯盼文章
      横批:诸事如意

      改了一下
      春风催碧叶
      夜灯盼收敛
      横批:哈哈哈哈


      碧叶双关
      收敛双关

      发布在 C斯达克
      I
      ibelief
    • RE: CFDer专用春联

      微信图片_20190203094943.jpg

      梯度散度旋度 度度有界
      质量动量能量 量量守恒

      横批 一致收敛

      发布在 C斯达克
      I
      ibelief
    • 很多讨论形不成闭环,无语了

      有些站友提出问题之后,其他站友们给了追问或者讨论之后,就没有消息了.....
      方案能不能用,倒是回复一下啊
      完全不能理解这种人提出问题就再也不管的人,不靠谱

      发布在 C斯达克
      I
      ibelief

    ibelief 发布的最新帖子

    • RE: 我要做自己的CFD软件,有生之年,跟商软来一次硬刚!

      @hurricane007 李博应该已经财富自由了吧

      发布在 C斯达克
      I
      ibelief
    • RE: 找几个CFD商软大神,帮做几个事情

      @李东岳 安装ansys 时就可以同时安装cfx么?按照我经验,目前的ansys学术版里面可以直接安装cfx,不需要任何额外的操作。

      发布在 C斯达克
      I
      ibelief
    • RE: 我要做自己的CFD软件,有生之年,跟商软来一次硬刚!

      @李东岳 这就黄了?有点可惜啊。

      发布在 C斯达克
      I
      ibelief
    • RE: 公式卡免费发放

      已经收到了

      发布在 C斯达克
      I
      ibelief
    • RE: 圆柱相切 网格划分

      @袁宝强 赞成第一种方法

      发布在 Fluent
      I
      ibelief
    • RE: 《OpenFOAM用户指南》勘误

      错别字: P12 2.1.4.2 中 (0.05,0.05,0.05)应为(0.05,0.05,0.005)

      发布在 OpenFOAM
      I
      ibelief
    • RE: 我要做自己的CFD软件,有生之年,跟商软来一次硬刚!

      @李东岳 好啊,支持啊

      发布在 C斯达克
      I
      ibelief
    • RE: 哪位大佬用过投影仪看电视

      @李东岳 之前用过极米的,效果还可以,(主要在晚上使用,所以不保证白天效果)
      是学校年会抽奖抽到的,没得挑
      https://item.jd.com/100014649792.html

      发布在 C斯达克
      I
      ibelief
    • RE: 200万网格并行算力测试(OpenFOAM版本)
      CPU Kunpeng 920 2251K
      系统: Linux (某国产系统)
      OpenFOAM版本:OpenFOAM - 7
      8 555.07
      4 810
      2 1251.31
      1 2082.1
      
      发布在 OpenFOAM
      I
      ibelief
    • RE: 200万网格并行算力测试(OpenFOAM版本)

      用笔记本测试了一下

      CPU型号:i7-4800MQ 
      系统:Ubuntu (WLS) 20.04
      OpenFOAM版本:OpenFOAM-v2006
      
      4 1655.69
      2 1437.05
      1 1637.21
      

      cafa2196-9c25-4648-b810-b9a9733998f9-image.png

      发布在 OpenFOAM
      I
      ibelief