Capacitance.php 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Measure
  17. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id$
  20. */
  21. /**
  22. * Implement needed classes
  23. */
  24. #require_once 'Zend/Measure/Abstract.php';
  25. #require_once 'Zend/Locale.php';
  26. /**
  27. * Class for handling capacitance conversions
  28. *
  29. * @category Zend
  30. * @package Zend_Measure
  31. * @subpackage Zend_Measure_Capacitance
  32. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  33. * @license http://framework.zend.com/license/new-bsd New BSD License
  34. */
  35. class Zend_Measure_Capacitance extends Zend_Measure_Abstract
  36. {
  37. const STANDARD = 'FARAD';
  38. const ABFARAD = 'ABFARAD';
  39. const AMPERE_PER_SECOND_VOLT = 'AMPERE_PER_SECOND_VOLT';
  40. const CENTIFARAD = 'CENTIFARAD';
  41. const COULOMB_PER_VOLT = 'COULOMB_PER_VOLT';
  42. const DECIFARAD = 'DECIFARAD';
  43. const DEKAFARAD = 'DEKAFARAD';
  44. const ELECTROMAGNETIC_UNIT = 'ELECTROMAGNETIC_UNIT';
  45. const ELECTROSTATIC_UNIT = 'ELECTROSTATIC_UNIT';
  46. const FARAD = 'FARAD';
  47. const FARAD_INTERNATIONAL = 'FARAD_INTERNATIONAL';
  48. const GAUSSIAN = 'GAUSSIAN';
  49. const GIGAFARAD = 'GIGAFARAD';
  50. const HECTOFARAD = 'HECTOFARAD';
  51. const JAR = 'JAR';
  52. const KILOFARAD = 'KILOFARAD';
  53. const MEGAFARAD = 'MEGAFARAD';
  54. const MICROFARAD = 'MICROFARAD';
  55. const MILLIFARAD = 'MILLIFARAD';
  56. const NANOFARAD = 'NANOFARAD';
  57. const PICOFARAD = 'PICOFARAD';
  58. const PUFF = 'PUFF';
  59. const SECOND_PER_OHM = 'SECOND_PER_OHM';
  60. const STATFARAD = 'STATFARAD';
  61. const TERAFARAD = 'TERAFARAD';
  62. /**
  63. * Calculations for all capacitance units
  64. *
  65. * @var array
  66. */
  67. protected $_units = array(
  68. 'ABFARAD' => array('1.0e+9', 'abfarad'),
  69. 'AMPERE_PER_SECOND_VOLT' => array('1', 'A/sV'),
  70. 'CENTIFARAD' => array('0.01', 'cF'),
  71. 'COULOMB_PER_VOLT' => array('1', 'C/V'),
  72. 'DECIFARAD' => array('0.1', 'dF'),
  73. 'DEKAFARAD' => array('10', 'daF'),
  74. 'ELECTROMAGNETIC_UNIT' => array('1.0e+9', 'capacity emu'),
  75. 'ELECTROSTATIC_UNIT' => array('1.11265e-12', 'capacity esu'),
  76. 'FARAD' => array('1', 'F'),
  77. 'FARAD_INTERNATIONAL' => array('0.99951', 'F'),
  78. 'GAUSSIAN' => array('1.11265e-12', 'G'),
  79. 'GIGAFARAD' => array('1.0e+9', 'GF'),
  80. 'HECTOFARAD' => array('100', 'hF'),
  81. 'JAR' => array('1.11265e-9', 'jar'),
  82. 'KILOFARAD' => array('1000', 'kF'),
  83. 'MEGAFARAD' => array('1000000', 'MF'),
  84. 'MICROFARAD' => array('0.000001', 'µF'),
  85. 'MILLIFARAD' => array('0.001', 'mF'),
  86. 'NANOFARAD' => array('1.0e-9', 'nF'),
  87. 'PICOFARAD' => array('1.0e-12', 'pF'),
  88. 'PUFF' => array('1.0e-12', 'pF'),
  89. 'SECOND_PER_OHM' => array('1', 's/Ohm'),
  90. 'STATFARAD' => array('1.11265e-12', 'statfarad'),
  91. 'TERAFARAD' => array('1.0e+12', 'TF'),
  92. 'STANDARD' => 'FARAD'
  93. );
  94. }