BUG: fin_flutter_analysis ignores individual TrapezoidalFin objects
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reading fin_flutter_analysis and how Rocket.fins represents fin sets and individual TrapezoidalFin objects. Reproduce both cases from the issue: individual fins alone, then a fin set with individual fins. Done means individual fins are analyzed or the function clearly reports that they were omitted; also check how mixed fin thicknesses and identical individual fins affect the existing warning behavior.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
fin_flutter_analysis doesn't see individual TrapezoidalFin objects (added in #818). It loops over flight.rocket.fins, and Rocket.fins returns only Fins sets, although its docstring says "all the fins currently added to the rocket". There are two cases:
- A rocket with only individual fins raises
AttributeError: There is no TrapezoidalFins in the rocket, can't run Flutter Analysis. - A rocket with a fin set and individual fins, such as canards, gets the result of the set alone, with no warning that the other fins weren't analyzed.
To Reproduce
from rocketpy import Environment, Flight, GenericMotor, Rocket, TrapezoidalFin
from rocketpy.utilities import fin_flutter_analysis
env = Environment()
env.set_atmospheric_model(type="custom_atmosphere", wind_u=3)
motor = GenericMotor(
thrust_source=1500,
burn_time=3,
chamber_radius=0.04,
chamber_height=0.5,
chamber_position=0,
propellant_initial_mass=2,
nozzle_radius=0.03,
)
rocket = Rocket(
radius=0.05,
mass=10,
inertia=(5, 5, 0.03),
power_off_drag=0.4,
power_on_drag=0.4,
center_of_mass_without_motor=0,
)
rocket.add_motor(motor, position=-0.8)
rocket.add_nose(length=0.4, kind="vonKarman", position=1)
for angle in (0, 90, 180, 270):
fin = TrapezoidalFin(
angular_position=angle,
root_chord=0.15,
tip_chord=0.06,
span=0.1,
rocket_radius=0.05,
)
rocket.add_surfaces(fin, positions=-0.85)
flight = Flight(rocket=rocket, environment=env, rail_length=5)
fin_flutter_analysis(
fin_thickness=0.003, shear_modulus=2.6e9, flight=flight, see_graphs=False
)
For the second case, add a fin set before the flight. The function analyzes only the set (S=0.0060 m2) and prints a minimum safety factor of 1.288. The four individual fins get 0.844 when they're defined as a set instead, so the analysis leaves out the fins that would flutter:
rocket.add_trapezoidal_fins(
n=4, root_chord=0.1, tip_chord=0.05, span=0.08, position=-0.4
)
Expected behavior
Individual fins are analyzed, or at least the second case warns that they were left out.
Additional context
This came up in the review of #1201. Two things to decide for a fix: fin_thickness and shear_modulus are single values, so fins of different thickness can't be analyzed in one call, and four identical individual fins shouldn't trigger the "More than one fin set found" warning. I can work on it after #1201, since both change the same function. Would you rather analyze every distinct fin, or only raise a clear error?
- 主要语言
- Python
- 星标
- 1.1k
- 派生
- 280
- 平均合并
- 3 天 2 小时
- 30 天内合并 PR
- 24
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RocketPy-Team/RocketPy 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
RocketPy-Team/RocketPy#1255 ·
维护者通常 3 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
RocketPy-Team/RocketPy#1241 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
RocketPy-Team/RocketPy#1202 ·
维护者通常 3 天内回复
-
Monte Carlo test fixtures write their logs into the working directory可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
RocketPy-Team/RocketPy#1189 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
RocketPy-Team/RocketPy#1171 · 1 条评论 ·
维护者通常 3 天内回复
查看 RocketPy-Team/RocketPy 的全部 Issue
相似的 Issue
-
docs(contributing): the two things that silently block a PR可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭available documentation good first issue
难度 1/5 1-3 小时 新手友好度 95/100
Nixitov/Riptide-Native#944 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
JTHCode/secretguard#24 ·
维护者通常 1 天内回复
-
area: middleware documentation good first issue
难度 2/5 1-3 小时 新手友好度 88/100
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
omarelshamy25x/shamy-hijri#63 ·
维护者通常 1 天内回复