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 resistance.
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 ElectricalResistanceUnit extends Unit<ElectricalResistanceUnit>
17  {
18      /** */
19      private static final long serialVersionUID = 20140607L;
20  
21      /** The base, with "kgm2/s3A2" as the SI signature. */
22      public static final Quantity<ElectricalResistanceUnit> BASE = new Quantity<>("ElectricalResistance", "kgm2/s3A2");
23  
24      /** The SI unit for electrical resistance is Ohm. */
25      public static final ElectricalResistanceUnit SI = new ElectricalResistanceUnit()
26              .build(new Unit.Builder<ElectricalResistanceUnit>().setQuantity(BASE).setId("ohm").setName("ohm")
27                      .setUnitSystem(UnitSystem.SI_DERIVED).setSiPrefixes(SIPrefixes.UNIT, 1.0).setScale(IdentityScale.SCALE)
28                      .setDefaultDisplayAbbreviation("\u03A9").setDefaultTextualAbbreviation("ohm"));
29  
30      /** Ohm. */
31      public static final ElectricalResistanceUnit OHM = SI;
32  
33      /** micro-ohm. */
34      public static final ElectricalResistanceUnit MICROOHM = OHM.deriveSI(SIPrefixes.getUnit("mu"), 1.0);
35  
36      /** milli-ohm. */
37      public static final ElectricalResistanceUnit MILLIOHM = OHM.deriveSI(SIPrefixes.getUnit("m"), 1.0);
38  
39      /** kilo-ohm. */
40      public static final ElectricalResistanceUnit KILOOHM = OHM.deriveSI(SIPrefixes.getUnit("k"), 1.0);
41  
42      /** mega-ohm. */
43      public static final ElectricalResistanceUnit MEGAOHM = OHM.deriveSI(SIPrefixes.getUnit("M"), 1.0);
44  
45      /** giga-ohm. */
46      public static final ElectricalResistanceUnit GIGAOHM = OHM.deriveSI(SIPrefixes.getUnit("G"), 1.0);
47  
48      /** ab-ohm. */
49      public static final ElectricalResistanceUnit ABOHM =
50              OHM.deriveLinear(1.0E-9, "abohm", "abohm", UnitSystem.CGS_EMU, "ab\u03A9", "abohm");
51  
52      /** stat-ohm. */
53      public static final ElectricalResistanceUnit STATOHM =
54              OHM.deriveLinear(8.987551787E11, "stohm", "statohm", UnitSystem.CGS_ESU, "st\u03A9", "stohm");
55  
56  }