From 745ccc884915c3c128dde9f07579964e120e7bf7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 01:05:49 +0000 Subject: [PATCH 1/2] Initial plan From 60924a597de1f0ad5f7667ff991fc3b5fd86d390 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 01:13:08 +0000 Subject: [PATCH 2/2] BUG: Fix incorrect Jacobian in only_radial_burn branch of evaluate_geometry Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com> --- CHANGELOG.md | 1 + rocketpy/motors/solid_motor.py | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cb9bd42f..24445261a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ Attention: The newest changes should be on top --> ### Fixed +- BUG: Fix incorrect Jacobian in `only_radial_burn` branch of `SolidMotor.evaluate_geometry` [#935](https://github.com/RocketPy-Team/RocketPy/pull/935) - BUG: Add explicit timeouts to ThrustCurve API requests [#935](https://github.com/RocketPy-Team/RocketPy/pull/935) ## [v1.12.0] - 2026-03-08 diff --git a/rocketpy/motors/solid_motor.py b/rocketpy/motors/solid_motor.py index f5e89c2f8..590a02511 100644 --- a/rocketpy/motors/solid_motor.py +++ b/rocketpy/motors/solid_motor.py @@ -546,13 +546,14 @@ def geometry_jacobian(t, y): 2 * np.pi * (grain_inner_radius * grain_height) ** 2 ) - inner_radius_derivative_wrt_inner_radius = factor * ( - grain_height - 2 * grain_inner_radius - ) - inner_radius_derivative_wrt_height = 0 + # burn_area = 2π*r*h, so ṙ = -vdiff/(2π*r*h): + # ∂ṙ/∂r = vdiff/(2π*r²*h) = factor * h + # ∂ṙ/∂h = vdiff/(2π*r*h²) = factor * r + inner_radius_derivative_wrt_inner_radius = factor * grain_height + inner_radius_derivative_wrt_height = factor * grain_inner_radius + # dh/dt = 0, so all partial derivatives of height are zero height_derivative_wrt_inner_radius = 0 height_derivative_wrt_height = 0 - # Height is a constant, so all the derivatives with respect to it are set to zero return [ [