Repository navigation
Add external atmosphere option to FlightConditions and PR_guess to Nozzle - #124
Open
anushka-tahiliani wants to merge 1 commit into
Open
anushka-tahiliani wants to merge 1 commit into
anushka-tahiliani wants to merge 1 commit into
Conversation
…zzle FlightConditions(use_external_atmosphere=True) replaces the built-in atmosphere with ambient_static_temperature, ambient_static_pressure and ambient_density inputs, so the ambient state can come from another model such as a mission analysis or a non-standard day. Nozzle(PR_guess=...) sets the starting value of the PR_bal pressure ratio, previously fixed at 2.0. Both defaults leave results unchanged.
anushka-tahiliani
marked this pull request as ready for review
November 17, 2026 15:53
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two small, opt-in options. Neither changes results with its default value, and both work with any pyCycle model; neither needs an external initial guess.
They come out of coupling pyCycle engine models to multidisciplinary aircraft optimization in FINCH (ideas-um/FINCH#281), an Aviary-compatible package (private for now; a public release is planned). There the mission analysis supplies the ambient state at every node, including hot-day takeoff, and the engine models need a better starting point for low pressure ratio nozzles. FINCH uses both options today through a fork of pyCycle; this PR lets it depend on pyCycle directly.
FlightConditions(use_external_atmosphere=True)FlightConditionsalways builds its ambient state from the built-in US1976 table (alt,dTs). When pyCycle runs inside a larger model, like a mission analysis, the atmosphere is usually already computed upstream: a non-standard or hot day, a different atmosphere model, or a temperature profile that a constantdTscan't represent.With
use_external_atmosphere=True, theAmbientsubsystem is replaced by a passthrough with the sameambient.Ts,ambient.Psandambient.rhosoutputs. The element then takes these inputs instead ofaltanddTs:ambient_static_temperatureambient_static_pressureambient_densityEverything downstream (the Tt/Pt balance and the flow start) is unchanged.
Nozzle(PR_guess=...)Sets the starting value of the
PR_baltotal-to-static pressure ratio. It is currently hard-coded to 2.0, which is a poor starting point for low pressure ratio nozzles, such as turboshaft, fan and propulsor exhausts, and for off-design points near PR = 1. It is a plain option: pass any value greater than 1 (FINCH's turboshaft usesPR_guess=1.05). The default stays 2.0.Tests
test_flightconditions.ExternalAtmosphereTestCaseFlightConditionsthe ambient state of a second, standard one. It checks that total and static P, T, W and V match to 1e-8 at 35,000 ft / M0.8 and on a +27 degR sea-level hot day.altanddTsare not inputs in this mode.test_nozzle.test_PR_guesschecks the initialPRwith and without the option.The full test suite passes, and so does
ruff check . --select NPY201.