|
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-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
19 * @version $Id: Kinematic.php 20096 2010-01-06 02:05:09Z bkarwin $ |
|
20 */ |
|
21 |
|
22 /** |
|
23 * Implement needed classes |
|
24 */ |
|
25 require_once 'Zend/Measure/Abstract.php'; |
|
26 require_once 'Zend/Locale.php'; |
|
27 |
|
28 /** |
|
29 * Class for handling acceleration conversions |
|
30 * |
|
31 * @category Zend |
|
32 * @package Zend_Measure |
|
33 * @subpackage Zend_Measure_Viscosity_Kinematic |
|
34 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
35 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
36 */ |
|
37 class Zend_Measure_Viscosity_Kinematic extends Zend_Measure_Abstract |
|
38 { |
|
39 const STANDARD = 'SQUARE_METER_PER_SECOND'; |
|
40 |
|
41 const CENTISTOKES = 'CENTISTOKES'; |
|
42 const LENTOR = 'LENTOR'; |
|
43 const LITER_PER_CENTIMETER_DAY = 'LITER_PER_CENTIMETER_DAY'; |
|
44 const LITER_PER_CENTIMETER_HOUR = 'LITER_PER_CENTIMETER_HOUR'; |
|
45 const LITER_PER_CENTIMETER_MINUTE = 'LITER_PER_CENTIMETER_MINUTE'; |
|
46 const LITER_PER_CENTIMETER_SECOND = 'LITER_PER_CENTIMETER_SECOND'; |
|
47 const POISE_CUBIC_CENTIMETER_PER_GRAM = 'POISE_CUBIC_CENTIMETER_PER_GRAM'; |
|
48 const SQUARE_CENTIMETER_PER_DAY = 'SQUARE_CENTIMETER_PER_DAY'; |
|
49 const SQUARE_CENTIMETER_PER_HOUR = 'SQUARE_CENTIMETER_PER_HOUR'; |
|
50 const SQUARE_CENTIMETER_PER_MINUTE = 'SQUARE_CENTIMETER_PER_MINUTE'; |
|
51 const SQUARE_CENTIMETER_PER_SECOND = 'SQUARE_CENTIMETER_PER_SECOND'; |
|
52 const SQUARE_FOOT_PER_DAY = 'SQUARE_FOOT_PER_DAY'; |
|
53 const SQUARE_FOOT_PER_HOUR = 'SQUARE_FOOT_PER_HOUR'; |
|
54 const SQUARE_FOOT_PER_MINUTE = 'SQUARE_FOOT_PER_MINUTE'; |
|
55 const SQUARE_FOOT_PER_SECOND = 'SQUARE_FOOT_PER_SECOND'; |
|
56 const SQUARE_INCH_PER_DAY = 'SQUARE_INCH_PER_DAY'; |
|
57 const SQUARE_INCH_PER_HOUR = 'SQUARE_INCH_PER_HOUR'; |
|
58 const SQUARE_INCH_PER_MINUTE = 'SQUARE_INCH_PER_MINUTE'; |
|
59 const SQUARE_INCH_PER_SECOND = 'SQUARE_INCH_PER_SECOND'; |
|
60 const SQUARE_METER_PER_DAY = 'SQUARE_METER_PER_DAY'; |
|
61 const SQUARE_METER_PER_HOUR = 'SQUARE_METER_PER_HOUR'; |
|
62 const SQUARE_METER_PER_MINUTE = 'SQUARE_METER_PER_MINUTE'; |
|
63 const SQUARE_METER_PER_SECOND = 'SQUARE_METER_PER_SECOND'; |
|
64 const SQUARE_MILLIMETER_PER_DAY = 'SQUARE_MILLIMETER_PER_DAY'; |
|
65 const SQUARE_MILLIMETER_PER_HOUR = 'SQUARE_MILLIMETER_PER_HOUR'; |
|
66 const SQUARE_MILLIMETER_PER_MINUTE = 'SQUARE_MILLIMETER_PER_MINUTE'; |
|
67 const SQUARE_MILLIMETER_PER_SECOND = 'SQUARE_MILLIMETER_PER_SECOND'; |
|
68 const STOKES = 'STOKES'; |
|
69 |
|
70 /** |
|
71 * Calculations for all kinematic viscosity units |
|
72 * |
|
73 * @var array |
|
74 */ |
|
75 protected $_units = array( |
|
76 'CENTISTOKES' => array('0.000001', 'cSt'), |
|
77 'LENTOR' => array('0.0001', 'lentor'), |
|
78 'LITER_PER_CENTIMETER_DAY' => array(array('' => '1', '/' => '864000'), 'l/cm day'), |
|
79 'LITER_PER_CENTIMETER_HOUR' => array(array('' => '1', '/' => '36000'), 'l/cm h'), |
|
80 'LITER_PER_CENTIMETER_MINUTE' => array(array('' => '1', '/' => '600'), 'l/cm m'), |
|
81 'LITER_PER_CENTIMETER_SECOND' => array('0.1', 'l/cm s'), |
|
82 'POISE_CUBIC_CENTIMETER_PER_GRAM' => array('0.0001', 'P cm³/g'), |
|
83 'SQUARE_CENTIMETER_PER_DAY' => array(array('' => '1', '/' => '864000000'),'cm²/day'), |
|
84 'SQUARE_CENTIMETER_PER_HOUR' => array(array('' => '1', '/' => '36000000'),'cm²/h'), |
|
85 'SQUARE_CENTIMETER_PER_MINUTE' => array(array('' => '1', '/' => '600000'),'cm²/m'), |
|
86 'SQUARE_CENTIMETER_PER_SECOND' => array('0.0001', 'cm²/s'), |
|
87 'SQUARE_FOOT_PER_DAY' => array('0.0000010752667', 'ft²/day'), |
|
88 'SQUARE_FOOT_PER_HOUR' => array('0.0000258064', 'ft²/h'), |
|
89 'SQUARE_FOOT_PER_MINUTE' => array('0.001548384048', 'ft²/m'), |
|
90 'SQUARE_FOOT_PER_SECOND' => array('0.09290304', 'ft²/s'), |
|
91 'SQUARE_INCH_PER_DAY' => array('7.4671296e-9', 'in²/day'), |
|
92 'SQUARE_INCH_PER_HOUR' => array('0.00000017921111', 'in²/h'), |
|
93 'SQUARE_INCH_PER_MINUTE' => array('0.000010752667', 'in²/m'), |
|
94 'SQUARE_INCH_PER_SECOND' => array('0.00064516', 'in²/s'), |
|
95 'SQUARE_METER_PER_DAY' => array(array('' => '1', '/' => '86400'), 'm²/day'), |
|
96 'SQUARE_METER_PER_HOUR' => array(array('' => '1', '/' => '3600'), 'm²/h'), |
|
97 'SQUARE_METER_PER_MINUTE' => array(array('' => '1', '/' => '60'), 'm²/m'), |
|
98 'SQUARE_METER_PER_SECOND' => array('1', 'm²/s'), |
|
99 'SQUARE_MILLIMETER_PER_DAY' => array(array('' => '1', '/' => '86400000000'), 'mm²/day'), |
|
100 'SQUARE_MILLIMETER_PER_HOUR' => array(array('' => '1', '/' => '3600000000'), 'mm²/h'), |
|
101 'SQUARE_MILLIMETER_PER_MINUTE' => array(array('' => '1', '/' => '60000000'), 'mm²/m'), |
|
102 'SQUARE_MILLIMETER_PER_SECOND' => array('0.000001', 'mm²/s'), |
|
103 'STOKES' => array('0.0001', 'St'), |
|
104 'STANDARD' => 'SQUARE_METER_PER_SECOND' |
|
105 ); |
|
106 } |