function
Class WaveDragAxisymmetric

java.lang.Object
  extended by function.WaveDragAxisymmetric

public class WaveDragAxisymmetric
extends java.lang.Object

Problem instance class for wave drag computations for axisymmetric bodies. Implements a medium-fidelity (A502) method and a low-fidelity (area-rule) method to compute this wave drag.

Author:
dgorur

Nested Class Summary
static class WaveDragAxisymmetric.AreaRule
          Function for computing the wave-drag coefficient C_D_w of an axisymmetric body.
static class WaveDragAxisymmetric.CART3D
           
static class WaveDragAxisymmetric.FIDELITY
          Encodes the fidelity of the analysis: high-fidelity and low-fidelity analyses can be swapped out as required.
static class WaveDragAxisymmetric.MaxRadiusConstraint
          Computes the constraint violation for the max-radius case.
static class WaveDragAxisymmetric.MaxRadiusLoFi
          Uses a simplistic way to compute the radius constraint violations.
static class WaveDragAxisymmetric.MaxVolumeConstraint
          Computes the volume constraint violation of a given body.
static class WaveDragAxisymmetric.MaxVolumeLoFi
           
static class WaveDragAxisymmetric.Panair
          Runs PANAIR to compute the wave drag of these axisymmetric bodies.
static class WaveDragAxisymmetric.PanairShevell
          Extension of WaveDragAxisymmetric.Panair to run on shevell.
static class WaveDragAxisymmetric.PROBLEM_TYPE
          Encodes the problem type: max.
 
Field Summary
static double[] NORMALIZED_LOWER_BOUND
          Lower bounds on radii, normalized by max radius.
static double[] NORMALIZED_UPPER_BOUND
          Upper bounds on radii, normalized by max radius.
static double[] NORMALIZED_X_LOCATIONS
          Control point axial locations, normalized by body length.
 
Constructor Summary
WaveDragAxisymmetric()
           
 
Method Summary
static double computeNominalRadius(double volume, double length)
          Returns the maximum radius of the nominal (quadratic radius distribution) body that has the specified volume.
static double computeSearsHaackRadius(double volume, double length)
          Returns the maximum radius of the Sears-Haack body that has the specified volume.
static double computeSearsHaackVolume(double length, double maxRadius)
          Returns the volume of the volume-constrained minimum-drag Sears-Haack body of the given length and maximum radius.
 double getLength()
          Returns the body length.
 double getMach()
          Returns the free stream Mach number.
 double getMaxVolume()
          Returns the maximum allowed enclosed volume.
 double[] getNominalRadii()
          Returns the nominal radii.
 double getNominalRadius()
          Returns the nominal maximum radius.
 double[] getSearsHaackRadii()
          Returns the Sears-Haack radii for fixed cross-sectional area.
 double[] getSearsHaackRadii2()
          Returns the Sears-Haack radii for fixed enclosed volume.
 double[] getXLocations()
          Returns the x-locations at which the radii are specified.
 void init()
          Initializes vectors such as the absolute x-locations and absolute nominal radii (only normalized ones are stored in the class as final variables).
static ScalarFunction makeMaxRadiusConstraint(double mach, double length, double nominalRadius, WaveDragAxisymmetric.FIDELITY fidelity)
          Constructs a max-radius constraint.
static BoundConstrainedProblem makeMaxRadiusProblem(double mach, double length, double maxRadius, WaveDragAxisymmetric.FIDELITY fidelity, boolean shevellFlag)
          Constructs a max-radius-constrained problem.
static InequalityConstrainedProblem makeMaxVolumeProblem(double mach, double length, double maxVolume, WaveDragAxisymmetric.FIDELITY fidelity, boolean shevellFlag)
          Constructs an inequality-constrained problem to address the max enclosed volume case.
static ScalarFunction makeObjective(double mach, double length, double nominalRadius, WaveDragAxisymmetric.FIDELITY fidelity, boolean shevellFlag)
          Returns a ScalarFunction that is the low-fidelity computation of the wave drag for axisymmetric bodies of the given length flying at the given Mach number.
static WaveDragAxisymmetric makeProblemContainer(double mach, double length, double constraintValue, WaveDragAxisymmetric.PROBLEM_TYPE type)
          Constructs a "container" body that holds many constants that are shared by multifidelity instances of the same problem.
static ScalarFunction makeVolumeConstraint(double mach, double length, double maxVolume, WaveDragAxisymmetric.FIDELITY fidelity)
          Constructs a volume constraint function.
 void setLength(double length)
          Sets the body length.
 void setMach(double mach)
          Sets the free-stream Mach number.
 void setMaxVolume(double maxVolume)
          Sets the maximum enclosed volume.
 void setNominalRadius(double nominalRadius)
          Sets the nominal maximum radius.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMALIZED_LOWER_BOUND

public static final double[] NORMALIZED_LOWER_BOUND
Lower bounds on radii, normalized by max radius.


NORMALIZED_UPPER_BOUND

public static final double[] NORMALIZED_UPPER_BOUND
Upper bounds on radii, normalized by max radius.


NORMALIZED_X_LOCATIONS

public static final double[] NORMALIZED_X_LOCATIONS
Control point axial locations, normalized by body length.

Constructor Detail

WaveDragAxisymmetric

public WaveDragAxisymmetric()
Method Detail

computeNominalRadius

public static double computeNominalRadius(double volume,
                                          double length)
Returns the maximum radius of the nominal (quadratic radius distribution) body that has the specified volume. This is useful for setting bounds for the optimization problem where the enclosed-volume constraint is imposed.

Parameters:
volume - the given enclosed volume.
length - the given length
Returns:
the maximum radius of the quadratic radius distribution that has the given volume.

computeSearsHaackRadius

public static double computeSearsHaackRadius(double volume,
                                             double length)
Returns the maximum radius of the Sears-Haack body that has the specified volume. This is useful for setting bounds for the optimizaiton problem where the enclosed-volume constraint is imposed.

Parameters:
volume - the given enclosed volume.
length - the given length.
Returns:
the maximum radius of the Sears-Haack body of the given volume.

computeSearsHaackVolume

public static double computeSearsHaackVolume(double length,
                                             double maxRadius)
Returns the volume of the volume-constrained minimum-drag Sears-Haack body of the given length and maximum radius.

Parameters:
length - the given length.
maxRadius - the given maximum radius.
Returns:
the volume of the corresponding Sears-Haack body.

makeObjective

public static ScalarFunction makeObjective(double mach,
                                           double length,
                                           double nominalRadius,
                                           WaveDragAxisymmetric.FIDELITY fidelity,
                                           boolean shevellFlag)
Returns a ScalarFunction that is the low-fidelity computation of the wave drag for axisymmetric bodies of the given length flying at the given Mach number. Note that the actual class returned can be easily modified.

Parameters:
mach - Mach number for the test.
length - length of the body.
nominalRadius - the scaling factor for radius values.
Returns:
A ScalarFunction that uses some low-fidelity method to compute wave drag.

makeMaxRadiusConstraint

public static ScalarFunction makeMaxRadiusConstraint(double mach,
                                                     double length,
                                                     double nominalRadius,
                                                     WaveDragAxisymmetric.FIDELITY fidelity)
Constructs a max-radius constraint.

Parameters:
mach - Mach number.
length - Body length.
nominalRadius - Max radius.
Returns:
A ScalarFunction that computes the radius constraint violation.

makeVolumeConstraint

public static ScalarFunction makeVolumeConstraint(double mach,
                                                  double length,
                                                  double maxVolume,
                                                  WaveDragAxisymmetric.FIDELITY fidelity)
Constructs a volume constraint function.

Parameters:
mach - Mach number.
length - Body length.
maxVolume - Max allowed volume.
Returns:
A ScalarFunction that computes volume constraint violation.

makeMaxRadiusProblem

public static BoundConstrainedProblem makeMaxRadiusProblem(double mach,
                                                           double length,
                                                           double maxRadius,
                                                           WaveDragAxisymmetric.FIDELITY fidelity,
                                                           boolean shevellFlag)
Constructs a max-radius-constrained problem.

Parameters:
mach - Mach number.
length - Body length.
maxRadius - Max radius.
fidelity - Fidelity.
shevellFlag - Running on shevell or just Linux?
Returns:
A max-radius-constrained problem.

makeMaxVolumeProblem

public static InequalityConstrainedProblem makeMaxVolumeProblem(double mach,
                                                                double length,
                                                                double maxVolume,
                                                                WaveDragAxisymmetric.FIDELITY fidelity,
                                                                boolean shevellFlag)
Constructs an inequality-constrained problem to address the max enclosed volume case.

Parameters:
mach - Mach number.
length - Body length.
maxVolume - Max allowed enclosed volume.
fidelity - Fidelity.
shevellFlag - running on shevell or just Linux?
Returns:
a volume-constrained wave-drag minimization problem.

makeProblemContainer

public static WaveDragAxisymmetric makeProblemContainer(double mach,
                                                        double length,
                                                        double constraintValue,
                                                        WaveDragAxisymmetric.PROBLEM_TYPE type)
Constructs a "container" body that holds many constants that are shared by multifidelity instances of the same problem.

Parameters:
mach - Mach number.
length - Body length.
constraintValue - Max constraint value, either radius or volume.
type - Type of problem, radius constraint or volume constraint.
Returns:
A container that holds a WaveDragAxisymmetric instance.

getLength

public double getLength()
Returns the body length.

Returns:
the body length.

getMach

public double getMach()
Returns the free stream Mach number.

Returns:
the Mach number.

getMaxVolume

public double getMaxVolume()
Returns the maximum allowed enclosed volume.

Returns:
the maximum allowed volume.

getNominalRadii

public double[] getNominalRadii()
Returns the nominal radii.

Returns:
the nominal radii.

getNominalRadius

public double getNominalRadius()
Returns the nominal maximum radius.

Returns:
the nominal maximum radius.

getSearsHaackRadii

public double[] getSearsHaackRadii()
Returns the Sears-Haack radii for fixed cross-sectional area.

Returns:
the Sears-Haack radii for fixed cross-sectional area.

getSearsHaackRadii2

public double[] getSearsHaackRadii2()
Returns the Sears-Haack radii for fixed enclosed volume.

Returns:
the Sears-Haack radii for fixed enclosed volume.

getXLocations

public double[] getXLocations()
Returns the x-locations at which the radii are specified.

Returns:
the x-locations.

init

public void init()
Initializes vectors such as the absolute x-locations and absolute nominal radii (only normalized ones are stored in the class as final variables).


setLength

public void setLength(double length)
Sets the body length.

Parameters:
length - the given length.

setMach

public void setMach(double mach)
Sets the free-stream Mach number.

Parameters:
mach - the given Mach number.

setMaxVolume

public void setMaxVolume(double maxVolume)
Sets the maximum enclosed volume.

Parameters:
maxVolume - the given maximum volume.

setNominalRadius

public void setNominalRadius(double nominalRadius)
Sets the nominal maximum radius.

Parameters:
nominalRadius - the given nominal maximum radius.