Skip to content

Engine scaling#1073

Open
jkirk5 wants to merge 6 commits intoOpenMDAO:mainfrom
jkirk5:engine_scaling
Open

Engine scaling#1073
jkirk5 wants to merge 6 commits intoOpenMDAO:mainfrom
jkirk5:engine_scaling

Conversation

@jkirk5
Copy link
Copy Markdown
Contributor

@jkirk5 jkirk5 commented Apr 2, 2026

Summary

Removes unnecessary variable Aircraft.Engine.SCALE_PERFORMANCE

Related Issues

Backwards incompatibilities

None

New Dependencies

None

@Kenneth-T-Moore
Copy link
Copy Markdown
Member

I think this PR uncovered some mistakes in the derivatives that weren't found because the scale_performance flag was false.

Comment thread aviary/subsystems/propulsion/engine_deck.py Outdated
Comment thread aviary/subsystems/propulsion/engine_deck.py Outdated
Comment on lines +1343 to +1349
warnings.warn(
f'EngineDeck <{self.name}>: aircraft:engine:scaled_sls_thrust and '
'product of aircraft:engine_scale_factor and '
'aircraft:engine:reference_sls_thrust are not an exact match but within '
'tolerance. Setting scaled thrust target to calculated value of '
f'{target_thrust} lbf.'
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should simplify this and go with the following logic:
If both SCALED_SLS_THRUST and SCALE_FACTOR are provided warn the user, ignore one and use the other (maybe sscale_factor should take precedence)?
This eliminates needing to do a tolerance check, and Aviary's logic is clear: it uses scale_factor to scale the engine. If scale factor is not provided it will be calculate based on SCALED_SLS_THRUST and reference thrust.

I think this warning as written will always trigger if thrust_provided = True, even if the the scaling is an exact match? If we want this warning then we should add it under an additional 'if' checking for within tolerance but not exact? Personally I think this is unecessary - if the provided scaling matches to within 1e-4 that's 0.01% and more than accurate enough to be ignored.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't ignore one because SCALED_SLS_THRUST is later used for calculations, so if it doesn't match scale factor it gets overwritten to a "incorrect" value. It's either check for a match or always error when both are provided.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it a DEBUG message for now

@@ -1364,44 +1320,34 @@ def _set_reference_thrust(self):
# both scale factor and target thrust provided:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As described below I think we should simplify this block of code for if we have both.
I would throw a warning stating both have been provided and so scaled_sls_thrust will be ignored.
Then I would move to the 'scale_factor has been provided, no scaled_thrust provided' logic block so Aviary is consistent and remove the complexity of the tolerance and warnings etc.

Copy link
Copy Markdown
Contributor Author

@jkirk5 jkirk5 Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned before, I am not sure if it is safe to ignore SLS thrust value provided. I think I will put a deprecation warning here that in the future we will not allow specifying both, with the plan to only accept scale factor in the future.

@jkirk5 jkirk5 requested a review from cmbenne3 April 14, 2026 18:50
@jkirk5 jkirk5 added this pull request to the merge queue Apr 16, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 16, 2026
@jkirk5 jkirk5 added this pull request to the merge queue Apr 17, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unintuitive behavior of Aircraft.Engine.SCALE_PERFORMANCE

3 participants