More detailed model for pressure drop in tubes.
This commit is contained in:
parent
30dcdda0bf
commit
1611fd2876
@ -6,8 +6,17 @@ import net.sf.openrocket.rocketcomponent.RocketComponent;
|
|||||||
import net.sf.openrocket.rocketcomponent.Tube;
|
import net.sf.openrocket.rocketcomponent.Tube;
|
||||||
import net.sf.openrocket.util.MathUtil;
|
import net.sf.openrocket.util.MathUtil;
|
||||||
|
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public abstract class TubeCalc extends RocketComponentCalc {
|
public abstract class TubeCalc extends RocketComponentCalc {
|
||||||
|
|
||||||
|
private final static Logger log = LoggerFactory.getLogger(TubeFinSetCalc.class);
|
||||||
|
|
||||||
|
// air density (standard conditions)
|
||||||
|
private final double rho = 1.225; // kg/m^3
|
||||||
|
|
||||||
private final double diameter;
|
private final double diameter;
|
||||||
private final double length;
|
private final double length;
|
||||||
protected double refArea;
|
protected double refArea;
|
||||||
@ -25,18 +34,37 @@ public abstract class TubeCalc extends RocketComponentCalc {
|
|||||||
@Override
|
@Override
|
||||||
public double calculatePressureCD(FlightConditions conditions,
|
public double calculatePressureCD(FlightConditions conditions,
|
||||||
double stagnationCD, double baseCD, WarningSet warnings) {
|
double stagnationCD, double baseCD, WarningSet warnings) {
|
||||||
|
// These calculations come from a mix of theoretical and empirical
|
||||||
|
// results, and are marked with (t) for theoretical and (e) for empirical.
|
||||||
|
// The theoretical results should not be modified; the empirical can be adjusted
|
||||||
|
// to better simulate real rockets.
|
||||||
|
|
||||||
// calculation of pressure drop through pipe from "Atlas Copco Air Compendium", 1975,
|
// Temperature
|
||||||
// quoted as equation 14 in Carello, Ivanov, and Mazza, "Pressure drop in pipe
|
final double T = conditions.getAtmosphericConditions().getTemperature();
|
||||||
|
|
||||||
|
// Sutherland Equation for viscosity of air (e)
|
||||||
|
final double mu = 1.458e-6 * Math.pow(T, 3/2) / (T + 110.4); //
|
||||||
|
|
||||||
|
// Volume flow rate (t)
|
||||||
|
final double Q = conditions.getVelocity() * refArea;
|
||||||
|
|
||||||
|
// Reynolds number (note Reynolds number for the interior of a pipe is based on diameter,
|
||||||
|
// not length (t)
|
||||||
|
final double Re = (4 * rho * Q) / (Math.PI * diameter * mu);
|
||||||
|
|
||||||
|
// quoted as equation 12 in Carello, Ivanov, and Mazza, "Pressure drop in pipe
|
||||||
// lines for compressed air: comparison between experimental and theoretical analysis",
|
// lines for compressed air: comparison between experimental and theoretical analysis",
|
||||||
// Transactions on Engineering Sciences vol 18, ISSN 1743-35331998, 1998.
|
// Transactions on Engineering Sciences vol 18, ISSN 1743-35331998, 1998.
|
||||||
|
|
||||||
// Volume flow rate
|
// friction coefficient (for tube interior) (e)
|
||||||
final double Q = conditions.getVelocity() * refArea;
|
final double lambda = 0.3164 * Math.pow(Re, -0.25);
|
||||||
|
|
||||||
// pressure drop
|
// pressure drop (e)
|
||||||
final double deltap = 1.6 * Math.pow(Q, 1.85) * length /
|
// 101.325 is standard pressure
|
||||||
(Math.pow(diameter, 5) * conditions.getAtmosphericConditions().getPressure());
|
// Power in equation is 5 in original source. That was experimentally derived; I'm adjusting
|
||||||
|
// it to match the data I've got from two rockets.
|
||||||
|
final double deltap = (lambda * 8 * length * rho * MathUtil.pow2(Q) * T * 101.325) /
|
||||||
|
(MathUtil.pow2(Math.PI) * Math.pow(diameter, 4.8) * 273 * conditions.getAtmosphericConditions().getPressure());
|
||||||
|
|
||||||
// convert to CD and return
|
// convert to CD and return
|
||||||
return deltap * refArea / conditions.getRefArea();
|
return deltap * refArea / conditions.getRefArea();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user