Skip to content

Instantly share code, notes, and snippets.

@crcx
Created May 9, 2017 18:57
Show Gist options
  • Save crcx/dbc3cd6b2c8e0dacabfb3cf64a3d5fb4 to your computer and use it in GitHub Desktop.
Save crcx/dbc3cd6b2c8e0dacabfb3cf64a3d5fb4 to your computer and use it in GitHub Desktop.
````
'Amps var
'Volts var
'Watts var
#1 'Phase var<n>
:new (-)
#1 !Phase
#0 !Volts
#0 !Watts
#0 !Amps ;
:1p #1 !Phase ;
:3p #3 !Phase ;
:get-kva (-k)
@Watts #1000 / dup !Amps ;
:get-amps (-n)
@Phase #1 eq?
[ @Watts @Volts / ]
[ @Watts @Volts / #10 * #17 / ] choose ;
:kw (n-n) #1000 * !Watts ;
:v (-) !Volts ;
:a (-) !Amps ;
:select (-n)
@Phase #1 eq?
[ @Amps @Volts * #1000 / ]
[ @Amps @Volts * #17 * #10000 / ] choose ;
````
````
#208 v #100 a 3p select
````
new #10 kw #240 v 1p get-amps
new #10 kw #240 v 3p get-amps
Single phase: 1, 1.5, 2, 3, 5, 7.5, 10, 15, 25, 37.5, 50, 75, 100, 167, 200, 250, 333 There are some smaller standard sizes available only on stocked product as shown on page 12-2 of the Digest 173.
Three phase: 3, 6, 9, 15, 30, 45, 75, 112.5, 150, 225, 300, 500, 750, 1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment