matlab数格子,matlab实现格子-Boltzmann法

Basic Lattice-Boltzmann (LB) MATLAB Code

Simple, yet simplistic, Lattice Boltzmann (LB) MATLAB implementation. D2H9, BGK, omega = 1, laminar flow in a 2D channel used as benchmark. Requires Image Processing Toolbox.

The code is not optimized for memory nor for speed, i.e. not efficient at all. However, it is better than almost nothing (i.e. the present MATLAB situation at Feb 2005 ? as far as I know)

Optimization for memory should consider only dry locations.

Other free LB (FORTRAN, C, and Cpp) codes are available:

See the anb.f code at http://www.ccrl-nece.de/lba/ or the S.Succi code available from www.physics.buffalo.edu/phy516/Files/Topic6/lbe.f

See also D2Q9poi.f from Dieter Wolf-Gladrow and

http://www.lstm.uni-erlangen.de/lbm2001/download/ written by Kraft and Schultz t tu.muenchen.de

See also the translation into C of the original Succi FORTAN code

www.physics.buffalo.edu/phy516/Files/Topic6/lbe.c

See also lb2d.m (by Youngseuk Keehm) at

http://srb.stanford.edu/GP200/PDFs/Hw02_solution.pdf

For LB benchmarking see:

http://staff.science.uva.nl/~sloot/CSS/BGK_handin.PDF

and page 190-192 in: Lattice-gas cellular automata and lattice Boltzmann models: an introduction / Dieter A. Wolf-Gladrow. -. ISBN: 3540669736.

This code is written to be readable by the most, optimisation makes it less readable. It is mean to be of some help to students tackling LB for the first time. As usual no guarantee of bug free or proper functioning. in the hope that some of the many LB developers will make soon something better available to the MATLAB community? possibly 3D, possibly multi-phase / multi-component.

Suggestions: Rather than rating, please- makes available a better code than this, it is an easier task. The user should not be surprise by encountering instability by changing the parameters without a precise rational. I suggest reading the references that benchmark the LB BKG and follow the given examples in order to get a feeling of the sensitivity of the code to the different variables.

格子波尔兹曼流体力学(Lattice Boltzmann Method, LBM)是一种用来模拟流体力学问题的值方,它基于分子动力学的理论,通过在多个离散的格点上模拟流体微粒的运动来描述流体流动。圆柱绕流是一种经典的流体力学问题,通过模拟流体在圆柱周围流动的过程,可以研究流体在圆柱表面的压力分布、阻力等性质。 在MATLAB实现格子波尔兹曼流体力学圆柱绕流的过程,可以分为以下几个步骤: 1. 确定模拟区域和格点分布:根据实际问题,确定流体的模拟区域和需要模拟的时间步长。将整个区域划分为离散的格点网格,每个格点代表一个微粒。 2. 初始化参:为模拟设置相应的初始条件,包括流体的密度、速度等。 3. 选择合适的碰撞模型:格子波尔兹曼方的核心是通过碰撞模型来模拟微粒之间的碰撞与相互作用。根据实际需要,选择适合的碰撞模型。 4. 进行流体模拟:根据格子波尔兹曼方的迭代步骤,依次计算每个格点上的微粒的运动。通过碰撞模型计算微粒的速度变化,并根据速度的变化推导微粒的位置。在模拟过程中,还需要考虑流体的边界条件,例如在圆柱表面进行边界条件的处理。 5. 结果分析与可视化:完成流体模拟后,对模拟结果进行后处理和分析。可以计算流体的压力、速度等物理量的分布,并可通过MATLAB绘制相应的图表或动画,以便更好地理解流体的运动规律和性质。 综上所述,通过MATLAB实现格子波尔兹曼流体力学圆柱绕流,可以模拟流体在圆柱周围的运动过程,并研究流体的压力分布、阻力等物理性质。这一方在流体力学领域具有广泛的应用,能够有效地解决一些经典的流体力学问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值