hydraulic-calculator
v1.1.0
Published
Perform basic hydraulic (fluid power) calculations.
Downloads
14
Maintainers
Readme
Hydraulic Calculator
This library performs basic hydraulic (fluid power) calculations.
Installation
npm install hydraulic-calculator
Usage
const hydcalc = require('hydraulic-calculator')
Pump Flow
Calculate the output flow for a pump. Answer in lpm or gpm
hydcalc.pumpFlow(options);
options
displacement
: Displacement of pump in cc/rev or in3/revspeed
: Speed of pump in RPMunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]efficiency
: Efficiency of pump [default 1]
Example:
hydcalc.pumpFlow({
displacement: 20,
speed: 1500,
unitType: "metric",
round: 1,
efficiency: .95
})
// Will return
Object {
result: "28.5"
}
Pump Displacement
Calculate the displacement of a pump
hydcalc.pumpDisplacement(options);
options
flow
: Flow in lpm or gpmspeed
: Speed of pump in RPMunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]efficiency
: Efficiency of pump [default 1]Example:
hydcalc.pumpDisplacement({
flow: 40,
speed: 1500,
unitType: "metric",
round: 3
})
// Will return
Object {
result: "26.667"
}
Pump Pressure
Calculate the output pressure of a pump
hydcalc.pumpPressure(options);
options
flow
: Flow in lpm or gpmpower
: Power of prime mover in kW or hpunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]efficiency
: Efficiency of pump [default 1]
Example:
hydcalc.pumpPressure({
flow: 25,
power: 10,
unitType: "metric",
round: 2,
efficiency: .85
})
// Will return
Object {
result: "204.00"
}
Input Power
Calculate the input power for a pump. Answer in kW or hp
hydcalc.inputPower(options);
options
flow
: Flow in lpm or gpmpressure
: Pressure in bar or psiunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]efficiency
: Efficiency of pump [default 1]
Example:
hydcalc.inputPower({
flow: 20,
pressure: 185,
unitType: "metric",
round: 1
})
// Will return
Object {
result: "6.2"
}
Motor Torque
Calculate the shaft torque of a hydraulic motor. Answer in Nm or lb-in
hydcalc.motorTorque(options);
options
displacement
: Displacement of motorpressure
: Pressure in bar or psiunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]efficiency
: Efficiency of motor [default 1]
Example:
hydcalc.motorTorque({
displacement: 180,
pressure: 185,
unitType: "metric",
round: 1
})
// Will return
Object {
result: "530.3"
}
Motor Speed
Calculate the shaft speed of a hydraulic motor. Answer in RPM
hydcalc.motorSpeed(options);
options
flow
: Flow in lpm or gpmdisplacement
: Displacement of motorunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]efficiency
: Efficiency of motor [default 1]
Example:
hydcalc.motorSpeed({
flow: 45,
displacement: 185,
unitType: "metric",
round: 1
})
// Will return
Object {
result: "243.2"
}
Motor Displacement
Calculate the displacement of a hydraulic motor. Answer in cc/rev or in3/rev
hydcalc.motorDisplacement(options);
options
flow
: Flow in lpm or gpmspeed
: Speed in RPMunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]efficiency
: Efficiency of motor [default 1]
Example:
hydcalc.motorDisplacement({
flow: 15,
speed: 200,
unitType: "metric"
})
// Will return
Object {
result: "75.00"
}
Motor Power
Calculate the output power of a hydraulic motor. Answer in kW or hp
hydcalc.motorPower(options);
options
torque
: Torque of hydraulic motor in Nm or lb-inspeed
: Speed of hydraulic motor in RPMunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]efficiency
: Efficiency of motor [default 1]
Example:
hydcalc.motorPower({
torque: 200,
speed: 200,
unitType: "metric"
})
// Will return
Object {
result: "4.19"
}
Cylinder Extend Speed
Calculate speed of an extending cylinder. Answer in mm/sec or in/sec
hydcalc.cylExtendSpeed(options);
options
flow
: Flow in lpm or gpmbore
: Diameter of bore in mm or inunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]Example:
hydcalc.cylExtendSpeed({
flow: 10,
bore: 5,
unitType: "imperial"
})
// Will return
Object {
result: "1.96"
}
Cylinder Retract Speed
Calculate speed of a retracting cylinder. Answer in mm/sec or in/sec
hydcalc.cylRetractSpeed(options);
options
flow
: Flow in lpm or gpmbore
: Diameter of bore in mm or inrod
: Diameter of rod in mm or inunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]Example:
hydcalc.cylRetractSpeed({
flow: 10,
bore: 5,
rod: 1,
unitType: "metric"
})
// Will return
Object {
result: "8841.95"
}
Cylinder Extend Force
Calculate the force of an extending cylinder. Answer in N or lbf
hydcalc.cylExtendForce(options);
options
pressure
: Pressure in bar or psibore
: Diameter of bore in mm or inunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]Example:
hydcalc.cylExtendForce({
pressure: 10,
bore: 50,
unitType: "metric"
})
// Will return
Object {
result: "1963.49"
}
Cylinder Retract Force
Calculate the force of a retracting cylinder. Answer in N or lbf
hydcalc.cylRetractForce(options);
options
pressure
: Pressure in bar or psibore
: Diameter of bore in mm or inrod
: Diameter of rod in mm or inunitType
: Metric or imperialround
: Round answer to nearest decimal [default 2]Example:
hydcalc.cylRetractForce({
pressure: 1000,
bore: 5,
rod: 1,
unitType: "imperial"
})
// Will return
Object {
result: "18849.50"
}