Skip to content

Commit

Permalink
Used port_a.m_flow instead of -port_b.m_flow
Browse files Browse the repository at this point in the history
For #147
  • Loading branch information
mwetter committed Mar 6, 2015
1 parent ea0cf65 commit 5e97fc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Annex60/Fluid/Movers/BaseClasses/ControlledFlowMachine.mo
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ equation
etaHyd = cha.efficiency(per=per.hydraulicEfficiency, V_flow=VMachine_flow, d=hydDer, r_N=1, delta=1E-4);
etaMot = cha.efficiency(per=per.motorEfficiency, V_flow=VMachine_flow, d=motDer, r_N=1, delta=1E-4);
dpMachine = -dp;
VMachine_flow = -port_b.m_flow/rho_in;
VMachine_flow = port_a.m_flow/rho_in;
// To compute the electrical power, we set a lower bound for eta to avoid
// a division by zero.
P = WFlo / Annex60.Utilities.Math.Functions.smoothMax(x1=eta, x2=1E-5, deltaX=1E-6);
Expand Down

0 comments on commit 5e97fc3

Please sign in to comment.