Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Obstruction show/hide events between output times are ignored in masks

未关闭 适合新手
#133 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
70/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
data

调研方向

从 fdsreader/bndf/obstruction.py 中的 SubObstruction.get_visible_times 开始,当前该函数中的显示/隐藏事件只与输出时间完全相等时才匹配;Mesh.get_obstruction_mask 会使用其结果。请修改它,使时间 t_e 的事件应用于所有 >= t_e 的输出时间。当使用真实的 Obstruction 和 SubObstruction 对象构建测试,且显示和隐藏时间位于输出时间之间,并且在每个输出时间都得到正确的可见性时,即完成。

由索引模型根据 Issue 内容生成。

描述

Found while reviewing #131.

SubObstruction.get_visible_times(times) (fdsreader/bndf/obstruction.py) only applies a show/hide event if its time is exactly one of the given output times:

for time in times:
    if time in self.show_times:
        hidden = False
    if time in self.hide_times:
        hidden = True

Show/hide times come from device/control activation and rarely coincide with slice/Plot3D/Smoke3D output times. An obstruction removed at t = 12.3 s with output every 1 s is therefore never hidden, and Mesh.get_obstruction_mask(times) masks it for the whole run. The time-dependent masks (to_global(masked=True) for slices, Plot3D and Smoke3D, and since #131 also 3D slices) are effectively constant for real cases.

Expected: an event at time t_e applies to all output times >= t_e (state of the obstruction at each output time).

A test should use real Obstruction/SubObstruction objects with show/hide times between output times; the tests in #131 use a fake obstruction that returns the visible times directly.

主要语言
Python
星标
76
派生
28
平均合并
1 天 10 小时
30 天内合并 PR
13

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

FireDynamics/fdsreader 的其他 Issue

查看 FireDynamics/fdsreader 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。