English 中文(简体)
在目标C中计算这一流动量的适当方法是什么?
原标题:What is the proper way of calculating this flow calculation in Objective C?

Im试图制造一种使用这三种公式的流速计算器。

压力比率 b

b = p2 +0.1 / p1 +0.1

The C-value and B-Value are given numbers depending on the valve. See page 6 on this pdf http://content2.smcetech.com/pdf/SY.New.pdf

问题 长期流动

Q = 600 * C(p1 +0.1) sqrt(293/(273 +t)

This is my working code.

float pressure1 = ([pressureMPa.text floatValue])+ 0.1;
float c = 600 * ([cValue.text floatValue]);
float temperature = ([tempC.text floatValue]);
float root = sqrtf(293/(273+temperature));
float sonicFlow = c * pressure1 * root;

Q = flow rate l/min
C = dm^3/s * bar
p1= Supply pressure: MPa
t = temperature deg C

长期流动

Q = 600 * C(p1 +0.1)* sqrt (1-(p2+0.1/p1 +0.1 - b 1-b)^2* sqrt(293/(273+t)

Q = flow rate l/min
C-value = dm^3/s * bar
p1 Supply pressure: MPa
t temperature deg C
b-Value

What is the best way to write the subsonic flow code?

页: 1 我有问题。

最佳回答

很难看到你所再次提出的问题。 是否需要由辛迪加来做真正的根基和权力?

Square root: sqrtf(float)
Power: powf(float, float) - second float is the power you want to raise the first float to.

两种电能(或许更容易阅读)的简单易行之处在于先计算中间值,然后乘以:

<代码>价值A * 价值A。

此外,铭记在C. 推广、各司和模块内容的操作者优先程度方面需要小心谨慎,然后进行增减。 如你所领导的“瓦克斯特”所建议的那样,确保你适当或更妥善地在方括号中总结事情,采取多种步骤进行计算。 因此,就你而言,我们担心:

// sqrt((1-((p2+0.1)/(p1+0.1))-b) / (1-b))^2
float part1 = (p2 + 0.1) / (p1 + 0.1);
float part2 = (1 - part1 - b) / (1 - b);
float part3 = sqrtf(part2);
float result = part3 * part3;

part1/2/3 are perhaps not ideal variable names, but you get the idea.

问题回答

暂无回答




相关问题
Maths in LaTex table of contents

I am trying to add a table of contents for my LaTex document. The issue I am having is that this line: subsubsection{The expectation of (X^2)} Causes an error in the file that contains the ...

Math Overflow -- Handling Large Numbers

I am having a problem handling large numbers. I need to calculate the log of a very large number. The number is the product of a series of numbers. For example: log(2x3x66x435x444) though my actual ...

Radial plotting algorithm

I have to write an algorithm in AS3.0 that plots the location of points radially. I d like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry ...

Subsequent weighted algorithm for comparison

I have two rows of numbers ... 1) 2 2 1 0 0 1 2) 1.5 1 0 .5 1 2 Each column is compared to each other. Lower values are better. For example Column 1, row 2 s value (1.5) is more ...

热门标签