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 quantum 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 final class QuantumModel extends PhysicalModel {
24:
25: /**
26: * Holds the single instance of this class.
27: */
28: final static QuantumModel INSTANCE = new QuantumModel();
29: /**
30: * Holds the meter to time transform.
31: */
32: private static RationalConverter METRE_TO_TIME = new RationalConverter(
33: 1, 299792458);
34:
35: /**
36: * Selects the relativistic model as the current model.
37: */
38: public static void select() {
39: throw new UnsupportedOperationException("Not implemented");
40: }
41:
42: // Implements Dimension.Model
43: public Dimension getDimension(BaseUnit<?> unit) {
44: if (unit.equals(SI.METRE))
45: return Dimension.TIME;
46: return Dimension.Model.STANDARD.getDimension(unit);
47: }
48:
49: // Implements Dimension.Model
50: public UnitConverter getTransform(BaseUnit<?> unit) {
51: if (unit.equals(SI.METRE))
52: return METRE_TO_TIME;
53: return Dimension.Model.STANDARD.getTransform(unit);
54: }
55:
56: // // ENERGY = m²·kg/s² = kg·c²
57: // SI.KILOGRAM.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT),
58: // new MultiplyConverter(1E-9 * c * c / ePlus));
59: //
60: // // H_BAR (SECOND * JOULE = SECOND * (KILOGRAM / C^2 )) = 1
61: // SI.SECOND.setDimension(Unit.ONE.divide(SI.GIGA(NonSI.ELECTRON_VOLT)),
62: // new MultiplyConverter(1E9 * ePlus / hBar));
63: //
64: // // SPEED_OF_LIGHT (METRE / SECOND) = 1
65: // SI.METRE.setDimension(Unit.ONE.divide(SI.GIGA(NonSI.ELECTRON_VOLT)),
66: // new MultiplyConverter(1E9 * ePlus / (c * hBar)));
67: //
68: // // BOLTZMANN (JOULE / KELVIN = (KILOGRAM / C^2 ) / KELVIN) = 1
69: // SI.KELVIN.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT),
70: // new MultiplyConverter(1E-9 * k / ePlus));
71: //
72: // // MAGNETIC CONSTANT (NEWTON / AMPERE^2) = 1
73: // SI.AMPERE.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT),
74: // new MultiplyConverter(1E-9 * MathLib.sqrt(µ0 * c * hBar) / ePlus));
75: //
76: // SI.MOLE.setDimension(SI.MOLE, Converter.IDENTITY);
77: // SI.CANDELA.setDimension(SI.CANDELA, Converter.IDENTITY);
78:
79: }
|