当前位置: 首页 > 工具软件 > FEniCS > 使用案例 >

一篇关于开源有限元库Fenics的评论:FEniCS is highly overrated. Avoid it.

贡光明
2023-12-01

最近看到一篇关于fenics的评论,觉得挺有意思,遂搬运过来。大意就是说fenics虽然名为开源库,但实际上开源的效果并不是很好。对于做有限元分析的新手来说它不怎么友好,其实际效果是被高估了的。其实我也研究了一段时间fenics了,不得不承认它的抽象做得确实够好,但过度的抽象就丢失了具体。我只能说想要摸清楚它底层的实现过程,或者想自定义地修改一些模块都太难了。如果想自己来编代码搞搞学术研究吧,只能做些应用层级的工作,很难深入底层;想要当工具做实际计算吧,那还不如用别的商软呢。所以它的定位就比较尴尬了,可能对于从一开始就很熟悉fenics的人而言它确实好用,但对于新手的话学起来太费劲。

这篇文章的评论跟我实际的感受也是很一致的,fenics就像是一块精美烹饪的鸡肋,想要把它嚼出味道,单靠个人自学实在成本过高非下苦工不可,这就丧失了开源软件的意义了。相较于它,我还是更喜欢deal.II。文章链接在下面,我就不翻译了。

未经允许请不要转载。

https://ckadapa.wordpress.com/2017/11/01/fenics-is-highly-overrated-dont-use-it/

FEniCS is highly overrated. Avoid it.

I have only one suggestion for the FEA community regarding FEniCS. That is,

If you want to learn FEA, then never use FEniCS. 

Recently, FEniCS has gained a lot of popularity among academics in the FEA community. (I do not think that industrial engineers are too naive to use FEniCS. Because they know better about the capabilities of FEA library/software suite.) I have heard many academics talking about FEniCS. So, I thought that it is worth looking into FEniCS. After going through its website, user documentation, and some of the tutorials, I came to the following conclusions:

  • FEniCS is highly overrated, and it has very limited stuff to offer for the FEA community.
  • FEniCS is good only for the Mathematicians who do not want to code and/or those who do not know programming.
  • FEniCS is not good enough for students who want to learn FEA nor for engineers who want to simulate their problems.
  • FEniCS is like ANSYS, Abaqus, Fluent etc., but without the GUI and with far few capabilities.
  • FEniCS is a perfect example of how an FEA library should not be designed.

 

Let’s have a look at the claims on FEniCS’s website.

1.) FEniCS enables users to quickly translate scientific models into efficient finite element code.

So what? It does not help FE users in learning either the finite element method or the aspect of programming for FEM. The users will not learn anything by running some Python code in which all the FE contents are available as one-line functions. Better to use a precompiled commercial package with a GUI than compiling such a Python code.

For example, let’s take this sample code snippet.

P2 = VectorElement('P', tetrahedron, 2)
P1 = FiniteElement('P', tetrahedron, 1)
TH = P2 * P1
W = FunctionSpace(mesh, TH)

There is nothing you can learn about FEA programming with these four lines of code.

2.) With the high-level Python and C++ interfaces to FEniCS, it is easy to get started, but FEniCS offers also powerful capabilities for more experienced programmers.

Unsubstantiated claims. I have not seen any such capabilities that come nowhere close to other opensource libraries/packages for FEA.

  • Very limited capabilities for non-linear analysis.

3.) FEniCS runs on a multitude of platforms ranging from laptops to high-performance clusters.

This is not unique to FEniCS. All the other (almost all of the top ones) modern FE libraries run on a multitude of platforms.

 

So, my suggestion to the FEA community is to avoid FEniCS.

  1. If you want to learn the coding aspects of FEA, then follow any good book on FEA, for example by Prof. TJR Hughes or Prof. O Zienkiewicz or Prof. J. N. Reddy etc. There are plenty such textbooks. FEA library deal.ii is one of the best places to learn both FEA and its programming.
  2. If you want to learn to simulate complex models, then learn one of the commercial packages like ANSYS, Abaqus, Nastran, Fluent, StarCCM+, COMSOL etc.

 

Note: I will keep updating this blog post if I come across any new reasons. You are welcome to suggest if you have any.

 类似资料: