Class MembraneSeparator

All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, SimulationInterface, NamedInterface

public class MembraneSeparator extends ProcessEquipmentBaseClass
Simple membrane separation unit with one inlet stream and two outlet streams (retentate and permeate). Each component can be assigned a permeate fraction representing the fraction of that component transported to the permeate side.
Author:
esol
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • logger

      private static final org.apache.logging.log4j.Logger logger
    • inletStream

      private StreamInterface inletStream
    • permeateStream

      private StreamInterface permeateStream
    • retentateStream

      private StreamInterface retentateStream
    • permeateFractions

      private final Map<String,Double> permeateFractions
    • permeabilities

      private final Map<String,Double> permeabilities
    • defaultPermeateFraction

      private double defaultPermeateFraction
    • membraneArea

      private double membraneArea
  • Constructor Details

    • MembraneSeparator

      public MembraneSeparator(String name)

      Constructor for MembraneSeparator.

      Parameters:
      name - a String object
    • MembraneSeparator

      public MembraneSeparator(String name, StreamInterface inletStream)

      Constructor for MembraneSeparator.

      Parameters:
      name - a String object
      inletStream - a StreamInterface object
  • Method Details

    • setInletStream

      public void setInletStream(StreamInterface inletStream)

      Setter for the field inletStream.

      Parameters:
      inletStream - a StreamInterface object
    • getPermeateStream

      public StreamInterface getPermeateStream()

      Getter for the field permeateStream.

      Returns:
      a StreamInterface object
    • getRetentateStream

      public StreamInterface getRetentateStream()

      Getter for the field retentateStream.

      Returns:
      a StreamInterface object
    • setMembraneArea

      public void setMembraneArea(double area)
      Set membrane area used for permeability calculations.
      Parameters:
      area - membrane area in m^2
    • setPermeability

      public void setPermeability(String component, double permeability)
      Specify permeability coefficient for a component.
      Parameters:
      component - component name
      permeability - permeability in mol/(m2*s*Pa)
    • clearPermeateFractions

      public void clearPermeateFractions()
      Remove any permeate fractions set previously.
    • setDefaultPermeateFraction

      public void setDefaultPermeateFraction(double fraction)
      Set a global permeate fraction used for all components not explicitly set.
      Parameters:
      fraction - permeate fraction (0-1)
    • setPermeateFraction

      public void setPermeateFraction(String component, double fraction)
      Specify permeate fraction for a component.
      Parameters:
      component - component name
      fraction - permeate fraction (0-1)
    • needRecalculation

      public boolean needRecalculation()

      Check if process equipment needs recalculating.

      Returns:
      true or false
    • run

      public void run(UUID id)

      In this method all thermodynamic and unit operations will be calculated in a steady state calculation.

      Parameters:
      id - UUID
    • runTransient

      public void runTransient(double dt, UUID id)

      runTransient

      This method calculates thermodynamic and unit operations using difference equations if available and calculateSteadyState is true. Use setCalculateSteadyState to set the parameter. Sets calc identifier UUID.
      Parameters:
      dt - Delta time [s]
      id - Calculation identifier
    • getMassBalance

      public double getMassBalance(String unit)

      getMassBalance.

      Specified by:
      getMassBalance in interface ProcessEquipmentInterface
      Overrides:
      getMassBalance in class ProcessEquipmentBaseClass
      Parameters:
      unit - a String object
      Returns:
      a double