Interface MultiStreamHeatExchangerInterface
- All Superinterfaces:
NamedInterface, ProcessEquipmentInterface, Runnable, Serializable, SimulationInterface
- All Known Implementing Classes:
MultiStreamHeatExchanger, MultiStreamHeatExchanger2
MultiStreamHeatExchangerInterface interface.
Defines the contract for a multi-stream heat exchanger, enabling the simulation and management of
multiple input and output streams. This interface extends the
ProcessEquipmentInterface to integrate with the broader NeqSim
process simulation framework.
Implementations of this interface should handle the addition and management of multiple streams, perform energy and mass balance calculations, and provide methods to analyze the performance and condition of the heat exchanger.
- Version:
- 1.0
- Author:
- esol
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddInStream(StreamInterface inStream) Adds an inlet stream to the heat exchanger.doublecalcThermalEffectiveness(double NTU, double Cr) Calculates the thermal effectiveness based on the Number of Transfer Units (NTU) and the capacity ratio (Cr).doubleRetrieves the fixed temperature difference (ΔT) used in calculations.doublegetDuty()Retrieves the duty (heat transfer) of the heat exchanger.doublegetEntropyProduction(String unit) getEntropyProduction.Retrieves the flow arrangement of the heat exchanger.doubleRetrieves the guessed outlet temperature used during initialization.doubleRetrieves the hot and cold duty balance of the heat exchanger.getInStream(int index) Retrieves the input stream at the specified index.doublegetInTemperature(int index) Gets the inlet temperature of a specific input stream.doublegetMassBalance(String unit) getMassBalance.getOutStream(int index) Retrieves the output stream at the specified index.doublegetOutTemperature(int index) Gets the outlet temperature of a specific output stream.doubleGets the thermal effectiveness of the heat exchanger.doubleRetrieves the overall heat transfer coefficient times area (UA value).voidRuns a condition analysis using the current heat exchanger as the reference.voidrunConditionAnalysis(ProcessEquipmentInterface refExchanger) runConditionAnalysis.voidsetDeltaT(double deltaT) Sets the fixed temperature difference (ΔT) for calculations and enables its usage.voidsetdT(double dT) Sets the temperature difference (ΔT) for the heat exchanger calculations.voidsetFeedStream(int index, StreamInterface inStream) Sets the feed stream at a specific index.voidsetFlowArrangement(String flowArrangement) Sets the flow arrangement of the heat exchanger.voidsetGuessOutTemperature(double guessOutTemperature) Sets the guessed outlet temperature in Kelvin.voidsetGuessOutTemperature(double guessOutTemperature, String unit) Sets the guessed outlet temperature with a specified unit.voidsetHotColdDutyBalance(double hotColdDutyBalance) Sets the hot and cold duty balance of the heat exchanger.voidsetOutTemperature(double temperature) Sets the outlet temperature for the heat exchanger.voidsetThermalEffectiveness(double thermalEffectiveness) Sets the thermal effectiveness of the heat exchanger.voidsetUAvalue(double UAvalue) Sets the overall heat transfer coefficient times area (UA value).voidsetUseDeltaT(boolean useDeltaT) Enables or disables the use of a fixed temperature difference (ΔT) in calculations.toJson()Serializes the Process Equipment along with its state to a JSON string.default StringtoJson(ReportConfig cfg) Serializes the Process Equipment with configurable level of detail.Methods inherited from interface NamedInterface
getName, getTagName, setName, setTagNameMethods inherited from interface ProcessEquipmentInterface
displayResult, equals, getCapacityDuty, getCapacityMax, getConditionAnalysisMessage, getController, getExergyChange, getExergyChange, getFluid, getMassBalance, getMechanicalDesign, getPressure, getPressure, getReport_json, getRestCapacity, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, hashCode, initMechanicalDesign, needRecalculation, reportResults, setController, setPressure, setRegulatorOutSignal, setSpecification, setTemperature, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run, run_step, run_step, runTransient, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime, solved
-
Method Details
-
addInStream
Adds an inlet stream to the heat exchanger.- Parameters:
inStream- Input stream to be added
-
setFeedStream
Sets the feed stream at a specific index.- Parameters:
index- Index of the stream to setinStream- Input stream to set at the specified index- Throws:
IndexOutOfBoundsException- if the index is out of range
-
getOutStream
Retrieves the output stream at the specified index.- Parameters:
index- Index of the output stream- Returns:
- The output
StreamInterfaceat the given index - Throws:
IndexOutOfBoundsException- if the index is out of range
-
getInStream
Retrieves the input stream at the specified index.- Parameters:
index- Index of the input stream- Returns:
- The input
StreamInterfaceat the given index - Throws:
IndexOutOfBoundsException- if the index is out of range
-
setOutTemperature
void setOutTemperature(double temperature) Sets the outlet temperature for the heat exchanger.- Parameters:
temperature- Desired outlet temperature
-
getOutTemperature
double getOutTemperature(int index) Gets the outlet temperature of a specific output stream.- Parameters:
index- Index of the output stream- Returns:
- Outlet temperature in Kelvin
-
getInTemperature
double getInTemperature(int index) Gets the inlet temperature of a specific input stream.- Parameters:
index- Index of the input stream- Returns:
- Inlet temperature in Kelvin
-
setdT
void setdT(double dT) Sets the temperature difference (ΔT) for the heat exchanger calculations.- Parameters:
dT- Temperature difference to set
-
setUseDeltaT
void setUseDeltaT(boolean useDeltaT) Enables or disables the use of a fixed temperature difference (ΔT) in calculations.- Parameters:
useDeltaT- True to use ΔT, false otherwise
-
setDeltaT
void setDeltaT(double deltaT) Sets the fixed temperature difference (ΔT) for calculations and enables its usage.- Parameters:
deltaT- Fixed temperature difference to set
-
getDeltaT
double getDeltaT()Retrieves the fixed temperature difference (ΔT) used in calculations.- Returns:
- Temperature difference ΔT
-
getThermalEffectiveness
double getThermalEffectiveness()Gets the thermal effectiveness of the heat exchanger.- Returns:
- Thermal effectiveness
-
setThermalEffectiveness
void setThermalEffectiveness(double thermalEffectiveness) Sets the thermal effectiveness of the heat exchanger.- Parameters:
thermalEffectiveness- Thermal effectiveness to set
-
calcThermalEffectiveness
double calcThermalEffectiveness(double NTU, double Cr) Calculates the thermal effectiveness based on the Number of Transfer Units (NTU) and the capacity ratio (Cr).- Parameters:
NTU- Number of Transfer UnitsCr- Capacity ratio (Cmin/Cmax)- Returns:
- Calculated thermal effectiveness
-
getUAvalue
double getUAvalue()Retrieves the overall heat transfer coefficient times area (UA value).- Returns:
- UA value
-
setUAvalue
void setUAvalue(double UAvalue) Sets the overall heat transfer coefficient times area (UA value).- Parameters:
UAvalue- UA value to set
-
getHotColdDutyBalance
double getHotColdDutyBalance()Retrieves the hot and cold duty balance of the heat exchanger.- Returns:
- Hot and cold duty balance
-
setHotColdDutyBalance
void setHotColdDutyBalance(double hotColdDutyBalance) Sets the hot and cold duty balance of the heat exchanger.- Parameters:
hotColdDutyBalance- Hot and cold duty balance to set
-
getDuty
double getDuty()Retrieves the duty (heat transfer) of the heat exchanger.- Returns:
- Duty in appropriate units
-
getMassBalance
getMassBalance.
- Specified by:
getMassBalancein interfaceProcessEquipmentInterface- Parameters:
unit- aStringobject- Returns:
- a double
-
getEntropyProduction
getEntropyProduction.
- Specified by:
getEntropyProductionin interfaceProcessEquipmentInterface- Parameters:
unit- aStringobject- Returns:
- a double
-
getFlowArrangement
String getFlowArrangement()Retrieves the flow arrangement of the heat exchanger.- Returns:
- Flow arrangement as a String (e.g., "counterflow", "parallelflow")
-
setFlowArrangement
Sets the flow arrangement of the heat exchanger.- Parameters:
flowArrangement- Name of the flow arrangement
-
runConditionAnalysis
runConditionAnalysis.
Runs a condition analysis by comparing the current heat exchanger with a reference exchanger.
- Specified by:
runConditionAnalysisin interfaceProcessEquipmentInterface- Parameters:
refExchanger- aProcessEquipmentInterfaceobject
-
runConditionAnalysis
void runConditionAnalysis()Runs a condition analysis using the current heat exchanger as the reference. -
getGuessOutTemperature
double getGuessOutTemperature()Retrieves the guessed outlet temperature used during initialization.- Returns:
- Guessed outlet temperature
-
setGuessOutTemperature
void setGuessOutTemperature(double guessOutTemperature) Sets the guessed outlet temperature in Kelvin.- Parameters:
guessOutTemperature- Guessed outlet temperature
-
setGuessOutTemperature
Sets the guessed outlet temperature with a specified unit.- Parameters:
guessOutTemperature- Guessed outlet temperatureunit- Unit of the temperature (e.g., "K", "C")
-
toJson
String toJson()Serializes the Process Equipment along with its state to a JSON string.
- Specified by:
toJsonin interfaceProcessEquipmentInterface- Returns:
- json string.
-
toJson
Serializes the Process Equipment with configurable level of detail.- Specified by:
toJsonin interfaceProcessEquipmentInterface- Parameters:
cfg- report configuration- Returns:
- json string
-