1 package com.billkuker.rocketry.motorsim;
\r
3 import javax.measure.quantity.Length;
\r
4 import javax.measure.quantity.Pressure;
\r
5 import javax.measure.quantity.Volume;
\r
6 import javax.measure.unit.SI;
\r
8 import org.jscience.physics.amount.Amount;
\r
10 public class CylindricalChamber implements Chamber {
\r
12 private Amount<Length> length = Amount.valueOf(200, SI.MILLIMETER);
\r
13 private Amount<Length> oD = Amount.valueOf(31, SI.MILLIMETER);
\r
14 private Amount<Length> iD = Amount.valueOf(30, SI.MILLIMETER);
\r
16 public Amount<Pressure> burstPressure() {
\r
20 public Amount<Volume> chamberVolume() {
\r
21 return iD.divide(2).pow(2).times(Math.PI).times(length).to(SI.CUBIC_METRE);
\r
24 public Amount<Length> getLength() {
\r
28 public void setLength(Amount<Length> length) {
\r
29 this.length = length;
\r
32 public Amount<Length> getID() {
\r
36 public void setID(Amount<Length> id) {
\r
40 public Amount<Length> getOD() {
\r
44 public void setOD(Amount<Length> oD) {
\r