npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hydraulic-calculator

v1.1.0

Published

Perform basic hydraulic (fluid power) calculations.

Downloads

14

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/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"
}