\r
log.info("Volume Burnt: " + volumeBurnt.to(SI.MILLIMETER.pow(3)));\r
\r
- Amount<MassFlowRate> mGenRate = volumeBurnt.times(motor.getFuel().idealDensity().times(densityRatio)).divide(dt).to(MassFlowRate.UNIT);\r
+ Amount<MassFlowRate> mGenRate = volumeBurnt.times(motor.getFuel().getIdealDensity().times(motor.getFuel().getDensityRatio())).divide(dt).to(MassFlowRate.UNIT);\r
\r
log.debug("Mass Gen Rate: " + mGenRate);\r
\r
- Amount specificGasConstant = Constants.R.divide(motor.getFuel().getCombustionProduct().effectiveMolarWeight());\r
- Amount<Temperature> chamberTemp = motor.getFuel().getCombustionProduct().idealCombustionTemperature().times(combustionEfficency);\r
+ Amount specificGasConstant = Constants.R.divide(motor.getFuel().getCombustionProduct().getEffectiveMolarWeight());\r
+ Amount<Temperature> chamberTemp = motor.getFuel().getCombustionProduct().getIdealCombustionTemperature().times(motor.getFuel().getCombustionEfficiency());\r
\r
Amount<MassFlowRate> mNozzle;\r
{\r
\r
Amount<Area> aStar = motor.getNozzle().throatArea();\r
\r
- double k = motor.getFuel().getCombustionProduct().ratioOfSpecificHeats();\r
+ double k = motor.getFuel().getCombustionProduct().getRatioOfSpecificHeats();\r
\r
log.debug("K: " + k);\r
\r
next.chamberPressure.doubleValue(SI.PASCAL),\r
SI.PASCAL);\r
\r
- next.thrust = motor.getNozzle().thrust(next.chamberPressure, atmosphereicPressure, atmosphereicPressure, motor.getFuel().getCombustionProduct().ratioOfSpecificHeats2Phase());\r
+ next.thrust = motor.getNozzle().thrust(next.chamberPressure, atmosphereicPressure, atmosphereicPressure, motor.getFuel().getCombustionProduct().getRatioOfSpecificHeats2Phase());\r
\r
if ( next.chamberPressure.approximates(atmosphereicPressure)){\r
log.info("Pressure at Patm on step " + i);\r
\r
public interface Fuel {\r
\r
- public Amount<VolumetricDensity> idealDensity();\r
+ public Amount<VolumetricDensity> getIdealDensity();\r
\r
public Amount<Velocity> burnRate(Amount<Pressure> pressure);\r
\r
public CombustionProduct getCombustionProduct();\r
\r
public interface CombustionProduct {\r
- public Amount<Temperature> idealCombustionTemperature();\r
+ public Amount<Temperature> getIdealCombustionTemperature();\r
\r
- public Amount<MolarWeight> effectiveMolarWeight();\r
+ public Amount<MolarWeight> getEffectiveMolarWeight();\r
\r
- public double ratioOfSpecificHeats();\r
+ public double getRatioOfSpecificHeats();\r
\r
- public double ratioOfSpecificHeats2Phase();\r
+ public double getRatioOfSpecificHeats2Phase();\r
}\r
\r
- /*\r
- @Deprecated\r
- public Amount<Temperature> idealCombustionTemperature();\r
-\r
- @Deprecated\r
- public Amount<MolarWeight> effectiveMolarWeight();\r
- \r
- @Deprecated\r
- public double ratioOfSpecificHeats();\r
+ public double getDensityRatio();\r
\r
- @Deprecated\r
- public double ratioOfSpecificHeats2Phase();*/\r
+ public double getCombustionEfficiency();\r
\r
}\r
}\r
\r
@Override\r
- public Amount<VolumetricDensity> idealDensity() {\r
+ public Amount<VolumetricDensity> getIdealDensity() {\r
return Amount.valueOf(1841, 0, SI.KILOGRAM.divide(SI.METER.pow(3))).to(VolumetricDensity.UNIT);\r
}\r
\r
public CombustionProduct getCombustionProduct() {\r
return new CombustionProduct(){\r
\r
- public Amount<Temperature> idealCombustionTemperature() {\r
+ public Amount<Temperature> getIdealCombustionTemperature() {\r
return Amount.valueOf(1600, SI.KELVIN);\r
}\r
\r
- public Amount<MolarWeight> effectiveMolarWeight() {\r
+ public Amount<MolarWeight> getEffectiveMolarWeight() {\r
return Amount.valueOf("39.9 kg/kmol").to(MolarWeight.UNIT);\r
}\r
\r
- public double ratioOfSpecificHeats() {\r
+ public double getRatioOfSpecificHeats() {\r
return 1.1361;\r
}\r
\r
- public double ratioOfSpecificHeats2Phase() {\r
+ public double getRatioOfSpecificHeats2Phase() {\r
return 1.042;\r
}\r
};\r
burnRate.show();\r
}\r
\r
+ public double getCombustionEfficiency() {\r
+ return .97;\r
+ }\r
+\r
+ public double getDensityRatio() {\r
+ return .96;\r
+ }\r
+\r
}\r
}\r
\r
//@Override \r
- public Amount<VolumetricDensity> idealDensity() {\r
+ public Amount<VolumetricDensity> getIdealDensity() {\r
//return Amount.valueOf(1.889, 0, SI.GRAM.divide(SI.CENTIMETER.pow(3))).to(VolumetricDensity.UNIT);\r
return Amount.valueOf(1889, 0, SI.KILOGRAM.divide(SI.METER.pow(3))).to(VolumetricDensity.UNIT);\r
}\r
public CombustionProduct getCombustionProduct(){\r
return new CombustionProduct(){\r
\r
- public Amount<Temperature> idealCombustionTemperature() {\r
+ public Amount<Temperature> getIdealCombustionTemperature() {\r
return Amount.valueOf(1720, SI.KELVIN);\r
}\r
\r
- public Amount<MolarWeight> effectiveMolarWeight() {\r
+ public Amount<MolarWeight> getEffectiveMolarWeight() {\r
return Amount.valueOf("41.98 kg/kmol").to(MolarWeight.UNIT);\r
}\r
\r
- public double ratioOfSpecificHeats() {\r
+ public double getRatioOfSpecificHeats() {\r
return 1.133;\r
}\r
\r
- public double ratioOfSpecificHeats2Phase() {\r
+ public double getRatioOfSpecificHeats2Phase() {\r
return 1.044;\r
}\r
};\r
}\r
\r
+ public double getCombustionEfficiency() {\r
+ return .97;\r
+ }\r
+\r
+ public double getDensityRatio() {\r
+ return .96;\r
+ }\r
+\r
}\r
return Amount.valueOf(0, Velocity.UNIT);\r
}\r
\r
- public abstract Amount<VolumetricDensity> idealDensity();\r
+ public abstract Amount<VolumetricDensity> getIdealDensity();\r
\r
}\r
\r
KNSU f = new KNSU();\r
\r
- Amount<Force> t = n.thrust(Po, Pe, Patm, f.getCombustionProduct().ratioOfSpecificHeats2Phase());\r
+ Amount<Force> t = n.thrust(Po, Pe, Patm, f.getCombustionProduct().getRatioOfSpecificHeats2Phase());\r
\r
Amount<Force> expected = Amount.valueOf(87.2, .1, SI.NEWTON);\r
\r
\r
KNSU f = new KNSU();\r
\r
- double cF = n.thrustCoefficient(Po, Pe, Patm, f.getCombustionProduct().ratioOfSpecificHeats2Phase());\r
+ double cF = n.thrustCoefficient(Po, Pe, Patm, f.getCombustionProduct().getRatioOfSpecificHeats2Phase());\r
\r
\r
Assert.assertEquals(cF, 1.2454812344324655);\r
\r
@Test\r
public void testEffectiveMolarWeight(){\r
- (new KNSU()).getCombustionProduct().effectiveMolarWeight();\r
+ (new KNSU()).getCombustionProduct().getEffectiveMolarWeight();\r
}\r
\r
@Test\r
public void testIdealDensity(){\r
- System.out.println((new KNSU()).idealDensity());\r
- System.out.println((new KNSU()).idealDensity().isExact());\r
+ System.out.println((new KNSU()).getIdealDensity());\r
+ System.out.println((new KNSU()).getIdealDensity().isExact());\r
}\r
}\r