import org.jscience.physics.amount.Constants;\r
\r
import com.billkuker.rocketry.motorsim.fuel.KNSU;\r
+import com.billkuker.rocketry.motorsim.grain.BurnPanel;\r
import com.billkuker.rocketry.motorsim.grain.CoredCylindricalGrain;\r
import com.billkuker.rocketry.motorsim.grain.ExtrudedGrain;\r
+import com.billkuker.rocketry.motorsim.grain.GrainPanel;\r
import com.billkuker.rocketry.motorsim.visual.Chart;\r
\r
public class Burn {\r
\r
private static double densityRatio = 0.96;\r
\r
- protected class Interval{\r
+ public class Interval{\r
Amount<Duration> time;\r
- Amount<Length> regression;\r
- Amount<Pressure> chamberPressure;\r
+ public Amount<Length> regression;\r
+ public Amount<Pressure> chamberPressure;\r
Amount<Mass> chamberProduct;\r
Amount<Force> thrust;\r
\r
\r
protected SortedMap<Amount<Duration>,Interval> data = new TreeMap<Amount<Duration>, Interval>();\r
\r
+ public SortedMap<Amount<Duration>,Interval> getData(){\r
+ return data;\r
+ }\r
+ \r
+ public Motor getMotor(){\r
+ return motor;\r
+ }\r
+\r
+ public Amount<Duration> burnTime(){\r
+ return data.lastKey();\r
+ }\r
+ \r
public Burn(Motor m){\r
motor = m;\r
}\r
g.setID(Amount.valueOf(10, SI.MILLIMETER));\r
m.setGrain(g);\r
\r
- m.setGrain(new ExtrudedGrain());\r
+ //m.setGrain(new ExtrudedGrain());\r
\r
ConvergentDivergentNozzle n = new ConvergentDivergentNozzle();\r
n.setThroatDiameter(Amount.valueOf(6.600, SI.MILLIMETER));\r
\r
b.burn();\r
\r
+ new BurnPanel(b).show();\r
+ /*\r
Chart<Duration, Pressure> r = new Chart<Duration, Pressure>(\r
SI.SECOND,\r
SI.MEGA(SI.PASCAL),\r
t.setDomain(b.data.keySet());\r
t.show();\r
\r
- /*\r
- Chart<Length, Area> s = new Chart<Length, Area>(SI.MILLIMETER,\r
- SI.MILLIMETER.pow(2).asType(Area.class), g, "surfaceArea");\r
- s.setDomain(s.new IntervalDomain(Amount.valueOf(0, SI.CENTIMETER), g\r
- .webThickness()));\r
- s.show();\r
- */\r
- \r
- Chart<Length, Dimensionless> kn = new Chart<Length, Dimensionless>(SI.MILLIMETER,\r
- Dimensionless.UNIT, b, "kn");\r
- kn.setDomain(kn.new IntervalDomain(Amount.valueOf(0, SI.CENTIMETER), m.getGrain()\r
- .webThickness()));\r
- kn.show();\r
+ new GrainPanel( m.getGrain() ).show();*/\r
\r
}\r
}\r