MCPcopy Create free account
hub / github.com/NatLabRockies/EnergyPlus / ResolveLoopFlowVsPressure

Function ResolveLoopFlowVsPressure

src/EnergyPlus/PlantPressureSystem.cc:811–964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

809}
810
811Real64 ResolveLoopFlowVsPressure(EnergyPlusData &state,
812 int const LoopNum, // - Index of which plant/condenser loop is being simulated
813 Real64 const SystemMassFlow, // - Initial "guess" at system mass flow rate [kg/s]
814 int const PumpCurveNum, // - Pump curve to use when calling the curve manager for psi = f(phi)
815 Real64 const PumpSpeed, // - Pump rotational speed, [rps] (revs per second)
816 Real64 const PumpImpellerDia, // - Nominal pump impeller diameter [m]
817 Real64 const MinPhi, // - Minimum allowable value of phi, requested by the pump manager from curve mgr
818 Real64 const MaxPhi // - Maximum allowable value of phi, requested by the pump manager from curve mgr
819)
820{
821
822 // FUNCTION INFORMATION:
823 // AUTHOR Kaustubh Phalak
824 // DATE WRITTEN Feb 2010
825 // MODIFIED na
826 // RE-ENGINEERED na
827
828 // PURPOSE OF THIS FUNCTION:
829 // To provide a means to simulate a constant speed pump curve and system curve to
830 // find a more realistic operating point for the plant.
831
832 // METHODOLOGY EMPLOYED:
833 // Pressure drop of complete loop is found for a particular flow rate.
834 // i.e. pressuredrop = K * massflow ^ 2
835 // System curve is then solved with pump curve already entered
836 // and flow rate provided by the pump will be calculated.
837 // This routine does not trap for errors if a pressure simulation is not to be performed.
838 // Calling routine should only call this if needed.
839
840 // Using/Aliasing
841 using Curve::CurveValue;
842
843 // Return value
844 Real64 ResolvedLoopMassFlowRate;
845
846 // FUNCTION PARAMETER DEFINITIONS:
847 static constexpr std::string_view RoutineName("ResolvedLoopMassFlowRate: ");
848 int constexpr MaxIters(100);
849 Real64 constexpr PressureConvergeCriteria(0.1); // Pa
850 Real64 constexpr ZeroTolerance(0.0001);
851
852 // FUNCTION LOCAL VARIABLE DECLARATIONS:
853 Real64 PumpPressureRise;
854 Real64 NodeTemperature;
855 Real64 NodeDensity;
856 Real64 SystemPressureDrop;
857 Real64 PhiPump;
858 Real64 PhiSystem;
859 Real64 PsiPump;
860 int Iteration;
861 Real64 LocalSystemMassFlow;
862 Real64 LoopEffectiveK;
863 bool Converged;
864 Array1D<Real64> MassFlowIterativeHistory(3);
865 Real64 MdotDeltaLatest;
866 Real64 MdotDeltaPrevious;
867 Real64 DampingFactor;
868

Callers 2

SetupPumpMinMaxFlowsFunction · 0.85
GetRequiredMassFlowRateFunction · 0.85

Calls 5

ShowWarningErrorFunction · 0.85
ShowContinueErrorFunction · 0.85
formatFunction · 0.85
CurveValueFunction · 0.85
getDensityMethod · 0.45

Tested by

no test coverage detected