01: /*
02: * JScience - Java(TM) Tools and Libraries for the Advancement of Sciences.
03: * Copyright (C) 2006 - JScience (http://jscience.org/)
04: * All rights reserved.
05: *
06: * Permission to use, copy, modify, and distribute this software is
07: * freely granted, provided that this notice is preserved.
08: */
09: package org.jscience.physics.model;
10:
11: import javax.measure.converter.RationalConverter;
12: import javax.measure.converter.UnitConverter;
13: import javax.measure.unit.BaseUnit;
14: import javax.measure.unit.Dimension;
15: import javax.measure.unit.SI;
16:
17: /**
18: * This class represents the high-energy model.
19: *
20: * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
21: * @version 3.0, February 13, 2006
22: */
23: public class HighEnergyModel extends PhysicalModel {
24:
25: /**
26: * Holds the single instance of this class.
27: */
28: final static HighEnergyModel INSTANCE = new HighEnergyModel();
29:
30: /**
31: * Holds the meter to time transform.
32: */
33: private static RationalConverter METRE_TO_TIME = new RationalConverter(
34: 1, 299792458);
35:
36: /**
37: * Selects the relativistic model as the current model.
38: */
39: public static void select() {
40: throw new UnsupportedOperationException("Not implemented");
41: }
42:
43: // Implements Dimension.Model
44: public Dimension getDimension(BaseUnit<?> unit) {
45: if (unit.equals(SI.METRE))
46: return Dimension.TIME;
47: return Dimension.Model.STANDARD.getDimension(unit);
48: }
49:
50: // Implements Dimension.Model
51: public UnitConverter getTransform(BaseUnit<?> unit) {
52: if (unit.equals(SI.METRE))
53: return METRE_TO_TIME;
54: return Dimension.Model.STANDARD.getTransform(unit);
55: }
56:
57: // // SPEED_OF_LIGHT (METRE / SECOND) = 1
58: // SI.SECOND.setDimension(SI.NANO(SI.SECOND), new MultiplyConverter(1E9));
59: // SI.METRE.setDimension(SI.NANO(SI.SECOND),
60: // new MultiplyConverter(1E9 / c));
61: //
62: // // ENERGY = m²·kg/s² = kg·c²
63: // SI.KILOGRAM.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT),
64: // new MultiplyConverter(c * c / ePlus / 1E9));
65: //
66: // // BOLTZMANN (JOULE / KELVIN = (KILOGRAM / C^2 ) / KELVIN) = 1
67: // SI.KELVIN.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT),
68: // new MultiplyConverter(k / ePlus / 1E9));
69: //
70: // // ELEMENTARY_CHARGE (SECOND * AMPERE) = 1
71: // SI.AMPERE.setDimension(Unit.ONE.divide(SI.NANO(SI.SECOND)),
72: // new MultiplyConverter(1E-9 / ePlus));
73: //
74: // SI.MOLE.setDimension(SI.MOLE, Converter.IDENTITY);
75: // SI.CANDELA.setDimension(SI.CANDELA, Converter.IDENTITY);
76: }
|