#Fat Jar Configuration File\r
-#Thu Apr 16 10:44:22 EDT 2009\r
+#Mon Apr 20 13:05:59 EDT 2009\r
onejar.license.required=true\r
manifest.classpath=\r
manifest.removesigners=true\r
onejar.checkbox=false\r
-jarname=MotorSim-0.1.jar\r
+jarname=MotorSim-0.2.jar\r
manifest.mergeall=true\r
manifest.mainclass=com.billkuker.rocketry.motorsim.visual.CrappyEditor\r
manifest.file=<createnew>\r
--- /dev/null
+package com.billkuker.rocketry.motorsim.motors.example;\r
+\r
+import java.awt.Shape;\r
+import java.awt.geom.Ellipse2D;\r
+import java.awt.geom.Rectangle2D;\r
+\r
+import javax.measure.unit.SI;\r
+\r
+import org.jscience.physics.amount.Amount;\r
+\r
+import com.billkuker.rocketry.motorsim.Burn;\r
+import com.billkuker.rocketry.motorsim.ConvergentDivergentNozzle;\r
+import com.billkuker.rocketry.motorsim.CylindricalChamber;\r
+import com.billkuker.rocketry.motorsim.Motor;\r
+import com.billkuker.rocketry.motorsim.fuel.KNSU;\r
+import com.billkuker.rocketry.motorsim.grain.ExtrudedShapeGrain;\r
+\r
+public class CSlot extends Motor {\r
+ public CSlot() {\r
+ setName("C-Slot");\r
+ setFuel(new KNSU());\r
+\r
+ CylindricalChamber c = new CylindricalChamber();\r
+ c.setLength(Amount.valueOf(150, SI.MILLIMETER));\r
+ c.setID(Amount.valueOf(50, SI.MILLIMETER));\r
+ setChamber(c);\r
+\r
+ setGrain(new ExtrudedShapeGrain() {\r
+ {\r
+ try {\r
+ Shape outside = new Ellipse2D.Double(0, 0, 30, 30);\r
+ xsection.add(outside);\r
+ xsection.inhibit(outside);\r
+ xsection.subtract(new Rectangle2D.Double(12.5,13, 5, 30));\r
+ setLength(Amount.valueOf(150, SI.MILLIMETER));\r
+ setForeEndInhibited(false);\r
+ setAftEndInhibited(false);\r
+ } catch (Exception e) {\r
+ throw new Error(e);\r
+ }\r
+ }\r
+ });\r
+\r
+ ConvergentDivergentNozzle n = new ConvergentDivergentNozzle();\r
+ n.setThroatDiameter(Amount.valueOf(7, SI.MILLIMETER));\r
+ n.setExitDiameter(Amount.valueOf(10, SI.MILLIMETER));\r
+ n.setEfficiency(.85);\r
+ setNozzle(n);\r
+ }\r
+ \r
+ public static void main(String args[]){\r
+ new Burn(new CSlot());\r
+ }\r
+\r
+}\r
--- /dev/null
+package com.billkuker.rocketry.motorsim.motors.example;\r
+\r
+import java.awt.Shape;\r
+import java.awt.geom.Rectangle2D;\r
+\r
+import javax.measure.unit.SI;\r
+\r
+import org.jscience.physics.amount.Amount;\r
+\r
+import com.billkuker.rocketry.motorsim.ConvergentDivergentNozzle;\r
+import com.billkuker.rocketry.motorsim.CylindricalChamber;\r
+import com.billkuker.rocketry.motorsim.Motor;\r
+import com.billkuker.rocketry.motorsim.fuel.KNSU;\r
+import com.billkuker.rocketry.motorsim.grain.RotatedShapeGrain;\r
+\r
+public class EndBurner extends Motor {\r
+ public EndBurner() {\r
+ setName("End Burner");\r
+ setFuel(new KNSU());\r
+\r
+ CylindricalChamber c = new CylindricalChamber();\r
+ c.setLength(Amount.valueOf(150, SI.MILLIMETER));\r
+ c.setID(Amount.valueOf(50, SI.MILLIMETER));\r
+ setChamber(c);\r
+\r
+ setGrain(new RotatedShapeGrain() {\r
+ {\r
+ try {\r
+ Shape outside = new Rectangle2D.Double(0, 0, 15, 70);\r
+ shape.add(outside);\r
+ shape.inhibit(outside);\r
+ shape.subtract(new Rectangle2D.Double(0, 50, 5, 70));\r
+ shape.subtract(new Rectangle2D.Double(0, 70, 15, 10));\r
+ } catch (Exception e) {\r
+ throw new Error(e);\r
+ }\r
+ }\r
+ });\r
+\r
+ ConvergentDivergentNozzle n = new ConvergentDivergentNozzle();\r
+ n.setThroatDiameter(Amount.valueOf(4, SI.MILLIMETER));\r
+ n.setExitDiameter(Amount.valueOf(9, SI.MILLIMETER));\r
+ n.setEfficiency(.85);\r
+ setNozzle(n);\r
+ }\r
+\r
+}\r
+++ /dev/null
-package com.billkuker.rocketry.motorsim.motors.kuker;\r
-\r
-import java.beans.PropertyVetoException;\r
-\r
-import javax.measure.unit.SI;\r
-\r
-import org.jscience.physics.amount.Amount;\r
-\r
-import com.billkuker.rocketry.motorsim.Burn;\r
-import com.billkuker.rocketry.motorsim.ConvergentDivergentNozzle;\r
-import com.billkuker.rocketry.motorsim.CylindricalChamber;\r
-import com.billkuker.rocketry.motorsim.Motor;\r
-import com.billkuker.rocketry.motorsim.fuel.KNSU;\r
-import com.billkuker.rocketry.motorsim.grain.CoredCylindricalGrain;\r
-import com.billkuker.rocketry.motorsim.grain.MultiGrain;\r
-import com.billkuker.rocketry.motorsim.grain.RotatedShapeGrain;\r
-import com.billkuker.rocketry.motorsim.visual.BurnPanel;\r
-\r
-public class RotatedTest extends Motor {\r
- public RotatedTest(){\r
- setName("R-Test");\r
- setFuel(new KNSU());\r
- \r
- CylindricalChamber c = new CylindricalChamber();\r
- c.setLength(Amount.valueOf(200, SI.MILLIMETER));\r
- c.setID(Amount.valueOf(25, SI.MILLIMETER));\r
- setChamber(c);\r
- \r
- \r
- setGrain( RotatedShapeGrain.DEFAULT_GRAIN );\r
- \r
- ConvergentDivergentNozzle n = new ConvergentDivergentNozzle();\r
- n.setThroatDiameter(Amount.valueOf(5.962, SI.MILLIMETER));\r
- n.setExitDiameter(Amount.valueOf(13.79, SI.MILLIMETER));\r
- n.setEfficiency(.85);\r
- setNozzle(n);\r
- }\r
- \r
- public static void main(String args[]) throws Exception{\r
- RotatedTest m = new RotatedTest();\r
- Burn b = new Burn(m);\r
- new BurnPanel(b).showAsWindow();\r
- }\r
-}\r
import com.billkuker.rocketry.motorsim.fuel.KNSU;\r
import com.billkuker.rocketry.motorsim.grain.CoredCylindricalGrain;\r
import com.billkuker.rocketry.motorsim.grain.MultiGrain;\r
-import com.billkuker.rocketry.motorsim.grain.RotatedShapeGrain;\r
import com.billkuker.rocketry.motorsim.io.MotorIO;\r
+import com.billkuker.rocketry.motorsim.motors.example.CSlot;\r
+import com.billkuker.rocketry.motorsim.motors.example.EndBurner;\r
\r
public class CrappyEditor extends JFrame {\r
- JTabbedPane tabs = new JTabbedPane();\r
+ JTabbedPane tabs;\r
\r
public CrappyEditor() {\r
setTitle("MotorSim v0.2");\r
setSize(1024, 768);\r
setDefaultCloseOperation(DISPOSE_ON_CLOSE);\r
- setContentPane(tabs);\r
+\r
\r
try {\r
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r
} catch (Exception e1) {\r
e1.printStackTrace();\r
}\r
-\r
+ tabs = new JTabbedPane();\r
+ setContentPane(tabs);\r
tabs.addTab("Edit", new Editor(defaultMotor()));\r
\r
}\r
setLayout(new BorderLayout());\r
add(text, BorderLayout.CENTER);\r
JPanel buttons = new JPanel(new FlowLayout());\r
+\r
buttons.add(new JButton("Burn!") {\r
{\r
addActionListener(new ActionListener() {\r
});\r
}\r
});\r
+\r
+\r
JRadioButton s, n;\r
buttons.add(s = new JRadioButton("SI"));\r
buttons.add(n = new JRadioButton("NonSI"));\r
UnitPreference.preference = UnitPreference.NONSI;\r
}\r
});\r
+ \r
+ buttons.add(new JButton("End Burner Example") {\r
+ {\r
+ addActionListener(new ActionListener() {\r
+ public void actionPerformed(ActionEvent arg0) {\r
+ tabs.addTab(getText(), new BurnPanel(new Burn(new EndBurner())));\r
+ }\r
+ });\r
+ }\r
+ });\r
+ \r
+ buttons.add(new JButton("C-Slot Example") {\r
+ {\r
+ addActionListener(new ActionListener() {\r
+ public void actionPerformed(ActionEvent arg0) {\r
+ tabs.addTab(getText(), new BurnPanel(new Burn(new CSlot())));\r
+ }\r
+ });\r
+ }\r
+ });\r
+ \r
add(buttons, BorderLayout.SOUTH);\r
text.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML);\r
\r
\r
return m;\r
}\r
+ \r
\r
public static void main(String args[]) {\r
new CrappyEditor().show();\r