pushed to the wrong branch, sorry
Revert "Don't let fins with zero area cause NaN exceptions." This reverts commit 1011f2df944dbfe3e82016ea0a3a0f0954c1ca9b. Revert "Add warning for fin with zero area" This reverts commit 512ce78b51a2514a5e96f72d9e8946d63b291cd9.
This commit is contained in:
parent
02c47408e8
commit
a61068e9f0
@ -1882,7 +1882,6 @@ Warning.PODSET_FORWARD = In-line podset forward of parent airframe component
|
|||||||
Warning.PODSET_OVERLAP = In-line podset overlaps parent airframe component
|
Warning.PODSET_OVERLAP = In-line podset overlaps parent airframe component
|
||||||
Warning.THICK_FIN = Thick fins may not simulate accurately.
|
Warning.THICK_FIN = Thick fins may not simulate accurately.
|
||||||
Warning.JAGGED_EDGED_FIN = Jagged-edged fin predictions may be inaccurate.
|
Warning.JAGGED_EDGED_FIN = Jagged-edged fin predictions may be inaccurate.
|
||||||
Warning.ZERO_AREA_FIN = Fins with zero area will not affect aerodynamics
|
|
||||||
Warning.LISTENERS_AFFECTED = Listeners modified the flight simulation
|
Warning.LISTENERS_AFFECTED = Listeners modified the flight simulation
|
||||||
Warning.RECOVERY_DEPLOYMENT_WHILE_BURNING = Recovery device opened while motor still burning.
|
Warning.RECOVERY_DEPLOYMENT_WHILE_BURNING = Recovery device opened while motor still burning.
|
||||||
Warning.FILE_INVALID_PARAMETER = Invalid parameter encountered, ignoring.
|
Warning.FILE_INVALID_PARAMETER = Invalid parameter encountered, ignoring.
|
||||||
|
@ -382,10 +382,6 @@ public abstract class Warning {
|
|||||||
////Jagged-edged fin predictions may be inaccurate.
|
////Jagged-edged fin predictions may be inaccurate.
|
||||||
public static final Warning JAGGED_EDGED_FIN = new Other(trans.get("Warning.JAGGED_EDGED_FIN"));
|
public static final Warning JAGGED_EDGED_FIN = new Other(trans.get("Warning.JAGGED_EDGED_FIN"));
|
||||||
|
|
||||||
/** A <code>Warning</code> that the fins have a zero area. */
|
|
||||||
////Fins with no area will not affect aerodynamics
|
|
||||||
public static final Warning ZERO_AREA_FIN = new Other(trans.get("Warning.ZERO_AREA_FIN"));
|
|
||||||
|
|
||||||
/** A <code>Warning</code> that simulation listeners have affected the simulation */
|
/** A <code>Warning</code> that simulation listeners have affected the simulation */
|
||||||
////Listeners modified the flight simulation
|
////Listeners modified the flight simulation
|
||||||
public static final Warning LISTENERS_AFFECTED = new Other(trans.get("Warning.LISTENERS_AFFECTED"));
|
public static final Warning LISTENERS_AFFECTED = new Other(trans.get("Warning.LISTENERS_AFFECTED"));
|
||||||
|
@ -84,9 +84,7 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
public void calculateNonaxialForces(FlightConditions conditions, Transformation transform,
|
public void calculateNonaxialForces(FlightConditions conditions, Transformation transform,
|
||||||
AerodynamicForces forces, WarningSet warnings) {
|
AerodynamicForces forces, WarningSet warnings) {
|
||||||
|
|
||||||
warnings.addAll(geometryWarnings);
|
if (span < 0.001) {
|
||||||
|
|
||||||
if (finArea < MathUtil.EPSILON) {
|
|
||||||
forces.setCm(0);
|
forces.setCm(0);
|
||||||
forces.setCN(0);
|
forces.setCN(0);
|
||||||
forces.setCNa(0);
|
forces.setCNa(0);
|
||||||
@ -99,6 +97,12 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((bodyRadius > 0) && (thickness > bodyRadius / 2)){
|
||||||
|
// Add warnings (radius/2 == diameter/4)
|
||||||
|
warnings.add(Warning.THICK_FIN);
|
||||||
|
}
|
||||||
|
warnings.addAll(geometryWarnings);
|
||||||
|
|
||||||
//////// Calculate CNa. /////////
|
//////// Calculate CNa. /////////
|
||||||
|
|
||||||
// One fin without interference (both sub- and supersonic):
|
// One fin without interference (both sub- and supersonic):
|
||||||
@ -237,12 +241,12 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
|
|
||||||
Coordinate[] points = component.getFinPoints();
|
Coordinate[] points = component.getFinPoints();
|
||||||
|
|
||||||
// Check geometry
|
// Check for jagged edges
|
||||||
geometryWarnings.clear();
|
geometryWarnings.clear();
|
||||||
boolean down = false;
|
boolean down = false;
|
||||||
for (int i = 1; i < points.length; i++) {
|
for (int i = 1; i < points.length; i++) {
|
||||||
if ((points[i].y > points[i - 1].y + 0.001) && down) {
|
if ((points[i].y > points[i - 1].y + 0.001) && down) {
|
||||||
geometryWarnings.add(Warning.JAGGED_EDGED_FIN, component.toString());
|
geometryWarnings.add(Warning.JAGGED_EDGED_FIN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (points[i].y < points[i - 1].y - 0.001) {
|
if (points[i].y < points[i - 1].y - 0.001) {
|
||||||
@ -250,15 +254,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (finArea < MathUtil.EPSILON) {
|
|
||||||
geometryWarnings.add(Warning.ZERO_AREA_FIN, component.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((bodyRadius > 0) && (thickness > bodyRadius / 2)){
|
|
||||||
// Add warnings (radius/2 == diameter/4)
|
|
||||||
geometryWarnings.add(Warning.THICK_FIN, component.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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);
|
||||||
@ -370,6 +365,7 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
macLead *= dy;
|
macLead *= dy;
|
||||||
area *= dy;
|
area *= dy;
|
||||||
rollSum *= dy;
|
rollSum *= dy;
|
||||||
|
|
||||||
macLength /= area;
|
macLength /= area;
|
||||||
macSpan /= area;
|
macSpan /= area;
|
||||||
macLead /= area;
|
macLead /= area;
|
||||||
@ -618,11 +614,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double calculateFrictionCD(FlightConditions conditions, double componentCf, WarningSet warnings) {
|
public double calculateFrictionCD(FlightConditions conditions, double componentCf, WarningSet warnings) {
|
||||||
// a fin with 0 area contributes no drag
|
|
||||||
if (finArea < MathUtil.EPSILON) {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
double cd = componentCf * (1 + 2 * thickness / macLength) * 2 * finArea / conditions.getRefArea();
|
double cd = componentCf * (1 + 2 * thickness / macLength) * 2 * finArea / conditions.getRefArea();
|
||||||
return cd;
|
return cd;
|
||||||
}
|
}
|
||||||
@ -631,11 +622,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
public double calculatePressureCD(FlightConditions conditions,
|
public double calculatePressureCD(FlightConditions conditions,
|
||||||
double stagnationCD, double baseCD, WarningSet warnings) {
|
double stagnationCD, double baseCD, WarningSet warnings) {
|
||||||
|
|
||||||
// a fin with 0 area contributes no drag
|
|
||||||
if (finArea < MathUtil.EPSILON) {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
double mach = conditions.getMach();
|
double mach = conditions.getMach();
|
||||||
double cd = 0;
|
double cd = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user