Remove FIXME comment since it was addressed by the previous commit which
modified the epsilon to check for equality in y points. Removed a bunch of vertical whitespace.
This commit is contained in:
parent
062dbb7a4c
commit
11a59e0759
@ -30,8 +30,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
/** Number of divisions in the fin chords. */
|
/** Number of divisions in the fin chords. */
|
||||||
protected static final int DIVISIONS = 48;
|
protected static final int DIVISIONS = 48;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected double macLength = Double.NaN; // MAC length
|
protected double macLength = Double.NaN; // MAC length
|
||||||
protected double macLead = Double.NaN; // MAC leading edge position
|
protected double macLead = Double.NaN; // MAC leading edge position
|
||||||
protected double macSpan = Double.NaN; // MAC spanwise position
|
protected double macSpan = Double.NaN; // MAC spanwise position
|
||||||
@ -48,7 +46,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
protected double[] chordTrail = new double[DIVISIONS];
|
protected double[] chordTrail = new double[DIVISIONS];
|
||||||
protected double[] chordLength = new double[DIVISIONS];
|
protected double[] chordLength = new double[DIVISIONS];
|
||||||
|
|
||||||
|
|
||||||
protected final WarningSet geometryWarnings = new WarningSet();
|
protected final WarningSet geometryWarnings = new WarningSet();
|
||||||
|
|
||||||
private double[] poly = new double[6];
|
private double[] poly = new double[6];
|
||||||
@ -81,7 +78,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
calculateInterferenceFinCount(fin);
|
calculateInterferenceFinCount(fin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculates the non-axial forces produced by the fins (normal and side forces,
|
* Calculates the non-axial forces produced by the fins (normal and side forces,
|
||||||
* pitch, yaw and roll moments, CP position, CNa).
|
* pitch, yaw and roll moments, CP position, CNa).
|
||||||
@ -90,7 +86,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
public void calculateNonaxialForces(FlightConditions conditions,
|
public void calculateNonaxialForces(FlightConditions conditions,
|
||||||
AerodynamicForces forces, WarningSet warnings) {
|
AerodynamicForces forces, WarningSet warnings) {
|
||||||
|
|
||||||
|
|
||||||
if (span < 0.001) {
|
if (span < 0.001) {
|
||||||
forces.setCm(0);
|
forces.setCm(0);
|
||||||
forces.setCN(0);
|
forces.setCN(0);
|
||||||
@ -104,15 +99,12 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add warnings (radius/2 == diameter/4)
|
// Add warnings (radius/2 == diameter/4)
|
||||||
if (thickness > bodyRadius / 2) {
|
if (thickness > bodyRadius / 2) {
|
||||||
warnings.add(Warning.THICK_FIN);
|
warnings.add(Warning.THICK_FIN);
|
||||||
}
|
}
|
||||||
warnings.addAll(geometryWarnings);
|
warnings.addAll(geometryWarnings);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//////// Calculate CNa. /////////
|
//////// Calculate CNa. /////////
|
||||||
|
|
||||||
// One fin without interference (both sub- and supersonic):
|
// One fin without interference (both sub- and supersonic):
|
||||||
@ -125,7 +117,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
double theta = conditions.getTheta();
|
double theta = conditions.getTheta();
|
||||||
double angle = baseRotation;
|
double angle = baseRotation;
|
||||||
|
|
||||||
|
|
||||||
// Compute basic CNa without interference effects
|
// Compute basic CNa without interference effects
|
||||||
if (finCount == 1 || finCount == 2) {
|
if (finCount == 1 || finCount == 2) {
|
||||||
// Basic CNa from geometry
|
// Basic CNa from geometry
|
||||||
@ -232,24 +223,18 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
// cna *= pow2(1 + tau); // Barrowman thesis (too optimistic??)
|
// cna *= pow2(1 + tau); // Barrowman thesis (too optimistic??)
|
||||||
// logger.debug("Component cna = {}", cna);
|
// logger.debug("Component cna = {}", cna);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: LOW: check for fin tip mach cone interference
|
// TODO: LOW: check for fin tip mach cone interference
|
||||||
// (Barrowman thesis pdf-page 40)
|
// (Barrowman thesis pdf-page 40)
|
||||||
|
|
||||||
// TODO: LOW: fin-fin mach cone effect, MIL-HDBK page 5-25
|
// TODO: LOW: fin-fin mach cone effect, MIL-HDBK page 5-25
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Calculate CP position
|
// Calculate CP position
|
||||||
|
double x = macLead + calculateCPPos(conditions) * macLength;
|
||||||
// logger.debug("Component macLead = {}", macLead);
|
// logger.debug("Component macLead = {}", macLead);
|
||||||
// logger.debug("Component macLength = {}", macLength);
|
// logger.debug("Component macLength = {}", macLength);
|
||||||
//FIXME - macLength is incorrect!
|
|
||||||
double x = macLead + calculateCPPos(conditions) * macLength;
|
|
||||||
// logger.debug("Component x = {}", x);
|
// logger.debug("Component x = {}", x);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Calculate roll forces, reduce forcing above stall angle
|
// Calculate roll forces, reduce forcing above stall angle
|
||||||
|
|
||||||
// Without body-fin interference effect:
|
// Without body-fin interference effect:
|
||||||
@ -258,9 +243,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
// With body-fin interference effect:
|
// With body-fin interference effect:
|
||||||
forces.setCrollForce(finCount * (macSpan + r) * cna1 * (1 + tau) * cantAngle / conditions.getRefLength());
|
forces.setCrollForce(finCount * (macSpan + r) * cna1 * (1 + tau) * cantAngle / conditions.getRefLength());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (conditions.getAOA() > STALL_ANGLE) {
|
if (conditions.getAOA() > STALL_ANGLE) {
|
||||||
// System.out.println("Fin stalling in roll");
|
// System.out.println("Fin stalling in roll");
|
||||||
forces.setCrollForce(forces.getCrollForce() * MathUtil.clamp(
|
forces.setCrollForce(forces.getCrollForce() * MathUtil.clamp(
|
||||||
@ -269,8 +251,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
forces.setCrollDamp(calculateDampingMoment(conditions));
|
forces.setCrollDamp(calculateDampingMoment(conditions));
|
||||||
forces.setCroll(forces.getCrollForce() - forces.getCrollDamp());
|
forces.setCroll(forces.getCrollForce() - forces.getCrollDamp());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// System.out.printf(component.getName() + ": roll rate:%.3f force:%.3f damp:%.3f " +
|
// System.out.printf(component.getName() + ": roll rate:%.3f force:%.3f damp:%.3f " +
|
||||||
// "total:%.3f\n",
|
// "total:%.3f\n",
|
||||||
// conditions.getRollRate(), forces.CrollForce, forces.CrollDamp, forces.Croll);
|
// conditions.getRollRate(), forces.CrollForce, forces.CrollDamp, forces.Croll);
|
||||||
@ -297,10 +277,8 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
forces.setCside(0);
|
forces.setCside(0);
|
||||||
forces.setCyaw(0);
|
forces.setCyaw(0);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the MAC length of the fin. This is required in the friction drag
|
* Returns the MAC length of the fin. This is required in the friction drag
|
||||||
* computation.
|
* computation.
|
||||||
@ -315,8 +293,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
return macLead + 0.5 * macLength;
|
return macLead + 0.5 * macLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pre-calculates the fin geometry values.
|
* Pre-calculates the fin geometry values.
|
||||||
*/
|
*/
|
||||||
@ -341,7 +317,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Calculate the chord lead and trail positions and length
|
// Calculate the chord lead and trail positions and length
|
||||||
|
|
||||||
Arrays.fill(chordLead, Double.POSITIVE_INFINITY);
|
Arrays.fill(chordLead, Double.POSITIVE_INFINITY);
|
||||||
@ -402,7 +377,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Calculate fin properties:
|
/* Calculate fin properties:
|
||||||
*
|
*
|
||||||
* macLength // MAC length
|
* macLength // MAC length
|
||||||
@ -455,7 +429,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
cosGammaLead /= (DIVISIONS - 1);
|
cosGammaLead /= (DIVISIONS - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////// CNa1 calculation ////////////////
|
/////////////// CNa1 calculation ////////////////
|
||||||
|
|
||||||
private static final double CNA_SUBSONIC = 0.9;
|
private static final double CNA_SUBSONIC = 0.9;
|
||||||
@ -494,7 +467,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
// System.out.println("K3[m="+CNA_SUPERSONIC+"] = "+k3[0]);
|
// System.out.println("K3[m="+CNA_SUPERSONIC+"] = "+k3[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected double calculateFinCNa1(FlightConditions conditions) {
|
protected double calculateFinCNa1(FlightConditions conditions) {
|
||||||
double mach = conditions.getMach();
|
double mach = conditions.getMach();
|
||||||
double ref = conditions.getRefArea();
|
double ref = conditions.getRefArea();
|
||||||
@ -531,9 +503,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
return cnaInterpolator.interpolate(mach, subV, superV, subD, superD, 0);
|
return cnaInterpolator.interpolate(mach, subV, superV, subD, superD, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private double calculateDampingMoment(FlightConditions conditions) {
|
private double calculateDampingMoment(FlightConditions conditions) {
|
||||||
double rollRate = conditions.getRollRate();
|
double rollRate = conditions.getRollRate();
|
||||||
|
|
||||||
@ -543,7 +512,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
double mach = conditions.getMach();
|
double mach = conditions.getMach();
|
||||||
double absRate = Math.abs(rollRate);
|
double absRate = Math.abs(rollRate);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* At low speeds and relatively large roll rates (i.e. near apogee) the
|
* At low speeds and relatively large roll rates (i.e. near apogee) the
|
||||||
* fin tips rotate well above stall angle. In this case sum the chords
|
* fin tips rotate well above stall angle. In this case sum the chords
|
||||||
@ -564,8 +532,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
return MathUtil.sign(rollRate) * finCount * sum;
|
return MathUtil.sign(rollRate) * finCount * sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (mach <= CNA_SUBSONIC) {
|
if (mach <= CNA_SUBSONIC) {
|
||||||
// System.out.println("BASIC: "+
|
// System.out.println("BASIC: "+
|
||||||
// (component.getFinCount() * 2*Math.PI * rollRate * rollSum /
|
// (component.getFinCount() * 2*Math.PI * rollRate * rollSum /
|
||||||
@ -609,9 +575,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
supersonic * (mach - CNA_SUBSONIC) / (CNA_SUPERSONIC - CNA_SUBSONIC);
|
supersonic * (mach - CNA_SUBSONIC) / (CNA_SUPERSONIC - CNA_SUBSONIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the relative position of the CP along the mean aerodynamic chord.
|
* Return the relative position of the CP along the mean aerodynamic chord.
|
||||||
* Below mach 0.5 it is at the quarter chord, above mach 2 calculated using an
|
* Below mach 0.5 it is at the quarter chord, above mach 2 calculated using an
|
||||||
@ -706,7 +669,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double calculatePressureDragForce(FlightConditions conditions,
|
public double calculatePressureDragForce(FlightConditions conditions,
|
||||||
double stagnationCD, double baseCD, WarningSet warnings) {
|
double stagnationCD, double baseCD, WarningSet warnings) {
|
||||||
@ -744,14 +706,12 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
}
|
}
|
||||||
// Airfoil assumed to have zero base drag
|
// Airfoil assumed to have zero base drag
|
||||||
|
|
||||||
|
|
||||||
// Scale to correct reference area
|
// Scale to correct reference area
|
||||||
drag *= finCount * span * thickness / conditions.getRefArea();
|
drag *= finCount * span * thickness / conditions.getRefArea();
|
||||||
|
|
||||||
return drag;
|
return drag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void calculateInterferenceFinCount(FinSet component) {
|
private void calculateInterferenceFinCount(FinSet component) {
|
||||||
RocketComponent parent = component.getParent();
|
RocketComponent parent = component.getParent();
|
||||||
if (parent == null) {
|
if (parent == null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user