Apply zero-volume body warning earlier on + add component information
This commit is contained in:
parent
60896d2236
commit
4f3d63f1db
@ -1899,8 +1899,7 @@ Warning.RECOVERY_HIGH_SPEED = Recovery device deployment at high speed
|
|||||||
Warning.NO_RECOVERY_DEVICE = No recovery device defined in the simulation.
|
Warning.NO_RECOVERY_DEVICE = No recovery device defined in the simulation.
|
||||||
Warning.TUMBLE_UNDER_THRUST = Stage began to tumble under thrust.
|
Warning.TUMBLE_UNDER_THRUST = Stage began to tumble under thrust.
|
||||||
Warning.EVENT_AFTER_LANDING = Flight Event occurred after landing:
|
Warning.EVENT_AFTER_LANDING = Flight Event occurred after landing:
|
||||||
Warning.ZERO_VOLUME_BODY = Zero-volume bodies may not simulate accurately.
|
Warning.ZERO_VOLUME_BODY = Zero-volume bodies may not simulate accurately
|
||||||
Warning.INLINE_PODS = Inline pods may not simulate accurately.
|
|
||||||
Warning.TUBE_SEPARATION = Space between tube fins may not simulate accurately.
|
Warning.TUBE_SEPARATION = Space between tube fins may not simulate accurately.
|
||||||
Warning.TUBE_OVERLAP = Overlapping tube fins may not simulate accurately.
|
Warning.TUBE_OVERLAP = Overlapping tube fins may not simulate accurately.
|
||||||
Warning.EMPTY_BRANCH = Simulation branch contains no data
|
Warning.EMPTY_BRANCH = Simulation branch contains no data
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.sf.openrocket.aerodynamics;
|
package net.sf.openrocket.aerodynamics;
|
||||||
|
|
||||||
|
import static net.sf.openrocket.util.MathUtil.EPSILON;
|
||||||
import static net.sf.openrocket.util.MathUtil.pow2;
|
import static net.sf.openrocket.util.MathUtil.pow2;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -300,9 +301,9 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
|||||||
|
|
||||||
SymmetricComponent sym = (SymmetricComponent) comp;
|
SymmetricComponent sym = (SymmetricComponent) comp;
|
||||||
prevComp = sym.getPreviousSymmetricComponent();
|
prevComp = sym.getPreviousSymmetricComponent();
|
||||||
if( null == prevComp){
|
if (prevComp == null) {
|
||||||
if (sym.getForeRadius() - sym.getThickness() > MathUtil.EPSILON) {
|
if (sym.getForeRadius() - sym.getThickness() > MathUtil.EPSILON) {
|
||||||
warnings.add(Warning.OPEN_AIRFRAME_FORWARD, sym.toString());
|
warnings.add(Warning.OPEN_AIRFRAME_FORWARD, sym.getName());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Check for radius discontinuity
|
// Check for radius discontinuity
|
||||||
@ -315,6 +316,12 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for phantom tube
|
||||||
|
if ((sym.getLength() < MathUtil.EPSILON) ||
|
||||||
|
(sym.getAftRadius() < MathUtil.EPSILON && sym.getForeRadius() < MathUtil.EPSILON)) {
|
||||||
|
warnings.add(Warning.ZERO_VOLUME_BODY, sym.getName());
|
||||||
|
}
|
||||||
|
|
||||||
// double x = component.toAbsolute(Coordinate.NUL)[0].x;
|
// double x = component.toAbsolute(Coordinate.NUL)[0].x;
|
||||||
// // Check for lengthwise discontinuity
|
// // Check for lengthwise discontinuity
|
||||||
// if (x > componentX + 0.0001) {
|
// if (x > componentX + 0.0001) {
|
||||||
|
@ -394,7 +394,6 @@ public abstract class Warning {
|
|||||||
public static final Warning EVENT_AFTER_LANDING = new Other(trans.get("Warning.EVENT_AFTER_LANDING"));
|
public static final Warning EVENT_AFTER_LANDING = new Other(trans.get("Warning.EVENT_AFTER_LANDING"));
|
||||||
|
|
||||||
public static final Warning ZERO_VOLUME_BODY = new Other(trans.get("Warning.ZERO_VOLUME_BODY"));
|
public static final Warning ZERO_VOLUME_BODY = new Other(trans.get("Warning.ZERO_VOLUME_BODY"));
|
||||||
public static final Warning INLINE_PODS = new Other(trans.get("Warning.INLINE_PODS"));
|
|
||||||
|
|
||||||
public static final Warning TUBE_SEPARATION = new Other(trans.get("Warning.TUBE_SEPARATION"));
|
public static final Warning TUBE_SEPARATION = new Other(trans.get("Warning.TUBE_SEPARATION"));
|
||||||
public static final Warning TUBE_OVERLAP = new Other(trans.get("Warning.TUBE_OVERLAP"));
|
public static final Warning TUBE_OVERLAP = new Other(trans.get("Warning.TUBE_OVERLAP"));
|
||||||
|
@ -49,7 +49,6 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
|
|
||||||
private final double thickness;
|
private final double thickness;
|
||||||
private final double bodyRadius;
|
private final double bodyRadius;
|
||||||
private final double bodyLength;
|
|
||||||
private final int finCount;
|
private final int finCount;
|
||||||
private final double cantAngle;
|
private final double cantAngle;
|
||||||
private final FinSet.CrossSection crossSection;
|
private final FinSet.CrossSection crossSection;
|
||||||
@ -63,19 +62,16 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
public FinSetCalc(FinSet component) {
|
public FinSetCalc(FinSet component) {
|
||||||
super(component);
|
super(component);
|
||||||
|
|
||||||
FinSet fin = component;
|
this.thickness = component.getThickness();
|
||||||
|
this.bodyRadius = component.getBodyRadius();
|
||||||
|
this.finCount = component.getFinCount();
|
||||||
|
|
||||||
thickness = fin.getThickness();
|
this.cantAngle = component.getCantAngle();
|
||||||
bodyLength = component.getParent().getLength();
|
this.span = component.getSpan();
|
||||||
bodyRadius = fin.getBodyRadius();
|
this.finArea = component.getPlanformArea();
|
||||||
finCount = fin.getFinCount();
|
this.crossSection = component.getCrossSection();
|
||||||
|
|
||||||
cantAngle = fin.getCantAngle();
|
calculateFinGeometry(component);
|
||||||
span = fin.getSpan();
|
|
||||||
finArea = fin.getPlanformArea();
|
|
||||||
crossSection = fin.getCrossSection();
|
|
||||||
|
|
||||||
calculateFinGeometry(fin);
|
|
||||||
calculatePoly();
|
calculatePoly();
|
||||||
calculateInterferenceFinCount(component);
|
calculateInterferenceFinCount(component);
|
||||||
}
|
}
|
||||||
@ -101,10 +97,7 @@ public class FinSetCalc extends RocketComponentCalc {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((bodyLength < EPSILON) || (bodyRadius < EPSILON)) {
|
if ((bodyRadius > 0) && (thickness > bodyRadius / 2)){
|
||||||
// Add warnings: Phantom Body
|
|
||||||
warnings.add(Warning.ZERO_VOLUME_BODY);
|
|
||||||
}else if( (0 < bodyRadius) && (thickness > bodyRadius / 2)){
|
|
||||||
// Add warnings (radius/2 == diameter/4)
|
// Add warnings (radius/2 == diameter/4)
|
||||||
warnings.add(Warning.THICK_FIN);
|
warnings.add(Warning.THICK_FIN);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user