扭矩公式在Java中的表示?

huangapple go评论63阅读模式
英文:

Torque formula in Java?

问题

我正在尝试在一个Java程序中计算扭矩,但在将公式转换为代码时遇到了一些问题。

以下是公式:

扭矩公式在Java中的表示?

这是我的代码:

torque = CYLINDER_LOAD_FACTOR * (Math.pow((displacement / numberOfCylinders), 2) * Math.exp(TORQUE_CONSTANT) * 0.59);
英文:

I'm trying to calculate the torque in a java program but I having some problems on how to convert the formula to code

Here is the formula: 扭矩公式在Java中的表示?

and here is my code:

torque = CYLINDER_LOAD_FACTOR * ( ( Math.pow( (displacement / numberOfCylinders), 2) * Math.exp(TORQUE_CONSTANT) * 0.59 ) );

答案1

得分: 2

这整个表达式应该被提升到0.59次幂,

( Math.pow( (位移 / 气缸数), 2) *  Math.exp(扭矩常数) )

但是你正在乘以那个数量。请尝试以下内容:

扭矩 = 气缸负荷系数 * Math.pow( Math.pow( (位移 / 气缸数), 2) *  Math.exp(扭矩常数), 0.59 );
英文:

This entire expression should be raised to the power of 0.59,

( Math.pow( (displacement / numberOfCylinders), 2) *  Math.exp(TORQUE_CONSTANT) )

but you're multiplying by that amount. Try the following:

torque = CYLINDER_LOAD_FACTOR * Math.pow( Math.pow( (displacement / numberOfCylinders), 2) *  Math.exp(TORQUE_CONSTANT), 0.59 );

huangapple
  • 本文由 发表于 2020年9月24日 05:20:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/64036403.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定