1. A method, comprising:receiving, by a controller, a specification curve corresponding to a centrifugal pump;
building and executing, by the controller, a first model of the centrifugal pump, based on the specification curve;
receiving sensor data corresponding to and during the operation of the centrifugal pump;
coupling a viscosity sensor to the centrifugal pump, data from the viscosity sensor processed every scan cycle of the controller to account every said scan cycle of the controller for a varying viscosity of a liquid flowing through the centrifugal pump;
updating the first model according to the sensor data to produce an updated model, and storing the updated model as a digital twin of the centrifugal pump; and
operating the centrifugal pump according to the updated model,
wherein the first model is created by a curve-fitting technique comprising a spline or a polynomial function programmed in the controller, the curve-fitting technique comprising:
receiving, by the controller, the specification curve as an input curve;
taking samples of the input curve, wherein the samples include head values and flow values for a plurality of pump revolutions-per-minute;
defining a number of points of the input curve to plot, wherein the points are the head-flow points;
defining an index number for each of the number of points;
processing each point for an increase in flow; and
creating a curve model of the centrifugal pump from head-flow points, including generating curves, wherein the curve model is used as the first model, and wherein the generated curves are head-flow curves.