Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
within ThermofluidStream.Processes.Internal.CentrifugalPump.Auxiliaries;
function res_detadV "Residuum of derivative of efficiency with respect to volume flow rate"
extends Modelica.Icons.Function;
extends Modelica.Math.Nonlinear.Interfaces.partialScalarFunction;
input Real ch[3] "Coefficients of head polynomial";
input Real cp[3] "Coefficients of power polynomial";
input Real Vn "Normalized volume flow rate";
output Real res "Residuum";
protected
Real N = (ch[1] + ch[2]*Vn + ch[3]*Vn^2)*Vn "Numerator";
Real dN = ch[1] + 2*ch[2]*Vn + 3*ch[3]*Vn^2 "Derivative of numerator with respect to Vn (normalized flow)";
Real D = cp[1] + cp[2]*Vn + cp[3]*Vn^2 "Denominator";
Real dD = cp[2] + 2*cp[3]*Vn "Derivative of denominator with respect to Vn (normalized flow)";
Real N = (ch[1] + ch[2]*u + ch[3]*u^2)*u "Numerator";
Real dN = ch[1] + 2*ch[2]*u + 3*ch[3]*u^2 "Derivative of numerator with respect to Vn (normalized flow)";
Real D = cp[1] + cp[2]*u + cp[3]*u^2 "Denominator";
Real dD = cp[2] + 2*cp[3]*u "Derivative of denominator with respect to Vn (normalized flow)";
algorithm
res := D*dN - N*dD;
y := D*dN - N*dD;
// eta = rho*g*h*V/P = eta_ref*(ch[1] + ch[2]*Vn + ch[3]*Vn^2)*Vn/(cp[1] + cp[2]*Vn + cp[3]*Vn^2) (@ w = w_ref, rho = rho_ref)
// eta = N/D (numerator/denominator)
// -> deta/dVn = 0 -> D*dN - N*dD = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ record GenericPump "Generic measurement data record for centrifugal pumps"
parameter SI.Density rho_ref(displayUnit="kg/l") = 1000 "Reference density";
parameter SI.AngularVelocity w_ref(displayUnit="rpm") = 314.1592653589793 "Reference angular velocity"; // 3000 rpm
final parameter Integer N = size(V_flow,1) "Number of data points";
parameter SI.VolumeFlowRate V_flow[:](displayUnit="m3/h") = {0,2.777777777778e-3,4.166666666667e-3} "Volume flow rate data points"
parameter SI.VolumeFlowRate V_flow[:](each displayUnit="m3/h") = {0,2.777777777778e-3,4.166666666667e-3} "Volume flow rate data points"
annotation (Dialog(group="Volume flow rate")); // {0,10,15} m3/h
parameter Boolean setHead = true "= true, if head data points shall be given (= false, if pressure difference shall be given instead)"
annotation(Dialog(group="Head/Pressure rise"),Evaluate=true, HideResult=true, choices(checkBox=true));
Expand Down