Create skeleton of Tube. For the moment, this is just enough to
make it possible to use TubeCalc.
This commit is contained in:
parent
4477d9226e
commit
68c4330fa3
@ -3,8 +3,8 @@ package net.sf.openrocket.aerodynamics.barrowman;
|
||||
import net.sf.openrocket.aerodynamics.AerodynamicForces;
|
||||
import net.sf.openrocket.aerodynamics.FlightConditions;
|
||||
import net.sf.openrocket.aerodynamics.WarningSet;
|
||||
import net.sf.openrocket.rocketcomponent.LaunchLug;
|
||||
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
||||
import net.sf.openrocket.rocketcomponent.Tube;
|
||||
import net.sf.openrocket.util.MathUtil;
|
||||
import net.sf.openrocket.util.Transformation;
|
||||
|
||||
@ -15,13 +15,14 @@ public abstract class TubeCalc extends RocketComponentCalc {
|
||||
|
||||
public TubeCalc(RocketComponent component) {
|
||||
super(component);
|
||||
|
||||
LaunchLug lug = (LaunchLug)component;
|
||||
double ld = lug.getLength() / (2*lug.getOuterRadius());
|
||||
|
||||
Tube tube = (Tube)component;
|
||||
|
||||
double ld = tube.getLength() / (2*tube.getOuterRadius());
|
||||
|
||||
CDmul = Math.max(1.3 - ld, 1);
|
||||
refArea = Math.PI * MathUtil.pow2(lug.getOuterRadius()) -
|
||||
Math.PI * MathUtil.pow2(lug.getInnerRadius()) * Math.max(1 - ld, 0);
|
||||
refArea = Math.PI * MathUtil.pow2(tube.getOuterRadius()) -
|
||||
Math.PI * MathUtil.pow2(tube.getInnerRadius()) * Math.max(1 - ld, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import net.sf.openrocket.util.MathUtil;
|
||||
import net.sf.openrocket.util.StateChangeListener;
|
||||
|
||||
|
||||
public class LaunchLug extends ExternalComponent implements AnglePositionable, BoxBounded, Coaxial, LineInstanceable, InsideColorComponent {
|
||||
public class LaunchLug extends Tube implements AnglePositionable, BoxBounded, LineInstanceable, InsideColorComponent {
|
||||
|
||||
private static final Translator trans = Application.getTranslator();
|
||||
|
||||
|
@ -17,7 +17,7 @@ import net.sf.openrocket.rocketcomponent.position.RadiusMethod;
|
||||
import net.sf.openrocket.startup.Application;
|
||||
import net.sf.openrocket.util.*;
|
||||
|
||||
public class TubeFinSet extends ExternalComponent implements AxialPositionable, BoxBounded, RingInstanceable, InsideColorComponent {
|
||||
public class TubeFinSet extends Tube implements AxialPositionable, BoxBounded, RingInstanceable, InsideColorComponent {
|
||||
private static final Translator trans = Application.getTranslator();
|
||||
|
||||
private final static double DEFAULT_RADIUS = 0.025;
|
||||
|
Loading…
x
Reference in New Issue
Block a user