Skip to content

Commit d9c79ba

Browse files
CopilotMateusStano
andauthored
BUG: Fix incorrect Jacobian in only_radial_burn branch of SolidMotor.evaluate_geometry (#944)
* Initial plan * BUG: Fix incorrect Jacobian in only_radial_burn branch of evaluate_geometry Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
1 parent 0c6fce1 commit d9c79ba

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ Attention: The newest changes should be on top -->
8080
- BUG: Fix parallel Monte Carlo simulation showing incorrect iteration count [#806](https://github.com/RocketPy-Team/RocketPy/pull/806)
8181
- BUG: Fix missing titles in roll parameter plots for fin sets [#934](https://github.com/RocketPy-Team/RocketPy/pull/934)
8282
- BUG: Duplicate _controllers in Flight.TimeNodes.merge() [#931](https://github.com/RocketPy-Team/RocketPy/pull/931)
83+
- BUG: Fix incorrect Jacobian in `only_radial_burn` branch of `SolidMotor.evaluate_geometry` [#935](https://github.com/RocketPy-Team/RocketPy/pull/935)
84+
- BUG: Add explicit timeouts to ThrustCurve API requests [#935](https://github.com/RocketPy-Team/RocketPy/pull/935)
8385

8486
## [v1.11.0] - 2025-11-01
8587

rocketpy/motors/solid_motor.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,14 @@ def geometry_jacobian(t, y):
546546
2 * np.pi * (grain_inner_radius * grain_height) ** 2
547547
)
548548

549-
inner_radius_derivative_wrt_inner_radius = factor * (
550-
grain_height - 2 * grain_inner_radius
551-
)
552-
inner_radius_derivative_wrt_height = 0
549+
# burn_area = 2π*r*h, so ṙ = -vdiff/(2π*r*h):
550+
# ∂ṙ/∂r = vdiff/(2π*r²*h) = factor * h
551+
# ∂ṙ/∂h = vdiff/(2π*r*h²) = factor * r
552+
inner_radius_derivative_wrt_inner_radius = factor * grain_height
553+
inner_radius_derivative_wrt_height = factor * grain_inner_radius
554+
# dh/dt = 0, so all partial derivatives of height are zero
553555
height_derivative_wrt_inner_radius = 0
554556
height_derivative_wrt_height = 0
555-
# Height is a constant, so all the derivatives with respect to it are set to zero
556557

557558
return [
558559
[

0 commit comments

Comments
 (0)