For faster navigation, this Iframe is preloading the Wikiwand page for Gerris.

Gerris

Gerris Flow Solver
A screenshot of Gerris(GfsView)
Gerris 1.3.2 (GfsView: 0.5.0)
原作者Stéphane Popinet, NIWA (National Institute of Water and Atmospheric research), Institut Jean le Rond d'Alembert
编程语言C
操作系统Unix-like, Mac OS X, Microsoft Windows(通过cygwin)
平台32位/64位
语言英文
类型计算流体力学
许可协议GNU通用公共许可证
网站http://gfs.sourceforge.net/

Gerris 是一个跨平台计算流体力学软件, 并且是遵守GNU通用公共许可证自由软件. 创建者是 Stéphane Popinet, 由 NIWA (National Institute of Water and Atmospheric research) 和 Institut Jean le Rond d'Alembert 进行维护. "Gerris" 是拉丁文(以及法文)中水黾的意思. [1]

历史

[编辑]

2001年, Stéphane Popinet 从零开始编写 Gerris. 第一个版本以 GNU通用公共许可证 于 2001 年 9 月发布. Gerris 是原创项目, 不是任何已有代码的改编版. [2] 最近一个稳定版是 2009-07-21 发布的. Gerris 常以发布日期标注(特别是开发中的)版本, 虽然也有正规的版本号.

严格的说 Gerris 指的仅仅是一个命令行界面的非交互式程序. 该程序依据给定的模拟文件读入各种模拟要用到的参数和物件, 并依据模拟文件的指示输出数据(可以是指定位置的物理量也可以是图形).

但通常提到 Gerris 的时候专门配合使用的计算结果查看器 GfsView 也会算在内. Gerris 计算时会自动生成离散八叉树(octree)形式的网格数据结构, 而一般的可视化软件没法处理这种结构, 故作者自己开发了 GfsView 来实现这一功能.

虽说是跨平台软件, 但在Windows平台需要使用cygwin进行编译.

主要功能

[编辑]
  • 可计算 2D 或 3D 不可压无粘/有粘流体.
  • 可在计算上述流体的同时求解对流扩散问题.
  • 支持固定边界和运动边界的计算.
  • 支持自由边界以及表面张力的计算.
  • 流体中放置的物件可由其他 CAD 软件(如 Blender [3]) 制作好后放入. 对于简单的几何体 Gerris 也提供了内置的模型供使用.
  • 全自动打网格(方形(2D)/立方体(3D)网格), 并且支持自适应网格. 疏密程度以及自适应判据可由用户指定.(GfsAdapt)
  • 可直接输出视频文件(需要 FFmpeg 的支持).
  • 支持平行计算

计算精度

[编辑]
  • 在计算无粘流体时由于计算格式的数值粘性, 结果与理论无粘流会有些差别. 网格剖分加细6次时, 等价的雷诺数大致是 104 ~ 106. 该粘性会随网格精细程度的提高而相应减小(雷诺数升高).[4]
  • 时间和空间都有二阶精度 [5].

缺点

[编辑]
  • 不支持可压流体的计算----适用范围较小.
  • 仅支持立方形的网格.
  • 全程序使用无量纲化的物理量, 单位转换不够方便[6].

示例文件

[编辑]

参见教程 [7]

文件 vorticity.gfs:

# 空间由两个单位立方体组成
1 2 GfsSimulation GfsBox GfsGEdge {} {
  # 模拟时间从 t=0 到 50
  GfsTime { end = 50 }
  # 网格剖分加细 6 次, 即是平面分成 2^6 * 2^6 个网格.
  GfsRefine 6
  # 流场的初态由随机数指定
  GfsInit {} {
    U = (0.5 - rand()/(double)RAND_MAX)
    V = (0.5 - rand()/(double)RAND_MAX)
  }  
  # 每计算10步在屏幕上输出一次时间, 以及计算误差相关的信息
  GfsOutputTime            { istep = 10  } stdout
  GfsOutputProjectionStats { istep = 10  } stdout
  # 每过 1 单位时间, 添加一帧涡量的 ppm 格式的图像到 vorticity.ppm
  GfsOutputPPM             { step = 1 } vorticity.ppm { v = Vorticity }
}
# 两个单位立方体的连接关系
GfsBox {}
1 1 right
1 1 top

开始计算

gerris2D vorticity.gfs

计算完后当前文件夹下将生成一个 .ppm 文件, 保存有各时刻的涡量大小(以颜色表示)的图像.

如在 Linux 下, 可以使用以下命令转化图像序列为视频(需要安装 ImageMagick)

convert vorticity.ppm vorticity.mpg

也可修改模拟文件使其直接输出 .mpg 文件.

参见

[编辑]

外部链接

[编辑]

参考文献

[编辑]
  1. ^ Gerris FAQ. Gerris Development Team. http://gfs.sourceforge.net/. 2012-04-16 [2012-04-16]. (原始内容存档于2018-06-12). 
  2. ^ FAQ:Where does Gerris come from?. Gerris Development Team. http://gfs.sourceforge.net/. [2012-06-14]. (原始内容存档于2018-06-12). 
  3. ^ Using Blender to create solids for Gerris. Gerris Development Team. http://gfs.sourceforge.net/. 2012-04-16 [2012-04-16]. (原始内容存档于2018-03-20). 
  4. ^ Estimation of the numerical viscosity. Gerris Development Team. http://gfs.sourceforge.net/. 2012-04-16 [2012-04-16]. (原始内容存档于2020-02-20). 
  5. ^ Quadtree-adaptive tsunami modelling (PDF). Gerris Development Team. http://gfs.sourceforge.net/. 2012-04-16 [2012-04-16]. (原始内容存档 (PDF)于2017-08-11). 
  6. ^ How would I redimensionalise U,V,W and P?. Gerris Development Team. http://gfs.sourceforge.net/. 2012-04-17 [2012-04-17]. (原始内容存档于2018-06-12). 
  7. ^ The Gerris Tutorial. Gerris Development Team. http://gfs.sourceforge.net/. 2011-03-23 [2012-04-16]. (原始内容存档于2018-04-27). 
{{bottomLinkPreText}} {{bottomLinkText}}
Gerris
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?