The grain's outer radius was smaller than its bore - #2
Conversation
grain_outer_radius was 0.00843 where the official scenario has 0.0843. A hollow grain's mass goes as (outer^2 - inner^2), so an outer radius under the inner one is a negative mass, and RocketPy 1.13 builds it without a word: solid grain mass -0.623 kg -> 4.861 kg total propellant 15.407 kg -> 20.891 kg apogee 199.8 m -> 130.5 m The apogee was 53% high because the rocket was carrying negative fuel. Since nothing downstream will catch this, the radii are now named constants with a check in front of them. It rejects an inner radius that is zero, negative, equal to the outer one, or larger. Also center_of_dry_mass_position, 0.015 where the scenario has 0.15. That one is inert today because dry_mass is 0 and it is a mass-weighted position, so it changes no number in this diff. Aligned anyway: it is the same decimal slip, and it stops being inert the day dry_mass does not stay zero. Every other parameter in this file already matches the official scenario. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
|
The red is the last step only, and it is not the physics. Step by step: The failure: That step uses Every earlier run on this workflow came from The report itself is fine. It is on the run as the Two ways to close it, both small: # skip the comment for fork pull requests
if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
# or let it fail without failing the job
continue-on-error: trueI would take the first, since a step that cannot succeed is better skipped than tolerated. Happy to send it as its own pull request, though note it would show the same red until it lands, for the same reason. @zuorenchen your call on whether that goes in now or after tomorrow. |
The grain's outer radius is smaller than its bore, so the motor is carrying negative fuel.
A hollow grain's mass goes as
outer^2 - inner^2. With the outer radius under the inner one that is negative, and RocketPy 1.13 builds the motor without a warning:The apogee was 53% high because the rocket weighed 5.5 kg less than it should. Every other parameter in this file already matches
scenario_1_parameters.yaml, which is what makes this one stand out.The check. Nothing downstream catches it, so the radii are now named constants with a guard in front:
It rejects an inner radius that is zero, negative, equal to the outer one, or larger.
raiserather thanassert, so it survivespython -O.One more, and it changes nothing today.
center_of_dry_mass_positionis0.015where the scenario has0.15. It is inert whiledry_massis 0, because it is a mass-weighted position, and I checked: total mass and centre of mass come out bit-identical either way. Aligned anyway, since it is the same decimal slip and it stops being inert the daydry_massis not zero. Happy to drop that hunk if the value was deliberate.Verified with the repo's own gates:
ruff checkandruff format --checkclean, andpython simulation.pyruns end to end and writesreport.html.