View Javadoc
1   package org.djunits.unit;
2   
3   import org.djunits.quantity.Quantity;
4   import org.djunits.unit.scale.IdentityScale;
5   import org.djunits.unit.si.SIPrefixes;
6   import org.djunits.unit.unitsystem.UnitSystem;
7   
8   /**
9    * The units of electrical potential (voltage).
10   * <p>
11   * Copyright (c) 2015-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
12   * BSD-style license. See <a href="https://djunits.org/docs/license.html">DJUNITS License</a>.
13   * </p>
14   * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
15   */
16  public class ElectricalPotentialUnit extends Unit<ElectricalPotentialUnit>
17  {
18      /** */
19      private static final long serialVersionUID = 20140607L;
20  
21      /** The base, with "kgm2/s3A" as the SI signature. */
22      public static final Quantity<ElectricalPotentialUnit> BASE = new Quantity<>("ElectricalPotential", "kgm2/s3A");
23  
24      /** The SI unit for electrical potential is Volt. */
25      public static final ElectricalPotentialUnit SI = new ElectricalPotentialUnit()
26              .build(new Unit.Builder<ElectricalPotentialUnit>().setQuantity(BASE).setId("V").setName("volt")
27                      .setUnitSystem(UnitSystem.SI_DERIVED).setSiPrefixes(SIPrefixes.UNIT, 1.0).setScale(IdentityScale.SCALE));
28  
29      /** Volt. */
30      public static final ElectricalPotentialUnit VOLT = SI;
31  
32      /** microvolt. */
33      public static final ElectricalPotentialUnit MICROVOLT = VOLT.deriveSI(SIPrefixes.getUnit("mu"), 1.0);
34  
35      /** millivolt. */
36      public static final ElectricalPotentialUnit MILLIVOLT = VOLT.deriveSI(SIPrefixes.getUnit("m"), 1.0);
37  
38      /** kilovolt. */
39      public static final ElectricalPotentialUnit KILOVOLT = VOLT.deriveSI(SIPrefixes.getUnit("k"), 1.0);
40  
41      /** megavolt. */
42      public static final ElectricalPotentialUnit MEGAVOLT = VOLT.deriveSI(SIPrefixes.getUnit("M"), 1.0);
43  
44      /** gigavolt. */
45      public static final ElectricalPotentialUnit GIGAVOLT = VOLT.deriveSI(SIPrefixes.getUnit("G"), 1.0);
46  
47      /** statvolt. */
48      public static final ElectricalPotentialUnit STATVOLT = VOLT.deriveLinear(299.792458, "stV", "statvolt", UnitSystem.CGS_ESU);
49  
50      /** abvolt. */
51      public static final ElectricalPotentialUnit ABVOLT = VOLT.deriveLinear(1.0E-8, "abV", "abvolt", UnitSystem.CGS_EMU);
52  
53  }