49739039a8c27cf0418907443db22f4bfa6f3522
[sw/motorsim] / src / com / billkuker / rocketry / motorsim / fuel / EditableFuel.java
1 package com.billkuker.rocketry.motorsim.fuel;\r
2 \r
3 import javax.measure.quantity.Pressure;\r
4 import javax.measure.quantity.VolumetricDensity;\r
5 import javax.measure.unit.SI;\r
6 \r
7 import org.jscience.physics.amount.Amount;\r
8 \r
9 \r
10 //TODO Implement MotorPart\r
11 public class EditableFuel extends SaintRobertFuel {\r
12         private String name;\r
13         private double a = 0.0665;\r
14         private double n = 0.319;\r
15         private double combustionEfficiency = .97;\r
16         private double densityRatio = .96;\r
17         private Amount<VolumetricDensity> idealDensity = Amount.valueOf(1889, 0, SI.KILOGRAM.divide(SI.METER.pow(3))).to(VolumetricDensity.UNIT);\r
18         CombustionProduct combustionProduct = new EditableCombustionProduct();\r
19         private SaintRobertFuel.Type type = SaintRobertFuel.Type.NONSI;\r
20         \r
21         public EditableFuel() {\r
22                 super(SaintRobertFuel.Type.NONSI);\r
23         }\r
24         \r
25         public String getName() {\r
26                 return name;\r
27         }\r
28 \r
29         public void setName(String name) {\r
30                 this.name = name;\r
31         }\r
32 \r
33 \r
34         @Override\r
35         protected double burnrateCoefficient(Amount<Pressure> pressure) {\r
36                 return a;\r
37         }\r
38 \r
39         @Override\r
40         protected double burnrateExponent(Amount<Pressure> pressure) {\r
41                 return n;\r
42         }\r
43 \r
44 \r
45         public double getA() {\r
46                 return a;\r
47         }\r
48 \r
49         public void setA(double a) {\r
50                 this.a = a;\r
51         }\r
52 \r
53         public double getCombustionEfficiency() {\r
54                 return combustionEfficiency;\r
55         }\r
56 \r
57         public void setCombustionEfficiency(double combustionEfficiency) {\r
58                 this.combustionEfficiency = combustionEfficiency;\r
59         }\r
60 \r
61         public double getDensityRatio() {\r
62                 return densityRatio;\r
63         }\r
64 \r
65         public void setDensityRatio(double densityRatio) {\r
66                 this.densityRatio = densityRatio;\r
67         }\r
68 \r
69         public Amount<VolumetricDensity> getIdealDensity() {\r
70                 return idealDensity;\r
71         }\r
72 \r
73         public void setIdealDensity(Amount<VolumetricDensity> idealDensity) {\r
74                 this.idealDensity = idealDensity;\r
75         }\r
76 \r
77         public double getN() {\r
78                 return n;\r
79         }\r
80 \r
81         public void setN(double n) {\r
82                 this.n = n;\r
83         }\r
84 \r
85         public CombustionProduct getCombustionProduct() {\r
86                 return combustionProduct;\r
87         }\r
88 \r
89         public void setCombustionProduct(CombustionProduct combustionProduct) {\r
90                 this.combustionProduct = combustionProduct;\r
91         }\r
92 \r
93         public SaintRobertFuel.Type getType() {\r
94                 return type;\r
95         }\r
96 \r
97         public void setType(SaintRobertFuel.Type type) {\r
98                 this.type = type;\r
99         }\r
100 \r
101 \r
102 }\r