You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
# scaling
Convert quantities between model and prototype scale using Froude similarity.
## Installation
```
pip install git+http://git.wrl.unsw.edu.au:3000/danh/scaling.git
```
## Usage
```sh
>>> from scaling import Froude
>>> froude = FroudeConverter()
>>> # Convert model value of 200 mm to prototype value (m) with scale of 10
>>> froude.model_to_proto( 200, length_scale= 10, input_unit= 'mm' , target_unit= 'm' )
2.0
>>> # Get Froude scaling exponent for quantities of time
>>> froude.scaling_exponent( 's' )
0.5
>>> # Get length, mass and time dimensions for quantities of energy
>>> froude.dimensions( 'kJ' )
'L^2 M^1 T^-2'
```
`scaling` uses `pint` for unit and dimension conversions. `pint` is able to interpret a wide range of different input units.
```sh
>>> # Convert water head model value (mm) to prototype pressure value (kPa)
>>> froude.model_to_proto( 10, length_scale= 100, 'mm.H20' , 'kPa' )
9.80665
>>> # Demonstrate different ways of specifying units of Newtons
>>> froude.dimensions( 'N' )
'L^1 M^1 T^-2'
>>> froude.dimensions( 'newton' )
'L^1 M^1 T^-2'
>>> froude.dimensions( 'kg.m/s/s' )
'L^1 M^1 T^-2'
>>> froude.dimensions( 'kilogram.metre/second^2' )
'L^1 M^1 T^-2'
```