001/* 002 * JScience - Java(TM) Tools and Libraries for the Advancement of Sciences. 003 * Copyright (C) 2006 - JScience (http://jscience.org/) 004 * All rights reserved. 005 * 006 * Permission to use, copy, modify, and distribute this software is 007 * freely granted, provided that this notice is preserved. 008 */ 009package org.jscience.physics.model; 010 011import javax.measure.converter.RationalConverter; 012import javax.measure.converter.UnitConverter; 013import javax.measure.unit.BaseUnit; 014import javax.measure.unit.Dimension; 015import javax.measure.unit.SI; 016 017/** 018 * This class represents the high-energy model. 019 * 020 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a> 021 * @version 3.0, February 13, 2006 022 */ 023public class HighEnergyModel extends PhysicalModel { 024 025 /** 026 * Holds the single instance of this class. 027 */ 028 final static HighEnergyModel INSTANCE = new HighEnergyModel(); 029 030 /** 031 * Holds the meter to time transform. 032 */ 033 private static RationalConverter METRE_TO_TIME 034 = new RationalConverter(1, 299792458); 035 036 /** 037 * Selects the relativistic model as the current model. 038 */ 039 public static void select() { 040 throw new UnsupportedOperationException("Not implemented"); 041 } 042 043 // Implements Dimension.Model 044 public Dimension getDimension(BaseUnit<?> unit) { 045 if (unit.equals(SI.METRE)) return Dimension.TIME; 046 return Dimension.Model.STANDARD.getDimension(unit); 047 } 048 049 // Implements Dimension.Model 050 public UnitConverter getTransform(BaseUnit<?> unit) { 051 if (unit.equals(SI.METRE)) return METRE_TO_TIME; 052 return Dimension.Model.STANDARD.getTransform(unit); 053 } 054 055// // SPEED_OF_LIGHT (METRE / SECOND) = 1 056// SI.SECOND.setDimension(SI.NANO(SI.SECOND), new MultiplyConverter(1E9)); 057// SI.METRE.setDimension(SI.NANO(SI.SECOND), 058// new MultiplyConverter(1E9 / c)); 059// 060// // ENERGY = m²·kg/s² = kg·c² 061// SI.KILOGRAM.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT), 062// new MultiplyConverter(c * c / ePlus / 1E9)); 063// 064// // BOLTZMANN (JOULE / KELVIN = (KILOGRAM / C^2 ) / KELVIN) = 1 065// SI.KELVIN.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT), 066// new MultiplyConverter(k / ePlus / 1E9)); 067// 068// // ELEMENTARY_CHARGE (SECOND * AMPERE) = 1 069// SI.AMPERE.setDimension(Unit.ONE.divide(SI.NANO(SI.SECOND)), 070// new MultiplyConverter(1E-9 / ePlus)); 071// 072// SI.MOLE.setDimension(SI.MOLE, Converter.IDENTITY); 073// SI.CANDELA.setDimension(SI.CANDELA, Converter.IDENTITY); 074}