Interface MultiStreamHeatExchangerInterface

All Superinterfaces:
NamedInterface, ProcessEquipmentInterface, Runnable, Serializable, SimulationInterface
All Known Implementing Classes:
MultiStreamHeatExchanger, MultiStreamHeatExchanger2

public interface MultiStreamHeatExchangerInterface extends ProcessEquipmentInterface
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 Details

    • addInStream

      void addInStream(StreamInterface inStream)
      Adds an inlet stream to the heat exchanger.
      Parameters:
      inStream - Input stream to be added
    • setFeedStream

      void setFeedStream(int index, StreamInterface inStream)
      Sets the feed stream at a specific index.
      Parameters:
      index - Index of the stream to set
      inStream - Input stream to set at the specified index
      Throws:
      IndexOutOfBoundsException - if the index is out of range
    • getOutStream

      StreamInterface getOutStream(int index)
      Retrieves the output stream at the specified index.
      Parameters:
      index - Index of the output stream
      Returns:
      The output StreamInterface at the given index
      Throws:
      IndexOutOfBoundsException - if the index is out of range
    • getInStream

      StreamInterface getInStream(int index)
      Retrieves the input stream at the specified index.
      Parameters:
      index - Index of the input stream
      Returns:
      The input StreamInterface at 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 Units
      Cr - 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

      double getMassBalance(String unit)

      getMassBalance.

      Specified by:
      getMassBalance in interface ProcessEquipmentInterface
      Parameters:
      unit - a String object
      Returns:
      a double
    • getEntropyProduction

      double getEntropyProduction(String unit)

      getEntropyProduction.

      Specified by:
      getEntropyProduction in interface ProcessEquipmentInterface
      Parameters:
      unit - a String object
      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

      void setFlowArrangement(String flowArrangement)
      Sets the flow arrangement of the heat exchanger.
      Parameters:
      flowArrangement - Name of the flow arrangement
    • runConditionAnalysis

      void runConditionAnalysis(ProcessEquipmentInterface refExchanger)

      runConditionAnalysis.

      Runs a condition analysis by comparing the current heat exchanger with a reference exchanger.

      Specified by:
      runConditionAnalysis in interface ProcessEquipmentInterface
      Parameters:
      refExchanger - a ProcessEquipmentInterface object
    • 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

      void setGuessOutTemperature(double guessOutTemperature, String unit)
      Sets the guessed outlet temperature with a specified unit.
      Parameters:
      guessOutTemperature - Guessed outlet temperature
      unit - 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:
      toJson in interface ProcessEquipmentInterface
      Returns:
      json string.
    • toJson

      default String toJson(ReportConfig cfg)
      Serializes the Process Equipment with configurable level of detail.
      Specified by:
      toJson in interface ProcessEquipmentInterface
      Parameters:
      cfg - report configuration
      Returns:
      json string