Skip to content

sshodges/hydraulic-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/rev
  • speed: Speed of pump in RPM
  • unitType: Metric or imperial
  • round: 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 gpm

  • speed: Speed of pump in RPM

  • unitType: Metric or imperial

  • round: 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 gpm
  • power: Power of prime mover in kW or hp
  • unitType: Metric or imperial
  • round: 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 gpm
  • pressure: Pressure in bar or psi
  • unitType: Metric or imperial
  • round: 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 motor
  • pressure: Pressure in bar or psi
  • unitType: Metric or imperial
  • round: 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 gpm
  • displacement: Displacement of motor
  • unitType: Metric or imperial
  • round: 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 gpm
  • speed: Speed in RPM
  • unitType: Metric or imperial
  • round: 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-in
  • speed: Speed of hydraulic motor in RPM
  • unitType: Metric or imperial
  • round: 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 gpm

  • bore: Diameter of bore in mm or in

  • unitType: Metric or imperial

  • round: 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 gpm

  • bore: Diameter of bore in mm or in

  • rod: Diameter of rod in mm or in

  • unitType: Metric or imperial

  • round: 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 psi

  • bore: Diameter of bore in mm or in

  • unitType: Metric or imperial

  • round: 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 psi

  • bore: Diameter of bore in mm or in

  • rod: Diameter of rod in mm or in

  • unitType: Metric or imperial

  • round: Round answer to nearest decimal [default 2]

    Example:
hydcalc.cylRetractForce({
      pressure: 1000,
      bore: 5,
      rod: 1,
      unitType: "imperial"
})
// Will return
Object {
  result: "18849.50"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published