diff --git a/core/src/net/sf/openrocket/aerodynamics/barrowman/TubeCalc.java b/core/src/net/sf/openrocket/aerodynamics/barrowman/TubeCalc.java index ed34e7476..3abd7aa30 100644 --- a/core/src/net/sf/openrocket/aerodynamics/barrowman/TubeCalc.java +++ b/core/src/net/sf/openrocket/aerodynamics/barrowman/TubeCalc.java @@ -59,22 +59,19 @@ public abstract class TubeCalc extends RocketComponentCalc { double f = 0.25/MathUtil.pow2(Math.log10((epsilon / (3.7 * diameter) + 5.74/Math.pow(Re, 0.9)))); // If we're supersonic, apply a correction - // if (conditions.getMach() > 1) { - // f = f / conditions.getBeta(); - // } + if (conditions.getMach() > 1) { + f = f / conditions.getBeta(); + } // pressure drop using Darcy-Weissbach equation deltap = f * (length * rho * MathUtil.pow2(v)) / (2 * diameter); - System.out.println(tube + ", v " + v + ", Re " + Re + ", p " + p + ": " + "deltap " + deltap); // drag coefficient of tube interior from pressure drop tubeCD = 2 * (deltap * innerArea) / (rho * MathUtil.pow2(v) * innerArea); } // convert to CD and return - System.out.println(tube + " tube CD " + tubeCD + ", stagnationCD " + stagnationCD + ", baseCD " + baseCD + ", inner area " + innerArea + ", frontal area " + frontalArea); - final double cd = (tubeCD * innerArea + (stagnationCD + baseCD) * frontalArea) / conditions.getRefArea(); - System.out.println(tube + " cd " + cd); + final double cd = (tubeCD * innerArea + 0.7*(stagnationCD + baseCD) * frontalArea) / conditions.getRefArea(); return cd; } } diff --git a/core/src/net/sf/openrocket/aerodynamics/barrowman/TubeFinSetCalc.java b/core/src/net/sf/openrocket/aerodynamics/barrowman/TubeFinSetCalc.java index 1a2e8f97e..a0b53cbfd 100644 --- a/core/src/net/sf/openrocket/aerodynamics/barrowman/TubeFinSetCalc.java +++ b/core/src/net/sf/openrocket/aerodynamics/barrowman/TubeFinSetCalc.java @@ -102,7 +102,6 @@ public class TubeFinSetCalc extends TubeCalc { // angle between bodyRadius+outerRadius and d final double theta2 = Math.PI/2.0 - theta1; - System.out.println("theta2 " + theta2); // area of arc from body tube. Doubled so we have area to remove from diamond final double a2 = MathUtil.pow2(bodyRadius) * theta2; @@ -118,18 +117,13 @@ public class TubeFinSetCalc extends TubeCalc { // Area of the outer surface of a tube, not including portion masked by interstice final double outerArea = chord * 2.0 * (Math.PI - theta1) * outerRadius; - - // Area of inner surface of a tube - final double innerArea = chord * 2.0 * Math.PI * innerRadius; // Surface area of the portion of the body tube masked by the tube fin. We'll subtract it from // the tube fin area rather than go in and change the body tube surface area calculation. If tube // fin and body tube roughness aren't the same this will result in an inaccuracy. final double maskedArea = chord * 2.0 * theta2 * bodyRadius; - wettedArea = innerArea + outerArea - maskedArea; - System.out.println(tubes + " outer " + outerArea + ", masked " + maskedArea); - log.debug("wetted area of tube fin " + wettedArea); + wettedArea = outerArea - maskedArea; // Precompute most of CNa. Equation comes from Ribner, "The ring airfoil in nonaxial // flow", Journal of the Aeronautical Sciences 14(9) pp 529-530 (1947) equation (5). @@ -270,9 +264,8 @@ public class TubeFinSetCalc extends TubeCalc { @Override public double calculateFrictionCD(FlightConditions conditions, double componentCf, WarningSet warnings) { - System.out.println(tubes + "wetted area " + wettedArea); final double frictionCD = componentCf * wettedArea / conditions.getRefArea(); - + return frictionCD; } @@ -281,11 +274,10 @@ public class TubeFinSetCalc extends TubeCalc { double stagnationCD, double baseCD, WarningSet warnings) { warnings.addAll(geometryWarnings); - System.out.println(tubes + " stag CD " + stagnationCD + ", base CD " + baseCD); final double cd = super.calculatePressureCD(conditions, stagnationCD, baseCD, warnings) + - (stagnationCD + baseCD) * intersticeArea / conditions.getRefArea(); - + (stagnationCD + baseCD) * intersticeArea / conditions.getRefArea(); + return cd; } }