Beispiel #1
0
 public int[] GetDefaultRpms()
 {
     if (IsVarioPump)
     {
         return(DynamicPerformanceCurves.Select(x => x.Rpm).ToArray());
     }
     else
     {
         return(null);
     }
 }
Beispiel #2
0
        public double GetInputPower(int rpm)
        {
            var x_n = DynamicPerformanceCurves.Select(x => (double)x.Rpm).ToArray();
            var y_P = DynamicPerformanceCurves.Select(x => x.PowerInput).ToArray();

            if (x_n.Count() != y_P.Count())
            {
                throw new ArgumentException("Angegebene drehzahlabhängige Leistungsdaten unplausibel.");
            }

            var p = Polynom.Polyfit(x_n, y_P, 2);

            return(p.Polyval(rpm));
        }