JADE v6.1

com.dautelle.physics.models
Class PhysicalModel

java.lang.Object
  extended bycom.dautelle.physics.models.PhysicalModel
Direct Known Subclasses:
HighEnergyModel, NaturalModel, QuantumModel, RelativisticModel, StandardModel

public abstract class PhysicalModel
extends java.lang.Object

This abstract class represents a physical model. Instances of this class determinate the dimensional units of the seven base quantities: Length, Mass, Duration, ElectricCurrent, Temperature (thermodynamic), AmountOfSubstance and LuminousIntensity.

To select a model, one needs only to call the model select static method. For example:

          RelativisticModel.select();
     
Selecting a predefined model automatically sets the Quantity current model, which specifies the default output units for quantities.

Version:
4.1, February 17, 2003
Author:
Jean-Marie Dautelle

Constructor Summary
protected PhysicalModel()
          Default constructor (allows for derivation).
 
Method Summary
static PhysicalModel current()
          Returns the current physical model (default: instance of StandardModel).
protected static void setCurrent(PhysicalModel model)
          Sets the current model.
protected abstract  void setPhysicalDimensions()
          Sets the dimensional units of the seven base quantities: Length, Mass, Duration, ElectricCurrent, Temperature (thermodynamic), AmountOfSubstance and LuminousIntensity.
 Unit unitFor(Quantity quantity)
          Returns the default output unit for the specified quantity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhysicalModel

protected PhysicalModel()
Default constructor (allows for derivation).

Method Detail

current

public static final PhysicalModel current()
Returns the current physical model (default: instance of StandardModel). The current model specifies the default output units of physical quantities.

Returns:
the context-local physical model.

setCurrent

protected static final void setCurrent(PhysicalModel model)
Sets the current model. This method is being called automatically when one of the predefined models is selected.

Parameters:
model - the context-local physical model.
See Also:
current()

unitFor

public Unit unitFor(Quantity quantity)
Returns the default output unit for the specified quantity. The default implementation of this method returns the dimensional unit of the specified quantity.

Parameters:
quantity - the quantity for which the default output unit is returned.
Returns:
quantity.getSystemUnit().getDimension()

setPhysicalDimensions

protected abstract void setPhysicalDimensions()
Sets the dimensional units of the seven base quantities: Length, Mass, Duration, ElectricCurrent, Temperature (thermodynamic), AmountOfSubstance and LuminousIntensity.

See Also:
BaseUnit.setDimension(javax.units.Unit, javax.units.Converter)

JADE v6.1

Copyright © 2004 Jean-Marie Dautelle.