File indexing completed on 2024-12-22 05:36:51

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category  Zend
0016  * @package   Zend_Measure
0017  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0018  * @license   http://framework.zend.com/license/new-bsd     New BSD License
0019  * @version   $Id$
0020  */
0021 
0022 /**
0023  * Implement needed classes
0024  */
0025 // require_once 'Zend/Measure/Abstract.php';
0026 // require_once 'Zend/Locale.php';
0027 
0028 /**
0029  * Class for handling acceleration conversions
0030  *
0031  * @category   Zend
0032  * @package    Zend_Measure
0033  * @subpackage Zend_Measure_Viscosity_Dynamic
0034  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0035  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0036  */
0037 class Zend_Measure_Viscosity_Dynamic extends Zend_Measure_Abstract
0038 {
0039     const STANDARD = 'KILOGRAM_PER_METER_SECOND';
0040 
0041     const CENTIPOISE                              = 'CENTIPOISE';
0042     const DECIPOISE                               = 'DECIPOISE';
0043     const DYNE_SECOND_PER_SQUARE_CENTIMETER       = 'DYNE_SECOND_PER_SQUARE_CENTIMETER';
0044     const GRAM_FORCE_SECOND_PER_SQUARE_CENTIMETER = 'GRAM_FORCE_SECOND_PER_SQUARE_CENTIMETER';
0045     const GRAM_PER_CENTIMETER_SECOND              = 'GRAM_PER_CENTIMETER_SECOND';
0046     const KILOGRAM_FORCE_SECOND_PER_SQUARE_METER  = 'KILOGRAM_FORCE_SECOND_PER_SQUARE_METER';
0047     const KILOGRAM_PER_METER_HOUR                 = 'KILOGRAM_PER_METER_HOUR';
0048     const KILOGRAM_PER_METER_SECOND               = 'KILOGRAM_PER_METER_SECOND';
0049     const MILLIPASCAL_SECOND                      = 'MILLIPASCAL_SECOND';
0050     const MILLIPOISE                              = 'MILLIPOISE';
0051     const NEWTON_SECOND_PER_SQUARE_METER          = 'NEWTON_SECOND_PER_SQUARE_METER';
0052     const PASCAL_SECOND                           = 'PASCAL_SECOND';
0053     const POISE                                   = 'POISE';
0054     const POISEUILLE                              = 'POISEUILLE';
0055     const POUND_FORCE_SECOND_PER_SQUARE_FEET      = 'POUND_FORCE_SECOND_PER_SQUARE_FEET';
0056     const POUND_FORCE_SECOND_PER_SQUARE_INCH      = 'POUND_FORCE_SECOND_PER_SQUARE_INCH';
0057     const POUND_PER_FOOT_HOUR                     = 'POUND_PER_FOOT_HOUR';
0058     const POUND_PER_FOOT_SECOND                   = 'POUND_PER_FOOT_SECOND';
0059     const POUNDAL_HOUR_PER_SQUARE_FOOT            = 'POUNDAL_HOUR_PER_SQUARE_FOOT';
0060     const POUNDAL_SECOND_PER_SQUARE_FOOT          = 'POUNDAL_SECOND_PER_SQUARE_FOOT';
0061     const REYN                                    = 'REYN';
0062     const SLUG_PER_FOOT_SECOND                    = 'SLUG_PER_FOOT_SECOND';
0063     const LBFS_PER_SQUARE_FOOT                    = 'LBFS_PER_SQUARE_FOOT';
0064     const NS_PER_SQUARE_METER                     = 'NS_PER_SQUARE_METER';
0065     const WATER_20C                               = 'WATER_20C';
0066     const WATER_40C                               = 'WATER_40C';
0067     const HEAVY_OIL_20C                           = 'HEAVY_OIL_20C';
0068     const HEAVY_OIL_40C                           = 'HEAVY_OIL_40C';
0069     const GLYCERIN_20C                            = 'GLYCERIN_20C';
0070     const GLYCERIN_40C                            = 'GLYCERIN_40C';
0071     const SAE_5W_MINUS18C                         = 'SAE_5W_MINUS18C';
0072     const SAE_10W_MINUS18C                        = 'SAE_10W_MINUS18C';
0073     const SAE_20W_MINUS18C                        = 'SAE_20W_MINUS18C';
0074     const SAE_5W_99C                              = 'SAE_5W_99C';
0075     const SAE_10W_99C                             = 'SAE_10W_99C';
0076     const SAE_20W_99C                             = 'SAE_20W_99C';
0077 
0078     /**
0079      * Calculations for all dynamic viscosity units
0080      *
0081      * @var array
0082      */
0083     protected $_units = array(
0084         'CENTIPOISE'          => array('0.001',      'cP'),
0085         'DECIPOISE'           => array('0.01',       'dP'),
0086         'DYNE_SECOND_PER_SQUARE_CENTIMETER'       => array('0.1',     'dyn s/cm²'),
0087         'GRAM_FORCE_SECOND_PER_SQUARE_CENTIMETER' => array('98.0665', 'gf s/cm²'),
0088         'GRAM_PER_CENTIMETER_SECOND'              => array('0.1',     'g/cm s'),
0089         'KILOGRAM_FORCE_SECOND_PER_SQUARE_METER'  => array('9.80665', 'kgf s/m²'),
0090         'KILOGRAM_PER_METER_HOUR'    => array(array('' => '1', '/' => '3600'), 'kg/m h'),
0091         'KILOGRAM_PER_METER_SECOND'  => array('1',   'kg/ms'),
0092         'MILLIPASCAL_SECOND'  => array('0.001',      'mPa s'),
0093         'MILLIPOISE'          => array('0.0001',     'mP'),
0094         'NEWTON_SECOND_PER_SQUARE_METER' => array('1', 'N s/m²'),
0095         'PASCAL_SECOND'       => array('1',          'Pa s'),
0096         'POISE'               => array('0.1',        'P'),
0097         'POISEUILLE'          => array('1',          'Pl'),
0098         'POUND_FORCE_SECOND_PER_SQUARE_FEET' => array('47.880259',  'lbf s/ft²'),
0099         'POUND_FORCE_SECOND_PER_SQUARE_INCH' => array('6894.75729', 'lbf s/in²'),
0100         'POUND_PER_FOOT_HOUR' => array('0.00041337887',             'lb/ft h'),
0101         'POUND_PER_FOOT_SECOND'          => array('1.4881639',      'lb/ft s'),
0102         'POUNDAL_HOUR_PER_SQUARE_FOOT'   => array('0.00041337887',  'pdl h/ft²'),
0103         'POUNDAL_SECOND_PER_SQUARE_FOOT' => array('1.4881639',      'pdl s/ft²'),
0104         'REYN'                => array('6894.75729', 'reyn'),
0105         'SLUG_PER_FOOT_SECOND'=> array('47.880259',  'slug/ft s'),
0106         'WATER_20C'           => array('0.001',      'water (20°)'),
0107         'WATER_40C'           => array('0.00065',    'water (40°)'),
0108         'HEAVY_OIL_20C'       => array('0.45',       'oil (20°)'),
0109         'HEAVY_OIL_40C'       => array('0.11',       'oil (40°)'),
0110         'GLYCERIN_20C'        => array('1.41',       'glycerin (20°)'),
0111         'GLYCERIN_40C'        => array('0.284',      'glycerin (40°)'),
0112         'SAE_5W_MINUS18C'     => array('1.2',        'SAE 5W (-18°)'),
0113         'SAE_10W_MINUS18C'    => array('2.4',        'SAE 10W (-18°)'),
0114         'SAE_20W_MINUS18C'    => array('9.6',        'SAE 20W (-18°)'),
0115         'SAE_5W_99C'          => array('0.0039',     'SAE 5W (99°)'),
0116         'SAE_10W_99C'         => array('0.0042',     'SAE 10W (99°)'),
0117         'SAE_20W_99C'         => array('0.0057',     'SAE 20W (99°)'),
0118         'STANDARD'            => 'KILOGRAM_PER_METER_SECOND'
0119     );
0120 }