Class PinchAnalysis
java.lang.Object
neqsim.process.equipment.heatexchanger.heatintegration.PinchAnalysis
- All Implemented Interfaces:
Serializable
Pinch analysis engine for heat integration of process streams.
Performs classical pinch analysis (Linnhoff method) to determine minimum heating and cooling utility requirements, the pinch temperature, and composite curves for a set of hot and cold process streams.
Algorithm
- Collect all unique temperatures from hot and cold streams
- Shift cold stream temperatures up by deltaT_min (minimum approach)
- Create temperature intervals and compute heat balances
- Cascade heat surplus/deficit to find pinch point and utility targets
Usage Example
PinchAnalysis pinch = new PinchAnalysis(10.0);
pinch.addHotStream("H1", 180, 80, 30);
pinch.addHotStream("H2", 150, 50, 15);
pinch.addColdStream("C1", 30, 140, 20);
pinch.addColdStream("C2", 60, 120, 25);
pinch.run();
double Qh = pinch.getMinimumHeatingUtility();
double Qc = pinch.getMinimumCoolingUtility();
double Tpinch = pinch.getPinchTemperatureC();
Integration with ProcessSystem
// Auto-extract heating/cooling duties from a process PinchAnalysis pinch = PinchAnalysis.fromProcessSystem(process, 10.0); pinch.run(); // Or add streams from a MultiStreamHeatExchanger2 PinchAnalysis pinch2 = new PinchAnalysis(10.0); pinch2.addStreamsFromHeatExchanger(multiStreamHX); pinch2.run();
- Version:
- 1.0
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double[]private double[]private List<HeatStream> private doubleprivate double[]private double[]private booleanprivate double[]private double[]private List<HeatStream> private static final org.apache.logging.log4j.LoggerLogger instance.private doubleprivate doubleprivate doubleprivate doubleprivate static final longSerialization version UID. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColdStream(String name, double supplyTemp_C, double targetTemp_C, double mCp) Add a cold stream (needs heating).voidaddHotStream(String name, double supplyTemp_C, double targetTemp_C, double mCp) Add a hot stream (needs cooling).voidaddProcessStream(String name, StreamInterface stream, double outletTemperature_C) Add a process stream by extracting its inlet and outlet temperatures and computing the average heat capacity flow rate (MCp = duty / deltaT).voidaddStream(HeatStream stream) Add a HeatStream object directly.voidaddStreamsFromHeatExchanger(HeatExchanger heatExchanger) Add streams from a two-stream HeatExchanger.voidAdd streams from a MultiStreamHeatExchanger2 (or LNGHeatExchanger).private voidBuild hot and cold composite curves for plotting.private double[]buildCompositeEnthalpy(List<HeatStream> streams, double[] tempArray, boolean isCold) Build cumulative enthalpy array for composite curve.private double[]buildCompositeTemperatures(List<HeatStream> streams, boolean isCold) Build sorted temperature array for composite curve.private voidCheck that analysis has been run.static PinchAnalysisfromProcessSystem(ProcessSystem process, double deltaTmin_C) Create a PinchAnalysis from a ProcessSystem by scanning all Heater, Cooler, HeatExchanger, and MultiStreamHeatExchanger2 equipment.Get the cold composite curve data.Get the grand composite curve data.Get the hot composite curve data.doubleGet the maximum heat recovery possible between hot and cold streams.doubleGet minimum cooling utility requirement.doubleGet minimum heating utility requirement.intGet the number of cold streams.intGet the number of hot streams.doubleGet pinch temperature (hot side) in Celsius.doubleGet pinch temperature on the cold side in Kelvin.doubleGet pinch temperature on the hot side in Kelvin.voidrun()Run the pinch analysis calculation.toJson()Get full results as JSON string.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
private static final org.apache.logging.log4j.Logger loggerLogger instance. -
hotStreams
-
coldStreams
-
deltaTmin
private double deltaTmin -
minimumHeatingUtility
private double minimumHeatingUtility -
minimumCoolingUtility
private double minimumCoolingUtility -
pinchTemperatureHot
private double pinchTemperatureHot -
pinchTemperatureCold
private double pinchTemperatureCold -
hasRun
private boolean hasRun -
hotCompositeQ
private double[] hotCompositeQ -
hotCompositeT
private double[] hotCompositeT -
coldCompositeQ
private double[] coldCompositeQ -
coldCompositeT
private double[] coldCompositeT -
grandCompositeQ
private double[] grandCompositeQ -
grandCompositeT
private double[] grandCompositeT
-
-
Constructor Details
-
PinchAnalysis
public PinchAnalysis(double deltaTmin_C) Constructor for PinchAnalysis.- Parameters:
deltaTmin_C- minimum approach temperature in Celsius (or K since it is a difference)
-
-
Method Details
-
addHotStream
Add a hot stream (needs cooling).- Parameters:
name- stream namesupplyTemp_C- supply temperature in CelsiustargetTemp_C- target temperature in CelsiusmCp- heat capacity flow rate in kW/K
-
addColdStream
Add a cold stream (needs heating).- Parameters:
name- stream namesupplyTemp_C- supply temperature in CelsiustargetTemp_C- target temperature in CelsiusmCp- heat capacity flow rate in kW/K
-
addStream
Add a HeatStream object directly.- Parameters:
stream- the heat stream to add
-
addProcessStream
Add a process stream by extracting its inlet and outlet temperatures and computing the average heat capacity flow rate (MCp = duty / deltaT). The stream must have been run so that its fluid properties are available.The stream is classified as hot (needs cooling) or cold (needs heating) based on whether the inlet temperature is higher or lower than the specified target temperature.
- Parameters:
name- display name for this stream in the pinch analysisstream- the NeqSim process stream (must have been run)outletTemperature_C- the outlet/target temperature in Celsius
-
addStreamsFromHeatExchanger
Add streams from a two-stream HeatExchanger. The hot side and cold side are extracted from the exchanger's inlet and outlet streams.- Parameters:
heatExchanger- a two-stream HeatExchanger (must have been run)
-
addStreamsFromHeatExchanger
Add streams from a MultiStreamHeatExchanger2 (or LNGHeatExchanger). Each internal stream in the exchanger is added as either a hot or cold stream based on its type classification.- Parameters:
mshe- the multi-stream heat exchanger (must have been run)
-
fromProcessSystem
Create a PinchAnalysis from a ProcessSystem by scanning all Heater, Cooler, HeatExchanger, and MultiStreamHeatExchanger2 equipment. Each utility (heater/cooler) is added as a stream representing the process-side heating or cooling requirement.The ProcessSystem must have been run before calling this method so that all stream temperatures and duties are available.
- Parameters:
process- the ProcessSystem to scan (must have been run)deltaTmin_C- minimum approach temperature in Celsius- Returns:
- a new PinchAnalysis populated with streams from the process
-
run
public void run()Run the pinch analysis calculation. -
buildCompositeCurves
private void buildCompositeCurves()Build hot and cold composite curves for plotting. -
buildCompositeTemperatures
Build sorted temperature array for composite curve.- Parameters:
streams- list of streamsisCold- true if cold streams- Returns:
- sorted temperature array in Kelvin (descending)
-
buildCompositeEnthalpy
private double[] buildCompositeEnthalpy(List<HeatStream> streams, double[] tempArray, boolean isCold) Build cumulative enthalpy array for composite curve.- Parameters:
streams- list of streamstempArray- sorted temperature array (descending)isCold- true if cold streams- Returns:
- cumulative enthalpy array in kW
-
getMinimumHeatingUtility
public double getMinimumHeatingUtility()Get minimum heating utility requirement.- Returns:
- minimum hot utility in kW
-
getMinimumCoolingUtility
public double getMinimumCoolingUtility()Get minimum cooling utility requirement.- Returns:
- minimum cold utility in kW
-
getMaximumHeatRecovery
public double getMaximumHeatRecovery()Get the maximum heat recovery possible between hot and cold streams.- Returns:
- maximum heat recovery in kW
-
getPinchTemperatureHot
public double getPinchTemperatureHot()Get pinch temperature on the hot side in Kelvin.- Returns:
- hot-side pinch temperature in Kelvin
-
getPinchTemperatureCold
public double getPinchTemperatureCold()Get pinch temperature on the cold side in Kelvin.- Returns:
- cold-side pinch temperature in Kelvin
-
getPinchTemperatureC
public double getPinchTemperatureC()Get pinch temperature (hot side) in Celsius.- Returns:
- hot-side pinch temperature in Celsius
-
getHotCompositeCurve
-
getColdCompositeCurve
-
getGrandCompositeCurve
-
getNumberOfHotStreams
public int getNumberOfHotStreams()Get the number of hot streams.- Returns:
- number of hot streams
-
getNumberOfColdStreams
public int getNumberOfColdStreams()Get the number of cold streams.- Returns:
- number of cold streams
-
toJson
Get full results as JSON string.- Returns:
- JSON representation of pinch analysis results
-
checkHasRun
private void checkHasRun()Check that analysis has been run.- Throws:
IllegalStateException- if run() has not been called
-