Class ProcessEquipmentBaseClass

java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, SimulationInterface, NamedInterface
Direct Known Subclasses:
Adjuster, BatteryStorage, Calculator, CO2Electrolyzer, ComponentSplitter, DexpiProcessUnit, DexpiProcessUnit, DistillationColumn, Ejector, Electrolyzer, FlareStack, FuelGasSystem, FurnaceBurner, LoopedPipeNetwork, Manifold, MembraneSeparator, Mixer, PipeFlowNetwork, PLEM, ProducedWaterTreatmentTrain, Recycle, ReservoirCVDsim, ReservoirDiffLibsim, ReservoirTPsim, Separator, SetPoint, Setter, SimpleAdsorber, SimpleReservoir, SolarPanel, Splitter, Stream, SubseaManifold, Tank, TwoPortEquipment, Umbilical, UtilityAirSystem, VesselDepressurization, VirtualStream, WellFlowlineNetwork, WellSystem, WindTurbine

public abstract class ProcessEquipmentBaseClass extends SimulationBaseClass implements ProcessEquipmentInterface

Abstract ProcessEquipmentBaseClass class.

Version:
$Id: $Id
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • controller

      private ControllerDeviceInterface controller
    • flowValveController

      ControllerDeviceInterface flowValveController
    • hasController

      public boolean hasController
    • specification

      private String specification
    • report

      public String[][] report
    • properties

      public HashMap<String,String> properties
    • energyStream

      public EnergyStream energyStream
    • isSetEnergyStream

      private boolean isSetEnergyStream
    • isSolved

      protected boolean isSolved
    • isActive

      private boolean isActive
    • minimumFlow

      private double minimumFlow
    • capacityAnalysisEnabled

      private boolean capacityAnalysisEnabled
      Flag to enable/disable capacity analysis for this equipment. When disabled, this equipment is excluded from bottleneck detection, capacity utilization summaries, and optimization routines.
    • failureMode

      private EquipmentFailureMode failureMode
      Current failure mode of the equipment. Null means equipment is operating normally.
    • isFailed

      private boolean isFailed
      Flag indicating if the equipment is in a failed state.
    • conditionAnalysisMessage

      public String conditionAnalysisMessage
  • Constructor Details

    • ProcessEquipmentBaseClass

      public ProcessEquipmentBaseClass(String name)

      Constructor for ProcessEquipmentBaseClass.

      Parameters:
      name - a String object
  • Method Details

    • getThermoSystem

      public SystemInterface getThermoSystem()

      getThermoSystem.

      Specified by:
      getThermoSystem in interface ProcessEquipmentInterface
      Returns:
      a SystemInterface object
    • displayResult

      public void displayResult()

      displayResult.

      Specified by:
      displayResult in interface ProcessEquipmentInterface
    • copy

      Create deep copy.
      Returns:
      a deep copy of the unit operation/process equipment
    • getProperty

      public Object getProperty(String propertyName)

      getProperty.

      Parameters:
      propertyName - a String object
      Returns:
      a Object object
    • setRegulatorOutSignal

      public void setRegulatorOutSignal(double signal)

      setRegulatorOutSignal.

      Specified by:
      setRegulatorOutSignal in interface ProcessEquipmentInterface
      Parameters:
      signal - a double
    • setController

      public void setController(ControllerDeviceInterface controller)

      setController.

      Specified by:
      setController in interface ProcessEquipmentInterface
      Parameters:
      controller - a ControllerDeviceInterface object
    • setFlowValveController

      public void setFlowValveController(ControllerDeviceInterface controller)

      Setter for the field flowValveController.

      Parameters:
      controller - a ControllerDeviceInterface object
    • getController

      public ControllerDeviceInterface getController()

      getController.

      Specified by:
      getController in interface ProcessEquipmentInterface
      Returns:
      a ControllerDeviceInterface object
    • getMechanicalDesign

      public MechanicalDesign getMechanicalDesign()

      Get a mechanicalDesign for the equipment.

      Specified by:
      getMechanicalDesign in interface ProcessEquipmentInterface
      Returns:
      a MechanicalDesign object
    • initMechanicalDesign

      public void initMechanicalDesign()

      Initialize a initMechanicalDesign for the equipment.

      Specified by:
      initMechanicalDesign in interface ProcessEquipmentInterface
    • getSpecification

      public String getSpecification()

      getSpecification.

      Specified by:
      getSpecification in interface ProcessEquipmentInterface
      Returns:
      a String object
    • setSpecification

      public void setSpecification(String specification)

      setSpecification.

      Specified by:
      setSpecification in interface ProcessEquipmentInterface
      Parameters:
      specification - a String object
    • reportResults

      public String[][] reportResults()

      reportResults.

      Specified by:
      reportResults in interface ProcessEquipmentInterface
      Returns:
      an array of String objects
    • solved

      public boolean solved()

      Returns whether or not the module has been solved.

      Specified by:
      solved in interface SimulationInterface
      Returns:
      a boolean
    • getEnergyStream

      public EnergyStream getEnergyStream()

      Getter for the field energyStream.

      Returns:
      a EnergyStream object
    • setEnergyStream

      public void setEnergyStream(EnergyStream energyStream)

      Setter for the field energyStream.

      Parameters:
      energyStream - a EnergyStream object
    • setEnergyStream

      public void setEnergyStream(boolean isSetEnergyStream)

      Setter for the field energyStream.

      Parameters:
      isSetEnergyStream - a boolean
    • isSetEnergyStream

      public boolean isSetEnergyStream()

      isSetEnergyStream.

      Returns:
      a boolean
    • getPressure

      public double getPressure()

      Getter for the field pressure.

      Specified by:
      getPressure in interface ProcessEquipmentInterface
      Returns:
      Pressure in bara
    • getPressure

      public double getPressure(String unit)

      Getter for the field pressure converted to specified unit.

      Specified by:
      getPressure in interface ProcessEquipmentInterface
      Parameters:
      unit - a String object
      Returns:
      a double
    • setPressure

      public void setPressure(double pressure)

      Setter for the field pressure.

      Specified by:
      setPressure in interface ProcessEquipmentInterface
      Parameters:
      pressure - a double
    • getTemperature

      public double getTemperature()

      Getter for the field temperature.

      Specified by:
      getTemperature in interface ProcessEquipmentInterface
      Returns:
      a double
    • getTemperature

      public double getTemperature(String unit)

      Getter for the field temperature converted to specified unit.

      Specified by:
      getTemperature in interface ProcessEquipmentInterface
      Parameters:
      unit - a String object
      Returns:
      a double
    • setTemperature

      public void setTemperature(double temperature)

      Setter for the field temperature.

      Specified by:
      setTemperature in interface ProcessEquipmentInterface
      Parameters:
      temperature - Temperature in Kelvin
    • getEntropyProduction

      public double getEntropyProduction(String unit)

      getEntropyProduction.

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

      public double getMassBalance(String unit)

      getMassBalance.

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

      public double getMassBalance()

      getMassBalance in kg/sec.

      Specified by:
      getMassBalance in interface ProcessEquipmentInterface
      Returns:
      The mass balance of the process equipment in kg/sec.
    • getExergyChange

      public double getExergyChange(String unit, double surroundingTemperature)
      Get exergy change production of the process equipment.
      Specified by:
      getExergyChange in interface ProcessEquipmentInterface
      Parameters:
      unit - Supported units are J and kJ
      surroundingTemperature - The surrounding temperature in Kelvin
      Returns:
      change in exergy in specified unit
    • runConditionAnalysis

      public void runConditionAnalysis(ProcessEquipmentInterface refExchanger)

      runConditionAnalysis.

      Specified by:
      runConditionAnalysis in interface ProcessEquipmentInterface
      Parameters:
      refExchanger - a ProcessEquipmentInterface object
    • getConditionAnalysisMessage

      public String getConditionAnalysisMessage()

      getConditionAnalysisMessage.

      Specified by:
      getConditionAnalysisMessage in interface ProcessEquipmentInterface
      Returns:
      a String object
    • getResultTable

      public String[][] getResultTable()

      getResultTable.

      Specified by:
      getResultTable in interface ProcessEquipmentInterface
      Returns:
      an array of String objects
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface ProcessEquipmentInterface
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface ProcessEquipmentInterface
      Overrides:
      equals in class Object
    • toJson

      public String toJson()

      Serializes the Process Equipment along with its state to a JSON string.

      Specified by:
      toJson in interface ProcessEquipmentInterface
      Returns:
      json string.
    • toJson

      public 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
    • getReport_json

      public String getReport_json()

      getReport_json.

      Return results of simulation in json format
      Specified by:
      getReport_json in interface ProcessEquipmentInterface
      Specified by:
      getReport_json in interface SimulationInterface
      Returns:
      a String
    • run_step

      public void run_step(UUID id)

      run_step

      In this method all thermodynamic and unit operations will be calculated in a steady state calculation. Sets calc identifier UUID. It does not solve recycles - only calculates one step
      Specified by:
      run_step in interface SimulationInterface
      Parameters:
      id - Calc identifier UUID to set.
    • getMinimumFlow

      public double getMinimumFlow()

      Getter for the field minimumFlow, e.g., the minimum flow rate for the pump.

      Returns:
      a double
    • setMinimumFlow

      public void setMinimumFlow(double minimumFlow)

      Setter for the field minimumFlow, e.g., the minimum flow rate for the pump.

      Parameters:
      minimumFlow - a double
    • isActive

      public boolean isActive()

      Getter for the field isActive.

      Returns:
      a boolean
    • isActive

      public void isActive(boolean isActive)

      Setter for the field isActive.

      Parameters:
      isActive - a boolean
    • isCapacityAnalysisEnabled

      public boolean isCapacityAnalysisEnabled()
      Checks if capacity analysis is enabled for this equipment.

      When disabled, this equipment is excluded from bottleneck detection, capacity utilization summaries, and optimization routines. The equipment still tracks its constraints but doesn't contribute to system-level analysis.

      Returns:
      true if capacity analysis is enabled (default is true)
    • setCapacityAnalysisEnabled

      public void setCapacityAnalysisEnabled(boolean enabled)
      Enables or disables capacity analysis for this equipment.

      When disabled, this equipment is excluded from:

      • System bottleneck detection (ProcessSystem.findBottleneck())
      • Capacity utilization summaries (ProcessSystem.getCapacityUtilizationSummary())
      • Equipment near capacity lists (ProcessSystem.getEquipmentNearCapacityLimit())
      • Optimization constraint checking

      The equipment still calculates and tracks its constraints internally.

      Parameters:
      enabled - true to include in capacity analysis, false to exclude
    • getFailureMode

      public EquipmentFailureMode getFailureMode()
      Gets the current failure mode of the equipment.
      Returns:
      the failure mode, or null if equipment is operating normally
    • setFailureMode

      public void setFailureMode(EquipmentFailureMode failureMode)
      Sets a failure mode on the equipment.

      When a failure mode is set, the equipment is marked as failed and its behavior changes according to the failure mode characteristics (capacity factor, etc.). Setting null clears the failure.

      Parameters:
      failureMode - the failure mode to apply, or null to clear failure
    • isFailed

      public boolean isFailed()
      Checks if the equipment is in a failed state.
      Returns:
      true if the equipment has a failure mode set
    • simulateTrip

      public void simulateTrip()
      Simulates a trip (complete failure) on the equipment.

      Convenience method that applies a standard trip failure mode. The equipment becomes inactive and is excluded from capacity analysis.

    • simulateDegradedOperation

      public void simulateDegradedOperation(double capacityPercent)
      Simulates degraded operation at a specified capacity.
      Parameters:
      capacityPercent - remaining capacity percentage (0-100)
    • restoreFromFailure

      public void restoreFromFailure()
      Restores the equipment from a failed state.

      Clears any failure mode and restores the equipment to normal operation.

    • getEffectiveCapacityFactor

      public double getEffectiveCapacityFactor()
      Gets the effective capacity factor considering any failure mode.
      Returns:
      capacity factor (0.0 to 1.0), where 1.0 is full capacity