| 查看: 3301 | 回复: 6 | ||
[求助]
玻尔兹曼格子法与浸入边界法结合(IB-LBM)插值问题 已有3人参与
|
|
哪位前辈指点下,在IB-LBM中,对受力和速度使用两点插值,可是在一段程序中: // Identify the lowest fluid lattice node in interpolation range. // 'Lowest' means: its x- and y-values are the smallest. // The other fluid nodes in range have coordinates // (x_int + 1, y_int), (x_int, y_int + 1), and (x_int + 1, y_int + 1). int x_int = (int)(particle.node[n].x - 0.5 + Nx) - Nx; int y_int = (int)(particle.node[n].y + 0.5); // Run over all neighboring fluid nodes. // In the case of the two-point interpolation, it is 2x2 fluid nodes. for (int X = x_int; X <= x_int + 1; ++X) { for (int Y = y_int; Y <= y_int + 1; ++Y) { // Compute distance between object node and fluid lattice node. const double dist_x = particle.node[n].x - 0.5 - X; const double dist_y = particle.node[n].y + 0.5 - Y; 为什么X方向要-0.5,Y方向要+0.5,不是直接向下取整就行了么? |
» 猜你喜欢
瑞典林雪平大学博士后招聘|PEC Water Splitting 方向
已经有130人回复
PRB投稿,Acknowledgment sent to author状态十天了
已经有3人回复
物理学I论文润色/翻译怎么收费?
已经有144人回复
PVA溶解
已经有2人回复
基金申请
已经有44人回复
CSC与新西兰维多利亚大学PhD奖学金项目
已经有0人回复
新西兰Robinson研究所 招聘CSC公派访问人员
已经有0人回复
帮我的英语口语老师找学生
已经有0人回复
什么时候开奖?
已经有11人回复
散金币祈福
已经有94人回复
2楼2016-11-17 20:57:32
bubblestar
铜虫 (初入文坛)
- 应助: 0 (幼儿园)
- 金币: 466.8
- 散金: 9
- 红花: 1
- 帖子: 42
- 在线: 11.1小时
- 虫号: 4593406
- 注册: 2016-04-16
- 专业: 多相流热物理学
3楼2017-02-24 10:10:00
4楼2017-10-09 14:14:21
唐松磊
铜虫 (正式写手)
- 应助: 0 (幼儿园)
- 金币: 1609.7
- 散金: 485
- 红花: 1
- 沙发: 2
- 帖子: 829
- 在线: 33.7小时
- 虫号: 6446859
- 注册: 2017-05-04
- 性别: GG
- 专业: 固体力学
5楼2018-11-30 11:39:42
唐松磊
铜虫 (正式写手)
- 应助: 0 (幼儿园)
- 金币: 1609.7
- 散金: 485
- 红花: 1
- 沙发: 2
- 帖子: 829
- 在线: 33.7小时
- 虫号: 6446859
- 注册: 2017-05-04
- 性别: GG
- 专业: 固体力学
6楼2018-11-30 11:41:20
janeloveben
铜虫 (正式写手)
- 应助: 0 (幼儿园)
- 金币: 2559.8
- 散金: 5
- 红花: 1
- 帖子: 699
- 在线: 39.8小时
- 虫号: 4009477
- 注册: 2015-08-06
- 性别: GG
- 专业: 机械测试理论与技术

7楼2019-02-28 19:36:49









回复此楼