MissionProblem

class baseclasses.MissionProblem(name, **kwargs)[source]

Mission Problem Object:

This mission problem object should contain all of the information required to analyze a single mission. A mission problem is made of profiles. All profiles in a given mission problem must use consistent units.

Parameters:
namestr

A name for the mission

evalFuncsiteratble object containing strings

The names of the functions the user wants evaluated for this mission problem

Initialize the mission problem

addProfile(profiles)[source]

Append a mission profile to the list. update the internal segment indices to correspond

addVariablesPyOpt(pyOptProb)[source]

Add the current set of variables to the optProb object.

Parameters:
optProbpyOpt_optimization class

Optimization problem definition to which variables are added

checkForProfileDVs()[source]

Check if design variables have been added to this mission.

evalDVSens(stepSize=1e-20)[source]

Evaluate the sensitivity of each of the 4 segment parameters (Mach, Alt) with respect to the design variables

getAltitudeCons(CAS, mach, alt)[source]

Solve for the altitude at which CAS=mach

getAltitudeConsSens(CAS, mach, alt, stepSize=1e-20)[source]

Solve for the altitude sensitivity at which CAS=mach

getNSeg()[source]

return the number of segments in the mission

getSegments()[source]

return a list of the segments in the mission in order

setDesignVars(missionDVs)[source]

Pass the DVs to each of the profiles and have the profiles set the DVs

Parameters:
missionDVsdict

Dictionary of variables which may or may not contain the design variable names this object needs

setUnits(module)[source]

Set the units and the gravity constant for this mission.

class baseclasses.MissionProfile(name, englishUnits=False)[source]

Mission Profile Object:

This Mission Profile Object contain an ordered set of segments that make up a single subsection of a mission. Start and end points of each segment in the profile are required to be continuous.

Initialize the mission profile

addSegments(segments)[source]

Take in a list of segments and append it to the the current list. Check for consistency while we are at it.

getSegmentParameters()[source]

Get the 4 segment parameters from each of the segment it owns Order is [M1, h1, M2, h2]

setDesignVars(missionDVs)[source]

Set the variables for this mission profile

Parameters:
missionDVsdict

Dictionary of variables which may or may not contain the design variable names this object needs

class baseclasses.MissionSegment(phase, **kwargs)[source]

Mission Segment Object:

This is the basic building block of the mission solver.

Parameters:
phasestr

Segment type selector valid options include

addDV(paramKey, lower=-1e+20, upper=1e+20, scale=1.0, name=None)[source]

Add one of the class attributes as a mission design variable. Typical variables are mach or velocity and altitude An error will be given if the requested DV is not allowed to be added .

Parameters:
dvNamestr

Name used by the optimizer for this variables.

paramKeystr

Name of variable to add. See above for possible ones

valuefloat. Default is None

Initial value for variable. If not given, current value of the attribute will be used.

lowerfloat. Default is None

Optimization lower bound. Default is unbonded.

upperfloat. Default is None

Optimization upper bound. Default is unbounded.

scalefloat. Default is 1.0

Set scaling parameter for the optimization to use.

namestr. Default is None

Overwrite the name of this variable. This is typically only used when the user wishes to have multiple aeroProblems to explictly use the same design variable.

Examples

>>> # Add initMach variable with typical bounds
>>> seg.addDV('initMach', value=0.75, lower=0.0, upper=1.0, scale=1.0)
determineInputs()[source]

Determine which of the four parameters (h, M, CAS, TAS) are inputs, which can be updated directly by the DV. For each end, there should be two inputs. At this point, the two beginning inputs should already be determined during initalization or by the MissionProfile.

propagateParameters()[source]

Set the final V,M,h base on initial values and segType.

setMissionData(module, segTypeDict, engTypeDict, idx, segIdx)[source]

set the data for the current segment in the fortran module

setParameters(value, paramType, isInitVal)[source]

Design variable handling, where ‘initMach’ will be of paramType=’Mach’ and isInitVal=True, and the finalMach will be automatically adjusted if needed. Also determines if the previous or next segment will be affect as well