/// <summary>
/// 计算圆柱内
/// 液体体积(圆柱体平躺)
/// </summary>
/// <param name="r">半径(mm)</param>
/// <param name="height">圆柱体高度(mm)</param>
/// <param name="lihe">液体高度(mm)</param>
/// <returns>体积(L)</returns>
private double CalculateCylVol(double r, double height, double lihe)
{
//底层面积
double dm = 0;
//三角形的底
double sd = Math.Abs(r - lihe);
//圆心顶半角
double cirdbj = Math.Acos(sd / r);
if (r > lihe)
{
//dm = Math.PI * r * r * (cirdbj * 2) / (2 * Math.PI) - r * Math.Sin(cirdbj) * sd;
dm = r * r * cirdbj - r * Math.Sin(cirdbj) * sd;
}
else if (r < lihe)
{
//dm = Math.PI * r * r * (2 * Math.PI - cirdbj * 2) / (2 * Math.PI) + r * Math.Sin(cirdbj) * sd;
dm = r * r * (Math.PI - cirdbj) + r * Math.Sin(cirdbj) * sd;
}
else
{
dm = Math.PI * r * r / 2;
}
//底面积*高
return dm * height / 1000000;
}