/*
* JScience - Java(TM) Tools and Libraries for the Advancement of Sciences.
* Copyright (C) 2006 - JScience (http://jscience.org/)
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software is
* freely granted, provided that this notice is preserved.
*/
package org.jscience.physics.model;
import javax.measure.converter.RationalConverter;
import javax.measure.converter.UnitConverter;
import javax.measure.unit.BaseUnit;
import javax.measure.unit.Dimension;
import javax.measure.unit.SI;
/**
* This class represents the quantum model.
*
* @author Jean-Marie Dautelle
* @version 3.0, February 13, 2006
*/
public final class QuantumModel extends PhysicalModel {
/**
* Holds the single instance of this class.
*/
final static QuantumModel INSTANCE = new QuantumModel();
/**
* Holds the meter to time transform.
*/
private static RationalConverter METRE_TO_TIME
= new RationalConverter(1, 299792458);
/**
* Selects the relativistic model as the current model.
*/
public static void select() {
throw new UnsupportedOperationException("Not implemented");
}
// Implements Dimension.Model
public Dimension getDimension(BaseUnit> unit) {
if (unit.equals(SI.METRE)) return Dimension.TIME;
return Dimension.Model.STANDARD.getDimension(unit);
}
// Implements Dimension.Model
public UnitConverter getTransform(BaseUnit> unit) {
if (unit.equals(SI.METRE)) return METRE_TO_TIME;
return Dimension.Model.STANDARD.getTransform(unit);
}
// // ENERGY = m²·kg/s² = kg·c²
// SI.KILOGRAM.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT),
// new MultiplyConverter(1E-9 * c * c / ePlus));
//
// // H_BAR (SECOND * JOULE = SECOND * (KILOGRAM / C^2 )) = 1
// SI.SECOND.setDimension(Unit.ONE.divide(SI.GIGA(NonSI.ELECTRON_VOLT)),
// new MultiplyConverter(1E9 * ePlus / hBar));
//
// // SPEED_OF_LIGHT (METRE / SECOND) = 1
// SI.METRE.setDimension(Unit.ONE.divide(SI.GIGA(NonSI.ELECTRON_VOLT)),
// new MultiplyConverter(1E9 * ePlus / (c * hBar)));
//
// // BOLTZMANN (JOULE / KELVIN = (KILOGRAM / C^2 ) / KELVIN) = 1
// SI.KELVIN.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT),
// new MultiplyConverter(1E-9 * k / ePlus));
//
// // MAGNETIC CONSTANT (NEWTON / AMPERE^2) = 1
// SI.AMPERE.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT),
// new MultiplyConverter(1E-9 * MathLib.sqrt(µ0 * c * hBar) / ePlus));
//
// SI.MOLE.setDimension(SI.MOLE, Converter.IDENTITY);
// SI.CANDELA.setDimension(SI.CANDELA, Converter.IDENTITY);
}
Ads help maintain this website.